Completed
Branch master (7d6942)
by Valentin
11:00 queued 03:34
created
src/Structure/Task.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         $reflection = new \ReflectionClass($this);
200 200
         $dom = new \DOMDocument("1.0", "utf-8");
201 201
         $root = $dom->createElement("task");
202
-        foreach($reflection->getProperties() as $property)
202
+        foreach ($reflection->getProperties() as $property)
203 203
         {
204 204
             $value = $this->{'get' . ucfirst($property->getName())}();
205 205
             $root->setAttribute($this->from_camel_case($property->getName()), $value);
Please login to merge, or discard this patch.
src/Structure/WorkflowInstance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
                     $this->{$property->getName()} = $params[$snakeProperty];
74 74
             }
75 75
             if (!is_null($this->getRunningTasks()) && !is_null($this->getQueuedTasks())
76
-                && $this->getRunningTasks() - $this->getQueuedTasks() > 0 )
76
+                && $this->getRunningTasks() - $this->getQueuedTasks() > 0)
77 77
                 $this->setStatus(self::STATUS_RUNNING);
78
-            if (!is_null($this->getQueuedTasks()) && $this->getQueuedTasks() > 0 )
78
+            if (!is_null($this->getQueuedTasks()) && $this->getQueuedTasks() > 0)
79 79
                 $this->setStatus(self::STATUS_QUEUED);
80 80
             if (!is_null($this->getRetryingTasks()) && $this->getRetryingTasks() > 0)
81 81
                 $this->setStatus(self::STATUS_RETRYING);
Please login to merge, or discard this patch.
src/Structure/Workflow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
         $root = $dom->createElement("workflow");
235 235
         $subjobs = $dom->createElement("subjobs");
236 236
         /** @var Job $job*/
237
-        foreach($this->getJobs() as $job) {
237
+        foreach ($this->getJobs() as $job) {
238 238
             $jobNode = $job->getXml()->getElementsByTagName('job')->item(0);
239 239
             $subjobs->appendChild($dom->importNode($jobNode, true));
240 240
 
Please login to merge, or discard this patch.
src/Structure/Job.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $root = $dom->createElement("job");
74 74
         $tasks = $dom->createElement("tasks");
75 75
         /** @var Task $task */
76
-        foreach($this->getTasks() as $task) {
76
+        foreach ($this->getTasks() as $task) {
77 77
             $taskItem = $dom->createElement("task");
78 78
             $taskNode = $task->getXml()->getElementsByTagName('task')->item(0);
79 79
             $tasks->appendChild($dom->importNode($taskNode, true));
Please login to merge, or discard this patch.
src/Structure/TimeSchedule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function setSeconds(array $seconds): TimeSchedule
68 68
     {
69
-        if (count( $seconds ) !== count( array_filter( $seconds, 'is_numeric' )) || array_sum($seconds) > self::SUM_SUBUNIT_IN_UNIT )
69
+        if (count($seconds) !== count(array_filter($seconds, 'is_numeric')) || array_sum($seconds) > self::SUM_SUBUNIT_IN_UNIT)
70 70
             throw new \Exception('Wrong units of time');
71 71
         $this->seconds = $seconds;
72 72
         return $this;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function setMinutes(array $minutes): TimeSchedule
89 89
     {
90
-        if (count( $minutes ) !== count( array_filter( $minutes, 'is_numeric' )) || array_sum($minutes) > self::SUM_SUBUNIT_IN_UNIT )
90
+        if (count($minutes) !== count(array_filter($minutes, 'is_numeric')) || array_sum($minutes) > self::SUM_SUBUNIT_IN_UNIT)
91 91
             throw new \Exception('Wrong units of time');
92 92
         $this->minutes = $minutes;
93 93
         return $this;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function setHours(array $hours): TimeSchedule
110 110
     {
111
-        if (count( $hours ) !== count( array_filter( $hours, 'is_numeric' )) || array_sum($hours) > self::SUM_HOURS )
111
+        if (count($hours) !== count(array_filter($hours, 'is_numeric')) || array_sum($hours) > self::SUM_HOURS)
112 112
             throw new \Exception('Wrong units of time');
113 113
         $this->hours = $hours;
114 114
         return $this;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function setDays(array $days): TimeSchedule
131 131
     {
132
-        if (count( $days ) !== count( array_filter( $days, 'is_numeric' )) || array_sum($days) > self::SUM_DAYS )
132
+        if (count($days) !== count(array_filter($days, 'is_numeric')) || array_sum($days) > self::SUM_DAYS)
133 133
             throw new \Exception('Wrong units of time');
134 134
         $this->days = $days;
135 135
         return $this;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function setMonths(array $months): TimeSchedule
152 152
     {
153
-        if (count( $months ) !== count( array_filter( $months, 'is_numeric' )) || array_sum($months) > self::SUM_MONTHS )
153
+        if (count($months) !== count(array_filter($months, 'is_numeric')) || array_sum($months) > self::SUM_MONTHS)
154 154
         throw new \Exception('Wrong units of time');
155 155
         $this->months = $months;
156 156
         return $this;
Please login to merge, or discard this patch.
src/Structure/Tube.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
     public function setDynamic($dynamic): Tube
101 101
     {
102 102
         if (!is_bool($dynamic)) {
103
-            if($dynamic === self::IS_NOT_DYNAMIC)
103
+            if ($dynamic === self::IS_NOT_DYNAMIC)
104 104
                 $dynamic = false;
105 105
             else
106 106
                 $dynamic = true;
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
         $xml = new \SimpleXMLElement($responseLine);
107 107
         $json = json_encode($xml);
108
-        $responseLine = json_decode($json,TRUE);
108
+        $responseLine = json_decode($json, TRUE);
109 109
         $responseName = preg_replace('#^(\S+).*$#s', '$1', $responseLine["@attributes"]['status']);
110 110
         if ($responseName === "KO") {
111 111
             $exceptionType = $responseLine['@attributes']['error-code'] ?? Response::RESPONSE_SERVER_ERROR;
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
         return $this->_socket;
193 193
     }
194 194
 
195
-    protected function build_query($name, $action = false, $attributes = [], $parameters = []){
195
+    protected function build_query($name, $action = false, $attributes = [], $parameters = []) {
196 196
         $dom = new \DOMDocument("1.0", "utf-8");
197 197
         $root = $dom->createElement($name);
198
-        if($action)
198
+        if ($action)
199 199
             $root->setAttribute('action', $action);
200 200
         foreach ($attributes as $key => $value) {
201 201
             $root->setAttribute($key, $value);
Please login to merge, or discard this patch.