@@ -70,7 +70,7 @@ public function testEmptyWorkflowInstances()
7070 {
7171 $ workflow = $ this ->pheanstalk ->workflowExists ('testWorkflow ' );
7272 $ instances = $ this ->pheanstalk ->getWorkflowInstances ($ workflow );
73- foreach (GetWorkflowInstancesCommand::FILTERS as $ filter ) {
73+ foreach (GetWorkflowInstancesCommand::FILTERS as $ filter ) {
7474 $ this ->assertNotNull ($ FilterInstances = $ instances ->get (strtolower ($ filter )));
7575 $ workflowInstances = $ FilterInstances ->get ('workflow_instances ' );
7676 $ this ->assertNull ($ workflowInstances );
@@ -88,11 +88,11 @@ public function testGetWorkflowInstances()
8888 $ workflow = $ this ->pheanstalk ->workflowExists ('testWorkflow ' );
8989 $ id = (int ) $ this ->pheanstalk ->put ($ workflow );
9090 $ instances = $ this ->pheanstalk ->getWorkflowInstances ($ workflow );
91- foreach (GetWorkflowInstancesCommand::FILTERS as $ filter ) {
91+ foreach (GetWorkflowInstancesCommand::FILTERS as $ filter ) {
9292 $ this ->assertNotNull ($ FilterInstances = $ instances ->get (strtolower ($ filter )));
9393 $ workflowInstances = $ FilterInstances ->get ('workflow_instances ' );
9494 /** @var ArrayCollection $workflowInstances */
95- if (!is_null ($ workflowInstances )) {
95+ if (!is_null ($ workflowInstances )) {
9696 $ this ->assertFalse ($ workflowInstances ->isEmpty ());
9797 }
9898 }
@@ -101,8 +101,8 @@ public function testGetWorkflowInstances()
101101 public function testListTubes ()
102102 {
103103 $ tubes = $ this ->pheanstalk ->listTubes ();
104- $ tubes = $ tubes ->filter (function (Tube $ tube ) {
105- return $ tube ->getName () === 'testTube ' ;
104+ $ tubes = $ tubes ->filter (function (Tube $ tube ) {
105+ return $ tube ->getName () === 'testTube ' ;
106106 });
107107 $ this ->assertFalse ($ tubes ->isEmpty ());
108108 }
@@ -168,12 +168,12 @@ public function testCancel()
168168
169169 protected function cancelFirstRunningInstance (Workflow $ workflow )
170170 {
171- try {
171+ try {
172172 $ instances = $ this ->pheanstalk ->getWorkflowInstances ($ workflow , GetWorkflowInstancesCommand::FILTER_EXECUTING );
173173 $ this ->assertFalse ($ instances ->isEmpty ());
174174 $ workflowInstance = $ instances ->first ();
175175 $ this ->assertTrue ($ this ->pheanstalk ->cancel ($ workflowInstance ));
176- } catch (ServerException $ e ){
176+ } catch (ServerException $ e ) {
177177 $ this ->cancelFirstRunningInstance ($ workflow );
178178 }
179179 }
@@ -195,7 +195,7 @@ public function testShouldFailWithNoPid()
195195 $ instances = $ this ->pheanstalk ->getWorkflowInstances ($ workflow , GetWorkflowInstancesCommand::FILTER_EXECUTING );
196196 $ this ->assertFalse ($ instances ->isEmpty ());
197197 /** @var WorkflowInstance $workflowInstance */
198- $ workflowInstance = $ instances ->filter (function (WorkflowInstance $ instance ) {
198+ $ workflowInstance = $ instances ->filter (function (WorkflowInstance $ instance ) {
199199 return $ instance ->getStatus () === 'RUNNING ' ;
200200 })->first ();
201201 /** @var JobInstance $jobInstance */
@@ -209,19 +209,19 @@ public function testShouldFailWithNoPid()
209209
210210 protected function killFirstRunningInstance (Workflow $ workflow )
211211 {
212- try {
212+ try {
213213 $ instances = $ this ->pheanstalk ->getWorkflowInstances ($ workflow , GetWorkflowInstancesCommand::FILTER_EXECUTING );
214214 $ this ->assertFalse ($ instances ->isEmpty ());
215215 /** @var WorkflowInstance $workflowInstance */
216- $ workflowInstance = $ instances ->filter (function (WorkflowInstance $ instance ) {
216+ $ workflowInstance = $ instances ->filter (function (WorkflowInstance $ instance ) {
217217 return $ instance ->getStatus () === 'RUNNING ' ;
218218 })->first ();
219219 /** @var JobInstance $jobInstance */
220220 $ jobInstance = $ workflowInstance ->getJobInstances ()->first ();
221221 $ taskInstance = $ jobInstance ->getTaskInstances ()->first ();
222222
223223 $ this ->assertTrue ($ this ->pheanstalk ->kill ($ workflowInstance , $ taskInstance ));
224- } catch (ServerException $ e ){
224+ } catch (ServerException $ e ) {
225225 $ this ->killFirstRunningInstance ($ workflow );
226226 }
227227 }
0 commit comments