Test Failed
Push — master ( c6f287...66f507 )
by Marco
04:33
created
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.
src/Comodojo/Extender/Task/Result.php 2 patches
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.
Braces   +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/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/Updater.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@
 block discarded – undo
34 34
     use EventsTrait;
35 35
 
36 36
     /**
37
-    * Class constructor
38
-    *
39
-    * @param Configuration $configuration
40
-    * @param LoggerInterface $logger
41
-    * @param TasksTable $tasks
42
-    * @param EventsManager $events
43
-    * @param EntityManager $em
44
-    */
37
+     * Class constructor
38
+     *
39
+     * @param Configuration $configuration
40
+     * @param LoggerInterface $logger
41
+     * @param TasksTable $tasks
42
+     * @param EventsManager $events
43
+     * @param EntityManager $em
44
+     */
45 45
     public function __construct(
46 46
         Configuration $configuration,
47 47
         LoggerInterface $logger,
Please login to merge, or discard this 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.
src/Comodojo/Extender/Task/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
 
140 140
         $result = [];
141 141
 
142
-        foreach($tasks as $name => $task) {
142
+        foreach ( $tasks as $name => $task ) {
143 143
 
144 144
             if ( empty($task['class']) ) {
145 145
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Workers/QueueWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 
67 67
         if ( !empty($queue) ) {
68 68
 
69
-            $events->emit( new QueueEvent('process', null, $queue) );
69
+            $events->emit(new QueueEvent('process', null, $queue));
70 70
 
71 71
             $requests = $this->jobsToRequests($queue);
72 72
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Queue/Manager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function flush(array $queue) {
81 81
 
82
-        $this->getEvents()->emit( new QueueEvent('flush', null, $queue) );
82
+        $this->getEvents()->emit(new QueueEvent('flush', null, $queue));
83 83
 
84 84
         $em = $this->getEntityManager();
85 85
 
86
-        foreach ($queue as $record) {
86
+        foreach ( $queue as $record ) {
87 87
             $em->remove($record);
88 88
         }
89 89
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
         $records = [];
111 111
 
112
-        foreach ($queue as $name => $request) {
112
+        foreach ( $queue as $name => $request ) {
113 113
             $records[] = $request instanceof Request ? $this->doAddRequest($request, $em) : false;
114 114
         }
115 115
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
     protected function doAddRequest(Request $request, EntityManager $em) {
123 123
 
124
-        $this->getEvents()->emit( new QueueEvent('add', $request) );
124
+        $this->getEvents()->emit(new QueueEvent('add', $request));
125 125
 
126 126
         $record = new Queue();
127 127
         $record->setName($request->getName())->setRequest($request);
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
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 
129 129
     public function addBulk(array $requests) {
130 130
 
131
-        foreach ($requests as $id => $request) {
131
+        foreach ( $requests as $id => $request ) {
132 132
 
133
-            if ($request instanceof \Comodojo\Extender\Task\Request) {
133
+            if ( $request instanceof \Comodojo\Extender\Task\Request ) {
134 134
                 $this->add($request);
135 135
             } else {
136 136
                 $this->logger->error("Skipping invalid request with local id $id: class mismatch");
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
         $this->installErrorHandler();
165 165
 
166
-        foreach ($this->tracker->getQueued() as $uid => $request) {
166
+        foreach ( $this->tracker->getQueued() as $uid => $request ) {
167 167
 
168 168
             if ( $this->multithread === false ) {
169 169
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
                 if ( $this->max_childs > 0 && $this->tracker->countRunning() >= $this->max_childs ) {
193 193
 
194
-                    while( $this->tracker->countRunning() >= $this->max_childs ) {
194
+                    while ( $this->tracker->countRunning() >= $this->max_childs ) {
195 195
 
196 196
                         $this->catcher();
197 197
 
Please login to merge, or discard this patch.