Commit 9c7d3da5 authored by 谢宇轩's avatar 谢宇轩

fix: 修复baseurl常量的作用域问题

parent 86b883c1
...@@ -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
...@@ -92,7 +92,7 @@ abstract class Option ...@@ -92,7 +92,7 @@ abstract class Option
public function getBaseUrl(): string public function getBaseUrl(): string
{ {
return self::ENDPONIT_HOSTS[$this->getStage()] ?? ""; return static::ENDPONIT_HOSTS[$this->getStage()] ?? "";
} }
/** /**
......
...@@ -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
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment