@@ -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 |
@@ -88,13 +88,13 @@ |
||
88 | 88 | |
89 | 89 | $translatableEntity->expects($this->any())->method('configureOptions')->will( |
90 | 90 | $this->returnCallback( |
91 | - function (OptionsResolver $resolver) use ($choices) { |
|
92 | - $choiceList = function (Options $options) use ($choices) { |
|
91 | + function(OptionsResolver $resolver) use ($choices) { |
|
92 | + $choiceList = function(Options $options) use ($choices) { |
|
93 | 93 | $className = $options->offsetGet('class'); |
94 | 94 | if (array_key_exists($className, $choices)) { |
95 | 95 | return new ArrayChoiceList( |
96 | 96 | $choices[$className], |
97 | - function ($item) { |
|
97 | + function($item) { |
|
98 | 98 | if ($item instanceof Country) { |
99 | 99 | return $item->getIso2Code(); |
100 | 100 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $resolver = $this->createMock('Symfony\Component\OptionsResolver\OptionsResolver'); |
45 | 45 | $resolver->expects($this->once()) |
46 | 46 | ->method('setDefaults') |
47 | - ->with($this->callback(function (array $options) { |
|
47 | + ->with($this->callback(function(array $options) { |
|
48 | 48 | $this->assertArrayHasKey('data_class', $options); |
49 | 49 | $this->assertArrayHasKey('compact_units', $options); |
50 | 50 | $this->assertArrayHasKey('csrf_token_id', $options); |
@@ -102,8 +102,8 @@ |
||
102 | 102 | $translator = $this->createMock(TranslatorInterface::class); |
103 | 103 | $translator->expects(static::any()) |
104 | 104 | ->method('trans') |
105 | - ->will(static::returnCallback(function ($message) { |
|
106 | - return $message.'_translated'; |
|
105 | + ->will(static::returnCallback(function($message) { |
|
106 | + return $message . '_translated'; |
|
107 | 107 | })); |
108 | 108 | } |
109 | 109 |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | $isManualEditGranted = $this->orderAddressSecurityProvider->isManualEditGranted($type); |
68 | 68 | $this->initCustomerAddressField($builder, $type, $order, $isManualEditGranted, $isEditEnabled); |
69 | 69 | |
70 | - $builder->add('phone', TextType::class, ['required' => false, StripTagsExtension::OPTION_NAME => true,]); |
|
70 | + $builder->add('phone', TextType::class, ['required' => false, StripTagsExtension::OPTION_NAME => true, ]); |
|
71 | 71 | |
72 | 72 | $builder->addEventListener( |
73 | 73 | FormEvents::SUBMIT, |
74 | - function (FormEvent $event) use ($isManualEditGranted) { |
|
74 | + function(FormEvent $event) use ($isManualEditGranted) { |
|
75 | 75 | if (!$isManualEditGranted) { |
76 | 76 | $event->setData(null); |
77 | 77 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | { |
152 | 152 | array_walk_recursive( |
153 | 153 | $addresses, |
154 | - function (&$item) { |
|
154 | + function(&$item) { |
|
155 | 155 | if ($item instanceof AbstractAddress) { |
156 | 156 | $item = $this->addressFormatter->format($item, null, ', '); |
157 | 157 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | |
175 | 175 | array_walk_recursive( |
176 | 176 | $addresses, |
177 | - function ($item, $key) use (&$data) { |
|
177 | + function($item, $key) use (&$data) { |
|
178 | 178 | if ($item instanceof AbstractAddress) { |
179 | 179 | $data[$key] = $this->serializer->normalize($item); |
180 | 180 | } |