@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->doctrineHelper->expects($this->any()) |
44 | 44 | ->method('getEntityClass') |
45 | 45 | ->willReturnCallback( |
46 | - function ($object) { |
|
46 | + function($object) { |
|
47 | 47 | return get_class($object); |
48 | 48 | } |
49 | 49 | ); |
@@ -609,12 +609,12 @@ discard block |
||
609 | 609 | $this->entityManager->expects($this->once()) |
610 | 610 | ->method('persist') |
611 | 611 | ->with($this->isInstanceOf(ProcessJob::class)) |
612 | - ->willReturnCallback(function (ProcessJob $processJob) use (&$createdProcessJob) { |
|
612 | + ->willReturnCallback(function(ProcessJob $processJob) use (&$createdProcessJob) { |
|
613 | 613 | $createdProcessJob = $processJob; |
614 | 614 | }); |
615 | 615 | $this->entityManager->expects($this->once()) |
616 | 616 | ->method('flush') |
617 | - ->willReturnCallback(function () use (&$createdProcessJob, $triggerConfig) { |
|
617 | + ->willReturnCallback(function() use (&$createdProcessJob, $triggerConfig) { |
|
618 | 618 | // emulate triggering of postFlush event during the call of flush method in the process method |
619 | 619 | $this->extension->process($this->entityManager); |
620 | 620 | $idReflection = new \ReflectionProperty(ProcessJob::class, 'id'); |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | ->with($this->isInstanceOf(ProcessJob::class)) |
772 | 772 | ->will( |
773 | 773 | $this->returnCallback( |
774 | - function (ProcessJob $processJob) use ($entityParams) { |
|
774 | + function(ProcessJob $processJob) use ($entityParams) { |
|
775 | 775 | $event = $processJob->getProcessTrigger()->getEvent(); |
776 | 776 | |
777 | 777 | $idReflection = new \ReflectionProperty(ProcessJob::class, 'id'); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $this->prepareTriggerCache(self::ENTITY_CLASS, $event); |
81 | 81 | |
82 | 82 | $triggers = array_map( |
83 | - function ($name) { |
|
83 | + function($name) { |
|
84 | 84 | return $this->getTriggers($name); |
85 | 85 | }, |
86 | 86 | $triggers |
@@ -89,10 +89,9 @@ discard block |
||
89 | 89 | $this->helper->expects($this->exactly(count($triggers))) |
90 | 90 | ->method('isRequirePass') |
91 | 91 | ->willReturnCallback( |
92 | - function ($trigger, $mainEntity, $prevEntity) use ($entity, $changeSet, $triggers) { |
|
92 | + function($trigger, $mainEntity, $prevEntity) use ($entity, $changeSet, $triggers) { |
|
93 | 93 | $expectedPrevEntity = $changeSet ? |
94 | - $this->getMainEntity(self::ENTITY_ID, [self::FIELD => $changeSet[self::FIELD]['old']]) : |
|
95 | - clone $entity; |
|
94 | + $this->getMainEntity(self::ENTITY_ID, [self::FIELD => $changeSet[self::FIELD]['old']]) : clone $entity; |
|
96 | 95 | |
97 | 96 | $this->assertEquals($expectedPrevEntity, $prevEntity); |
98 | 97 | $this->assertSame($entity, $mainEntity); |
@@ -121,7 +121,7 @@ |
||
121 | 121 | ->with($processJob->getData(), 'json', array('processJob' => $processJob)) |
122 | 122 | ->will( |
123 | 123 | $this->returnCallback( |
124 | - function () use ($processJob, $entityId, $serializedData) { |
|
124 | + function() use ($processJob, $entityId, $serializedData) { |
|
125 | 125 | $processJob->setEntityId($entityId); |
126 | 126 | return $serializedData; |
127 | 127 | } |
@@ -85,13 +85,13 @@ |
||
85 | 85 | ] |
86 | 86 | ); |
87 | 87 | |
88 | - $this->listener->createTriggers($event);//pre event job |
|
88 | + $this->listener->createTriggers($event); //pre event job |
|
89 | 89 | |
90 | 90 | $triggersBag = new TriggersBag($definition, [$trigger1, $trigger2]); |
91 | 91 | |
92 | 92 | $this->updater->expects($this->once())->method('updateTriggers')->with($triggersBag); |
93 | 93 | |
94 | - $this->listener->updateTriggers($event);//after event job |
|
94 | + $this->listener->updateTriggers($event); //after event job |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | public function testTriggersDelete() |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $this->assertEquals( |
61 | 61 | 'w.relatedEntity NOT IN(:relatedEntities)', |
62 | - (string) $this->queryBuilder->getDQLPart('where') |
|
62 | + (string)$this->queryBuilder->getDQLPart('where') |
|
63 | 63 | ); |
64 | 64 | $this->assertEquals($disabledEntities, $this->queryBuilder->getParameter('relatedEntities')->getValue()); |
65 | 65 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $this->gridSubscriber->onWorkflowsResultBeforeQuery($this->event); |
75 | 75 | |
76 | - $this->assertEquals('', (string) $this->queryBuilder->getDQLPart('where')); |
|
76 | + $this->assertEquals('', (string)$this->queryBuilder->getDQLPart('where')); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function testOnProcessesResultBeforeQueryWithDisabledProcesses() |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $this->gridSubscriber->onProcessesResultBeforeQuery($this->event); |
88 | 88 | |
89 | - $this->assertEquals('process.name NOT IN(:processes)', (string) $this->queryBuilder->getDQLPart('where')); |
|
89 | + $this->assertEquals('process.name NOT IN(:processes)', (string)$this->queryBuilder->getDQLPart('where')); |
|
90 | 90 | $this->assertEquals($disabledProcesses, $this->queryBuilder->getParameter('processes')->getValue()); |
91 | 91 | } |
92 | 92 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | $this->gridSubscriber->onProcessesResultBeforeQuery($this->event); |
101 | 101 | |
102 | - $this->assertEquals('', (string) $this->queryBuilder->getDQLPart('where')); |
|
102 | + $this->assertEquals('', (string)$this->queryBuilder->getDQLPart('where')); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ->with($this->isInstanceOf('Oro\Bundle\WorkflowBundle\Model\WorkflowData'), 'json') |
124 | 124 | ->will( |
125 | 125 | $this->returnCallback( |
126 | - function ($data) use ($data1, $expectedSerializedData1) { |
|
126 | + function($data) use ($data1, $expectedSerializedData1) { |
|
127 | 127 | $this->assertEquals($data1, $data); |
128 | 128 | return $expectedSerializedData1; |
129 | 129 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ->with($this->isInstanceOf('Oro\Bundle\WorkflowBundle\Model\WorkflowData'), 'json') |
137 | 137 | ->will( |
138 | 138 | $this->returnCallback( |
139 | - function ($data) use ($data2, $expectedSerializedData2) { |
|
139 | + function($data) use ($data2, $expectedSerializedData2) { |
|
140 | 140 | $this->assertEquals($data2, $data); |
141 | 141 | return $expectedSerializedData2; |
142 | 142 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | ->with($this->isInstanceOf('Oro\Bundle\WorkflowBundle\Model\WorkflowData'), 'json') |
150 | 150 | ->will( |
151 | 151 | $this->returnCallback( |
152 | - function ($data) use ($data4, $expectedSerializedData4) { |
|
152 | + function($data) use ($data4, $expectedSerializedData4) { |
|
153 | 153 | $this->assertEquals($data4, $data); |
154 | 154 | return $expectedSerializedData4; |
155 | 155 | } |
@@ -131,7 +131,7 @@ |
||
131 | 131 | $this->assertAttributeEquals(0, 'deepLevel', $this->listener); |
132 | 132 | $this->assertAttributeEquals($expectedSchedule, 'entitiesScheduledForWorkflowStart', $this->listener); |
133 | 133 | |
134 | - $startChildWorkflow = function () use ($childEvent, $childEntity, $childWorkflow, $childWorkflowName) { |
|
134 | + $startChildWorkflow = function() use ($childEvent, $childEntity, $childWorkflow, $childWorkflowName) { |
|
135 | 135 | $this->listener->postPersist($childEvent); |
136 | 136 | |
137 | 137 | $expectedSchedule = [ |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
21 | 21 | $translator->expects($this->any()) |
22 | 22 | ->method('trans') |
23 | - ->willReturnCallback(function ($value) { |
|
23 | + ->willReturnCallback(function($value) { |
|
24 | 24 | return 'translated: ' . $value; |
25 | 25 | }); |
26 | 26 |