Test Failed
Pull Request — master (#1190)
by butschster
10:27
created
src/Router/src/Registry/RoutePatternRegistryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
      * @param non-empty-string $name
9 9
      * @param non-empty-string|\Stringable $pattern
10 10
      */
11
-    public function register(string $name, string|\Stringable $pattern): void;
11
+    public function register(string $name, string | \Stringable $pattern): void;
12 12
 
13 13
     /**
14 14
      * @return array<non-empty-string, non-empty-string>
Please login to merge, or discard this patch.
src/Reactor/src/Partial/Method.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     {
73 73
         $param = PromotedParameter::fromElement($this->element->addPromotedParameter($name));
74 74
 
75
-        if (\func_num_args() > 1) {
75
+        if (\func_num_args() > 1){
76 76
             $param->setDefaultValue($defaultValue);
77 77
         }
78 78
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,8 @@
 block discarded – undo
72 72
     {
73 73
         $param = PromotedParameter::fromElement($this->element->addPromotedParameter($name));
74 74
 
75
-        if (\func_num_args() > 1) {
75
+        if (\func_num_args() > 1)
76
+        {
76 77
             $param->setDefaultValue($defaultValue);
77 78
         }
78 79
 
Please login to merge, or discard this patch.
src/Scaffolder/src/helpers.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace Spiral\Scaffolder;
6 6
 
7
-if (!\function_exists('trimPostfix')) {
7
+if (!\function_exists('trimPostfix'))
8
+{
8 9
     /**
9 10
      * @internal
10 11
      */
@@ -16,7 +17,8 @@  discard block
 block discarded – undo
16 17
     }
17 18
 }
18 19
 
19
-if (!\function_exists('defineArrayType')) {
20
+if (!\function_exists('defineArrayType'))
21
+{
20 22
     /**
21 23
      * @internal
22 24
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 namespace Spiral\Scaffolder;
6 6
 
7
-if (!\function_exists('trimPostfix')) {
7
+if (!\function_exists('trimPostfix')){
8 8
     /**
9 9
      * @internal
10 10
      */
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
     }
17 17
 }
18 18
 
19
-if (!\function_exists('defineArrayType')) {
19
+if (!\function_exists('defineArrayType')){
20 20
     /**
21 21
      * @internal
22 22
      */
23 23
     function defineArrayType(array $array, ?string $failureType = null): ?string
24 24
     {
25
-        $types = \array_map(static fn ($value): string => \gettype($value), $array);
25
+        $types = \array_map(static fn ($value) : string => \gettype($value), $array);
26 26
 
27 27
         $types = \array_unique($types);
28 28
 
Please login to merge, or discard this patch.
src/Cache/src/CacheManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         private readonly CacheConfig $config,
20 20
         private readonly FactoryInterface $factory,
21 21
         private readonly ?EventDispatcherInterface $dispatcher = null,
22
-    ) {
22
+    ){
23 23
     }
24 24
 
25 25
     public function storage(?string $name = null): CacheInterface
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
         $storage = $this->config->getAliases()[$name] ?? $name;
31 31
 
32 32
         $prefix = null;
33
-        if (\is_array($storage)) {
33
+        if (\is_array($storage)){
34 34
             $prefix = !empty($storage['prefix']) ? $storage['prefix'] : null;
35 35
             $storage = $storage['storage'];
36 36
         }
37 37
 
38
-        if (!isset($this->storages[$storage])) {
38
+        if (!isset($this->storages[$storage])){
39 39
             $this->storages[$storage] = $this->resolve($storage);
40 40
         }
41 41
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,12 +30,14 @@
 block discarded – undo
30 30
         $storage = $this->config->getAliases()[$name] ?? $name;
31 31
 
32 32
         $prefix = null;
33
-        if (\is_array($storage)) {
33
+        if (\is_array($storage))
34
+        {
34 35
             $prefix = !empty($storage['prefix']) ? $storage['prefix'] : null;
35 36
             $storage = $storage['storage'];
36 37
         }
37 38
 
38
-        if (!isset($this->storages[$storage])) {
39
+        if (!isset($this->storages[$storage]))
40
+        {
39 41
             $this->storages[$storage] = $this->resolve($storage);
40 42
         }
41 43
 
Please login to merge, or discard this patch.
src/Core/src/Internal/Common/DestructorTrait.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
     public function destruct(): void
13 13
     {
14 14
         $class = new \ReflectionClass($this);
15
-        foreach ($class->getProperties() as $property) {
15
+        foreach ($class->getProperties() as $property){
16 16
             $name = $property->getName();
17
-            if (!isset($this->$name)) {
17
+            if (!isset($this->$name)){
18 18
                 continue;
19 19
             }
20 20
             $value = $this->$name;
21 21
             unset($this->$name);
22
-            if (\is_object($value) && \method_exists($value, 'destruct')) {
22
+            if (\is_object($value) && \method_exists($value, 'destruct')){
23 23
                 $value->destruct();
24 24
             }
25 25
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,14 +12,17 @@
 block discarded – undo
12 12
     public function destruct(): void
13 13
     {
14 14
         $class = new \ReflectionClass($this);
15
-        foreach ($class->getProperties() as $property) {
15
+        foreach ($class->getProperties() as $property)
16
+        {
16 17
             $name = $property->getName();
17
-            if (!isset($this->$name)) {
18
+            if (!isset($this->$name))
19
+            {
18 20
                 continue;
19 21
             }
20 22
             $value = $this->$name;
21 23
             unset($this->$name);
22
-            if (\is_object($value) && \method_exists($value, 'destruct')) {
24
+            if (\is_object($value) && \method_exists($value, 'destruct'))
25
+            {
23 26
                 $value->destruct();
24 27
             }
25 28
         }
Please login to merge, or discard this patch.
src/Core/src/Internal/Tracer/Trace.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,7 +27,8 @@  discard block
 block discarded – undo
27 27
     public function __toString(): string
28 28
     {
29 29
         $info = [];
30
-        foreach ($this->info as $key => $item) {
30
+        foreach ($this->info as $key => $item)
31
+        {
31 32
             $info[] = "$key: {$this->stringifyValue($item)}";
32 33
         }
33 34
         return \implode("\n", $info);
@@ -47,14 +48,17 @@  discard block
 block discarded – undo
47 48
 
48 49
     private function renderArray(array $array, int $level = 0): string
49 50
     {
50
-        if ($array === []) {
51
+        if ($array === [])
52
+        {
51 53
             return '[]';
52 54
         }
53
-        if ($level >= self::ARRAY_MAX_LEVEL) {
55
+        if ($level >= self::ARRAY_MAX_LEVEL)
56
+        {
54 57
             return 'array';
55 58
         }
56 59
         $result = [];
57
-        foreach ($array as $key => $value) {
60
+        foreach ($array as $key => $value)
61
+        {
58 62
             $result[] = \sprintf(
59 63
                 '%s: %s',
60 64
                 $key,
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function __construct(
21 21
         public array $info = [],
22
-    ) {
22
+    ){
23 23
         $this->alias = $info['alias'] ?? null;
24 24
     }
25 25
 
26 26
     public function __toString(): string
27 27
     {
28 28
         $info = [];
29
-        foreach ($this->info as $key => $item) {
29
+        foreach ($this->info as $key => $item){
30 30
             $info[] = "$key: {$this->stringifyValue($item)}";
31 31
         }
32 32
         return \implode("\n", $info);
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
             \is_scalar($item) => \var_export($item, true),
40 40
             $item instanceof \Closure => $this->renderClosureSignature(new \ReflectionFunction($item)),
41 41
             $item instanceof \ReflectionFunctionAbstract => $this->renderClosureSignature($item),
42
-            $item instanceof \UnitEnum => $item::class . "::$item->name",
43
-            \is_object($item) => $item instanceof \Stringable ? (string) $item : 'instance of ' . $item::class,
42
+            $item instanceof \UnitEnum => $item::class."::$item->name",
43
+            \is_object($item) => $item instanceof \Stringable ? (string)$item : 'instance of '.$item::class,
44 44
             \is_array($item) => $this->renderArray($item),
45 45
             default => \get_debug_type($item),
46 46
         };
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 
49 49
     private function renderArray(array $array, int $level = 0): string
50 50
     {
51
-        if ($array === []) {
51
+        if ($array === []){
52 52
             return '[]';
53 53
         }
54
-        if ($level >= self::ARRAY_MAX_LEVEL) {
54
+        if ($level >= self::ARRAY_MAX_LEVEL){
55 55
             return 'array';
56 56
         }
57 57
         $result = [];
58
-        foreach ($array as $key => $value) {
58
+        foreach ($array as $key => $value){
59 59
             $result[] = \sprintf(
60 60
                 '%s: %s',
61 61
                 $key,
@@ -66,6 +66,6 @@  discard block
 block discarded – undo
66 66
         }
67 67
 
68 68
         $pad = \str_repeat('  ', $level);
69
-        return "[\n  $pad" . \implode(",\n  $pad", $result) . "\n$pad]";
69
+        return "[\n  $pad".\implode(",\n  $pad", $result)."\n$pad]";
70 70
     }
71 71
 }
Please login to merge, or discard this patch.
src/Core/src/Attribute/Finalize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,6 +12,6 @@
 block discarded – undo
12 12
 {
13 13
     public function __construct(
14 14
         public string $method,
15
-    ) {
15
+    ){
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/Core/tests/Scope/Stub/DatetimeCarrier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 {
11 11
     public function __construct(
12 12
         public DateTimeInterface $logger,
13
-    ) {
13
+    ){
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
src/Core/tests/Scope/Stub/AttrScopeFooFinalize.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         $this->logger = $logger;
22 22
         $this->finalized = true;
23
-        if ($this->throwException) {
23
+        if ($this->throwException){
24 24
             throw new RuntimeException('Test exception from finalize method.');
25 25
         }
26 26
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
     {
21 21
         $this->logger = $logger;
22 22
         $this->finalized = true;
23
-        if ($this->throwException) {
23
+        if ($this->throwException)
24
+        {
24 25
             throw new RuntimeException('Test exception from finalize method.');
25 26
         }
26 27
     }
Please login to merge, or discard this patch.