Completed
Push — 2.0 ( a11c65...7cb9cd )
by Marco
11:37
created
src/Comodojo/Extender/Task/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  */
20 20
 
21 21
 
22
-class Result extends Model{
22
+class Result extends Model {
23 23
 
24 24
     protected $mode = self::READONLY;
25 25
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Utils/StopWatch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,9 +111,9 @@
 block discarded – undo
111 111
 
112 112
         $t = microtime(true);
113 113
 
114
-        $micro = sprintf("%06d",($t - floor($t)) * 1000000);
114
+        $micro = sprintf("%06d", ($t - floor($t)) * 1000000);
115 115
 
116
-        return new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );
116
+        return new DateTime(date('Y-m-d H:i:s.'.$micro, $t));
117 117
 
118 118
     }
119 119
 
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.
src/Comodojo/Extender/Task/Manager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 
134 134
     public function addBulk(array $requests) {
135 135
 
136
-        foreach ($requests as $id => $request) {
136
+        foreach ( $requests as $id => $request ) {
137 137
 
138
-            if ($request instanceof \Comodojo\Extender\Task\Request) {
138
+            if ( $request instanceof \Comodojo\Extender\Task\Request ) {
139 139
                 $this->add($request);
140 140
             } else {
141 141
                 $this->logger->error("Skipping invalid request with local id $id: class mismatch");
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
     protected function cycle() {
176 176
 
177
-        foreach ($this->tracker->getQueued() as $uid => $request) {
177
+        foreach ( $this->tracker->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->tracker->countRunning() >= $this->max_childs ) {
204 204
 
205
-                    while( $this->tracker->countRunning() >= $this->max_childs ) {
205
+                    while ( $this->tracker->countRunning() >= $this->max_childs ) {
206 206
 
207 207
                         $this->catcher();
208 208
 
Please login to merge, or discard this patch.
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($request, $em) : false;
111 111
         }
112 112
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Components/Database.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                 false
85 85
             ];
86 86
 
87
-            switch (strtoupper($metadata_mode)) {
87
+            switch ( strtoupper($metadata_mode) ) {
88 88
 
89 89
                 case 'YAML':
90 90
                     $db_config = Setup::createYAMLMetadataConfiguration(...$config_args);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $repos = $configuration->get('database-repositories');
179 179
 
180 180
         return array_map(function($repo) use ($base_folder) {
181
-            return substr($repo, 0, 1 ) === "/" ? $repo : "$base_folder/$repo";
181
+            return substr($repo, 0, 1) === "/" ? $repo : "$base_folder/$repo";
182 182
         }, $repos);
183 183
 
184 184
     }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $base_folder = $configuration->get('base-path');
189 189
         $folder = $configuration->get('database-proxies');
190 190
 
191
-        return substr($folder, 0, 1 ) === "/" ? $folder : "$base_folder/$folder";
191
+        return substr($folder, 0, 1) === "/" ? $folder : "$base_folder/$folder";
192 192
 
193 193
     }
194 194
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Schedule/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
         $records = [];
145 145
         $em = $this->getEntityManager();
146 146
 
147
-        foreach ($schedules as $key => $schedule) {
147
+        foreach ( $schedules as $key => $schedule ) {
148 148
 
149 149
             try {
150 150
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Schedule/Updater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $em = Database::init($this->getConfiguration())->getEntityManager();
60 60
 
61
-        foreach ($results as $result) {
61
+        foreach ( $results as $result ) {
62 62
 
63 63
             $id = $result->jid;
64 64
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $date = new DateTime();
94 94
         $timestamps = [];
95 95
 
96
-        foreach ($items as $schedule) {
96
+        foreach ( $items as $schedule ) {
97 97
 
98 98
             $timestamps[] = $schedule->getNextPlannedRun($date)->getTimestamp();
99 99
 
Please login to merge, or discard this patch.