@@ -29,6 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @param ProcessInterface $process |
31 | 31 | * @param StepInterface $currentStep |
32 | + * @return ProcessContext |
|
32 | 33 | */ |
33 | 34 | public function initialize(ProcessInterface $process, StepInterface $currentStep); |
34 | 35 | |
@@ -78,11 +79,13 @@ discard block |
||
78 | 79 | * Override the default next step. |
79 | 80 | * |
80 | 81 | * @param string $stepAlias |
82 | + * @return void |
|
81 | 83 | */ |
82 | 84 | public function setNextStepByName($stepAlias); |
83 | 85 | |
84 | 86 | /** |
85 | 87 | * Close context and clear all the data. |
88 | + * @return void |
|
86 | 89 | */ |
87 | 90 | public function close(); |
88 | 91 | |
@@ -104,6 +107,7 @@ discard block |
||
104 | 107 | * Set storage. |
105 | 108 | * |
106 | 109 | * @param StorageInterface $storage |
110 | + * @return void |
|
107 | 111 | */ |
108 | 112 | public function setStorage(StorageInterface $storage); |
109 | 113 | |
@@ -118,6 +122,7 @@ discard block |
||
118 | 122 | * Set current request. |
119 | 123 | * |
120 | 124 | * @param Request $request |
125 | + * @return void |
|
121 | 126 | */ |
122 | 127 | public function setRequest(Request $request); |
123 | 128 | |
@@ -139,6 +144,7 @@ discard block |
||
139 | 144 | * Set a new history of step names. |
140 | 145 | * |
141 | 146 | * @param array $history |
147 | + * @return void |
|
142 | 148 | */ |
143 | 149 | public function setStepHistory(array $history); |
144 | 150 | |
@@ -146,6 +152,7 @@ discard block |
||
146 | 152 | * Add the given name to the history of step names. |
147 | 153 | * |
148 | 154 | * @param string $stepName |
155 | + * @return void |
|
149 | 156 | */ |
150 | 157 | public function addStepToHistory($stepName); |
151 | 158 | |
@@ -153,6 +160,7 @@ discard block |
||
153 | 160 | * Goes back from the end fo the history and deletes all step names until the current one is found. |
154 | 161 | * |
155 | 162 | * @throws NotFoundHttpException If the step name is not found in the history. |
163 | + * @return void |
|
156 | 164 | */ |
157 | 165 | public function rewindHistory(); |
158 | 166 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @param string $stepName |
43 | 43 | * @param ParameterBag $queryParameters |
44 | 44 | * |
45 | - * @return Response|View |
|
45 | + * @return RedirectResponse |
|
46 | 46 | */ |
47 | 47 | public function display($scenarioAlias, $stepName, ParameterBag $queryParameters = null); |
48 | 48 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param string $scenarioAlias |
54 | 54 | * @param string $stepName |
55 | 55 | * |
56 | - * @return Response|View |
|
56 | + * @return RedirectResponse |
|
57 | 57 | */ |
58 | 58 | public function forward($scenarioAlias, $stepName); |
59 | 59 | |
@@ -62,6 +62,7 @@ discard block |
||
62 | 62 | * |
63 | 63 | * @param string $alias |
64 | 64 | * @param ProcessScenarioInterface $scenario |
65 | + * @return void |
|
65 | 66 | */ |
66 | 67 | public function registerScenario($alias, ProcessScenarioInterface $scenario); |
67 | 68 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | /** |
84 | 84 | * Set validation. |
85 | 85 | * |
86 | - * @param callable $validation |
|
86 | + * @param \Closure $validation |
|
87 | 87 | * |
88 | 88 | * @return $this |
89 | 89 | */ |
@@ -187,6 +187,7 @@ |
||
187 | 187 | |
188 | 188 | /** |
189 | 189 | * {@inheritdoc} |
190 | + * @param string $field |
|
190 | 191 | */ |
191 | 192 | private function getFieldName($field) |
192 | 193 | { |
@@ -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; |
@@ -175,6 +175,9 @@ |
||
175 | 175 | return Driver::QB_SOURCE_ALIAS . '.' . $field; |
176 | 176 | } |
177 | 177 | |
178 | + /** |
|
179 | + * @param string $field |
|
180 | + */ |
|
178 | 181 | private function getInConstraint(AbstractNode $parentNode, $field, array $values) |
179 | 182 | { |
180 | 183 | $orNode = $parentNode->orx(); |
@@ -11,14 +11,13 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\GridBundle\Doctrine\PHPCRODM; |
13 | 13 | |
14 | -use Sylius\Component\Grid\Data\ExpressionBuilderInterface; |
|
15 | -use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder; |
|
16 | -use Doctrine\Common\Collections\Expr\CompositeExpression; |
|
17 | 14 | use Doctrine\Common\Collections\Expr\Comparison; |
15 | +use Doctrine\Common\Collections\Expr\CompositeExpression; |
|
16 | +use Doctrine\Common\Collections\Expr\Expression; |
|
18 | 17 | use Doctrine\Common\Collections\Expr\Value; |
19 | 18 | use Doctrine\ODM\PHPCR\Query\Builder\AbstractNode; |
20 | 19 | use Doctrine\ODM\PHPCR\Query\Builder\OperandFactory; |
21 | -use Doctrine\Common\Collections\Expr\Expression; |
|
20 | +use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder; |
|
22 | 21 | use Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparison; |
23 | 22 | |
24 | 23 | /** |
@@ -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; |
@@ -11,15 +11,12 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\GridBundle\Tests\DependencyInjection; |
13 | 13 | |
14 | -use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder; |
|
15 | -use Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionVisitor; |
|
16 | 14 | use Doctrine\Common\Collections\Expr\Comparison; |
17 | -use Doctrine\ODM\PHPCR\Query\Builder\AbstractNode; |
|
18 | -use Doctrine\ODM\PHPCR\Query\Builder\AbstractLeafNode; |
|
15 | +use Doctrine\Common\Collections\Expr\CompositeExpression; |
|
19 | 16 | use Doctrine\ODM\PHPCR\Query\Builder\OperandDynamicField; |
20 | -use Doctrine\ODM\PHPCR\Query\Builder\ConstraintComparison; |
|
21 | 17 | use Doctrine\ODM\PHPCR\Query\Builder\OperandStaticLiteral; |
22 | -use Doctrine\Common\Collections\Expr\CompositeExpression; |
|
18 | +use Doctrine\ODM\PHPCR\Query\Builder\QueryBuilder; |
|
19 | +use Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExpressionVisitor; |
|
23 | 20 | use Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparison; |
24 | 21 | |
25 | 22 | require(__DIR__ . '/QueryBuilderWalker.php'); |
@@ -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); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | OperandDynamicField(o.number) OperandStaticLiteral("8") |
147 | 147 | ) |
148 | 148 | ) |
149 | -EOT |
|
149 | +eot |
|
150 | 150 | ); |
151 | 151 | } |
152 | 152 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ) |
185 | 185 | ) |
186 | 186 | ) |
187 | -EOT |
|
187 | +eot |
|
188 | 188 | ); |
189 | 189 | } |
190 | 190 | |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | ) |
231 | 231 | ) |
232 | 232 | ) |
233 | -EOT |
|
233 | +eot |
|
234 | 234 | ); |
235 | 235 | } |
236 | 236 |
@@ -51,7 +51,6 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * @param GridView $gridView |
53 | 53 | * @param string $template |
54 | - * @param array $variables |
|
55 | 54 | * |
56 | 55 | * @return mixed |
57 | 56 | */ |
@@ -84,8 +83,6 @@ discard block |
||
84 | 83 | |
85 | 84 | /** |
86 | 85 | * @param GridView $gridView |
87 | - * @param Action $action |
|
88 | - * @param mixed $data |
|
89 | 86 | */ |
90 | 87 | public function renderFilter(GridView $gridView, Filter $filter) |
91 | 88 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * @param $id |
|
49 | + * @param string $id |
|
50 | 50 | * |
51 | 51 | * @return object |
52 | 52 | */ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
75 | - * @param array $headers |
|
75 | + * @param string[] $headers |
|
76 | 76 | * @param array $rows |
77 | 77 | * @param OutputInterface $output |
78 | 78 | */ |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * @param OutputInterface $output |
146 | 146 | * @param string $question |
147 | - * @param array $constraints |
|
147 | + * @param \Symfony\Component\Validator\Constraints\NotBlank[] $constraints |
|
148 | 148 | * |
149 | - * @return mixed |
|
149 | + * @return string |
|
150 | 150 | */ |
151 | 151 | protected function askHidden(OutputInterface $output, $question, array $constraints = []) |
152 | 152 | { |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | * @param array $constraints |
160 | 160 | * @param mixed $default |
161 | 161 | * |
162 | - * @return mixed |
|
162 | + * @return string |
|
163 | 163 | */ |
164 | 164 | protected function ask(OutputInterface $output, $question, array $constraints = [], $default = null) |
165 | 165 | { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
170 | - * @param mixed $value |
|
170 | + * @param string $value |
|
171 | 171 | * @param array $constraints |
172 | 172 | * |
173 | 173 | * @return bool |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * @param string $default |
196 | 196 | * @param bool $hidden |
197 | 197 | * |
198 | - * @return mixed |
|
198 | + * @return string |
|
199 | 199 | */ |
200 | 200 | private function proceedAskRequest(OutputInterface $output, $question, array $constraints = [], $default = null, $hidden = false) |
201 | 201 | { |
@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\InstallerBundle\Command; |
13 | 13 | |
14 | -use Sylius\Bundle\CoreBundle\Kernel\Kernel; |
|
15 | 14 | use Symfony\Component\Console\Application; |
16 | 15 | use Symfony\Component\Console\Input\ArrayInput; |
17 | 16 | use Symfony\Component\Console\Input\InputInterface; |