@@ -116,15 +116,15 @@ discard block |
||
| 116 | 116 | $wrapped = AbstractWrapper::wrap($relation, $this->om); |
| 117 | 117 | if ($parent = $wrapped->getPropertyValue($options['relationParentRelationField'])) { |
| 118 | 118 | |
| 119 | - $translation = call_user_func_array(array($parent,$options['translate']), array($locale)); |
|
| 119 | + $translation = call_user_func_array(array($parent, $options['translate']), array($locale)); |
|
| 120 | 120 | |
| 121 | 121 | $this->parentSlug = $translation->{$options['parentFieldMethod']}(); |
| 122 | 122 | |
| 123 | 123 | // if needed, remove suffix from parentSlug, so we can use it to prepend it to our slug |
| 124 | - if(isset($options['suffix'])) { |
|
| 124 | + if (isset($options['suffix'])) { |
|
| 125 | 125 | $suffix = $options['suffix']; |
| 126 | 126 | |
| 127 | - if(substr($this->parentSlug, -strlen($suffix)) === $suffix) { //endsWith |
|
| 127 | + if (substr($this->parentSlug, -strlen($suffix)) === $suffix) { //endsWith |
|
| 128 | 128 | $this->parentSlug = substr_replace($this->parentSlug, '', -1 * strlen($suffix)); |
| 129 | 129 | } |
| 130 | 130 | } |
@@ -219,6 +219,6 @@ discard block |
||
| 219 | 219 | */ |
| 220 | 220 | private function deleteUnnecessaryParentSlug($slug) |
| 221 | 221 | { |
| 222 | - return preg_replace('/^' . preg_quote($this->parentSlug.$this->usedPathSeparator, '/') . '/', '', $slug); |
|
| 222 | + return preg_replace('/^'.preg_quote($this->parentSlug.$this->usedPathSeparator, '/').'/', '', $slug); |
|
| 223 | 223 | } |
| 224 | 224 | } |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | |
| 87 | 87 | $resolver |
| 88 | 88 | ->setDefaults(array( |
| 89 | - 'validation_groups' => function (Options $options) { |
|
| 89 | + 'validation_groups' => function(Options $options) { |
|
| 90 | 90 | if ($options['shippable']) { |
| 91 | 91 | $this->validationGroups[] = 'shippable'; |
| 92 | 92 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | public function buildView(FormView $view, FormInterface $form, array $options) |
| 56 | 56 | { |
| 57 | 57 | if ($form->getConfig()->hasAttribute('prototypes')) { |
| 58 | - $view->vars['prototypes'] = array_map(function (FormInterface $prototype) use ($view) { |
|
| 58 | + $view->vars['prototypes'] = array_map(function(FormInterface $prototype) use ($view) { |
|
| 59 | 59 | return $prototype->createView($view); |
| 60 | 60 | }, $form->getConfig()->getAttribute('prototypes')); |
| 61 | 61 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function configureOptions(OptionsResolver $resolver) |
| 42 | 42 | { |
| 43 | - $choiceList = function (Options $options) { |
|
| 43 | + $choiceList = function(Options $options) { |
|
| 44 | 44 | if (null === $options['enabled']) { |
| 45 | 45 | $choices = $this->countryRepository->findAll(); |
| 46 | 46 | } else { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | parent::configureOptions($resolver); |
| 28 | 28 | |
| 29 | 29 | $resolver->setDefaults(array( |
| 30 | - 'query_builder' => function (EntityRepository $repository) { |
|
| 30 | + 'query_builder' => function(EntityRepository $repository) { |
|
| 31 | 31 | return $repository->createQueryBuilder('o')->orderBy('o.left', 'asc'); |
| 32 | 32 | }, |
| 33 | 33 | )); |
@@ -170,10 +170,10 @@ discard block |
||
| 170 | 170 | ->arrayNode('roles_hierarchy') |
| 171 | 171 | ->useAttributeAsKey('id') |
| 172 | 172 | ->prototype('array') |
| 173 | - ->beforeNormalization()->ifString()->then(function ($v) { return array('value' => $v); })->end() |
|
| 173 | + ->beforeNormalization()->ifString()->then(function($v) { return array('value' => $v); })->end() |
|
| 174 | 174 | ->beforeNormalization() |
| 175 | - ->ifTrue(function ($v) { return is_array($v) && isset($v['value']); }) |
|
| 176 | - ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); }) |
|
| 175 | + ->ifTrue(function($v) { return is_array($v) && isset($v['value']); }) |
|
| 176 | + ->then(function($v) { return preg_split('/\s*,\s*/', $v['value']); }) |
|
| 177 | 177 | ->end() |
| 178 | 178 | ->prototype('scalar')->end() |
| 179 | 179 | ->end() |
@@ -198,10 +198,10 @@ discard block |
||
| 198 | 198 | ->useAttributeAsKey('id') |
| 199 | 199 | ->prototype('array') |
| 200 | 200 | ->performNoDeepMerging() |
| 201 | - ->beforeNormalization()->ifString()->then(function ($v) { return array('value' => $v); })->end() |
|
| 201 | + ->beforeNormalization()->ifString()->then(function($v) { return array('value' => $v); })->end() |
|
| 202 | 202 | ->beforeNormalization() |
| 203 | - ->ifTrue(function ($v) { return is_array($v) && isset($v['value']); }) |
|
| 204 | - ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); }) |
|
| 203 | + ->ifTrue(function($v) { return is_array($v) && isset($v['value']); }) |
|
| 204 | + ->then(function($v) { return preg_split('/\s*,\s*/', $v['value']); }) |
|
| 205 | 205 | ->end() |
| 206 | 206 | ->prototype('scalar')->end() |
| 207 | 207 | ->end() |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | 200, |
| 111 | 111 | array( |
| 112 | 112 | 'Content-Type' => 'application/pdf', |
| 113 | - 'Content-Disposition' => 'attachment; filename="' . $order->getNumber() . '.pdf"' |
|
| 113 | + 'Content-Disposition' => 'attachment; filename="'.$order->getNumber().'.pdf"' |
|
| 114 | 114 | ) |
| 115 | 115 | ); |
| 116 | 116 | } |
@@ -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; |