Skip to content

Commit

Permalink
ide辅助提示
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Mar 13, 2021
1 parent c8ca63f commit 9b8ff09
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/CoroutineSingleTon.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ trait CoroutineSingleTon
{
private static $instance = [];

static function getInstance(...$args)
/**
* @param mixed ...$args
* @return static
*/
public static function getInstance(...$args)
{
$cid = Coroutine::getCid();
if(!isset(static::$instance[$cid])){
Expand Down
4 changes: 3 additions & 1 deletion src/Process/ProcessHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
namespace EasySwoole\Component\Process;


use Swoole\Server;

class ProcessHelper
{
static function register(\swoole_server $server,AbstractProcess $process):bool
static function register(Server $server,AbstractProcess $process):bool
{
return $server->addProcess($process->getProcess());
}
Expand Down
4 changes: 4 additions & 0 deletions src/Singleton.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ trait Singleton
{
private static $instance;

/**
* @param mixed ...$args
* @return static
*/
static function getInstance(...$args)
{
if(!isset(static::$instance)){
Expand Down

0 comments on commit 9b8ff09

Please sign in to comment.