@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $this->queryBuilder->setParameter($field, $value); |
78 | 78 | |
79 | - return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':'.$field); |
|
79 | + return $this->queryBuilder->expr()->eq($this->getFieldName($field), ':' . $field); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | { |
87 | 87 | $this->queryBuilder->setParameter($field, $value); |
88 | 88 | |
89 | - return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':'.$field); |
|
89 | + return $this->queryBuilder->expr()->neq($this->getFieldName($field), ':' . $field); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function lessThan($field, $value) |
96 | 96 | { |
97 | - $this->queryBuilder->andWhere($this->getFieldName($field).' < :'.$field)->setParameter($field, $value); |
|
97 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' < :' . $field)->setParameter($field, $value); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function lessThanOrEqual($field, $value) |
104 | 104 | { |
105 | - $this->queryBuilder->andWhere($this->getFieldName($field).' =< :'.$field)->setParameter($field, $value); |
|
105 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' =< :' . $field)->setParameter($field, $value); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function greaterThan($field, $value) |
112 | 112 | { |
113 | - $this->queryBuilder->andWhere($this->getFieldName($field).' > :'.$field)->setParameter($field, $value); |
|
113 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' > :' . $field)->setParameter($field, $value); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function greaterThanOrEqual($field, $value) |
120 | 120 | { |
121 | - $this->queryBuilder->andWhere($this->getFieldName($field).' => :%s'.$field)->setParameter($field, $value); |
|
121 | + $this->queryBuilder->andWhere($this->getFieldName($field) . ' => :%s' . $field)->setParameter($field, $value); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | private function getFieldName($field) |
192 | 192 | { |
193 | 193 | if (false === strpos($field, '.')) { |
194 | - return $this->queryBuilder->getRootAlias().'.'.$field; |
|
194 | + return $this->queryBuilder->getRootAlias() . '.' . $field; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | return $field; |
@@ -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; |
@@ -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; |
@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | return [ |
109 | 109 | [ |
110 | 110 | Comparison::IN, |
111 | - [ 'one' ], |
|
111 | + ['one'], |
|
112 | 112 | 'ConstraintOrx ( jcr.operator.equal.to ( OperandDynamicField(o.hello) OperandStaticLiteral("one") ) )' |
113 | 113 | ], |
114 | 114 | [ |
115 | 115 | Comparison::IN, |
116 | - [ 'one', 'two', 'three' ], |
|
116 | + ['one', 'two', 'three'], |
|
117 | 117 | 'ConstraintOrx ( jcr.operator.equal.to ( OperandDynamicField(o.hello) OperandStaticLiteral("one") ) jcr.operator.equal.to ( OperandDynamicField(o.hello) OperandStaticLiteral("two") ) jcr.operator.equal.to ( OperandDynamicField(o.hello) OperandStaticLiteral("three") ) )', |
118 | 118 | ], |
119 | 119 | [ |
120 | 120 | Comparison::NIN, |
121 | - [ 'one' ], |
|
121 | + ['one'], |
|
122 | 122 | 'ConstraintNot ( ConstraintOrx ( jcr.operator.equal.to ( OperandDynamicField(o.hello) OperandStaticLiteral("one") ) ) )' |
123 | 123 | ], |
124 | 124 | ]; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $expr2 = new Comparison('number', Comparison::GT, 8); |
134 | 134 | $expr = new CompositeExpression( |
135 | 135 | $type, |
136 | - [ $expr1, $expr2 ] |
|
136 | + [$expr1, $expr2] |
|
137 | 137 | ); |
138 | 138 | |
139 | 139 | $this->visitor->dispatch($expr); |
@@ -153,8 +153,8 @@ discard block |
||
153 | 153 | public function provideComposite() |
154 | 154 | { |
155 | 155 | return [ |
156 | - [ CompositeExpression::TYPE_AND, 'ConstraintAndx' ], |
|
157 | - [ CompositeExpression::TYPE_OR, 'ConstraintOrx' ] |
|
156 | + [CompositeExpression::TYPE_AND, 'ConstraintAndx'], |
|
157 | + [CompositeExpression::TYPE_OR, 'ConstraintOrx'] |
|
158 | 158 | ]; |
159 | 159 | } |
160 | 160 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | $expr3 = new Comparison('date', Comparison::GT, '2015-12-10'); |
167 | 167 | $expr = new CompositeExpression( |
168 | 168 | $type, |
169 | - [ $expr1, $expr2, $expr3 ] |
|
169 | + [$expr1, $expr2, $expr3] |
|
170 | 170 | ); |
171 | 171 | |
172 | 172 | $this->visitor->dispatch($expr); |
@@ -197,12 +197,12 @@ discard block |
||
197 | 197 | $expr4 = new Comparison('date', Comparison::LT, '2016-12-10'); |
198 | 198 | $expr5 = new Comparison('date', Comparison::NEQ, '2016-12-10'); |
199 | 199 | |
200 | - $comp2 = new CompositeExpression(CompositeExpression::TYPE_AND, [ $expr2, $expr5 ]); |
|
201 | - $comp1 = new CompositeExpression(CompositeExpression::TYPE_OR, [ $expr1, $comp2 ]); |
|
200 | + $comp2 = new CompositeExpression(CompositeExpression::TYPE_AND, [$expr2, $expr5]); |
|
201 | + $comp1 = new CompositeExpression(CompositeExpression::TYPE_OR, [$expr1, $comp2]); |
|
202 | 202 | |
203 | 203 | $expr = new CompositeExpression( |
204 | 204 | $type, |
205 | - [ $comp1, $expr3, $expr4 ] |
|
205 | + [$comp1, $expr3, $expr4] |
|
206 | 206 | ); |
207 | 207 | |
208 | 208 | $this->visitor->dispatch($expr); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function load(array $config, ContainerBuilder $container) |
29 | 29 | { |
30 | 30 | $config = $this->processConfiguration($this->getConfiguration($config, $container), $config); |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | |
33 | 33 | $loader->load('services.xml'); |
34 | 34 | $loader->load('filters.xml'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | foreach (['filter', 'action'] as $templatesCollectionName) { |
40 | 40 | $templates = isset($config['templates'][$templatesCollectionName]) ? $config['templates'][$templatesCollectionName] : []; |
41 | - $container->setParameter('sylius.grid.templates.'.$templatesCollectionName, $templates); |
|
41 | + $container->setParameter('sylius.grid.templates.' . $templatesCollectionName, $templates); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $container->setParameter('sylius.grids_definitions', $config['grids']); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $this |
28 | 28 | ->add(new Requirement( |
29 | 29 | $translator->trans('sylius.filesystem.vendors', [], 'requirements'), |
30 | - $status = is_dir($root.'/../vendor'), |
|
30 | + $status = is_dir($root . '/../vendor'), |
|
31 | 31 | $exists, |
32 | 32 | $status ? $exists : $notExists |
33 | 33 | )) |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | )) |
50 | 50 | ->add(new Requirement( |
51 | 51 | $translator->trans('sylius.filesystem.parameters', [], 'requirements'), |
52 | - $status = is_writable($root.'/config/parameters.yml'), |
|
52 | + $status = is_writable($root . '/config/parameters.yml'), |
|
53 | 53 | $writable, |
54 | 54 | $status ? $writable : $notWritable, |
55 | 55 | true, |
56 | - $translator->trans('sylius.filesystem.parameters.help', ['%path%' => $root.'/config/parameters.yml'], 'requirements') |
|
56 | + $translator->trans('sylius.filesystem.parameters.help', ['%path%' => $root . '/config/parameters.yml'], 'requirements') |
|
57 | 57 | )) |
58 | 58 | ; |
59 | 59 | } |
@@ -30,13 +30,13 @@ |
||
30 | 30 | ->add(new Requirement( |
31 | 31 | $translator->trans('sylius.settings.version', [], 'requirements'), |
32 | 32 | version_compare(phpversion(), self::REQUIRED_PHP_VERSION, '>='), |
33 | - '>='.self::REQUIRED_PHP_VERSION, |
|
33 | + '>=' . self::REQUIRED_PHP_VERSION, |
|
34 | 34 | phpversion() |
35 | 35 | )) |
36 | 36 | ->add(new Requirement( |
37 | 37 | $translator->trans('sylius.settings.version_recommended', [], 'requirements'), |
38 | 38 | version_compare(phpversion(), self::RECOMMENDED_PHP_VERSION, '>='), |
39 | - '>='.self::RECOMMENDED_PHP_VERSION, |
|
39 | + '>=' . self::RECOMMENDED_PHP_VERSION, |
|
40 | 40 | phpversion(), |
41 | 41 | false |
42 | 42 | )) |
@@ -73,7 +73,7 @@ |
||
73 | 73 | foreach ($this->commands as $step => $command) { |
74 | 74 | try { |
75 | 75 | $output->writeln(sprintf('<comment>Step %d of %d.</comment> <info>%s</info>', $step + 1, count($this->commands), $command['message'])); |
76 | - $this->commandExecutor->runCommand('sylius:install:'.$command['command'], [], $output); |
|
76 | + $this->commandExecutor->runCommand('sylius:install:' . $command['command'], [], $output); |
|
77 | 77 | $output->writeln(''); |
78 | 78 | } catch (RuntimeException $exception) { |
79 | 79 | $this->isErrored = true; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function load(array $config, ContainerBuilder $container) |
28 | 28 | { |
29 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
29 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
30 | 30 | |
31 | 31 | $loader->load('services.xml'); |
32 | 32 | $loader->load('requirements.xml'); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | try { |
82 | 82 | $this->filesystem->mkdir($directory, 0755); |
83 | 83 | } catch (IOException $exception) { |
84 | - $output->writeln($this->createUnexistingDirectoryMessage(getcwd().'/'.$directory)); |
|
84 | + $output->writeln($this->createUnexistingDirectoryMessage(getcwd() . '/' . $directory)); |
|
85 | 85 | |
86 | 86 | throw new \RuntimeException('Failed while trying to create directory.'); |
87 | 87 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | private function createUnexistingDirectoryMessage($directory) |
138 | 138 | { |
139 | 139 | return |
140 | - '<error>Cannot run command due to unexisting directory (tried to create it automatically, failed).</error>'.PHP_EOL. |
|
140 | + '<error>Cannot run command due to unexisting directory (tried to create it automatically, failed).</error>' . PHP_EOL . |
|
141 | 141 | sprintf('Create directory "%s" and run command "<comment>%s</comment>"', $directory, $this->name) |
142 | 142 | ; |
143 | 143 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | private function createBadPermissionsMessage($directory) |
151 | 151 | { |
152 | 152 | return |
153 | - '<error>Cannot run command due to bad directory permissions (tried to change permissions to 0755).</error>'.PHP_EOL. |
|
153 | + '<error>Cannot run command due to bad directory permissions (tried to change permissions to 0755).</error>' . PHP_EOL . |
|
154 | 154 | sprintf('Set "%s" writable recursively and run command "<comment>%s</comment>"', $directory, $this->name) |
155 | 155 | ; |
156 | 156 | } |