Completed
Push — 2.0 ( dd3689...ee0168 )
by Marco
12:16
created
src/Comodojo/Extender/Components/Ipc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -66,6 +66,9 @@
 block discarded – undo
66 66
 
67 67
     }
68 68
 
69
+    /**
70
+     * @param string $data
71
+     */
69 72
     public function write($uid, $data) {
70 73
 
71 74
         $writer = $this->ipc[$uid][self::WRITER];
Please login to merge, or discard this patch.
src/Comodojo/Extender/Jobs/Manager.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -62,6 +62,9 @@
 block discarded – undo
62 62
 
63 63
     }
64 64
 
65
+    /**
66
+     * @param integer|null $pid
67
+     */
65 68
     public function isStarting($uid, $pid) {
66 69
 
67 70
         $job = $this->queued_jobs[$uid];
Please login to merge, or discard this patch.
src/Comodojo/Extender/Jobs/Runner.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -384,6 +384,9 @@
 block discarded – undo
384 384
 
385 385
     }
386 386
 
387
+    /**
388
+     * @param string $message
389
+     */
387 390
     private function abortQueued($message) {
388 391
 
389 392
         foreach ($this->manager->queued() as $uid => $job) {
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
 
124 124
     public function run() {
125 125
 
126
-        foreach ($this->manager->queued() as $uid => $job) {
126
+        foreach ( $this->manager->queued() as $uid => $job ) {
127 127
 
128
-            $this->events->emit( new JobEvent('start', $job) );
129
-            $this->events->emit( new JobStatusEvent('start', $job) );
128
+            $this->events->emit(new JobEvent('start', $job));
129
+            $this->events->emit(new JobStatusEvent('start', $job));
130 130
 
131 131
             if ( $this->multithread === false ) {
132 132
 
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 
144 144
                 $this->manager->isCompleted($uid, $result->success, $result->result, $result->wid);
145 145
 
146
-                $this->events->emit( new JobEvent('stop', $job) );
147
-                $this->events->emit( new JobStatusEvent('stop', $job) );
146
+                $this->events->emit(new JobEvent('stop', $job));
147
+                $this->events->emit(new JobStatusEvent('stop', $job));
148 148
 
149 149
                 continue;
150 150
 
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 
159 159
                 $this->manager->isAborted($uid, $e->getMessage());
160 160
 
161
-                $this->events->emit( new JobEvent('stop', $job) );
162
-                $this->events->emit( new JobStatusEvent('stop', $job) );
161
+                $this->events->emit(new JobEvent('stop', $job));
162
+                $this->events->emit(new JobStatusEvent('stop', $job));
163 163
 
164 164
                 continue;
165 165
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             if ( $this->max_childs > 0 && count($this->manager->running()) >= $this->max_childs ) {
171 171
 
172
-                while( count($this->manager->running()) >= $this->max_childs ) {
172
+                while ( count($this->manager->running()) >= $this->max_childs ) {
173 173
 
174 174
                     $this->catcher();
175 175
 
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
 
343 343
                 $this->logger->notice("Job ".$job->name."(id: ".$job->id.", uid: $uid) ends in $status");
344 344
 
345
-                $this->events->emit( new JobEvent('stop', $job) );
346
-                $this->events->emit( new JobStatusEvent('stop', $job) );
345
+                $this->events->emit(new JobEvent('stop', $job));
346
+                $this->events->emit(new JobStatusEvent('stop', $job));
347 347
 
348 348
             } else {
349 349
 
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
 
374 374
                     $this->logger->notice("Job ".$job->name."(id: ".$job->id.", uid: $uid) ends in error");
375 375
 
376
-                    $this->events->emit( new JobEvent('stop', $job) );
377
-                    $this->events->emit( new JobStatusEvent('stop', $job) );
376
+                    $this->events->emit(new JobEvent('stop', $job));
377
+                    $this->events->emit(new JobStatusEvent('stop', $job));
378 378
 
379 379
                 }
380 380
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
     private function abortQueued($message) {
388 388
 
389
-        foreach ($this->manager->queued() as $uid => $job) {
389
+        foreach ( $this->manager->queued() as $uid => $job ) {
390 390
 
391 391
             $this->manager->isAborted($uid, $message);
392 392
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Utils/ProcessTools.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -76,6 +76,9 @@
 block discarded – undo
76 76
 
77 77
     }
78 78
 
79
+    /**
80
+     * @param integer $pid
81
+     */
79 82
     public static function setNiceness($niceness = null, $pid = null) {
80 83
 
81 84
         $niceness = self::filterNiceness($niceness);
Please login to merge, or discard this patch.
src/Comodojo/Extender/Utils/Validator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
 
56 56
             if ( $e_count == 5 ) $e_array[] = "*";
57 57
 
58
-        }
59
-        catch (Exception $e) {
58
+        } catch (Exception $e) {
60 59
 
61 60
             throw $e;
62 61
 
Please login to merge, or discard this patch.