@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up(Schema $schema, QueryBag $queries) |
| 15 | 15 | { |
| 16 | - $table = $schema->getTable('orocrm_magento_order'); |
|
| 16 | + $table = $schema->getTable('orocrm_magento_order'); |
|
| 17 | 17 | |
| 18 | 18 | if (!$table->hasColumn('origin_id')) { |
| 19 | 19 | $table->addColumn('origin_id', 'integer', ['notnull' => false, 'unsigned' => true]); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | /** @var ActivityListExtension */ |
| 28 | 28 | protected $activityListExtension; |
| 29 | 29 | |
| 30 | - /** @var ExtendExtension */ |
|
| 30 | + /** @var ExtendExtension */ |
|
| 31 | 31 | protected $extendExtension; |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -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; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $value->getChannel()->getType() |
| 45 | 45 | ); |
| 46 | 46 | |
| 47 | - if (! $transportProvider instanceof MagentoTransportInterface) { |
|
| 47 | + if (!$transportProvider instanceof MagentoTransportInterface) { |
|
| 48 | 48 | throw new UnexpectedTypeException($transportProvider, MagentoTransportInterface::class); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * @var $transportProvider MagentoTransportInterface |
| 55 | 55 | */ |
| 56 | - if (! $transportProvider->isCustomerHasUniqueEmail($value)) { |
|
| 56 | + if (!$transportProvider->isCustomerHasUniqueEmail($value)) { |
|
| 57 | 57 | $this->context->addViolationAt('email', $constraint->message); |
| 58 | 58 | } |
| 59 | 59 | } catch (\RuntimeException $e) { |
@@ -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 | |