@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function __construct(string $name) |
18 | 18 | { |
19 | - if (! \in_array($name, self::$validNames, true)) { |
|
19 | + if (!\in_array($name, self::$validNames, true)) { |
|
20 | 20 | throw UnknownTheme::named($name, self::$validNames); |
21 | 21 | } |
22 | 22 | $this->name = $name; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | public function __construct(array $arguments, array $options) |
28 | 28 | { |
29 | 29 | $this->directory = $arguments['directory'] ?? ''; |
30 | - $this->recursive = isset($options['recursive']) && (bool) $options['recursive']; |
|
30 | + $this->recursive = isset($options['recursive']) && (bool)$options['recursive']; |
|
31 | 31 | $this->setOutputFile($arguments); |
32 | 32 | } |
33 | 33 |
@@ -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 | } |