@@ -32,7 +32,7 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $value = (array)$value; |
| 34 | 34 | $names = array_map( |
| 35 | - function ($tag) { |
|
| 35 | + function($tag) { |
|
| 36 | 36 | return $tag['name']; |
| 37 | 37 | }, |
| 38 | 38 | $value |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | public function testHandle(array $notifications, array $expected) |
| 64 | 64 | { |
| 65 | 65 | $expected = array_map( |
| 66 | - function (EmailNotification $notification) { |
|
| 66 | + function(EmailNotification $notification) { |
|
| 67 | 67 | return new EmailNotificationAdapter( |
| 68 | 68 | $this->entity, |
| 69 | 69 | $notification, |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | $variable = $this->createMock(Variable::class); |
| 42 | 42 | $variable->expects($this->once())->method('getValue')->willReturn($value); |
| 43 | 43 | $variable->expects($this->any())->method('getType')->willReturn($type); |
| 44 | - $this->translator->expects($this->exactly((int) $expectedTranslate)) |
|
| 44 | + $this->translator->expects($this->exactly((int)$expectedTranslate)) |
|
| 45 | 45 | ->method('trans') |
| 46 | 46 | ->with($expected) |
| 47 | 47 | ->willReturnArgument(0); |
@@ -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 | /** |