@@ -15,6 +15,6 @@ |
||
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 | } |
@@ -43,11 +43,11 @@ |
||
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(); |
@@ -52,7 +52,7 @@ |
||
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 | } |
@@ -28,7 +28,7 @@ |
||
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 |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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); |
@@ -43,7 +43,7 @@ |
||
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 | } |
@@ -44,13 +44,13 @@ |
||
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 | ); |
@@ -33,7 +33,7 @@ |
||
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) |
@@ -33,7 +33,7 @@ |
||
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) |