@@ -521,9 +521,9 @@ |
||
521 | 521 | } |
522 | 522 | } |
523 | 523 | |
524 | - /** |
|
525 | - * @When /^I add option value "([^""]*)"$/ |
|
526 | - */ |
|
524 | + /** |
|
525 | + * @When /^I add option value "([^""]*)"$/ |
|
526 | + */ |
|
527 | 527 | public function iAddOptionValue($optionValue) |
528 | 528 | { |
529 | 529 | $newItem = $this->addNewItemToFormCollection($this->getSession()->getPage(), 'option_values'); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | protected function waitForTabToActivate($tabContainer) |
63 | 63 | { |
64 | - $this->waitFor(function () use ($tabContainer) { |
|
64 | + $this->waitFor(function() use ($tabContainer) { |
|
65 | 65 | return false !== strpos($tabContainer->getAttribute('class'), 'active'); |
66 | 66 | }); |
67 | 67 | } |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | */ |
754 | 754 | protected function getFormCollectionDiv(DocumentElement $page, $collectionName) |
755 | 755 | { |
756 | - return $page->find('css', 'div[data-form-type="collection"][id*="'. $collectionName .'"]'); |
|
756 | + return $page->find('css', 'div[data-form-type="collection"][id*="'.$collectionName.'"]'); |
|
757 | 757 | } |
758 | 758 | |
759 | 759 | /** |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $attribute = explode(':', $data['attributes']); |
50 | 50 | |
51 | 51 | $productAttribute = $this->findOneByName('product_attribute', trim($attribute[0])); |
52 | - $attributeValue = $this->getFactory('product_attribute_value')->createNew(); |
|
52 | + $attributeValue = $this->getFactory('product_attribute_value')->createNew(); |
|
53 | 53 | |
54 | 54 | $attributeValue->setAttribute($productAttribute); |
55 | 55 | $attributeValue->setValue($attribute[1]); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $archetype = $this->findOneByName('product_archetype_translation', $archetypeName); |
135 | 135 | |
136 | 136 | if (!$archetype->getLocale() === $locale) { |
137 | - throw new \Exception('There is no translation for product archetype'. $archetypeName . ' in '.$locale . 'locale'); |
|
137 | + throw new \Exception('There is no translation for product archetype'.$archetypeName.' in '.$locale.'locale'); |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | $option->setName($name); |
164 | 164 | $option->setPresentation($presentation ?: $name); |
165 | 165 | |
166 | - foreach(explode(',', $values) as $valueData) { |
|
166 | + foreach (explode(',', $values) as $valueData) { |
|
167 | 167 | |
168 | 168 | $valueData = preg_split("[\\[|\\]]", $valueData, -1, PREG_SPLIT_NO_EMPTY); |
169 | 169 | $optionValue = $optionValueFactory->createNew(); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | $product = $this->findOneByName('product_translation', $productName); |
256 | 256 | |
257 | 257 | if (!$product->getLocale() === $locale) { |
258 | - throw new \Exception('There is no translation for product'. $productName . ' in '.$locale . 'locale'); |
|
258 | + throw new \Exception('There is no translation for product'.$productName.' in '.$locale.'locale'); |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | foreach ($calculatorConfiguration as $channelCode => $price) { |
326 | 326 | $channel = $channelRepository->findOneBy(array('code' => $channelCode)); |
327 | 327 | |
328 | - $finalCalculatorConfiguration[$channel->getId()] = (int)round($price * 100); |
|
328 | + $finalCalculatorConfiguration[$channel->getId()] = (int) round($price * 100); |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | return $finalCalculatorConfiguration; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | if ($cartIdentifier !== null) { |
125 | 125 | $cart = $this->cartRepository->find($cartIdentifier); |
126 | 126 | |
127 | - if ($cart !== null ) { |
|
127 | + if ($cart !== null) { |
|
128 | 128 | return $cart; |
129 | 129 | } |
130 | 130 | } |
@@ -244,7 +244,7 @@ |
||
244 | 244 | $func = 'get' . ucfirst($field); |
245 | 245 | |
246 | 246 | if (method_exists($element, $func)) { |
247 | - $content .= $element->$func() . self::SPACER; |
|
247 | + $content .= $element->$func() . self::SPACER; |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 |
@@ -241,10 +241,10 @@ |
||
241 | 241 | // TODO maybe I can use the property accessor here |
242 | 242 | $content = ''; |
243 | 243 | foreach (array_keys(array_slice($fields, 1)) as $field) { |
244 | - $func = 'get' . ucfirst($field); |
|
244 | + $func = 'get'.ucfirst($field); |
|
245 | 245 | |
246 | 246 | if (method_exists($element, $func)) { |
247 | - $content .= $element->$func() . self::SPACER; |
|
247 | + $content .= $element->$func().self::SPACER; |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | ) |
28 | 28 | { |
29 | 29 | $this->beConstructedWith( |
30 | - (Array)$config, |
|
30 | + (Array) $config, |
|
31 | 31 | $transformer |
32 | 32 | ); |
33 | 33 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $this->beConstructedWith( |
40 | 40 | $searchRepository, |
41 | - (array)$config, |
|
41 | + (array) $config, |
|
42 | 42 | $productRepository, |
43 | 43 | $entityManager, |
44 | 44 | $queryLogger, |
@@ -140,7 +140,7 @@ |
||
140 | 140 | foreach ($this->query($query->getSearchTerm(), $this->em) as $modelClass => $modelIdsToTags) { |
141 | 141 | $modelIds = array_keys($modelIdsToTags); |
142 | 142 | |
143 | - if(isset($modelIdsForChannel[$modelClass])) { |
|
143 | + if (isset($modelIdsForChannel[$modelClass])) { |
|
144 | 144 | $modelIds = array_intersect($modelIds, $modelIdsForChannel[$modelClass]); |
145 | 145 | } |
146 | 146 |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | if ($channel = $this->channelContext->getChannel()) { |
194 | 194 | $channelFilter = new \Elastica\Filter\Terms(); |
195 | - $channelFilter->setTerms('channels', array((string)$channel)); |
|
195 | + $channelFilter->setTerms('channels', array((string) $channel)); |
|
196 | 196 | $boolFilter->addMust($channelFilter); |
197 | 197 | $elasticaQuery->setFilter($boolFilter); |
198 | 198 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | if ($channel = $this->channelContext->getChannel()) { |
237 | 237 | $channelFilter = new \Elastica\Filter\Terms(); |
238 | - $channelFilter->setTerms('channels', array((string)$channel)); |
|
238 | + $channelFilter->setTerms('channels', array((string) $channel)); |
|
239 | 239 | $boolFilter->addMust($channelFilter); |
240 | 240 | $elasticaQuery->setPostFilter($boolFilter); |
241 | 241 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | ${$name.'Aggregation'}->setField($name); |
366 | 366 | ${$name.'Aggregation'}->setSize(550); |
367 | 367 | |
368 | - ${$name.'AggregationFilter'}->addAggregation(${$name . 'Aggregation'}); |
|
368 | + ${$name.'AggregationFilter'}->addAggregation(${$name.'Aggregation'}); |
|
369 | 369 | } // range facet creation |
370 | 370 | elseif ('range' === $facet['type']) { |
371 | 371 | ${$name.'AggregationFilter'} = new \Elastica\Aggregation\Filter($name); |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | ->addRange($value['from'], $value['to']); |
378 | 378 | } |
379 | 379 | |
380 | - ${$name.'AggregationFilter'}->addAggregation(${$name . 'Aggregation'}); |
|
380 | + ${$name.'AggregationFilter'}->addAggregation(${$name.'Aggregation'}); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | $aggregations[$name]['aggregation'] = ${$name.'Aggregation'}; |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $aggregations[$name]['aggregation_filter']->setFilter($boolFilter); |
427 | 427 | } elseif ($name != key($value)) { |
428 | 428 | if (isset(${key($value).'BoolFilter'})) { |
429 | - $aggregations[$name]['aggregation_filter']->setFilter(${key($value) . 'BoolFilter'}); |
|
429 | + $aggregations[$name]['aggregation_filter']->setFilter(${key($value).'BoolFilter'}); |
|
430 | 430 | } |
431 | 431 | } |
432 | 432 | } |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | $boolFilter->addShould($rangeFilters); |
463 | 463 | } |
464 | 464 | } else { |
465 | - $termFilters = new \Elastica\Filter\Terms(); |
|
465 | + $termFilters = new \Elastica\Filter\Terms(); |
|
466 | 466 | $termFilters->setTerms($name, $value); |
467 | 467 | $boolFilter->addShould($termFilters); |
468 | 468 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->getQuery() |
70 | 70 | ; |
71 | 71 | |
72 | - $result = $this->waitFor(function () use ($query) { |
|
72 | + $result = $this->waitFor(function() use ($query) { |
|
73 | 73 | return $query->getResult(); |
74 | 74 | }); |
75 | 75 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ; |
99 | 99 | |
100 | 100 | try { |
101 | - $this->waitFor(function () use ($query) { |
|
101 | + $this->waitFor(function() use ($query) { |
|
102 | 102 | return 0 === count($query->getResult()) ? true : false; |
103 | 103 | }); |
104 | 104 | } catch (\RuntimeException $exception) { |