File tree 3 files changed +12
-2
lines changed
3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ trait CoroutineSingleTon
10
10
{
11
11
private static $ instance = [];
12
12
13
- static function getInstance (...$ args )
13
+ /**
14
+ * @param mixed ...$args
15
+ * @return static
16
+ */
17
+ public static function getInstance (...$ args )
14
18
{
15
19
$ cid = Coroutine::getCid ();
16
20
if (!isset (static ::$ instance [$ cid ])){
Original file line number Diff line number Diff line change 9
9
namespace EasySwoole \Component \Process ;
10
10
11
11
12
+ use Swoole \Server ;
13
+
12
14
class ProcessHelper
13
15
{
14
- static function register (\ swoole_server $ server ,AbstractProcess $ process ):bool
16
+ static function register (Server $ server ,AbstractProcess $ process ):bool
15
17
{
16
18
return $ server ->addProcess ($ process ->getProcess ());
17
19
}
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ trait Singleton
13
13
{
14
14
private static $ instance ;
15
15
16
+ /**
17
+ * @param mixed ...$args
18
+ * @return static
19
+ */
16
20
static function getInstance (...$ args )
17
21
{
18
22
if (!isset (static ::$ instance )){
You can’t perform that action at this time.
0 commit comments