Completed
Push — master ( 024d05...2ca7c9 )
by Akihito
02:21
created
src/Snidel/ForkContainer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         if ($pid) {
131 131
             // owner
132
-            $this->log->info('pid: ' . getmypid());
132
+            $this->log->info('pid: '.getmypid());
133 133
 
134 134
             return $this->masterPid;
135 135
         } elseif ($pid === -1) {
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
         } else {
138 138
             // master
139 139
             $taskQueue = new TaskQueue($this->ownerPid);
140
-            $this->log->info('pid: ' . $this->masterPid);
140
+            $this->log->info('pid: '.$this->masterPid);
141 141
 
142 142
             foreach ($this->signals as $sig) {
143 143
                 $this->pcntl->signal($sig, SIG_DFL, true);
144 144
             }
145 145
 
146 146
             while ($task = $taskQueue->dequeue()) {
147
-                $this->log->info('dequeued task #' . $taskQueue->dequeuedCount());
147
+                $this->log->info('dequeued task #'.$taskQueue->dequeuedCount());
148 148
                 if ($this->token->accept()) {
149 149
                     $this->forkWorker($task);
150 150
                 }
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 
172 172
         if (getmypid() === $this->masterPid) {
173 173
             // master
174
-            $this->log->info('forked worker. pid: ' . $fork->getPid());
174
+            $this->log->info('forked worker. pid: '.$fork->getPid());
175 175
         } else {
176 176
             // worker
177
-            $this->log->info('has forked. pid: ' . getmypid());
177
+            $this->log->info('has forked. pid: '.getmypid());
178 178
             // @codeCoverageIgnoreStart
179 179
 
180 180
             foreach ($this->signals as $sig) {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             }
183 183
 
184 184
             $resultQueue = new ResultQueue($this->ownerPid);
185
-            register_shutdown_function(function () use ($fork, $resultQueue) {
185
+            register_shutdown_function(function() use ($fork, $resultQueue) {
186 186
                 if ($fork->hasNoResult() || !$fork->isQueued()) {
187 187
                     $result = new Result();
188 188
                     $result->setFailure();
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
      */
316 316
     private function getCollectionWithTag($tag)
317 317
     {
318
-        $collection = array_filter($this->forks, function ($fork) use ($tag) {
319
-            return $fork->getTag() ===  $tag;
318
+        $collection = array_filter($this->forks, function($fork) use ($tag) {
319
+            return $fork->getTag() === $tag;
320 320
         });
321 321
 
322 322
         return new ForkCollection($collection);
Please login to merge, or discard this patch.