@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function up(Schema $schema, QueryBag $queries) |
16 | 16 | { |
17 | - $table = $schema->getTable('orocrm_magento_order'); |
|
17 | + $table = $schema->getTable('orocrm_magento_order'); |
|
18 | 18 | $table->addColumn('origin_id', 'integer', ['notnull' => false, 'unsigned' => true]); |
19 | 19 | $table->addUniqueIndex(['origin_id', 'channel_id'], 'unq_origin_id_channel_id'); |
20 | 20 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | return; |
30 | 30 | } |
31 | 31 | |
32 | - $items = array_map(function ($subWidget) { |
|
32 | + $items = array_map(function($subWidget) { |
|
33 | 33 | return [ |
34 | 34 | 'id' => $subWidget, |
35 | 35 | 'show' => true, |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | $connection = $manager->getConnection(); |
74 | - $connection->transactional(function () use ($connection, $updateQuery) { |
|
74 | + $connection->transactional(function() use ($connection, $updateQuery) { |
|
75 | 75 | $connection->executeUpdate($updateQuery); |
76 | 76 | }); |
77 | 77 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $iterator = new BufferedIdentityQueryResultIterator($qb->getQuery()); |
90 | 90 | $iterator->setBufferSize(self::BUFFER_SIZE); |
91 | - $connection->transactional(function () use ($manager, $iterator, $associationName) { |
|
91 | + $connection->transactional(function() use ($manager, $iterator, $associationName) { |
|
92 | 92 | $connection = $manager->getConnection(); |
93 | 93 | $insertQB = $connection->createQueryBuilder(); |
94 | 94 | $tableName = $manager->getClassMetadata(SalesCustomer::class)->getTableName(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | use ContainerAwareTrait; |
41 | 41 | |
42 | - const TAX = 0.0838; |
|
42 | + const TAX = 0.0838; |
|
43 | 43 | |
44 | 44 | /** @var array */ |
45 | 45 | protected $users; |
@@ -522,10 +522,10 @@ discard block |
||
522 | 522 | $totalTaxAmount = 0.0; |
523 | 523 | $shipping = rand(0, 1); |
524 | 524 | for ($i = 0; $i <= $cartItemsCount; $i++) { |
525 | - $product = $products[rand(0, count($products)-1)]; |
|
526 | - $origin = $i+1; |
|
525 | + $product = $products[rand(0, count($products) - 1)]; |
|
526 | + $origin = $i + 1; |
|
527 | 527 | $price = rand(10, 200); |
528 | - $price = $price + rand(0, 99)/100.0; |
|
528 | + $price = $price + rand(0, 99) / 100.0; |
|
529 | 529 | $taxAmount = $price * self::TAX; |
530 | 530 | $totalTaxAmount = $totalTaxAmount + $taxAmount; |
531 | 531 | $total = $total + $price + $taxAmount; |
@@ -549,8 +549,8 @@ discard block |
||
549 | 549 | $cartItem->setCart($cart); |
550 | 550 | $cartItem->setOwner($cart->getOrganization()); |
551 | 551 | $cart->getCartItems()->add($cartItem); |
552 | - $cart->setItemsQty($i+1); |
|
553 | - $cart->setItemsCount($i+1); |
|
552 | + $cart->setItemsQty($i + 1); |
|
553 | + $cart->setItemsCount($i + 1); |
|
554 | 554 | $om->persist($cartItem); |
555 | 555 | $cartItems[] = $cartItem; |
556 | 556 | } |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | |
672 | 672 | $buffer = range(0, count($accounts) - 1); |
673 | 673 | for ($i = 0; $i < 25; ++$i) { |
674 | - $birthday = $this->generateBirthday(); |
|
674 | + $birthday = $this->generateBirthday(); |
|
675 | 675 | |
676 | 676 | /** @var Contact $contact */ |
677 | 677 | $contact = $contacts[$buffer[$i]]; |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | */ |
728 | 728 | protected function getRandomOwner() |
729 | 729 | { |
730 | - $randomUser = count($this->users)-1; |
|
730 | + $randomUser = count($this->users) - 1; |
|
731 | 731 | $user = $this->users[rand(0, $randomUser)]; |
732 | 732 | |
733 | 733 | return $user; |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public static function getConverterCallback() |
19 | 19 | { |
20 | - return function (ResultRecordInterface $record) { |
|
20 | + return function(ResultRecordInterface $record) { |
|
21 | 21 | /** @var ArrayCollection $websites */ |
22 | 22 | $websites = $record->getValue('websites'); |
23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | return implode( |
29 | 29 | ', ', |
30 | 30 | $websites->map( |
31 | - function (Website $website) { |
|
31 | + function(Website $website) { |
|
32 | 32 | return $website->getName(); |
33 | 33 | } |
34 | 34 | )->toArray() |
@@ -216,7 +216,7 @@ |
||
216 | 216 | /** @var OrderAddress $existingEntity */ |
217 | 217 | $existingEntity = $this->existingEntity->getAddresses() |
218 | 218 | ->filter( |
219 | - function (OrderAddress $address) use ($entity) { |
|
219 | + function(OrderAddress $address) use ($entity) { |
|
220 | 220 | $isMatched = true; |
221 | 221 | $fieldsToMatch = ['street', 'city', 'postalCode', 'country', 'region']; |
222 | 222 |
@@ -250,8 +250,7 @@ |
||
250 | 250 | protected function getMageRegionId($addressType, $originId) |
251 | 251 | { |
252 | 252 | return isset($this->mageRegionsIds[$addressType][$originId]) ? |
253 | - $this->mageRegionsIds[$addressType][$originId] : |
|
254 | - null; |
|
253 | + $this->mageRegionsIds[$addressType][$originId] : null; |
|
255 | 254 | } |
256 | 255 | |
257 | 256 | /** |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $existingEntity = $this->getEntityByCriteria([$entityIdField => $entityId], $entityClass); |
79 | 79 | } |
80 | 80 | |
81 | - return $existingEntity ? : null; |
|
81 | + return $existingEntity ?: null; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
@@ -119,17 +119,17 @@ |
||
119 | 119 | $exportedRecord = parent::convertToExportFormat($exportedRecord, $skipNullValues); |
120 | 120 | |
121 | 121 | if (isset($exportedRecord['store']['store_id'])) { |
122 | - $exportedRecord['store_id'] = $exportedRecord['store']['store_id']; |
|
122 | + $exportedRecord['store_id'] = $exportedRecord['store']['store_id']; |
|
123 | 123 | unset($exportedRecord['store']); |
124 | 124 | } |
125 | 125 | |
126 | 126 | if (isset($exportedRecord['website']['id'])) { |
127 | - $exportedRecord['website_id'] = $exportedRecord['website']['id']; |
|
127 | + $exportedRecord['website_id'] = $exportedRecord['website']['id']; |
|
128 | 128 | unset($exportedRecord['website']); |
129 | 129 | } |
130 | 130 | |
131 | 131 | if (isset($exportedRecord['group']['customer_group_id'])) { |
132 | - $exportedRecord['group_id'] = $exportedRecord['group']['customer_group_id']; |
|
132 | + $exportedRecord['group_id'] = $exportedRecord['group']['customer_group_id']; |
|
133 | 133 | unset($exportedRecord['group']); |
134 | 134 | } |
135 | 135 |