Passed
Pull Request — master (#1190)
by Aleksei
20:19 queued 07:41
created
src/Router/src/Registry/DefaultPatternRegistry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
      * @param non-empty-string $name
18 18
      * @param non-empty-string|\Stringable $pattern
19 19
      */
20
-    public function register(string $name, string|\Stringable $pattern): void
20
+    public function register(string $name, string | \Stringable $pattern): void
21 21
     {
22
-        $pattern = (string) $pattern;
22
+        $pattern = (string)$pattern;
23 23
         \assert($pattern !== '');
24 24
         $this->patterns[$name] = $pattern;
25 25
     }
Please login to merge, or discard this patch.
src/Router/src/Target/Namespaced.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@
 block discarded – undo
44 44
      */
45 45
     protected function resolveController(array $matches): string
46 46
     {
47
-        if (\preg_match('/[^a-z_0-9\-]/i', $matches['controller'])) {
47
+        if (\preg_match('/[^a-z_0-9\-]/i', $matches['controller']))
48
+        {
48 49
             throw new TargetException('Invalid namespace target, controller name not allowed.');
49 50
         }
50 51
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         string $namespace,
27 27
         string $postfix = 'Controller',
28 28
         int $options = 0,
29
-    ) {
29
+    ){
30 30
         $this->namespace = \rtrim($namespace, '\\');
31 31
         $this->postfix = \ucfirst($postfix);
32 32
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     protected function resolveController(array $matches): string
46 46
     {
47
-        if (\preg_match('/[^a-z_0-9\-]/i', $matches['controller'])) {
47
+        if (\preg_match('/[^a-z_0-9\-]/i', $matches['controller'])){
48 48
             throw new TargetException('Invalid namespace target, controller name not allowed.');
49 49
         }
50 50
 
Please login to merge, or discard this patch.
src/Router/tests/Fixtures/TestController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
         return $id;
30 30
     }
31 31
 
32
-    public function defaultInt(string|int $id = 1): string
32
+    public function defaultInt(string | int $id = 1): string
33 33
     {
34 34
         $result = \is_int($id) ? 'int: ' : 'string: ';
35 35
 
36
-        return $result . $id;
36
+        return $result.$id;
37 37
     }
38 38
 
39 39
     public function echo(): void
Please login to merge, or discard this patch.
src/Core/src/Config/Inflector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function __construct(
20 20
         public readonly \Closure $inflector,
21
-    ) {
21
+    ){
22 22
         $this->parametersCount = (new \ReflectionFunction($inflector))->getNumberOfParameters();
23 23
     }
24 24
 
Please login to merge, or discard this patch.
src/Core/src/Config/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function __construct(
19 19
         callable $callable,
20 20
         public readonly bool $singleton = false,
21
-    ) {
21
+    ){
22 22
         $this->factory = $callable(...);
23 23
         $this->parametersCount = (new \ReflectionFunction($this->factory))->getNumberOfParameters();
24 24
         /** @psalm-suppress TypeDoesNotContainType */
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 \is_object($callable[0]) ? $callable[0]::class : $callable[0],
30 30
                 $callable[1],
31 31
             ),
32
-            \is_object($callable) && $callable::class !== \Closure::class => 'object ' . $callable::class,
32
+            \is_object($callable) && $callable::class !== \Closure::class => 'object '.$callable::class,
33 33
             default => null,
34 34
         };
35 35
     }
Please login to merge, or discard this patch.
src/Prototype/src/NodeVisitors/LocateProperties.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,9 +43,12 @@  discard block
 block discarded – undo
43 43
             $this->requested[$node->name->name] = $node->name->name;
44 44
         }
45 45
 
46
-        if ($node instanceof Node\Stmt\Property) {
47
-            foreach ($node->props as $prop) {
48
-                if ($prop instanceof Node\Stmt\PropertyProperty) {
46
+        if ($node instanceof Node\Stmt\Property)
47
+        {
48
+            foreach ($node->props as $prop)
49
+            {
50
+                if ($prop instanceof Node\Stmt\PropertyProperty)
51
+                {
49 52
                     $this->properties[$prop->name->name] = $prop->name->name;
50 53
                 }
51 54
             }
@@ -56,7 +59,8 @@  discard block
 block discarded – undo
56 59
 
57 60
     private function promotedProperties(Node $node): void
58 61
     {
59
-        if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable) {
62
+        if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable)
63
+        {
60 64
             return;
61 65
         }
62 66
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
             $node->var instanceof Node\Expr\Variable &&
39 39
             $node->var->name === 'this' &&
40 40
             $node->name instanceof Node\Identifier
41
-        ) {
41
+        ){
42 42
             $this->requested[$node->name->name] = $node->name->name;
43 43
         }
44 44
 
45
-        if ($node instanceof Node\Stmt\Property) {
46
-            foreach ($node->props as $prop) {
47
-                if ($prop instanceof Node\Stmt\PropertyProperty) {
45
+        if ($node instanceof Node\Stmt\Property){
46
+            foreach ($node->props as $prop){
47
+                if ($prop instanceof Node\Stmt\PropertyProperty){
48 48
                     $this->properties[$prop->name->name] = $prop->name->name;
49 49
                 }
50 50
             }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     private function promotedProperties(Node $node): void
57 57
     {
58
-        if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable) {
58
+        if (!$node instanceof Node\Param || !$node->var instanceof Node\Expr\Variable){
59 59
             return;
60 60
         }
61 61
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $node->flags & Node\Stmt\Class_::MODIFIER_PUBLIC ||
64 64
             $node->flags & Node\Stmt\Class_::MODIFIER_PROTECTED ||
65 65
             $node->flags & Node\Stmt\Class_::MODIFIER_PRIVATE
66
-        ) {
66
+        ){
67 67
             $this->properties[$node->var->name] = $node->var->name;
68 68
         }
69 69
     }
Please login to merge, or discard this patch.
src/Tokenizer/src/ScopedEnumsInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,5 +16,5 @@
 block discarded – undo
16 16
      *
17 17
      * @return \ReflectionEnum[]
18 18
      */
19
-    public function getScopedEnums(string $scope, object|string|null $target = null): array;
19
+    public function getScopedEnums(string $scope, object | string | null $target = null): array;
20 20
 }
Please login to merge, or discard this patch.
src/Tokenizer/src/Listener/ListenerInvoker.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function invoke(TokenizationListenerInterface $listener, iterable $classes): void
18 18
     {
19
-        foreach ($classes as $class) {
19
+        foreach ($classes as $class){
20 20
             $listener->listen($class);
21 21
         }
22 22
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,8 @@
 block discarded – undo
16 16
      */
17 17
     public function invoke(TokenizationListenerInterface $listener, iterable $classes): void
18 18
     {
19
-        foreach ($classes as $class) {
19
+        foreach ($classes as $class)
20
+        {
20 21
             $listener->listen($class);
21 22
         }
22 23
     }
Please login to merge, or discard this patch.
src/Tokenizer/src/ScopedInterfacesInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,5 +17,5 @@
 block discarded – undo
17 17
      *                            results.
18 18
      * @return \ReflectionClass[]
19 19
      */
20
-    public function getScopedInterfaces(string $scope, string|null $target = null): array;
20
+    public function getScopedInterfaces(string $scope, string | null $target = null): array;
21 21
 }
Please login to merge, or discard this patch.