Completed
Push — master ( 64f4aa...2c8981 )
by Kamil
23:00
created
src/Sylius/Bundle/ThemeBundle/Form/Type/ThemeChoiceType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,13 +41,13 @@
 block discarded – undo
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
         ;
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Form/Type/CountryType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/Sylius/Bundle/GridBundle/DependencyInjection/Configuration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)))
Please login to merge, or discard this patch.
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/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.