Passed
Pull Request — master (#7)
by Luis
20:14 queued 05:16
created
src/Parser/Code/Builders/Filters/ProtectedVisibilityFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
     /** @param \PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Property $member */
16 16
     public function accept($member): bool
17 17
     {
18
-        return ! $member->isProtected();
18
+        return !$member->isProtected();
19 19
     }
20 20
 }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredAttributesBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
      */
44 44
     public function build(array $parsedAttributes): array
45 45
     {
46
-        $attributes = array_filter($parsedAttributes, static function ($attribute): bool {
46
+        $attributes = array_filter($parsedAttributes, static function($attribute): bool {
47 47
             return $attribute instanceof Property;
48 48
         });
49 49
 
50
-        return array_map(function (Property $attribute): Attribute {
50
+        return array_map(function(Property $attribute): Attribute {
51 51
             $name = "\${$attribute->props[0]->name}";
52 52
             $visibility = $this->visibilityBuilder->build($attribute);
53 53
             $comment = $attribute->getDocComment() === null ? null : $attribute->getDocComment()->getText();
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredMethodsBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function build(array $methods): array
54 54
     {
55
-        return array_map(function (ClassMethod $method): Method {
55
+        return array_map(function(ClassMethod $method): Method {
56 56
             return $this->buildMethod($method);
57 57
         }, $this->visibilityFilters->apply($methods));
58 58
     }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/ParametersBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function build(array $parameters, MethodDocBlock $methodDocBlock): array
30 30
     {
31
-        return array_map(function (Param $parameter) use ($methodDocBlock): Parameter {
31
+        return array_map(function(Param $parameter) use ($methodDocBlock): Parameter {
32 32
             /** @var \PhpParser\Node\Expr\Variable $parsedParameter Since the parser throws error by default */
33 33
             $parsedParameter = $parameter->var;
34 34
 
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/TypeBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     private function fromParsedType($type): TypeDeclaration
41 41
     {
42 42
         if ($type instanceof NullableType) {
43
-            return TypeDeclaration::fromNullable((string) $type->type);
43
+            return TypeDeclaration::fromNullable((string)$type->type);
44 44
         }
45 45
 
46 46
         if ($type instanceof Name) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         }
49 49
 
50 50
         if ($type instanceof Identifier) {
51
-            return TypeDeclaration::from((string) $type);
51
+            return TypeDeclaration::from((string)$type);
52 52
         }
53 53
 
54 54
         throw UnsupportedType::declaredAs($type);
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
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $attributes = $classMembers;
45 45
         foreach ($this->filters as $filter) {
46
-            $attributes = array_filter($attributes, static function (Stmt $member) use ($filter): bool {
46
+            $attributes = array_filter($attributes, static function(Stmt $member) use ($filter): bool {
47 47
                 return $filter->accept($member);
48 48
             });
49 49
         }
Please login to merge, or discard this patch.
src/Parser/Code/Builders/Members/FilteredConstantsBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@
 block discarded – undo
44 44
      */
45 45
     public function build(array $classAttributes): array
46 46
     {
47
-        $constants = array_filter($classAttributes, static function ($attribute): bool {
47
+        $constants = array_filter($classAttributes, static function($attribute): bool {
48 48
             return $attribute instanceof ClassConst;
49 49
         });
50 50
 
51
-        return array_map(function (ClassConst $constant): Constant {
51
+        return array_map(function(ClassConst $constant): Constant {
52 52
             return new Constant(
53
-                (string) $constant->consts[0]->name,
53
+                (string)$constant->consts[0]->name,
54 54
                 TypeDeclaration::from($this->determineType($constant->consts[0])),
55 55
                 $this->visibilityBuilder->build($constant)
56 56
             );
Please login to merge, or discard this patch.
src/Parser/Code/Builders/TraitDefinitionBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function build(Trait_ $trait): TraitDefinition
34 34
     {
35 35
         return new TraitDefinition(
36
-            Name::from((string) $trait->name),
36
+            Name::from((string)$trait->name),
37 37
             $this->membersBuilder->methods($trait->getMethods()),
38 38
             $this->membersBuilder->attributes($trait->stmts),
39 39
             $this->buildTraits($trait->stmts)
Please login to merge, or discard this patch.
src/Parser/Code/Builders/InterfaceDefinitionBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function build(Interface_ $interface): InterfaceDefinition
34 34
     {
35 35
         return new InterfaceDefinition(
36
-            InterfaceDefinitionName::from((string) $interface->name),
36
+            InterfaceDefinitionName::from((string)$interface->name),
37 37
             $this->membersBuilder->methods($interface->getMethods()),
38 38
             $this->membersBuilder->constants($interface->stmts),
39 39
             $this->buildInterfaces($interface->extends)
Please login to merge, or discard this patch.