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
02514b60
Commit
02514b60
authored
Feb 21, 2023
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复trait中的方法的作用域
parent
1504057b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
CallBackHelper.php
src/Helper/CallBackHelper.php
+5
-5
QueryPath.php
src/Helper/QueryPath.php
+4
-1
No files found.
src/Helper/CallBackHelper.php
View file @
02514b60
...
...
@@ -29,7 +29,7 @@ trait CallBackHelper
/**
* @param mixed $lastResult
*/
p
ublic
function
setLastResult
(
$lastResult
)
:
void
p
rotected
function
setLastResult
(
$lastResult
)
:
void
{
$this
->
lastResult
=
$lastResult
;
}
...
...
@@ -45,7 +45,7 @@ trait CallBackHelper
/**
* @param SdkException $lastException
*/
p
ublic
function
setLastException
(
SdkException
$lastException
)
:
void
p
rotected
function
setLastException
(
SdkException
$lastException
)
:
void
{
$this
->
lastException
=
$lastException
;
}
...
...
@@ -53,7 +53,7 @@ trait CallBackHelper
/**
* @return Closure
*/
p
ublic
function
defaultSuccessCallBack
()
:
Closure
p
rivate
function
defaultSuccessCallBack
()
:
Closure
{
// 这里使用默认作用域
return
function
()
{
...
...
@@ -64,7 +64,7 @@ trait CallBackHelper
/**
* @return Closure
*/
p
ublic
function
defaultFailedCallBack
()
:
Closure
p
rivate
function
defaultFailedCallBack
()
:
Closure
{
// 这里使用默认作用域
return
function
()
{
...
...
@@ -84,4 +84,4 @@ trait CallBackHelper
}
}
\ No newline at end of file
}
src/Helper/QueryPath.php
View file @
02514b60
...
...
@@ -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
}
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