@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | $entityType = $this->getEntityType(CreditMemo::class); |
25 | 25 | $response = $this->cget(['entity' => $entityType]); |
26 | - $this->assertResponseContains(__DIR__.'/responses/get_credit_memos.yml', $response); |
|
26 | + $this->assertResponseContains(__DIR__ . '/responses/get_credit_memos.yml', $response); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testGetCreditMemo() |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'entity' => $this->getEntityType(CreditMemo::class), |
33 | 33 | 'id' => '<toString(@creditMemo->id)>', |
34 | 34 | ]); |
35 | - $this->assertResponseContains(__DIR__.'/responses/get_credit_memo.yml', $response); |
|
35 | + $this->assertResponseContains(__DIR__ . '/responses/get_credit_memo.yml', $response); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | public function testUpdateCreditMemo() |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $data = [ |
45 | 45 | 'data' => [ |
46 | 46 | 'type' => $entityType, |
47 | - 'id' => (string) $creditMemo->getId(), |
|
47 | + 'id' => (string)$creditMemo->getId(), |
|
48 | 48 | 'attributes' => |
49 | 49 | [ |
50 | 50 | 'transactionId' => '100000XT', |
@@ -71,12 +71,12 @@ discard block |
||
71 | 71 | |
72 | 72 | $response = $this->post( |
73 | 73 | ['entity' => $entityType], |
74 | - __DIR__.'/requests/create_credit_memo.yml' |
|
74 | + __DIR__ . '/requests/create_credit_memo.yml' |
|
75 | 75 | ); |
76 | 76 | |
77 | 77 | /** @var CreditMemo $creditMemo */ |
78 | 78 | $creditMemo = $this->getCreditMemoRepository()->findOneByOriginId('2'); |
79 | - $this->assertResponseContains(__DIR__.'/responses/create_credit_memo.yml', $response, $creditMemo); |
|
79 | + $this->assertResponseContains(__DIR__ . '/responses/create_credit_memo.yml', $response, $creditMemo); |
|
80 | 80 | $this->assertSame($this->getReference('organization')->getId(), $creditMemo->getOrganization()->getId()); |
81 | 81 | $this->assertSame($this->getReference('user')->getId(), $creditMemo->getOwner()->getId()); |
82 | 82 | $this->assertSame($this->getReference('guestOrder')->getId(), $creditMemo->getOrder()->getId()); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | protected function assertWebsitesEquals(array $expectedWebsites) |
123 | 123 | { |
124 | 124 | $websiteEntities = $this->em->getRepository(Website::class)->findBy([], ['originId' => 'ASC']); |
125 | - $websites = array_map(function (Website $item) { |
|
125 | + $websites = array_map(function(Website $item) { |
|
126 | 126 | return [ |
127 | 127 | 'id' => $item->getOriginId(), |
128 | 128 | 'code' => $item->getCode(), |
@@ -131,7 +131,7 @@ |
||
131 | 131 | protected function assertRegionsEquals(array $expectedRegions) |
132 | 132 | { |
133 | 133 | $regionEntities = $this->em->getRepository(Region::class)->findBy([], ['id' => 'ASC']); |
134 | - $regions = array_map(function (Region $item) { |
|
134 | + $regions = array_map(function(Region $item) { |
|
135 | 135 | return [ |
136 | 136 | "combinedCode" => $item->getCombinedCode(), |
137 | 137 | "code" => $item->getCode(), |
@@ -121,7 +121,7 @@ |
||
121 | 121 | protected function assertStoresEquals(array $expectecStores) |
122 | 122 | { |
123 | 123 | $storeEntities = $this->em->getRepository(Store::class)->findBy([], ['originId' => 'ASC']); |
124 | - $stores = array_map(function (Store $item) { |
|
124 | + $stores = array_map(function(Store $item) { |
|
125 | 125 | return [ |
126 | 126 | 'id' => $item->getOriginId(), |
127 | 127 | 'code' => $item->getCode(), |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | protected function getExpectedResultCallback($firstName, $lastName, $email) |
176 | 176 | { |
177 | - return function () use ($firstName, $lastName, $email) { |
|
177 | + return function() use ($firstName, $lastName, $email) { |
|
178 | 178 | /** |
179 | 179 | * @var $store Store |
180 | 180 | */ |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | $order = new Order(); |
231 | 231 | $order->setCustomer($customer); |
232 | 232 | $order->setOriginId(1); |
233 | - $order->setIncrementId((string) rand(1, 1000)); |
|
233 | + $order->setIncrementId((string)rand(1, 1000)); |
|
234 | 234 | $order->setCustomerEmail($email); |
235 | 235 | $order->setCart(new Cart()); |
236 | 236 | $order->setStatus('open'); |
@@ -136,7 +136,7 @@ |
||
136 | 136 | $orderNotesCollection |
137 | 137 | ); |
138 | 138 | |
139 | - $actualOrderNoteIds = $orderNotesCollection->map(function (OrderNote $orderNote) { |
|
139 | + $actualOrderNoteIds = $orderNotesCollection->map(function(OrderNote $orderNote) { |
|
140 | 140 | return $orderNote->getOriginId(); |
141 | 141 | })->toArray(); |
142 | 142 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | $magentoAddressUSAZ = $this->createMagentoAddress($this->regions['US-AZ'], $this->countries['US']); |
43 | 43 | $magentoAddressUSLA = $this->createMagentoAddress($this->regions['US-LA'], $this->countries['US']); |
44 | - $account = $this->createAccount(); |
|
44 | + $account = $this->createAccount(); |
|
45 | 45 | |
46 | 46 | $customer = $this->createCustomer(1, $account, $magentoAddressUSAZ, self::NONE_SHARED_EMAIL); |
47 | 47 | $customer2 = $this->createCustomer(2, $account, $magentoAddressUSLA, self::TEST_SHARED_EMAIL); |
@@ -165,12 +165,12 @@ |
||
165 | 165 | $origin |
166 | 166 | ) { |
167 | 167 | $result = $adminUrl . |
168 | - '/oro_gateway/do?'.$origin.'=' . |
|
169 | - $id . |
|
170 | - '&route=' . $magentoRoute . |
|
171 | - '&workflow=' . $flowName . |
|
172 | - '&success_url=' . urlencode($successUrl) . |
|
173 | - '&error_url=' . urlencode($errorUrl); |
|
168 | + '/oro_gateway/do?'.$origin.'=' . |
|
169 | + $id . |
|
170 | + '&route=' . $magentoRoute . |
|
171 | + '&workflow=' . $flowName . |
|
172 | + '&success_url=' . urlencode($successUrl) . |
|
173 | + '&error_url=' . urlencode($errorUrl); |
|
174 | 174 | |
175 | 175 | $this->transport->expects($this->atLeastOnce())->method('getAdminUrl')->will($this->returnValue($adminUrl)); |
176 | 176 |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $origin |
166 | 166 | ) { |
167 | 167 | $result = $adminUrl . |
168 | - '/oro_gateway/do?'.$origin.'=' . |
|
168 | + '/oro_gateway/do?' . $origin . '=' . |
|
169 | 169 | $id . |
170 | 170 | '&route=' . $magentoRoute . |
171 | 171 | '&workflow=' . $flowName . |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | $exception = new ExtensionRequiredException; |
215 | 215 | |
216 | 216 | return [ |
217 | - [144, $successRoute, $errorRoute, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
217 | + [144, $successRoute, $errorRoute, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
218 | 218 | [356, $successRoute, $errorRoute, $exception, $successUrl, $errorUrl, $flowName, $checkoutRoute, $origin], |
219 | - [543, $exception, $errorRoute, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
220 | - [632, $successRoute, $exception, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
219 | + [543, $exception, $errorRoute, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
220 | + [632, $successRoute, $exception, $adminUrl, $successUrl, $errorUrl, $flowName, $newOrderRoute, $origin], |
|
221 | 221 | ]; |
222 | 222 | } |
223 | 223 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $this->assertFalse($stateManager->isInState($object->stateField, self::STATE_REQUIRE_ADDRESS)); |
35 | 35 | $this->assertFalse($stateManager->isInState($object->stateField, self::STATE_REQUIRE_INFO)); |
36 | 36 | |
37 | - $stateManager->addState($object, 'stateField', self::STATE_REQUIRE_ADDRESS | self::STATE_REQUIRE_INFO); |
|
37 | + $stateManager->addState($object, 'stateField', self::STATE_REQUIRE_ADDRESS|self::STATE_REQUIRE_INFO); |
|
38 | 38 | $this->assertTrue($stateManager->isInState($object->stateField, self::STATE_REQUIRE_ADDRESS)); |
39 | 39 | $this->assertTrue($stateManager->isInState($object->stateField, self::STATE_REQUIRE_INFO)); |
40 | 40 |