Commit 02514b60 authored by 谢宇轩's avatar 谢宇轩

fix: 修复trait中的方法的作用域

parent 1504057b
......@@ -29,7 +29,7 @@ trait CallBackHelper
/**
* @param mixed $lastResult
*/
public function setLastResult($lastResult): void
protected function setLastResult($lastResult): void
{
$this->lastResult = $lastResult;
}
......@@ -45,7 +45,7 @@ trait CallBackHelper
/**
* @param SdkException $lastException
*/
public function setLastException(SdkException $lastException): void
protected function setLastException(SdkException $lastException): void
{
$this->lastException = $lastException;
}
......@@ -53,7 +53,7 @@ trait CallBackHelper
/**
* @return Closure
*/
public function defaultSuccessCallBack(): Closure
private function defaultSuccessCallBack(): Closure
{
// 这里使用默认作用域
return function () {
......@@ -64,7 +64,7 @@ trait CallBackHelper
/**
* @return Closure
*/
public function defaultFailedCallBack(): Closure
private function defaultFailedCallBack(): Closure
{
// 这里使用默认作用域
return function () {
......@@ -84,4 +84,4 @@ trait CallBackHelper
}
}
\ No newline at end of file
}
......@@ -2,6 +2,9 @@
namespace Jiwei\EasyHttpSdk\Helper;
/**
* 用于扩展错误类型
*/
trait QueryPath
{
/** @var string Endpoint */
......@@ -19,4 +22,4 @@ trait QueryPath
{
return $this->endpoint . ":" . $this->action;
}
}
\ No newline at end of file
}
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