@@ -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 | { |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | { |
| 77 | 77 | $this->shouldThrow( |
| 78 | 78 | new \RuntimeException('Unknown restrict condition "foo"') |
| 79 | - )->during('restrict', [ $comparison, 'foo' ]); |
|
| 79 | + )->during('restrict', [$comparison, 'foo']); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | function it_should_return_the_expression_builder( |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use Doctrine\Common\Collections\Expr\CompositeExpression; |
| 23 | 23 | use Sylius\Bundle\GridBundle\Doctrine\PHPCRODM\ExtraComparison; |
| 24 | 24 | |
| 25 | -require(__DIR__ . '/QueryBuilderWalker.php'); |
|
| 25 | +require(__DIR__.'/QueryBuilderWalker.php'); |
|
| 26 | 26 | |
| 27 | 27 | class ExpressionVisitorTest extends \PHPUnit_Framework_TestCase |
| 28 | 28 | { |
@@ -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); |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | */ |
| 152 | 152 | public function theTypeFieldShouldBeDisabled() |
| 153 | 153 | { |
| 154 | - $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]); |
|
| 154 | + $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]); |
|
| 155 | 155 | |
| 156 | 156 | Assert::true( |
| 157 | 157 | $currentPage->isTypeDisabled(), |