@@ -82,16 +82,16 @@ |
||
| 82 | 82 | public function preSetDataProvider() |
| 83 | 83 | { |
| 84 | 84 | return [ |
| 85 | - 'with websites' => [ |
|
| 86 | - 'websites' => [ |
|
| 87 | - [ |
|
| 88 | - 'id' => 1, 'label' => 'Website 1' |
|
| 89 | - ] |
|
| 90 | - ], |
|
| 91 | - 'expected' => [ |
|
| 92 | - 'Website 1' => 1 |
|
| 93 | - ] |
|
| 94 | - ] |
|
| 85 | + 'with websites' => [ |
|
| 86 | + 'websites' => [ |
|
| 87 | + [ |
|
| 88 | + 'id' => 1, 'label' => 'Website 1' |
|
| 89 | + ] |
|
| 90 | + ], |
|
| 91 | + 'expected' => [ |
|
| 92 | + 'Website 1' => 1 |
|
| 93 | + ] |
|
| 94 | + ] |
|
| 95 | 95 | ]; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $this->isType('string'), |
| 47 | 47 | $this->isType('string'), |
| 48 | 48 | $this->callback( |
| 49 | - function ($item) { |
|
| 49 | + function($item) { |
|
| 50 | 50 | $this->assertInternalType('array', $item); |
| 51 | 51 | $this->assertArrayHasKey('label', $item); |
| 52 | 52 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $this->isType('string'), |
| 48 | 48 | $this->isType('string'), |
| 49 | 49 | $this->callback( |
| 50 | - function ($item) { |
|
| 50 | + function($item) { |
|
| 51 | 51 | $this->assertInternalType('array', $item); |
| 52 | 52 | $this->assertArrayHasKey('label', $item); |
| 53 | 53 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | ->method('setNormalizers') |
| 27 | 27 | ->with( |
| 28 | 28 | [ |
| 29 | - 'options' => function (Options $options, $values) { |
|
| 29 | + 'options' => function(Options $options, $values) { |
|
| 30 | 30 | if (!$values) { |
| 31 | 31 | $values = []; |
| 32 | 32 | } |
@@ -112,14 +112,14 @@ |
||
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | $this->connectorChoicesProvider |
| 115 | - ->expects($this->once()) |
|
| 116 | - ->method('getAllowedConnectorsChoices') |
|
| 117 | - ->willReturn($allowedConnectorsChoices); |
|
| 115 | + ->expects($this->once()) |
|
| 116 | + ->method('getAllowedConnectorsChoices') |
|
| 117 | + ->willReturn($allowedConnectorsChoices); |
|
| 118 | 118 | |
| 119 | 119 | $this->websiteChoicesProvider |
| 120 | - ->expects($this->once()) |
|
| 121 | - ->method('formatWebsiteChoices') |
|
| 122 | - ->willReturn($websiteChoices); |
|
| 120 | + ->expects($this->once()) |
|
| 121 | + ->method('formatWebsiteChoices') |
|
| 122 | + ->willReturn($websiteChoices); |
|
| 123 | 123 | |
| 124 | 124 | $this->transportEntityProvider |
| 125 | 125 | ->expects($this->once()) |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | ->method('get') |
| 97 | 97 | ->will( |
| 98 | 98 | $this->returnCallback( |
| 99 | - function ($argument) { |
|
| 99 | + function($argument) { |
|
| 100 | 100 | switch ($argument) { |
| 101 | 101 | case TransportHandler::TRANSPORT_TYPE: |
| 102 | 102 | return 'magento_soap'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $this->guestCustomerStrategyHelper = $this->createMock(GuestCustomerStrategyHelper::class); |
| 45 | 45 | |
| 46 | - $this->writer = new ProxyEntityWriter($this->wrapped, $this->databaseHelper); |
|
| 46 | + $this->writer = new ProxyEntityWriter($this->wrapped, $this->databaseHelper); |
|
| 47 | 47 | $this->writer->setGuestCustomerStrategyHelper($this->guestCustomerStrategyHelper); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -238,41 +238,41 @@ discard block |
||
| 238 | 238 | public function customerProvider() |
| 239 | 239 | { |
| 240 | 240 | return [ |
| 241 | - [ //guest mode. customers will be merged |
|
| 241 | + [//guest mode. customers will be merged |
|
| 242 | 242 | [$this->getCustomer('[email protected]', 1), $this->getCustomer('[email protected]', 1)], |
| 243 | 243 | [$this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1)] |
| 244 | 244 | ], |
| 245 | - [ //guest mode. customers will be merged |
|
| 245 | + [//guest mode. customers will be merged |
|
| 246 | 246 | [$this->getCustomer('[email protected]', 1), $this->getCustomer('[email protected]', 1)], |
| 247 | 247 | [$this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1)] |
| 248 | 248 | ], |
| 249 | - [ //guest mode. customers will be merged |
|
| 249 | + [//guest mode. customers will be merged |
|
| 250 | 250 | [$this->getCustomer('[email protected]', 1), $this->getCustomer('[email protected]', 1)], |
| 251 | 251 | [$this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1)] |
| 252 | 252 | ], |
| 253 | - [ //guest mode. customers will be merged |
|
| 253 | + [//guest mode. customers will be merged |
|
| 254 | 254 | [$this->getCustomer('example&@e.com', 1), $this->getCustomer('example&@e.com', 1)], |
| 255 | 255 | [$this->getUniqueHash('example&@e.com', 1) => $this->getCustomer('example&@e.com', 1)] |
| 256 | 256 | ], |
| 257 | - [ //guest mode. customers won't be merged, different channel |
|
| 257 | + [//guest mode. customers won't be merged, different channel |
|
| 258 | 258 | [$this->getCustomer('[email protected]', 1), $this->getCustomer('[email protected]', 2)], |
| 259 | 259 | [ |
| 260 | 260 | $this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1), |
| 261 | 261 | $this->getUniqueHash('[email protected]', 2) => $this->getCustomer('[email protected]', 2) |
| 262 | 262 | ] |
| 263 | 263 | ], |
| 264 | - [ //guest mode. customers won't be merged, different email |
|
| 264 | + [//guest mode. customers won't be merged, different email |
|
| 265 | 265 | [$this->getCustomer('[email protected]', 1), $this->getCustomer('[email protected]', 1)], |
| 266 | 266 | [ |
| 267 | 267 | $this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1), |
| 268 | 268 | $this->getUniqueHash('[email protected]', 1) => $this->getCustomer('[email protected]', 1) |
| 269 | 269 | ] |
| 270 | 270 | ], |
| 271 | - [ //guest mode. customers will be merged, without channel |
|
| 271 | + [//guest mode. customers will be merged, without channel |
|
| 272 | 272 | [$this->getCustomer('example&@e.com', null), $this->getCustomer('example&@e.com', null)], |
| 273 | 273 | [$this->getUniqueHash('example&@e.com', null) => $this->getCustomer('example&@e.com', null)] |
| 274 | 274 | ], |
| 275 | - [ //not guest mode. customers will be merged with originId |
|
| 275 | + [//not guest mode. customers will be merged with originId |
|
| 276 | 276 | [$this->getCustomer('[email protected]', 1, false, 10), $this->getCustomer('[email protected]', 1, false, 10)], |
| 277 | 277 | [10 => $this->getCustomer('[email protected]', 1, false, 10)] |
| 278 | 278 | ], |
@@ -314,9 +314,9 @@ discard block |
||
| 314 | 314 | $string = $email; |
| 315 | 315 | |
| 316 | 316 | if ($channelId) { |
| 317 | - $string.=$channelId; |
|
| 317 | + $string .= $channelId; |
|
| 318 | 318 | if ($fullName) { |
| 319 | - $string.=$fullName; |
|
| 319 | + $string .= $fullName; |
|
| 320 | 320 | } |
| 321 | 321 | } |
| 322 | 322 | |
@@ -161,7 +161,7 @@ |
||
| 161 | 161 | $entityManager = $this->getMockBuilder('Doctrine\ORM\EntityManager') |
| 162 | 162 | ->disableOriginalConstructor()->getMock(); |
| 163 | 163 | |
| 164 | - $repository = $this->getMockBuilder('Doctrine\ORM\EntityRepository') |
|
| 164 | + $repository = $this->getMockBuilder('Doctrine\ORM\EntityRepository') |
|
| 165 | 165 | ->disableOriginalConstructor()->getMock(); |
| 166 | 166 | $repository->expects(self::once())->method('findOneBy')->willReturn(new CustomerGroup()); |
| 167 | 167 | |
@@ -106,24 +106,24 @@ |
||
| 106 | 106 | $doctrine->getEntityRepositoryForClass(Account::class)->findBy(['owner' => $owner]), |
| 107 | 107 | $doctrine->getEntityRepositoryForClass(B2bCustomer::class)->findBy(['owner' => $owner]) |
| 108 | 108 | ); |
| 109 | - $accountsInGrid = array_map(function (GridRow $row) { |
|
| 109 | + $accountsInGrid = array_map(function(GridRow $row) { |
|
| 110 | 110 | return $row->getCellValue('Account name'); |
| 111 | 111 | }, $grid->getRows()); |
| 112 | - array_walk($ownAccounts, function (NameInterface &$element) { |
|
| 112 | + array_walk($ownAccounts, function(NameInterface &$element) { |
|
| 113 | 113 | $element = $element->getName(); |
| 114 | 114 | }); |
| 115 | 115 | } elseif ('Magento Customers' == $accountType) { |
| 116 | 116 | $ownAccounts = $doctrine->getEntityRepositoryForClass(Customer::class)->findBy(['owner' => $owner]); |
| 117 | - $accountsInGrid = array_map(function (GridRow $row) { |
|
| 117 | + $accountsInGrid = array_map(function(GridRow $row) { |
|
| 118 | 118 | $firstName = $row->getCellValue('First Name'); |
| 119 | 119 | $lastName = $row->getCellValue('Last Name'); |
| 120 | - $firstName = $firstName instanceof \DateTime ? $firstName->format('Y-m-d H:i:s') : $firstName; |
|
| 121 | - $lastName = $lastName instanceof \DateTime ? $lastName->format('Y-m-d H:i:s') : $lastName; |
|
| 120 | + $firstName = $firstName instanceof \DateTime ? $firstName->format('Y-m-d H:i:s') : $firstName; |
|
| 121 | + $lastName = $lastName instanceof \DateTime ? $lastName->format('Y-m-d H:i:s') : $lastName; |
|
| 122 | 122 | |
| 123 | - return $firstName.' '.$lastName; |
|
| 123 | + return $firstName . ' ' . $lastName; |
|
| 124 | 124 | }, $grid->getRows()); |
| 125 | - array_walk($ownAccounts, function (Customer &$element) { |
|
| 126 | - $element = $element->getFirstName().' '.$element->getLastName(); |
|
| 125 | + array_walk($ownAccounts, function(Customer &$element) { |
|
| 126 | + $element = $element->getFirstName() . ' ' . $element->getLastName(); |
|
| 127 | 127 | }); |
| 128 | 128 | } else { |
| 129 | 129 | throw new RuntimeException(sprintf('Unsupported "%s" account type', $accountType)); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | ); |
| 26 | 26 | |
| 27 | 27 | $queries->addPostQuery( |
| 28 | - 'UPDATE orocrm_magento_order_items itm '. |
|
| 28 | + 'UPDATE orocrm_magento_order_items itm ' . |
|
| 29 | 29 | 'SET owner_id = (SELECT organization_id FROM orocrm_magento_order WHERE itm.order_id = id)' |
| 30 | 30 | ); |
| 31 | 31 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | $queries->addPostQuery( |
| 43 | - 'UPDATE orocrm_magento_cart_item itm '. |
|
| 43 | + 'UPDATE orocrm_magento_cart_item itm ' . |
|
| 44 | 44 | 'SET owner_id = (SELECT organization_id FROM orocrm_magento_cart WHERE itm.cart_id = id)' |
| 45 | 45 | ); |
| 46 | 46 | } |