@@ -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 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $this->quoteAddressManager->expects($this->any())->method('updateFromAbstract') |
| 132 | 132 | ->will( |
| 133 | 133 | $this->returnCallback( |
| 134 | - function (CustomerAddress $address = null, QuoteAddress $orderAddress = null) { |
|
| 134 | + function(CustomerAddress $address = null, QuoteAddress $orderAddress = null) { |
|
| 135 | 135 | if (!$orderAddress) { |
| 136 | 136 | $orderAddress = new QuoteAddress(); |
| 137 | 137 | } |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $this->quoteAddressManager->expects($this->any())->method('getEntityByIdentifier') |
| 254 | 254 | ->will( |
| 255 | 255 | $this->returnCallback( |
| 256 | - function ($identifier) use ($groupedAddresses) { |
|
| 256 | + function($identifier) use ($groupedAddresses) { |
|
| 257 | 257 | foreach ($groupedAddresses as $groupedAddressesGroup) { |
| 258 | 258 | if (array_key_exists($identifier, $groupedAddressesGroup)) { |
| 259 | 259 | return $groupedAddressesGroup[$identifier]; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $this->quoteAddressManager->expects($this->any())->method('updateFromAbstract') |
| 269 | 269 | ->will( |
| 270 | 270 | $this->returnCallback( |
| 271 | - function (CustomerAddress $address) { |
|
| 271 | + function(CustomerAddress $address) { |
|
| 272 | 272 | $quoteAddress = new QuoteAddress(); |
| 273 | 273 | $quoteAddress->setCountry($address->getCountry()); |
| 274 | 274 | $quoteAddress->setStreet($address->getStreet()); |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | $this->quoteAddressManager->expects($this->any())->method('updateFromAbstract') |
| 284 | 284 | ->will( |
| 285 | 285 | $this->returnCallback( |
| 286 | - function (CustomerAddress $address = null, QuoteAddress $orderAddress = null) { |
|
| 286 | + function(CustomerAddress $address = null, QuoteAddress $orderAddress = null) { |
|
| 287 | 287 | if (!$orderAddress) { |
| 288 | 288 | $orderAddress = new QuoteAddress(); |
| 289 | 289 | } |