Completed
Push — 1.9 ( afdbdd...913aaa )
by Kamil
01:29
created
src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
 
167 167
     private static function getCouponNormalizer(?FactoryInterface $couponFactory): \Closure
168 168
     {
169
-        return function (Options $options, array $couponDefinitions) use ($couponFactory): array {
169
+        return function (Options $options, array $couponDefinitions) use ($couponFactory) : array {
170 170
             if (null === $couponFactory) {
171 171
                 throw new \RuntimeException('You must configure a $couponFactory');
172 172
             }
Please login to merge, or discard this patch.
spec/Validator/Constraints/ZoneCannotContainItselfValidatorSpec.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,8 @@
 block discarded – undo
46 46
     {
47 47
         $this
48 48
             ->shouldThrow(\InvalidArgumentException::class)
49
-            ->during('validate', ['', new class() extends Constraint {
49
+            ->during('validate', ['', new class() extends Constraint
50
+            {
50 51
             }])
51 52
         ;
52 53
     }
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Doctrine/ORM/ProductRepository.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,11 +105,11 @@
 block discarded – undo
105 105
         if (isset($sorting['price'])) {
106 106
             // Another hack, the subquery to get the first position variant
107 107
             $subQuery = $this->createQueryBuilder('m')
108
-                 ->select('min(v.position)')
109
-                 ->innerJoin('m.variants', 'v')
110
-                 ->andWhere('m.id = :product_id')
111
-                 ->andWhere('v.enabled = :enabled')
112
-             ;
108
+                    ->select('min(v.position)')
109
+                    ->innerJoin('m.variants', 'v')
110
+                    ->andWhere('m.id = :product_id')
111
+                    ->andWhere('v.enabled = :enabled')
112
+                ;
113 113
 
114 114
             $queryBuilder
115 115
                 ->addSelect('variant')
Please login to merge, or discard this patch.
Compiler/CircularDependencyBreakingExceptionListenerPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         $definition = new Definition(CircularDependencyBreakingExceptionListener::class);
32 32
         $definition->setDecoratedService('twig.exception_listener');
33
-        $definition->addArgument(new Reference(CircularDependencyBreakingExceptionListener::class .'.inner'));
33
+        $definition->addArgument(new Reference(CircularDependencyBreakingExceptionListener::class . '.inner'));
34 34
 
35 35
         $container->setDefinition(
36 36
             CircularDependencyBreakingExceptionListener::class,
Please login to merge, or discard this patch.
Compiler/CircularDependencyBreakingErrorListenerPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
         $definition = new Definition(CircularDependencyBreakingErrorListener::class);
31 31
         $definition->setDecoratedService('exception_listener');
32
-        $definition->addArgument(new Reference(CircularDependencyBreakingErrorListener::class .'.inner'));
32
+        $definition->addArgument(new Reference(CircularDependencyBreakingErrorListener::class . '.inner'));
33 33
 
34 34
         $container->setDefinition(
35 35
             CircularDependencyBreakingErrorListener::class,
Please login to merge, or discard this patch.
src/Sylius/Bundle/ApiBundle/PropertyInfo/Extractor/ReflectionExtractor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         $getsetter = lcfirst($camelProp); // jQuery style, e.g. read: last(), write: last($item)
288 288
 
289 289
         foreach ($this->accessorPrefixes as $prefix) {
290
-            $methodName = $prefix.$camelProp;
290
+            $methodName = $prefix . $camelProp;
291 291
 
292 292
             if ($reflClass->hasMethod($methodName) && $reflClass->getMethod($methodName)->getModifiers() & $this->methodReflectionFlags && !$reflClass->getMethod($methodName)->getNumberOfRequiredParameters()) {
293 293
                 $method = $reflClass->getMethod($methodName);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         }
314 314
 
315 315
         if ($allowMagicCall && $reflClass->hasMethod('__call') && ($reflClass->getMethod('__call')->getModifiers() & $this->methodReflectionFlags)) {
316
-            return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get'.$camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
316
+            return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, 'get' . $camelProp, PropertyReadInfo::VISIBILITY_PUBLIC, false, false);
317 317
         }
318 318
 
319 319
         return null;
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
         $errors = array_merge($errors, $adderAndRemoverErrors);
373 373
 
374 374
         foreach ($this->mutatorPrefixes as $mutatorPrefix) {
375
-            $methodName = $mutatorPrefix.$camelized;
375
+            $methodName = $mutatorPrefix . $camelized;
376 376
 
377 377
             [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, $methodName, 1);
378 378
             if (!$accessible) {
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         if ($allowMagicCall) {
419 419
             [$accessible, $methodAccessibleErrors] = $this->isMethodAccessible($reflClass, '__call', 2);
420 420
             if ($accessible) {
421
-                return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set'.$camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
421
+                return new PropertyWriteInfo(PropertyWriteInfo::TYPE_METHOD, 'set' . $camelized, PropertyWriteInfo::VISIBILITY_PUBLIC, false);
422 422
             }
423 423
 
424 424
             $errors = array_merge($errors, $methodAccessibleErrors);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 
427 427
         if (!$allowAdderRemover && null !== $adderAccessName && null !== $removerAccessName) {
428 428
             $errors[] = sprintf(
429
-                'The property "%s" in class "%s" can be defined with the methods "%s()" but '.
429
+                'The property "%s" in class "%s" can be defined with the methods "%s()" but ' .
430 430
                 'the new value must be an array or an instance of \Traversable',
431 431
                 $property,
432 432
                 $reflClass->getName(),
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 
606 606
         foreach ($this->accessorPrefixes as $prefix) {
607 607
             try {
608
-                $reflectionMethod = new \ReflectionMethod($class, $prefix.$ucProperty);
608
+                $reflectionMethod = new \ReflectionMethod($class, $prefix . $ucProperty);
609 609
                 if ($reflectionMethod->isStatic()) {
610 610
                     continue;
611 611
                 }
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 
641 641
             foreach ($names as $name) {
642 642
                 try {
643
-                    $reflectionMethod = new \ReflectionMethod($class, $prefix.$name);
643
+                    $reflectionMethod = new \ReflectionMethod($class, $prefix . $name);
644 644
                     if ($reflectionMethod->isStatic()) {
645 645
                         continue;
646 646
                     }
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
     {
663 663
         $pattern = implode('|', array_merge($this->accessorPrefixes, $this->mutatorPrefixes));
664 664
 
665
-        if ('' !== $pattern && preg_match('/^('.$pattern.')(.+)$/i', $methodName, $matches)) {
665
+        if ('' !== $pattern && preg_match('/^(' . $pattern . ')(.+)$/i', $methodName, $matches)) {
666 666
             if (!\in_array($matches[1], $this->arrayMutatorPrefixes)) {
667 667
                 return $matches[2];
668 668
             }
@@ -699,8 +699,8 @@  discard block
 block discarded – undo
699 699
         $errors = [];
700 700
 
701 701
         foreach ($singulars as $singular) {
702
-            $addMethod = $addPrefix.$singular;
703
-            $removeMethod = $removePrefix.$singular;
702
+            $addMethod = $addPrefix . $singular;
703
+            $removeMethod = $removePrefix . $singular;
704 704
 
705 705
             [$addMethodFound, $addMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $addMethod, 1);
706 706
             [$removeMethodFound, $removeMethodAccessibleErrors] = $this->isMethodAccessible($reflClass, $removeMethod, 1);
Please login to merge, or discard this patch.
src/Sylius/Bundle/ApiBundle/test/src/Tests/PromotionTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
             '@type' => 'hydra:Collection',
42 42
             'hydra:member' => [
43 43
                 [
44
-                  '@type' => 'Promotion',
45
-                  'name' => 'Sunday promotion'
44
+                    '@type' => 'Promotion',
45
+                    'name' => 'Sunday promotion'
46 46
                 ],
47 47
             ],
48 48
             'hydra:totalItems' => 1,
Please login to merge, or discard this patch.
spec/Validator/Constraints/OrderShippingMethodEligibilityValidatorSpec.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,14 +45,16 @@
 block discarded – undo
45 45
     {
46 46
         $this
47 47
             ->shouldThrow(\InvalidArgumentException::class)
48
-            ->during('validate', ['', new class() extends Constraint {
48
+            ->during('validate', ['', new class() extends Constraint
49
+            {
49 50
             }])
50 51
         ;
51 52
     }
52 53
 
53 54
     function it_throws_an_exception_if_constraint_does_not_type_of_order_shipping_method_eligibility(): void
54 55
     {
55
-        $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface {
56
+        $constraint = new class() extends Constraint implements OrderTokenValueAwareInterface
57
+        {
56 58
             private $orderTokenValue;
57 59
 
58 60
             public function getOrderTokenValue(): ?string
Please login to merge, or discard this patch.
Bundle/ApiBundle/spec/Validator/Constraints/OrderNotEmptyValidatorSpec.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@  discard block
 block discarded – undo
40 40
     {
41 41
         $this
42 42
             ->shouldThrow(\InvalidArgumentException::class)
43
-            ->during('validate', [new CompleteOrder(), new class() extends Constraint {
43
+            ->during('validate', [new CompleteOrder(), new class() extends Constraint
44
+            {
44 45
             }])
45 46
         ;
46 47
     }
@@ -49,7 +50,8 @@  discard block
 block discarded – undo
49 50
     {
50 51
         $this
51 52
             ->shouldThrow(\InvalidArgumentException::class)
52
-            ->during('validate', ['', new class() extends Constraint {
53
+            ->during('validate', ['', new class() extends Constraint
54
+            {
53 55
             }])
54 56
         ;
55 57
     }
Please login to merge, or discard this patch.