@@ -123,8 +123,7 @@ |
||
| 123 | 123 | do { |
| 124 | 124 | libxml_clear_errors(); |
| 125 | 125 | $data .= isset($length) ? |
| 126 | - $this->_wrapper()->fgets($this->_socket, $length) : |
|
| 127 | - $this->_wrapper()->fgets($this->_socket); |
|
| 126 | + $this->_wrapper()->fgets($this->_socket, $length) : $this->_wrapper()->fgets($this->_socket); |
|
| 128 | 127 | simplexml_load_string($data); |
| 129 | 128 | if (!empty(libxml_get_errors()) && microtime(true) - $timer > $timeout) { |
| 130 | 129 | $this->disconnect(); |
@@ -38,10 +38,10 @@ |
||
| 38 | 38 | $tubes = parent::parseResponse($responseLine, $responseData); |
| 39 | 39 | |
| 40 | 40 | $name = $this->name; |
| 41 | - $matchingTubes = $tubes->filter(function (Tube $tube) use ($name) { |
|
| 41 | + $matchingTubes = $tubes->filter(function(Tube $tube) use ($name) { |
|
| 42 | 42 | return $tube->getName() === $name; |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - return !$matchingTubes->isEmpty() ? $matchingTubes->first() : false; |
|
| 45 | + return !$matchingTubes->isEmpty() ? $matchingTubes->first() : false; |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -38,10 +38,10 @@ |
||
| 38 | 38 | $workflows = parent::parseResponse($responseLine, $responseData); |
| 39 | 39 | |
| 40 | 40 | $name = $this->name; |
| 41 | - $matchingWorkflows = $workflows->filter(function (Workflow $workflow) use ($name) { |
|
| 41 | + $matchingWorkflows = $workflows->filter(function(Workflow $workflow) use ($name) { |
|
| 42 | 42 | return $workflow->getName() === $name; |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | - return !$matchingWorkflows->isEmpty() ? $matchingWorkflows->first() : false; |
|
| 45 | + return !$matchingWorkflows->isEmpty() ? $matchingWorkflows->first() : false; |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | return new ArrayCollection([]); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - $instances = $responseData['workflow'] ; |
|
| 96 | + $instances = $responseData['workflow']; |
|
| 97 | 97 | $instances = isset($instances['tags']) ? [$instances['@attributes']] : $instances; |
| 98 | 98 | $workflowInstances = new ArrayCollection([]); |
| 99 | 99 | foreach ($instances as $instance) { |
@@ -112,8 +112,7 @@ discard block |
||
| 112 | 112 | $workflowInstances[] = new WorkflowInstance($instance); |
| 113 | 113 | } |
| 114 | 114 | $collection['rows'] = (int) (isset($responseData['@attributes']['rows'])) ? |
| 115 | - (int) $responseData['@attributes']['rows'] : |
|
| 116 | - $workflowInstances->count(); |
|
| 115 | + (int) $responseData['@attributes']['rows'] : $workflowInstances->count(); |
|
| 117 | 116 | $collection['page'] = $this->page; |
| 118 | 117 | $collection['workflow_instances'] = $workflowInstances; |
| 119 | 118 | return new ArrayCollection($collection); |
@@ -258,7 +258,7 @@ |
||
| 258 | 258 | } catch (ServerDuplicateEntryException $e) { |
| 259 | 259 | if ($force) { |
| 260 | 260 | $workflows = $this->_dispatch(new Command\ListWorkflowsCommand()); |
| 261 | - $workflowToDelete = $workflows->filter(function (Workflow $listedWorkflow) use ($workflow) { |
|
| 261 | + $workflowToDelete = $workflows->filter(function(Workflow $listedWorkflow) use ($workflow) { |
|
| 262 | 262 | return $listedWorkflow->getName() === $workflow->getName() |
| 263 | 263 | && $listedWorkflow->getGroup() === $workflow->getGroup(); |
| 264 | 264 | })->first(); |
@@ -205,7 +205,7 @@ |
||
| 205 | 205 | $dom = new \DOMDocument("1.0", "utf-8"); |
| 206 | 206 | $root = $dom->createElement("task"); |
| 207 | 207 | foreach ($reflection->getProperties() as $property) { |
| 208 | - $value = $this->{'get' . ucfirst($property->getName())}(); |
|
| 208 | + $value = $this->{'get'.ucfirst($property->getName())}(); |
|
| 209 | 209 | $root->setAttribute($this->from_camel_case($property->getName()), $value); |
| 210 | 210 | } |
| 211 | 211 | $dom->appendChild($root); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | } |
| 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 | 78 | } |
| 79 | 79 | if (!is_null($this->getQueuedTasks()) && $this->getQueuedTasks() > 0) { |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | */ |
| 369 | 369 | public function setJobInstances(ArrayCollection $jobInstances): WorkflowInstance |
| 370 | 370 | { |
| 371 | - $this->jobInstances = $jobInstances->filter(function (JobInstance $jobInstance) { |
|
| 371 | + $this->jobInstances = $jobInstances->filter(function(JobInstance $jobInstance) { |
|
| 372 | 372 | return true; |
| 373 | 373 | }); |
| 374 | 374 | return $this; |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | */ |
| 139 | 139 | public function setJobs(ArrayCollection $jobs): Workflow |
| 140 | 140 | { |
| 141 | - $this->jobs = $jobs->filter(function (Job $job) { |
|
| 141 | + $this->jobs = $jobs->filter(function(Job $job) { |
|
| 142 | 142 | return true; |
| 143 | 143 | }); |
| 144 | 144 | return $this; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function setTasks(ArrayCollection $tasks): Job |
| 37 | 37 | { |
| 38 | - $this->tasks = $tasks->filter(function (Task $task) { |
|
| 38 | + $this->tasks = $tasks->filter(function(Task $task) { |
|
| 39 | 39 | return true; |
| 40 | 40 | }); |
| 41 | 41 | return $this; |