@@ -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 |
@@ -89,7 +89,7 @@ |
||
89 | 89 | $class = $context->getOption(static::ENTITY_NAME_KEY); |
90 | 90 | $classRef = new ReflectionClass($class); |
91 | 91 | $classProperties = array_map( |
92 | - function (ReflectionProperty $prop) { |
|
92 | + function(ReflectionProperty $prop) { |
|
93 | 93 | return $prop->getName(); |
94 | 94 | }, |
95 | 95 | $classRef->getProperties() |
@@ -38,7 +38,7 @@ |
||
38 | 38 | /** |
39 | 39 | * @todo Remove dependency on exact magento channel type in CRM-8153 |
40 | 40 | */ |
41 | - return function (EntityRepository $er) { |
|
41 | + return function(EntityRepository $er) { |
|
42 | 42 | return $er->createQueryBuilder('c') |
43 | 43 | ->where('c.type = :type') |
44 | 44 | ->setParameter('type', MagentoChannelType::TYPE); |
@@ -81,20 +81,20 @@ discard block |
||
81 | 81 | 'integrationId' => null, |
82 | 82 | ], $body); |
83 | 83 | |
84 | - if (! $body['integrationId']) { |
|
84 | + if (!$body['integrationId']) { |
|
85 | 85 | $this->logger->critical('The message invalid. It must have integrationId set'); |
86 | 86 | |
87 | 87 | return self::REJECT; |
88 | 88 | } |
89 | 89 | |
90 | 90 | $ownerId = $message->getMessageId(); |
91 | - $jobName = 'oro_magento:sync_cart_expiration_integration:'.$body['integrationId']; |
|
91 | + $jobName = 'oro_magento:sync_cart_expiration_integration:' . $body['integrationId']; |
|
92 | 92 | |
93 | 93 | /** @var IntegrationRepository $repository */ |
94 | 94 | $repository = $this->doctrine->getRepository(Integration::class); |
95 | 95 | $integration = $repository->getOrLoadById($body['integrationId']); |
96 | 96 | |
97 | - if (! $integration || ! $integration->isEnabled()) { |
|
97 | + if (!$integration || !$integration->isEnabled()) { |
|
98 | 98 | $this->logger->error( |
99 | 99 | sprintf('The integration should exist and be enabled: %s', $body['integrationId']) |
100 | 100 | ); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return self::REJECT; |
103 | 103 | } |
104 | 104 | |
105 | - if (! is_array($integration->getConnectors()) || ! in_array('cart', $integration->getConnectors())) { |
|
105 | + if (!is_array($integration->getConnectors()) || !in_array('cart', $integration->getConnectors())) { |
|
106 | 106 | $this->logger->error( |
107 | 107 | sprintf('The integration should have cart in connectors: %s', $body['integrationId']), |
108 | 108 | ['integration' => $integration] |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | try { |
115 | - $result = $this->jobRunner->runUnique($ownerId, $jobName, function () use ($integration) { |
|
115 | + $result = $this->jobRunner->runUnique($ownerId, $jobName, function() use ($integration) { |
|
116 | 116 | $this->setTemporaryIntegrationToken($integration); |
117 | 117 | $this->cartExpirationProcessor->process($integration); |
118 | 118 | return true; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return self::REJECT; |
113 | 113 | } |
114 | 114 | |
115 | - $jobName = 'orocrm_magento:sync_initial_integration:'.$body['integration_id']; |
|
115 | + $jobName = 'orocrm_magento:sync_initial_integration:' . $body['integration_id']; |
|
116 | 116 | $ownerId = $message->getMessageId(); |
117 | 117 | |
118 | 118 | /** @var EntityManagerInterface $em */ |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | |
122 | 122 | /** @var Integration $integration */ |
123 | 123 | $integration = $em->find(Integration::class, $body['integration_id']); |
124 | - if (! $integration) { |
|
124 | + if (!$integration) { |
|
125 | 125 | $this->logger->error( |
126 | 126 | sprintf('Integration not found: %s', $body['integration_id']) |
127 | 127 | ); |
128 | 128 | |
129 | 129 | return self::REJECT; |
130 | 130 | } |
131 | - if (! $integration->isEnabled()) { |
|
131 | + if (!$integration->isEnabled()) { |
|
132 | 132 | $this->logger->error( |
133 | 133 | sprintf('Integration is not enabled: %s', $body['integration_id']) |
134 | 134 | ); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | return self::REJECT; |
137 | 137 | } |
138 | 138 | |
139 | - $result = $this->jobRunner->runUnique($ownerId, $jobName, function () use ($body, $integration) { |
|
139 | + $result = $this->jobRunner->runUnique($ownerId, $jobName, function() use ($body, $integration) { |
|
140 | 140 | $enabledListeners = [ |
141 | 141 | 'oro_search.index_listener', |
142 | 142 | 'oro_entity.event_listener.entity_modify_created_updated_properties_listener', |