@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | public function absolutePath(): string |
| 23 | 23 | { |
| 24 | - return (string) $this->directory->getRealPath(); |
|
| 24 | + return (string)$this->directory->getRealPath(); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | private function setDirectory(string $path): void |
@@ -31,7 +31,7 @@ discard block |
||
| 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; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ($member instanceof ClassConst |
| 23 | 23 | || $member instanceof ClassMethod |
| 24 | 24 | || $member instanceof Property) { |
| 25 | - return ! $member->isProtected(); |
|
| 25 | + return !$member->isProtected(); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | return false; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | if ($member instanceof ClassConst |
| 23 | 23 | || $member instanceof ClassMethod |
| 24 | 24 | || $member instanceof Property) { |
| 25 | - return ! $member->isPrivate(); |
|
| 25 | + return !$member->isPrivate(); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | return false; |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | public function build(Trait_ $trait): TraitDefinition |
| 33 | 33 | { |
| 34 | 34 | return new TraitDefinition( |
| 35 | - new Name((string) $trait->name), |
|
| 35 | + new Name((string)$trait->name), |
|
| 36 | 36 | $this->membersBuilder->methods($trait->getMethods()), |
| 37 | 37 | $this->membersBuilder->attributes($trait->stmts), |
| 38 | 38 | $this->buildTraits($trait->stmts) |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | public function build(Class_ $class): ClassDefinition |
| 36 | 36 | { |
| 37 | 37 | return new ClassDefinition( |
| 38 | - new ClassDefinitionName((string) $class->name), |
|
| 38 | + new ClassDefinitionName((string)$class->name), |
|
| 39 | 39 | $this->membersBuilder->methods($class->getMethods()), |
| 40 | 40 | $this->membersBuilder->constants($class->stmts), |
| 41 | - $class->extends !== null ? new ClassDefinitionName((string) end($class->extends->parts)) : null, |
|
| 41 | + $class->extends !== null ? new ClassDefinitionName((string)end($class->extends->parts)) : null, |
|
| 42 | 42 | $this->membersBuilder->attributes($class->stmts), |
| 43 | 43 | $this->buildInterfaces($class->implements), |
| 44 | 44 | $this->buildTraits($class->stmts) |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | protected function buildTraits(array $nodes): array |
| 21 | 21 | { |
| 22 | - $useStatements = array_filter($nodes, static fn (Node $node): bool => $node instanceof TraitUse); |
|
| 22 | + $useStatements = array_filter($nodes, static fn(Node $node): bool => $node instanceof TraitUse); |
|
| 23 | 23 | |
| 24 | 24 | if (count($useStatements) === 0) { |
| 25 | 25 | return []; |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | protected function buildInterfaces(array $implements): array |
| 20 | 20 | { |
| 21 | - return array_map(static fn (Name $name): DefinitionName => new DefinitionName($name->getLast()), $implements); |
|
| 21 | + return array_map(static fn(Name $name): DefinitionName => new DefinitionName($name->getLast()), $implements); |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -46,9 +46,9 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | public function build(array $parsedAttributes): array |
| 48 | 48 | { |
| 49 | - $attributes = array_filter($parsedAttributes, static fn ($attribute): bool => $attribute instanceof Property); |
|
| 49 | + $attributes = array_filter($parsedAttributes, static fn($attribute): bool => $attribute instanceof Property); |
|
| 50 | 50 | |
| 51 | - return array_map(function (Property $attribute): Attribute { |
|
| 51 | + return array_map(function(Property $attribute): Attribute { |
|
| 52 | 52 | $variable = new Variable( |
| 53 | 53 | "\${$attribute->props[0]->name}", |
| 54 | 54 | $this->typeBuilder->fromAttributeType($attribute->type, $attribute->getDocComment()) |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function build(array $methods): array |
| 49 | 49 | { |
| 50 | 50 | return array_map( |
| 51 | - fn (ClassMethod $method): Method => $this->buildMethod($method), |
|
| 51 | + fn(ClassMethod $method): Method => $this->buildMethod($method), |
|
| 52 | 52 | $this->visibilityFilters->apply($methods) |
| 53 | 53 | ); |
| 54 | 54 | } |