Completed
Push — master ( 6366df...fbe022 )
by Kirill
23s queued 19s
created
src/Attributes/tests/TestCase.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected function iterableToArray(iterable $iterable): array
33 33
     {
34
-        if ($iterable instanceof \Traversable) {
34
+        if ($iterable instanceof \Traversable)
35
+        {
35 36
             return \iterator_to_array($iterable, false);
36 37
         }
37 38
 
@@ -47,7 +48,8 @@  discard block
 block discarded – undo
47 48
     {
48 49
         $instance = new $class();
49 50
 
50
-        foreach ($fields as $field => $value) {
51
+        foreach ($fields as $field => $value)
52
+        {
51 53
             $instance->$field = $value;
52 54
         }
53 55
 
Please login to merge, or discard this patch.
src/Attributes/tests/Concerns/InteractWithReflection.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,8 +43,10 @@  discard block
 block discarded – undo
43 43
             ->getReflectionConstants()
44 44
         ;
45 45
 
46
-        foreach ($constants as $reflection) {
47
-            if ($reflection->getName() === $name) {
46
+        foreach ($constants as $reflection)
47
+        {
48
+            if ($reflection->getName() === $name)
49
+            {
48 50
                 return $reflection;
49 51
             }
50 52
         }
@@ -58,8 +60,10 @@  discard block
 block discarded – undo
58 60
             ->getParameters()
59 61
         ;
60 62
 
61
-        foreach ($parameters as $reflection) {
62
-            if ($reflection->getName() === $name) {
63
+        foreach ($parameters as $reflection)
64
+        {
65
+            if ($reflection->getName() === $name)
66
+            {
63 67
                 return $reflection;
64 68
             }
65 69
         }
@@ -73,8 +77,10 @@  discard block
 block discarded – undo
73 77
             ->getParameters()
74 78
         ;
75 79
 
76
-        foreach ($parameters as $reflection) {
77
-            if ($reflection->getName() === $name) {
80
+        foreach ($parameters as $reflection)
81
+        {
82
+            if ($reflection->getName() === $name)
83
+            {
78 84
                 return $reflection;
79 85
             }
80 86
         }
Please login to merge, or discard this patch.
src/Attributes/src/Composite/MergeReader.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
      */
19 19
     protected function each(callable $resolver): iterable
20 20
     {
21
-        foreach ($this->readers as $reader) {
21
+        foreach ($this->readers as $reader)
22
+        {
22 23
             yield from $resolver($reader);
23 24
         }
24 25
     }
Please login to merge, or discard this patch.
src/Attributes/src/Composite/SelectiveReader.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,12 @@
 block discarded – undo
18 18
      */
19 19
     protected function each(callable $resolver): iterable
20 20
     {
21
-        foreach ($this->readers as $reader) {
21
+        foreach ($this->readers as $reader)
22
+        {
22 23
             $result = $this->iterableToArray($resolver($reader));
23 24
 
24
-            if (\count($result) > 0) {
25
+            if (\count($result) > 0)
26
+            {
25 27
                 return $result;
26 28
             }
27 29
         }
Please login to merge, or discard this patch.
src/Attributes/src/Internal/Instantiator/Instantiator.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,15 +24,18 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected function getConstructor(\ReflectionClass $class): ?\ReflectionMethod
26 26
     {
27
-        if ($class->hasMethod(self::CONSTRUCTOR_NAME)) {
27
+        if ($class->hasMethod(self::CONSTRUCTOR_NAME))
28
+        {
28 29
             return $class->getMethod(self::CONSTRUCTOR_NAME);
29 30
         }
30 31
 
31
-        if ($constructor = $this->getTraitConstructors($class)) {
32
+        if ($constructor = $this->getTraitConstructors($class))
33
+        {
32 34
             return $constructor;
33 35
         }
34 36
 
35
-        if ($parent = $class->getParentClass()) {
37
+        if ($parent = $class->getParentClass())
38
+        {
36 39
             return $this->getConstructor($parent);
37 40
         }
38 41
 
@@ -45,12 +48,15 @@  discard block
 block discarded – undo
45 48
      */
46 49
     private function getTraitConstructors(\ReflectionClass $class): ?\ReflectionMethod
47 50
     {
48
-        foreach ($class->getTraits() as $trait) {
49
-            if ($constructor = $this->getConstructor($trait)) {
51
+        foreach ($class->getTraits() as $trait)
52
+        {
53
+            if ($constructor = $this->getConstructor($trait))
54
+            {
50 55
                 return $constructor;
51 56
             }
52 57
 
53
-            if ($constructor = $this->getTraitConstructors($trait)) {
58
+            if ($constructor = $this->getTraitConstructors($trait))
59
+            {
54 60
                 return $constructor;
55 61
             }
56 62
         }
Please login to merge, or discard this patch.
src/Attributes/src/Internal/Instantiator/DoctrineInstantiator.php 1 patch
Braces   +17 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,23 +61,29 @@  discard block
 block discarded – undo
61 61
         $arguments = $this->formatArguments($arguments);
62 62
 
63 63
         // Using constructor
64
-        if ($this->getConstructor($attr)) {
64
+        if ($this->getConstructor($attr))
65
+        {
65 66
             return $attr->newInstance($arguments);
66 67
         }
67 68
 
68 69
         // Using direct insert
69 70
         $instance = $attr->newInstanceWithoutConstructor();
70 71
 
71
-        foreach ($arguments as $name => $value) {
72
-            try {
72
+        foreach ($arguments as $name => $value)
73
+        {
74
+            try
75
+            {
73 76
                 $property = $attr->getProperty($name);
74 77
 
75
-                if (!$property->isPublic()) {
78
+                if (!$property->isPublic())
79
+                {
76 80
                     throw $this->propertyNotFound($attr, $name, $context);
77 81
                 }
78 82
 
79 83
                 $instance->$name = $value;
80
-            } catch (\Throwable $e) {
84
+            }
85
+            catch (\Throwable $e)
86
+            {
81 87
                 throw $this->propertyNotFound($attr, $name, $context);
82 88
             }
83 89
         }
@@ -93,8 +99,10 @@  discard block
 block discarded – undo
93 99
     {
94 100
         $result = [];
95 101
 
96
-        foreach ($arguments as $name => $value) {
97
-            if (\is_int($name)) {
102
+        foreach ($arguments as $name => $value)
103
+        {
104
+            if (\is_int($name))
105
+            {
98 106
                 $this->validateArgumentPosition($name, $value);
99 107
 
100 108
                 $name = self::DEFAULT_PROPERTY_NAME;
@@ -112,7 +120,8 @@  discard block
 block discarded – undo
112 120
      */
113 121
     private function validateArgumentPosition(int $index, $value): void
114 122
     {
115
-        if ($index === 0) {
123
+        if ($index === 0)
124
+        {
116 125
             return;
117 126
         }
118 127
 
Please login to merge, or discard this patch.
src/SendIt/tests/RenderTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
 
34 34
     public function tearDown(): void
35 35
     {
36
-        foreach (glob(__DIR__ . '/App/runtime/cache/views/*.php') as $file) {
36
+        foreach (glob(__DIR__ . '/App/runtime/cache/views/*.php') as $file)
37
+        {
37 38
             @unlink($file);
38 39
         }
39 40
     }
Please login to merge, or discard this patch.
src/Framework/Bootloader/AttributesBootloader.php 1 patch
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,14 +25,18 @@
 block discarded – undo
25 25
      */
26 26
     public function boot(Container $container): void
27 27
     {
28
-        $container->bindSingleton(ReaderInterface::class, function () use ($container) {
28
+        $container->bindSingleton(ReaderInterface::class, function () use ($container)
29
+        {
29 30
             $factory = new Factory();
30 31
 
31
-            if ($container->has(CacheInterface::class)) {
32
+            if ($container->has(CacheInterface::class))
33
+            {
32 34
                 $factory = $factory->withCache(
33 35
                     $container->get(CacheInterface::class)
34 36
                 );
35
-            } elseif ($container->has(CacheItemInterface::class)) {
37
+            }
38
+            elseif ($container->has(CacheItemInterface::class))
39
+            {
36 40
                 $factory = $factory->withCache(
37 41
                     $container->get(CacheItemInterface::class)
38 42
                 );
Please login to merge, or discard this patch.
src/AnnotatedRoutes/tests/CacheTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@
 block discarded – undo
44 44
     private function include(string $file)
45 45
     {
46 46
         // Required when "opcache.cli_enabled=1"
47
-        if (\function_exists('\\opcache_invalidate')) {
47
+        if (\function_exists('\\opcache_invalidate'))
48
+        {
48 49
             \opcache_invalidate($file);
49 50
         }
50 51
 
Please login to merge, or discard this patch.