Completed
Push — master ( d54afb...01173a )
by Kamil
26:45
created
src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/ExpressionVisitor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Sylius/Bundle/GridBundle/Doctrine/PHPCRODM/DataSource.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Sylius/Bundle/GridBundle/spec/Doctrine/PHPCRODM/DataSourceSpec.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
Sylius/Bundle/GridBundle/Tests/DependencyInjection/ConfigurationTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                         'actions' => [],
49 49
                     ]
50 50
                 ],
51
-                'drivers' => [ 'doctrine/orm' ]
51
+                'drivers' => ['doctrine/orm']
52 52
             ]
53 53
         );
54 54
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->assertConfigurationIsInvalid(
100 100
             [
101 101
                 [
102
-                    'drivers' => [ 'doctrine/orm', 'foo/invalid' ],
102
+                    'drivers' => ['doctrine/orm', 'foo/invalid'],
103 103
                 ],
104 104
             ],
105 105
             'Invalid driver specified in ["doctrine\/orm","foo\/invalid"], valid drivers:'
Please login to merge, or discard this patch.
Sylius/Bundle/GridBundle/Tests/Doctrine/PHPCRODM/ExpressionVisitorTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Bundle/ThemeBundle/Configuration/Test/TestThemeConfigurationManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->configurationProcessor = $configurationProcessor;
44 44
         $this->filesystem = new Filesystem();
45
-        $this->configurationsFile = rtrim($cacheDir, '/') . '/_test_themes/data.serialized';
45
+        $this->configurationsFile = rtrim($cacheDir, '/').'/_test_themes/data.serialized';
46 46
     }
47 47
 
48 48
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $this->clearTheme($themeName);
83 83
 
84 84
         $configurations = $this->load();
85
-        $configurations = array_filter($configurations, function ($configuration) use ($themeName) {
85
+        $configurations = array_filter($configurations, function($configuration) use ($themeName) {
86 86
             return isset($configuration['name']) && $configuration['name'] !== $themeName;
87 87
         });
88 88
         $this->save($configurations);
@@ -165,6 +165,6 @@  discard block
 block discarded – undo
165 165
      */
166 166
     private function getThemeDirectory($themeName)
167 167
     {
168
-        return rtrim(dirname($this->configurationsFile), '/') . '/' . $themeName;
168
+        return rtrim(dirname($this->configurationsFile), '/').'/'.$themeName;
169 169
     }
170 170
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/ThemeContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
      */
124 124
     public function themeChangesHomepageTemplateContents(ThemeInterface $theme, $contents)
125 125
     {
126
-        $file = rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig';
126
+        $file = rtrim($theme->getPath(), '/').'/SyliusWebBundle/views/Frontend/Homepage/main.html.twig';
127 127
         $dir = dirname($file);
128 128
 
129 129
         if (!file_exists($dir)) {
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Domain/PromotionCouponContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             $this->couponRepository->remove($coupon);
64 64
 
65 65
             throw new \Exception(sprintf('Coupon "%s" has been removed, but it should not.', $coupon->getCode()));
66
-        } catch(ForeignKeyConstraintViolationException $exception) {
66
+        } catch (ForeignKeyConstraintViolationException $exception) {
67 67
             $this->sharedStorage->set('last_exception', $exception);
68 68
         }
69 69
     }
Please login to merge, or discard this patch.