Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Easy Http SDK
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Back End
Easy Http SDK
Commits
9c7d3da5
Commit
9c7d3da5
authored
Feb 17, 2023
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复baseurl常量的作用域问题
parent
86b883c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
SdkEndpointBuilder.php
src/Generation/SdkEndpointBuilder.php
+2
-2
Option.php
src/Option.php
+1
-1
Endpoint.temp
template/Endpoint.temp
+1
-2
No files found.
src/Generation/SdkEndpointBuilder.php
View file @
9c7d3da5
...
@@ -167,7 +167,7 @@ class SdkEndpointBuilder
...
@@ -167,7 +167,7 @@ class SdkEndpointBuilder
$args
.=
'?array $body = [], '
;
$args
.=
'?array $body = [], '
;
$bodyStr
=
', json_encode($body)'
;
$bodyStr
=
', json_encode($body)'
;
$params
[]
=
[
$params
[]
=
[
"type"
=>
"array|null"
,
"type"
=>
"array
<string, mixed>
|null"
,
"name"
=>
'$body'
,
"name"
=>
'$body'
,
];
];
}
}
...
@@ -207,4 +207,4 @@ class SdkEndpointBuilder
...
@@ -207,4 +207,4 @@ class SdkEndpointBuilder
return
count
(
$this
->
tomlSetting
);
return
count
(
$this
->
tomlSetting
);
}
}
}
}
\ No newline at end of file
src/Option.php
View file @
9c7d3da5
...
@@ -92,7 +92,7 @@ abstract class Option
...
@@ -92,7 +92,7 @@ abstract class Option
public
function
getBaseUrl
()
:
string
public
function
getBaseUrl
()
:
string
{
{
return
s
elf
::
ENDPONIT_HOSTS
[
$this
->
getStage
()]
??
""
;
return
s
tatic
::
ENDPONIT_HOSTS
[
$this
->
getStage
()]
??
""
;
}
}
/**
/**
...
...
template/Endpoint.temp
View file @
9c7d3da5
...
@@ -41,8 +41,7 @@ class {{ Endpoint }}
...
@@ -41,8 +41,7 @@ class {{ Endpoint }}
{% for param in item.Params %}
{% for param in item.Params %}
* @param {{ param.type }} {{ param.name }}
* @param {{ param.type }} {{ param.name }}
{% endfor %}
{% endfor %}
*
* @param Closure|null $catch
* @param Closure|null $catch
* @param Closure|null $then
* @param Closure|null $then
* @return mixed
* @return mixed
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment