Passed
Push — dependabot/npm_and_yarn/semant... ( 8258be )
by
unknown
04:40
created
src/Parser/Code/Builders/Filters/ProtectedVisibilityFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
  */
20 20
 final class ProtectedVisibilityFilter implements VisibilityFilter
21 21
 {
22
-    public function accept(Stmt|Param $member): bool
22
+    public function accept(Stmt | Param $member): bool
23 23
     {
24 24
         if ($member instanceof ClassConst
25 25
             || $member instanceof ClassMethod
26 26
             || $member instanceof Property) {
27
-            return ! $member->isProtected();
27
+            return !$member->isProtected();
28 28
         }
29 29
 
30 30
         if ($member instanceof Param) {
31
-            return ! (bool) ($member->flags & Class_::MODIFIER_PROTECTED);
31
+            return !(bool) ($member->flags & Class_::MODIFIER_PROTECTED);
32 32
         }
33 33
 
34 34
         return false;
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Filters/PrivateVisibilityFilter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
  */
20 20
 final class PrivateVisibilityFilter implements VisibilityFilter
21 21
 {
22
-    public function accept(Stmt|Param $member): bool
22
+    public function accept(Stmt | Param $member): bool
23 23
     {
24 24
         if ($member instanceof ClassConst
25 25
             || $member instanceof ClassMethod
26 26
             || $member instanceof Property) {
27
-            return ! $member->isPrivate();
27
+            return !$member->isPrivate();
28 28
         }
29 29
 
30 30
         if ($member instanceof Param) {
31
-            return ! (bool) ($member->flags & Class_::MODIFIER_PRIVATE);
31
+            return !(bool) ($member->flags & Class_::MODIFIER_PRIVATE);
32 32
         }
33 33
 
34 34
         return false;
Please login to merge, or discard this patch.
src/Parser/CodebaseDirectory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             'The directory with the code to be scanned cannot be empty'
32 32
         );
33 33
         $directory = new SplFileInfo($path);
34
-        if (! $directory->isDir()) {
34
+        if (!$directory->isDir()) {
35 35
             throw InvalidDirectory::notFoundAt($directory);
36 36
         }
37 37
         $this->directory = $directory;
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/ParsedPropertiesBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function build(array $parsedProperties, UseStatements $useStatements): array
32 32
     {
33
-        return array_map(function (ParsedProperty $property) use ($useStatements): Property {
33
+        return array_map(function(ParsedProperty $property) use ($useStatements): Property {
34 34
             $variable = new Variable(
35 35
                 "\${$property->props[0]->name}",
36 36
                 $this->typeBuilder->fromPropertyType($property->type, $property->getDocComment(), $useStatements)
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function fromPromotedProperties(array $promotedProperties, UseStatements $useStatements): array
49 49
     {
50
-        return array_map(function (Node\Param $param) use ($useStatements): Property {
50
+        return array_map(function(Node\Param $param) use ($useStatements): Property {
51 51
             /** @var Node\Expr\Variable $var */
52 52
             $var = $param->var;
53 53
 
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/ParsedConstantsBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         if (property_exists($constant->value, 'value')) {
48 48
             return self::TYPES[\gettype($constant->value->value)];
49 49
         }
50
-        if (! $constant->value instanceof ConstFetch) {
50
+        if (!$constant->value instanceof ConstFetch) {
51 51
             return null;
52 52
         }
53 53
         return 'bool';
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/TypeBuilder.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     }
28 28
 
29 29
     public function fromMethodParameter(
30
-        Identifier|Name|ComplexType|null $type,
30
+        Identifier | Name | ComplexType | null $type,
31 31
         ?Doc $docBlock,
32 32
         string $name,
33 33
         UseStatements $useStatements
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         }
39 39
 
40 40
         $typeDeclaration = $this->fromParsedType($type);
41
-        if (! $typeDeclaration->isBuiltInArray()) {
41
+        if (!$typeDeclaration->isBuiltInArray()) {
42 42
             return $typeDeclaration;
43 43
         }
44 44
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     }
49 49
 
50 50
     public function fromMethodReturnType(
51
-        Identifier|Name|ComplexType|null $type,
51
+        Identifier | Name | ComplexType | null $type,
52 52
         ?Doc $docBlock,
53 53
         UseStatements $useStatements
54 54
     ): TypeDeclaration {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
         $typeDeclaration = $this->fromParsedType($type);
61
-        if (! $typeDeclaration->isBuiltInArray()) {
61
+        if (!$typeDeclaration->isBuiltInArray()) {
62 62
             return $typeDeclaration;
63 63
         }
64 64
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
     public function fromPropertyType(
71
-        Identifier|Name|ComplexType|null $type,
71
+        Identifier | Name | ComplexType | null $type,
72 72
         ?Doc $docBlock,
73 73
         UseStatements $useStatements
74 74
     ): TypeDeclaration {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
 
80 80
         $typeDeclaration = $this->fromParsedType($type);
81
-        if (! $typeDeclaration->isBuiltInArray()) {
81
+        if (!$typeDeclaration->isBuiltInArray()) {
82 82
             return $typeDeclaration;
83 83
         }
84 84
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         return $typeFromDocBlock->isPresent() ? $typeFromDocBlock : $typeDeclaration;
88 88
     }
89 89
 
90
-    private function fromParsedType(Identifier|Name|ComplexType|null $type): TypeDeclaration
90
+    private function fromParsedType(Identifier | Name | ComplexType | null $type): TypeDeclaration
91 91
     {
92 92
         return match (true) {
93 93
             $type instanceof NullableType => TypeDeclaration::fromNullable((string) $type->type),
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
     }
107 107
 
108 108
     /** @return string[] */
109
-    private function fromCompositeType(UnionType|IntersectionType $type): array
109
+    private function fromCompositeType(UnionType | IntersectionType $type): array
110 110
     {
111 111
         return array_map(
112
-            static fn (Identifier|Name $name): string => (string) $name,
112
+            static fn (Identifier | Name $name): string => (string) $name,
113 113
             $type->types
114 114
         );
115 115
     }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/VisibilityFilters.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $members = $definitionMembers;
46 46
         foreach ($this->filters as $filter) {
47
-            $members = array_filter($members, static fn (Stmt|Param $member): bool => $filter->accept($member));
47
+            $members = array_filter($members, static fn (Stmt | Param $member): bool => $filter->accept($member));
48 48
         }
49 49
         return $members;
50 50
     }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/TagTypeFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $params = array_values(array_filter(
35 35
             $parameterTags,
36 36
             static fn (TagWithType|InvalidTag $parameter): bool =>
37
-               $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName
37
+                $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName
38 38
         ));
39 39
 
40 40
         if (count($params) < 1) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         /** @var Param[] $params */
34 34
         $params = array_values(array_filter(
35 35
             $parameterTags,
36
-            static fn (TagWithType|InvalidTag $parameter): bool =>
36
+            static fn (TagWithType | InvalidTag $parameter): bool =>
37 37
                $parameter instanceof Param && "\${$parameter->getVariableName()}" === $parameterName
38 38
         ));
39 39
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     private function fromType(Type $type): TagType
99 99
     {
100
-        if (! $type instanceof Object_) {
100
+        if (!$type instanceof Object_) {
101 101
             return TagType::named((string) $type);
102 102
         }
103 103
         if ($type->getFqsen() === null) {
Please login to merge, or discard this patch.
src/Parser/Code/Builders/UseStatementsBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
 final class UseStatementsBuilder
22 22
 {
23
-    public function build(Class_|Interface_|Trait_ $definition): UseStatements
23
+    public function build(Class_ | Interface_ | Trait_ $definition): UseStatements
24 24
     {
25 25
         $uses = [];
26 26
 
Please login to merge, or discard this patch.