@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function load(array $configs, ContainerBuilder $container) |
24 | 24 | { |
25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | 26 | |
27 | 27 | $loader->load('services.yml'); |
28 | 28 | $loader->load('form_types.yml'); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $types = [\PDO::PARAM_INT]; |
50 | 50 | if ($products) { |
51 | 51 | $parameters[] = array_map( |
52 | - function ($product) { |
|
52 | + function($product) { |
|
53 | 53 | return $product instanceof Product ? $product->getId() : $product; |
54 | 54 | }, |
55 | 55 | $products |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $qb = $this->createQueryBuilder('price'); |
170 | 170 | |
171 | 171 | // ensure all skus are strings to avoid postgres's "No operator matches the given name and argument type(s)." |
172 | - array_walk($productSkus, function (& $sku) { |
|
172 | + array_walk($productSkus, function(& $sku) { |
|
173 | 173 | $sku = (string)$sku; |
174 | 174 | }); |
175 | 175 | |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | $price->setId($id); |
260 | 260 | } |
261 | 261 | $qb |
262 | - ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId(): null) |
|
262 | + ->setParameter('price_rule_id', $price->getPriceRule() ? $price->getPriceRule()->getId() : null) |
|
263 | 263 | ->setParameter('unit_code', $price->getProductUnitCode()) |
264 | 264 | ->setParameter('product_id', $price->getProduct()->getId()) |
265 | 265 | ->setParameter('price_list_id', $price->getPriceList()->getId()) |
@@ -99,7 +99,7 @@ |
||
99 | 99 | $repository = $entityManager->getRepository(ShippingService::class); |
100 | 100 | |
101 | 101 | /** @var ShippingService $shippingService */ |
102 | - $shippingService = $repository->findOneBy(['description' => $description]); |
|
102 | + $shippingService = $repository->findOneBy(['description' => $description]); |
|
103 | 103 | |
104 | 104 | if (!$shippingService) { |
105 | 105 | throw new \InvalidArgumentException(sprintf('No shipping service "%s" found', $description)); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $websiteProvider = $this->createMock(WebsiteProviderInterface::class); |
86 | 86 | $websiteProvider->expects($this->any()) |
87 | 87 | ->method('getWebsiteIds') |
88 | - ->will($this->returnCallback(function () use ($repo) { |
|
88 | + ->will($this->returnCallback(function() use ($repo) { |
|
89 | 89 | return $repo->getWebsiteIdentifiers(); |
90 | 90 | })); |
91 | 91 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | ] |
404 | 404 | ); |
405 | 405 | |
406 | - $items = $this->getResultItems(['alias' => 'oro_product_'. $notExistingId]); |
|
406 | + $items = $this->getResultItems(['alias' => 'oro_product_' . $notExistingId]); |
|
407 | 407 | |
408 | 408 | $this->assertCount(0, $items); |
409 | 409 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $types = [\PDO::PARAM_INT]; |
81 | 81 | if ($products) { |
82 | 82 | $parameters[] = array_map( |
83 | - function ($product) { |
|
83 | + function($product) { |
|
84 | 84 | return $product instanceof Product ? $product->getId() : $product; |
85 | 85 | }, |
86 | 86 | $products |
@@ -542,11 +542,11 @@ discard block |
||
542 | 542 | foreach ($criteria as $field => $criterion) { |
543 | 543 | QueryBuilderUtil::checkIdentifier($field); |
544 | 544 | if ($criterion === null) { |
545 | - $qb->andWhere($qb->expr()->isNull('prices.'.$field)); |
|
545 | + $qb->andWhere($qb->expr()->isNull('prices.' . $field)); |
|
546 | 546 | } elseif (is_array($criterion)) { |
547 | - $qb->andWhere($qb->expr()->in('prices.'.$field, $criterion)); |
|
547 | + $qb->andWhere($qb->expr()->in('prices.' . $field, $criterion)); |
|
548 | 548 | } else { |
549 | - $qb->andWhere($qb->expr()->eq('prices.'.$field, ':'.$field)) |
|
549 | + $qb->andWhere($qb->expr()->eq('prices.' . $field, ':' . $field)) |
|
550 | 550 | ->setParameter($field, $criterion); |
551 | 551 | } |
552 | 552 | } |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | protected function buildColumnName($currencyIsoCode, $priceAttributeId) |
159 | 159 | { |
160 | - return 'price_attribute_price_column_'.strtolower($currencyIsoCode).'_'.$priceAttributeId; |
|
160 | + return 'price_attribute_price_column_' . strtolower($currencyIsoCode) . '_' . $priceAttributeId; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $priceRepository = $this->doctrineHelper->getEntityRepository('OroPricingBundle:PriceAttributeProductPrice'); |
187 | 187 | |
188 | 188 | $productIds = array_map( |
189 | - function (ResultRecord $record) { |
|
189 | + function(ResultRecord $record) { |
|
190 | 190 | return $record->getValue('id'); |
191 | 191 | }, |
192 | 192 | $records |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | { |
235 | 235 | QueryBuilderUtil::checkIdentifier($columnName); |
236 | 236 | |
237 | - return $columnName.'_table'; |
|
237 | + return $columnName . '_table'; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
@@ -8,7 +8,7 @@ |
||
8 | 8 | use Symfony\Component\HttpFoundation\RequestStack; |
9 | 9 | |
10 | 10 | class ScopedProductSearchQueryRestrictionEventListenerTest extends |
11 | - AbstractProductSearchQueryRestrictionEventListenerTest |
|
11 | + AbstractProductSearchQueryRestrictionEventListenerTest |
|
12 | 12 | { |
13 | 13 | const SCOPE = 'test_scope'; |
14 | 14 |
@@ -29,15 +29,15 @@ |
||
29 | 29 | |
30 | 30 | foreach ($unitsByProductIds as $productId => $unit) { |
31 | 31 | QueryBuilderUtil::checkIdentifier($productId); |
32 | - $productIdParamName = 'product_id_'.$productId; |
|
32 | + $productIdParamName = 'product_id_' . $productId; |
|
33 | 33 | |
34 | - $productExpr = $expr->eq('product.id', ':'.$productIdParamName); |
|
34 | + $productExpr = $expr->eq('product.id', ':' . $productIdParamName); |
|
35 | 35 | |
36 | 36 | $qb->setParameter($productIdParamName, $productId); |
37 | 37 | |
38 | - $unitParamName = 'unit_'.$productId; |
|
38 | + $unitParamName = 'unit_' . $productId; |
|
39 | 39 | |
40 | - $unitExpr = $expr->eq('options.productUnit', ':'.$unitParamName); |
|
40 | + $unitExpr = $expr->eq('options.productUnit', ':' . $unitParamName); |
|
41 | 41 | $qb->setParameter($unitParamName, $unit); |
42 | 42 | |
43 | 43 | $expressions[] = $expr->andX($productExpr, $unitExpr); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $this->translator->expects($this->any()) |
46 | 46 | ->method('trans') |
47 | - ->willReturnCallback(function ($label) { |
|
47 | + ->willReturnCallback(function($label) { |
|
48 | 48 | return $label; |
49 | 49 | }); |
50 | 50 | |
@@ -75,8 +75,7 @@ discard block |
||
75 | 75 | /** @var AbstractToken $token */ |
76 | 76 | $token = $this->createMock( |
77 | 77 | $isGuest ? |
78 | - AnonymousCustomerUserToken::class : |
|
79 | - UsernamePasswordOrganizationToken::class |
|
78 | + AnonymousCustomerUserToken::class : UsernamePasswordOrganizationToken::class |
|
80 | 79 | ); |
81 | 80 | |
82 | 81 | $this->tokenStorage |