@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this->quantityProvider->expects($this->any()) |
| 82 | 82 | ->method('canDecrement') |
| 83 | 83 | ->willReturnCallback( |
| 84 | - function (Product $product) use ($canDecrement) { |
|
| 84 | + function(Product $product) use ($canDecrement) { |
|
| 85 | 85 | return $canDecrement && $product->getId() === 3; |
| 86 | 86 | } |
| 87 | 87 | ); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $this->quantityProvider->expects($this->any()) |
| 90 | 90 | ->method('getAvailableQuantity') |
| 91 | 91 | ->willReturnCallback( |
| 92 | - function (Product $product) use ($availableQuantity) { |
|
| 92 | + function(Product $product) use ($availableQuantity) { |
|
| 93 | 93 | return $product->getId() === 3 ? $availableQuantity : 0; |
| 94 | 94 | } |
| 95 | 95 | ); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->authorizationChecker->expects($this->any()) |
| 98 | 98 | ->method('isGranted') |
| 99 | 99 | ->willReturnCallback( |
| 100 | - function ($argument, Product $product) use ($isVisible) { |
|
| 100 | + function($argument, Product $product) use ($isVisible) { |
|
| 101 | 101 | return $isVisible && $argument === 'VIEW' && $product->getId() === 3; |
| 102 | 102 | } |
| 103 | 103 | ); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | |
| 53 | 53 | /* @var $dispatcher EventDispatcherInterface */ |
| 54 | 54 | $dispatcher = static::getContainer()->get('event_dispatcher'); |
| 55 | - $listener = function (CheckoutValidateEvent $event) { |
|
| 55 | + $listener = function(CheckoutValidateEvent $event) { |
|
| 56 | 56 | $event->setIsCheckoutRestartRequired(true); |
| 57 | 57 | }; |
| 58 | 58 | $dispatcher->addListener(CheckoutValidateEvent::NAME, $listener); |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | protected function addJoin(DatagridConfiguration $config) |
| 109 | 109 | { |
| 110 | 110 | $config->getOrmQuery()->addLeftJoin( |
| 111 | - $this->getAlias($config).'.taxCode', |
|
| 111 | + $this->getAlias($config) . '.taxCode', |
|
| 112 | 112 | $this->getJoinAlias() |
| 113 | 113 | ); |
| 114 | 114 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | ->findBy(['id' => $this->filterIds($ids)]); |
| 82 | 82 | |
| 83 | 83 | $result = array_map( |
| 84 | - function (AbstractTaxCode $taxCode) { |
|
| 84 | + function(AbstractTaxCode $taxCode) { |
|
| 85 | 85 | return $taxCode->getCode(); |
| 86 | 86 | }, |
| 87 | 87 | $taxCodes |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | $data = array_filter( |
| 102 | 102 | $data, |
| 103 | - function ($value) { |
|
| 103 | + function($value) { |
|
| 104 | 104 | return false !== filter_var($value, FILTER_VALIDATE_INT); |
| 105 | 105 | } |
| 106 | 106 | ); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | { |
| 119 | 119 | $data = array_filter( |
| 120 | 120 | $data, |
| 121 | - function ($value) { |
|
| 121 | + function($value) { |
|
| 122 | 122 | return is_string($value) && $value; |
| 123 | 123 | } |
| 124 | 124 | ); |
@@ -54,12 +54,12 @@ |
||
| 54 | 54 | |
| 55 | 55 | $result = $this->getProvider()->getTax($order); |
| 56 | 56 | $taxItems = array_map( |
| 57 | - function (Result $lineItem) { |
|
| 57 | + function(Result $lineItem) { |
|
| 58 | 58 | return [ |
| 59 | 59 | 'unit' => $lineItem->getUnit()->getArrayCopy(), |
| 60 | 60 | 'row' => $lineItem->getRow()->getArrayCopy(), |
| 61 | 61 | 'taxes' => array_map( |
| 62 | - function (AbstractResultElement $item) { |
|
| 62 | + function(AbstractResultElement $item) { |
|
| 63 | 63 | return $item->getArrayCopy(); |
| 64 | 64 | }, |
| 65 | 65 | $lineItem->getTaxes() |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $this->translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
| 42 | 42 | $this->translator->expects($this->any())->method('trans')->willReturnCallback( |
| 43 | - function ($message) { |
|
| 43 | + function($message) { |
|
| 44 | 44 | return ucfirst($message); |
| 45 | 45 | } |
| 46 | 46 | ); |
@@ -81,14 +81,14 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $event = new LifecycleEventArgs($order, $this->entityManager); |
| 83 | 83 | |
| 84 | - $this->taxProvider->expects($this->exactly((int) $expected)) |
|
| 84 | + $this->taxProvider->expects($this->exactly((int)$expected)) |
|
| 85 | 85 | ->method('createTaxValue') |
| 86 | 86 | ->with($order) |
| 87 | 87 | ->willReturn($taxValue); |
| 88 | 88 | |
| 89 | - $this->entityManager->expects($this->exactly((int) $expected))->method('persist')->with($taxValue); |
|
| 89 | + $this->entityManager->expects($this->exactly((int)$expected))->method('persist')->with($taxValue); |
|
| 90 | 90 | |
| 91 | - $this->metadata->expects($this->exactly((int) $expected))->method('getIdentifierValues')->willReturn([]); |
|
| 91 | + $this->metadata->expects($this->exactly((int)$expected))->method('getIdentifierValues')->willReturn([]); |
|
| 92 | 92 | |
| 93 | 93 | $this->listener->prePersist($order, $event); |
| 94 | 94 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | $event = new LifecycleEventArgs($order, $this->entityManager); |
| 115 | 115 | |
| 116 | 116 | $this->taxProvider->expects($this->never())->method('createTaxValue'); |
| 117 | - $this->metadata->expects($this->exactly((int) $expected))->method('getIdentifierValues')->willReturn([1]); |
|
| 117 | + $this->metadata->expects($this->exactly((int)$expected))->method('getIdentifierValues')->willReturn([1]); |
|
| 118 | 118 | |
| 119 | 119 | $this->listener->prePersist($order, $event); |
| 120 | 120 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | $order = new Order(); |
| 137 | - $this->taxProvider->expects($this->exactly((int) $expected))->method('removeTax')->with($order); |
|
| 137 | + $this->taxProvider->expects($this->exactly((int)$expected))->method('removeTax')->with($order); |
|
| 138 | 138 | |
| 139 | 139 | $this->listener->preRemove($order); |
| 140 | 140 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | |
| 112 | 112 | public function testBeforeSaveNoAddress() |
| 113 | 113 | { |
| 114 | - $address ='some_value'; |
|
| 114 | + $address = 'some_value'; |
|
| 115 | 115 | $settings = ['value' => $address]; |
| 116 | 116 | $event = new ConfigSettingsUpdateEvent($this->configManager, $settings); |
| 117 | 117 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | $builder->addEventListener( |
| 69 | 69 | FormEvents::PRE_SET_DATA, |
| 70 | - function (FormEvent $event) use ($quote, $type, $isManualEditGranted) { |
|
| 70 | + function(FormEvent $event) use ($quote, $type, $isManualEditGranted) { |
|
| 71 | 71 | $form = $event->getForm(); |
| 72 | 72 | |
| 73 | 73 | $addressCollection = $this->quoteAddressManager->getGroupedAddresses($quote, $type, 'oro.sale.quote.'); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $builder->addEventListener( |
| 103 | 103 | FormEvents::SUBMIT, |
| 104 | - function (FormEvent $event) use ($isManualEditGranted) { |
|
| 104 | + function(FormEvent $event) use ($isManualEditGranted) { |
|
| 105 | 105 | if (!$isManualEditGranted) { |
| 106 | 106 | $event->setData(null); |
| 107 | 107 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | { |
| 213 | 213 | array_walk_recursive( |
| 214 | 214 | $addresses, |
| 215 | - function (&$item) { |
|
| 215 | + function(&$item) { |
|
| 216 | 216 | if ($item instanceof AbstractAddress) { |
| 217 | 217 | $item = $this->addressFormatter->format($item, null, ', '); |
| 218 | 218 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | array_walk_recursive( |
| 237 | 237 | $addresses, |
| 238 | - function ($item, $key) use (&$data) { |
|
| 238 | + function($item, $key) use (&$data) { |
|
| 239 | 239 | if ($item instanceof AbstractAddress) { |
| 240 | 240 | $data[$key] = $this->serializer->normalize($item); |
| 241 | 241 | } |