-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatting #735
formatting #735
Conversation
@@ -1462,9 +1459,6 @@ protected static function forkOneWorkerForLinux(self $worker) | |||
{ | |||
// Get available worker id. | |||
$id = static::getId($worker->workerId, 0); | |||
if ($id === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because $id
's return type is int. so $id === false
is never equal.
@@ -1373,7 +1370,7 @@ protected static function forkWorkersForWindows() | |||
} | |||
else | |||
{ | |||
static::$globalEvent = new \Workerman\Events\Select(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because there is use
at the top of the file
@@ -1047,7 +1044,7 @@ protected static function formatStatusData($statistics_file) | |||
$total_timers = 0; | |||
$maxLen1 = static::$_maxSocketNameLength; | |||
$maxLen2 = static::$_maxWorkerNameLength; | |||
foreach($info as $key => $value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$key
is not used.
@@ -1003,9 +1002,7 @@ protected static function parseCommand() | |||
\posix_kill($master_pid, $sig); | |||
exit; | |||
default : | |||
if (isset($command)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$command
never is null
. because line 886.
@@ -972,7 +971,7 @@ protected static function parseCommand() | |||
$start_time = \time(); | |||
// Check master process is still alive? | |||
while (1) { | |||
$master_is_alive = $master_pid && \posix_kill((int) $master_pid, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$master_pid
is already int
Thanks. |
According to phpstorm prompt