@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function removeAuthor(ThemeAuthor $author) |
142 | 142 | { |
143 | - $this->authors = array_filter($this->authors, function ($currentAuthor) use ($author) { |
|
143 | + $this->authors = array_filter($this->authors, function($currentAuthor) use ($author) { |
|
144 | 144 | return $currentAuthor !== $author; |
145 | 145 | }); |
146 | 146 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function removeParent(ThemeInterface $theme) |
168 | 168 | { |
169 | - $this->parents = array_filter($this->parents, function ($currentTheme) use ($theme) { |
|
169 | + $this->parents = array_filter($this->parents, function($currentTheme) use ($theme) { |
|
170 | 170 | return $currentTheme !== $theme; |
171 | 171 | }); |
172 | 172 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | public function removeScreenshot(ThemeScreenshot $screenshot) |
194 | 194 | { |
195 | - $this->screenshots = array_filter($this->screenshots, function ($currentScreenshot) use ($screenshot) { |
|
195 | + $this->screenshots = array_filter($this->screenshots, function($currentScreenshot) use ($screenshot) { |
|
196 | 196 | return $currentScreenshot !== $screenshot; |
197 | 197 | }); |
198 | 198 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | // Normalizer instead of default as it should not be overwritten |
43 | 43 | $resolver |
44 | - ->setNormalizer('choices', function () { |
|
44 | + ->setNormalizer('choices', function() { |
|
45 | 45 | $themes = $this->themeRepository->findAll(); |
46 | 46 | |
47 | 47 | $choices = []; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | return $choices; |
53 | 53 | }) |
54 | - ->setNormalizer('choices_as_values', function () { |
|
54 | + ->setNormalizer('choices_as_values', function() { |
|
55 | 55 | return true; |
56 | 56 | }) |
57 | 57 | ; |
@@ -41,13 +41,13 @@ |
||
41 | 41 | { |
42 | 42 | // Normalizer instead of default as it should not be overwritten |
43 | 43 | $resolver |
44 | - ->setNormalizer('choices', function () { |
|
44 | + ->setNormalizer('choices', function() { |
|
45 | 45 | return $this->themeRepository->findAll(); |
46 | 46 | }) |
47 | - ->setNormalizer('choices_as_values', function () { |
|
47 | + ->setNormalizer('choices_as_values', function() { |
|
48 | 48 | return true; |
49 | 49 | }) |
50 | - ->setDefault('choice_label', function (ThemeInterface $theme) { |
|
50 | + ->setDefault('choice_label', function(ThemeInterface $theme) { |
|
51 | 51 | return (string) $theme; |
52 | 52 | }) |
53 | 53 | ; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | { |
49 | 49 | parent::buildForm($builder, $options); |
50 | 50 | |
51 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
51 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
52 | 52 | // Adding dynamically created code field |
53 | 53 | $nameOptions = [ |
54 | 54 | 'label' => 'sylius.form.locale.name', |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function buildForm(FormBuilderInterface $builder, array $options) |
50 | 50 | { |
51 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
51 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
52 | 52 | // Adding dynamically created isoName field |
53 | 53 | $nameOptions = [ |
54 | 54 | 'label' => 'sylius.form.country.name', |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | private function addDriversSection(ArrayNodeDefinition $node) |
40 | 40 | { |
41 | 41 | // determine which drivers are distributed with this bundle |
42 | - $driverDir = __DIR__ . '/../Resources/config/driver'; |
|
42 | + $driverDir = __DIR__.'/../Resources/config/driver'; |
|
43 | 43 | $iterator = new \RecursiveDirectoryIterator($driverDir); |
44 | 44 | foreach (new \RecursiveIteratorIterator($iterator) as $file) { |
45 | 45 | if ($file->getExtension() !== 'xml') { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ->arrayNode('drivers') |
57 | 57 | ->info('Enable drivers which are distributed with this bundle') |
58 | 58 | ->validate() |
59 | - ->ifTrue(function ($value) use ($validDrivers) { |
|
59 | + ->ifTrue(function($value) use ($validDrivers) { |
|
60 | 60 | return 0 !== count(array_diff($value, $validDrivers)); |
61 | 61 | }) |
62 | 62 | ->thenInvalid(sprintf('Invalid driver specified in %%s, valid drivers: ["%s"]', implode('", "', $validDrivers))) |
@@ -163,7 +163,7 @@ |
||
163 | 163 | */ |
164 | 164 | public function orderBy($field, $direction) |
165 | 165 | { |
166 | - $this->orderBys = [ $field => $direction ]; |
|
166 | + $this->orderBys = [$field => $direction]; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | return $parentNode->fieldIsset($this->getField($field)); |
86 | 86 | |
87 | 87 | default: |
88 | - throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); |
|
88 | + throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator()); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | return $parentNode; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function walkCompositeExpression(CompositeExpression $expr, AbstractNode $parentNode) |
107 | 107 | { |
108 | - switch($expr->getType()) { |
|
108 | + switch ($expr->getType()) { |
|
109 | 109 | case CompositeExpression::TYPE_AND: |
110 | 110 | $node = $parentNode->andX(); |
111 | 111 | break; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $node = $parentNode->orX(); |
114 | 114 | break; |
115 | 115 | default: |
116 | - throw new \RuntimeException('Unknown composite: ' . $expr->getType()); |
|
116 | + throw new \RuntimeException('Unknown composite: '.$expr->getType()); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | $expressions = $expr->getExpressionList(); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | break; |
129 | 129 | } |
130 | 130 | |
131 | - switch($expr->getType()) { |
|
131 | + switch ($expr->getType()) { |
|
132 | 132 | case CompositeExpression::TYPE_AND: |
133 | 133 | $parentNode = $parentNode->andX(); |
134 | 134 | break; |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | return $this->walkCompositeExpression($expr, $parentNode); |
167 | 167 | |
168 | 168 | default: |
169 | - throw new \RuntimeException("Unknown Expression " . get_class($expr)); |
|
169 | + throw new \RuntimeException("Unknown Expression ".get_class($expr)); |
|
170 | 170 | } |
171 | 171 | } |
172 | 172 | |
173 | 173 | private function getField($field) |
174 | 174 | { |
175 | - return Driver::QB_SOURCE_ALIAS . '.' . $field; |
|
175 | + return Driver::QB_SOURCE_ALIAS.'.'.$field; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | private function getInConstraint(AbstractNode $parentNode, $field, array $values) |
@@ -32,7 +32,7 @@ |
||
32 | 32 | function it_is_initializable() |
33 | 33 | { |
34 | 34 | $this->shouldHaveType('Sylius\Component\Inventory\Operator\BackordersHandler'); |
35 | - } |
|
35 | + } |
|
36 | 36 | |
37 | 37 | function it_implements_Sylius_inventory_backorders_handler_interface() |
38 | 38 | { |