Completed
Push — 2.0 ( 76e968...4129d9 )
by Marco
13:01
created
src/Comodojo/Extender/Queue/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $em = $this->getEntityManager();
82 82
 
83
-        foreach ($queue as $record) {
83
+        foreach ( $queue as $record ) {
84 84
             $em->remove($record);
85 85
         }
86 86
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         $records = [];
108 108
 
109
-        foreach ($queue as $name => $request) {
109
+        foreach ( $queue as $name => $request ) {
110 110
             $records[] = $request instanceof Request ? $this->doAddRequest($name, $request, $em) : false;
111 111
         }
112 112
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Schedule/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $date = new DateTime();
99 99
         $timestamps = [];
100 100
 
101
-        foreach ($items as $schedule) {
101
+        foreach ( $items as $schedule ) {
102 102
 
103 103
             $timestamps[] = $schedule->getNextPlannedRun($date)->getTimestamp();
104 104
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         $em = $this->getEntityManager();
114 114
 
115
-        foreach ($results as $result) {
115
+        foreach ( $results as $result ) {
116 116
 
117 117
             $id = $result->getJid();
118 118
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Task/Manager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 
140 140
         $responses = [];
141 141
 
142
-        foreach ($requests as $id => $request) {
142
+        foreach ( $requests as $id => $request ) {
143 143
 
144
-            if ($request instanceof \Comodojo\Extender\Task\Request) {
144
+            if ( $request instanceof \Comodojo\Extender\Task\Request ) {
145 145
                 $this->add($request);
146 146
                 $responses[$id] = true;
147 147
             } else {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
     protected function cycle() {
176 176
 
177
-        foreach ($this->locker->getQueued() as $uid => $request) {
177
+        foreach ( $this->locker->getQueued() as $uid => $request ) {
178 178
 
179 179
             if ( $this->multithread === false ) {
180 180
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
                 if ( $this->max_childs > 0 && $this->locker->countRunning() >= $this->max_childs ) {
204 204
 
205
-                    while( $this->locker->countRunning() >= $this->max_childs ) {
205
+                    while ( $this->locker->countRunning() >= $this->max_childs ) {
206 206
 
207 207
                         $this->catcher();
208 208
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Task/Runner.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $thetask = $this->table->get($task)->getInstance($name, $parameters);
99 99
 
100
-            $this->events->emit( new TaskEvent('start', $thetask) );
100
+            $this->events->emit(new TaskEvent('start', $thetask));
101 101
 
102 102
             $pid = $thetask->getPid();
103 103
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 $this->stopwatch->getStartTime()
113 113
             );
114 114
 
115
-            $this->events->emit( new TaskStatusEvent('start', $thetask) );
115
+            $this->events->emit(new TaskStatusEvent('start', $thetask));
116 116
 
117 117
             try {
118 118
 
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
 
135 135
             }
136 136
 
137
-            $this->events->emit( new TaskStatusEvent($status ? 'success' : 'error', $thetask) );
137
+            $this->events->emit(new TaskStatusEvent($status ? 'success' : 'error', $thetask));
138 138
 
139
-            $this->events->emit( new TaskStatusEvent('stop', $thetask) );
139
+            $this->events->emit(new TaskStatusEvent('stop', $thetask));
140 140
 
141
-            $this->events->emit( new TaskEvent('stop', $thetask) );
141
+            $this->events->emit(new TaskEvent('stop', $thetask));
142 142
 
143 143
             $this->stopwatch->stop();
144 144
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Task/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@
 block discarded – undo
356 356
 
357 357
     public function isChain() {
358 358
 
359
-        return ( $this->done !== null || $this->fail !== null || $this->pipe !== null );
359
+        return ($this->done !== null || $this->fail !== null || $this->pipe !== null);
360 360
 
361 361
     }
362 362
 
Please login to merge, or discard this patch.
test_socket_2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
     $client = \Comodojo\Daemon\Socket\Client::create('unix://extender.sock');
8 8
 
9
-    $data = $client->send('scheduler:refresh',[]);
9
+    $data = $client->send('scheduler:refresh', []);
10 10
 
11 11
 } catch (Exception $e) {
12 12
 
Please login to merge, or discard this patch.