@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | foreach ($this->signals as $sig) { |
| 62 | 62 | $this->pcntl->signal( |
| 63 | 63 | $sig, |
| 64 | - function ($sig) use($log, $self) { |
|
| 65 | - $log->info('received signal. signo: ' . $sig); |
|
| 64 | + function($sig) use($log, $self) { |
|
| 65 | + $log->info('received signal. signo: '.$sig); |
|
| 66 | 66 | $self->setReceivedSignal($sig); |
| 67 | 67 | |
| 68 | 68 | $log->info('--> sending a signal " to children.'); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $this->log->info('parent pid: ' . $this->ownerPid); |
|
| 77 | + $this->log->info('parent pid: '.$this->ownerPid); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | throw $e; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $this->log->info('queued task #' . $this->container->queuedCount()); |
|
| 115 | + $this->log->info('queued task #'.$this->container->queuedCount()); |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | if (getmypid() === $this->ownerPid) { |
| 141 | 141 | // parent |
| 142 | - $this->log->info('created child process. pid: ' . $fork->getPid()); |
|
| 142 | + $this->log->info('created child process. pid: '.$fork->getPid()); |
|
| 143 | 143 | } else { |
| 144 | 144 | // @codeCoverageIgnoreStart |
| 145 | 145 | // child |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | $log = $this->log; |
| 154 | 154 | $resultHasWritten = false; |
| 155 | - register_shutdown_function(function () use (&$resultHasWritten, $fork, $task, $log, $token) { |
|
| 155 | + register_shutdown_function(function() use (&$resultHasWritten, $fork, $task, $log, $token) { |
|
| 156 | 156 | if (!$resultHasWritten) { |
| 157 | 157 | $dataRepository = new DataRepository(); |
| 158 | 158 | $data = $dataRepository->load(getmypid()); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $this->wait(); |
| 235 | 235 | } |
| 236 | 236 | if ($tag !== null && !$this->container->hasTag($tag)) { |
| 237 | - throw new \InvalidArgumentException('unknown tag: ' . $tag); |
|
| 237 | + throw new \InvalidArgumentException('unknown tag: '.$tag); |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | return $this->container->getCollection($tag); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | public function sendSignalToChildren($sig) |
| 250 | 250 | { |
| 251 | 251 | foreach ($this->container->getChildrend() as $child) { |
| 252 | - $this->log->info('----> sending a signal to child. pid: ' . $child->getPid()); |
|
| 252 | + $this->log->info('----> sending a signal to child. pid: '.$child->getPid()); |
|
| 253 | 253 | posix_kill($child->getPid(), $sig); |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | $childPid = $result->getFork()->getPid(); |
| 352 | 352 | if ($result->isFailure()) { |
| 353 | - $message = 'an error has occurred in child process. pid: ' . $childPid; |
|
| 353 | + $message = 'an error has occurred in child process. pid: '.$childPid; |
|
| 354 | 354 | $this->log->error($message); |
| 355 | 355 | throw new \RuntimeException($message); |
| 356 | 356 | } |