@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ->method('setData') |
121 | 121 | ->with( |
122 | 122 | $this->callback( |
123 | - function ($data) use ($syncStartDate) { |
|
123 | + function($data) use ($syncStartDate) { |
|
124 | 124 | $this->assertArrayHasKey('initialSyncedTo', $data); |
125 | 125 | |
126 | 126 | $this->assertEquals(['initialSyncedTo' => $syncStartDate->format(\DateTime::ISO8601)], $data); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ->method('setData') |
185 | 185 | ->with( |
186 | 186 | $this->callback( |
187 | - function ($data) use ($syncedTo, $interval) { |
|
187 | + function($data) use ($syncedTo, $interval) { |
|
188 | 188 | $this->assertArrayHasKey('initialSyncedTo', $data); |
189 | 189 | |
190 | 190 | $date = \DateTime::createFromFormat( |
@@ -73,7 +73,7 @@ |
||
73 | 73 | ->with($this->isType('integer')) |
74 | 74 | ->will( |
75 | 75 | $this->returnCallback( |
76 | - function ($id) use ($channels) { |
|
76 | + function($id) use ($channels) { |
|
77 | 77 | if (empty($channels[$id])) { |
78 | 78 | return null; |
79 | 79 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $translator = $this->createMock('Symfony\Component\Translation\TranslatorInterface'); |
55 | 55 | $translator->expects($this->any()) |
56 | 56 | ->method('trans') |
57 | - ->will($this->returnCallback(function ($id) { |
|
57 | + ->will($this->returnCallback(function($id) { |
|
58 | 58 | return $id; |
59 | 59 | })); |
60 | 60 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | ->method('getRepository') |
76 | 76 | ->will( |
77 | 77 | $this->returnCallback( |
78 | - function ($entityName) use ($channelRepository, $customerRepository) { |
|
78 | + function($entityName) use ($channelRepository, $customerRepository) { |
|
79 | 79 | if ($entityName == 'OroChannelBundle:Channel') { |
80 | 80 | return $channelRepository; |
81 | 81 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ); |
125 | 125 | $this->dateHelper->expects($this->once()) |
126 | 126 | ->method('getDatePeriod') |
127 | - ->willReturnCallback(function ($past, $now) { |
|
127 | + ->willReturnCallback(function($past, $now) { |
|
128 | 128 | return [ |
129 | 129 | '2014-02' => ['date' => '2014-02-01'], |
130 | 130 | '2014-03' => ['date' => '2014-03-01'], |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | }); |
142 | 142 | $this->dateHelper->expects($this->any()) |
143 | 143 | ->method('getKey') |
144 | - ->willReturnCallback(function ($past, $now, $row) { |
|
144 | + ->willReturnCallback(function($past, $now, $row) { |
|
145 | 145 | return $row['yearCreated'] . '-' . $row['monthCreated']; |
146 | 146 | }); |
147 | 147 | $this->dateHelper->expects($this->once()) |
148 | 148 | ->method('getPeriod') |
149 | - ->willReturnCallback(function ($dateRange) { |
|
149 | + ->willReturnCallback(function($dateRange) { |
|
150 | 150 | return [$dateRange['start'], $dateRange['end']]; |
151 | 151 | }); |
152 | 152 | $this->assertEquals( |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | public function testGetAverageOrderAmountByCustomerChartView() |
61 | 61 | { |
62 | - $sourceOrderData = [ |
|
62 | + $sourceOrderData = [ |
|
63 | 63 | 'First' => [['month' => '2014-09-01', 'amount' => 3]], |
64 | 64 | 'Second' => [['month' => '2014-09-01', 'amount' => 5]] |
65 | 65 | ]; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | 'First' => [['month' => '2014-09-01', 'amount' => 3]], |
68 | 68 | 'Second' => [['month' => '2014-09-01', 'amount' => 5]] |
69 | 69 | ]; |
70 | - $expectedOptions = [ |
|
70 | + $expectedOptions = [ |
|
71 | 71 | 'name' => 'multiline_chart', |
72 | 72 | 'data_schema' => [ |
73 | 73 | 'label' => [ |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | ] |
83 | 83 | ] |
84 | 84 | ]; |
85 | - $chartConfig = [ |
|
85 | + $chartConfig = [ |
|
86 | 86 | 'data_schema' => [ |
87 | 87 | 'label' => [ |
88 | 88 | 'field_name' => 'month', |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | ->willReturn(['viewType' => 'month']); |
111 | 111 | $dateHelper->expects($this->once()) |
112 | 112 | ->method('getPeriod') |
113 | - ->willReturnCallback(function ($dateRange) { |
|
113 | + ->willReturnCallback(function($dateRange) { |
|
114 | 114 | return [$dateRange['start'], $dateRange['end']]; |
115 | 115 | }); |
116 | 116 | $orderRepository->expects($this->once()) |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | ); |
177 | 177 | $this->dateHelper->expects($this->once()) |
178 | 178 | ->method('getPeriod') |
179 | - ->willReturnCallback(function ($dateRange) { |
|
179 | + ->willReturnCallback(function($dateRange) { |
|
180 | 180 | return [$dateRange['start'], $dateRange['end']]; |
181 | 181 | }); |
182 | 182 | $this->dateHelper->expects($this->once()) |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | ); |
328 | 328 | $this->dateHelper->expects($this->once()) |
329 | 329 | ->method('getPeriod') |
330 | - ->willReturnCallback(function ($dateRange) { |
|
330 | + ->willReturnCallback(function($dateRange) { |
|
331 | 331 | return [$dateRange['start'], $dateRange['end']]; |
332 | 332 | }); |
333 | 333 | $this->dateHelper->expects($this->once()) |
@@ -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 |
@@ -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()) |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $requestStack = new RequestStack(); |
54 | 54 | $requestStack->push($this->request); |
55 | 55 | |
56 | - $this->transportEntity = $this->getEntity(MagentoSoapTransport::class); |
|
56 | + $this->transportEntity = $this->getEntity(MagentoSoapTransport::class); |
|
57 | 57 | |
58 | 58 | $this->transportHandler = new TransportHandler( |
59 | 59 | $this->typesRegistry, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ->method('get') |
99 | 99 | ->will( |
100 | 100 | $this->returnCallback( |
101 | - function ($argument) { |
|
101 | + function($argument) { |
|
102 | 102 | switch ($argument) { |
103 | 103 | case TransportHandler::TRANSPORT_TYPE: |
104 | 104 | 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 |