@@ -36,6 +36,6 @@ |
||
36 | 36 | |
37 | 37 | public function id(): string |
38 | 38 | { |
39 | - return sha1((string) mt_rand()); |
|
39 | + return sha1((string)mt_rand()); |
|
40 | 40 | } |
41 | 41 | } |
@@ -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; |
@@ -43,7 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | $attributes = $classMembers; |
45 | 45 | foreach ($this->filters as $filter) { |
46 | - $attributes = array_filter($attributes, static fn (Stmt $member): bool => $filter->accept($member)); |
|
46 | + $attributes = array_filter($attributes, static fn(Stmt $member): bool => $filter->accept($member)); |
|
47 | 47 | } |
48 | 48 | return $attributes; |
49 | 49 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this->twig = $twig ?? new Twig(new FilesystemLoader(__DIR__ . '/../resources/templates')); |
25 | 25 | $this->twig->addFilter(new Filter( |
26 | 26 | 'whitespace', |
27 | - static fn (string $html): ?string => preg_replace('/\s\s+/', '', $html) |
|
27 | + static fn(string $html): ?string => preg_replace('/\s\s+/', '', $html) |
|
28 | 28 | )); |
29 | 29 | } |
30 | 30 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | try { |
35 | 35 | return $this->twig->render($template, $values); |
36 | - } catch (LoaderError | RuntimeError | SyntaxError $e) { |
|
36 | + } catch (LoaderError | RuntimeError | SyntaxError $e) { |
|
37 | 37 | throw new TemplateFailure($e); |
38 | 38 | } |
39 | 39 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | return \count(array_filter( |
42 | 42 | $this->methods, |
43 | - static fn (Method $method): bool => $method->hasVisibility($modifier) |
|
43 | + static fn(Method $method): bool => $method->hasVisibility($modifier) |
|
44 | 44 | )); |
45 | 45 | } |
46 | 46 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function constructorParameters(): array |
68 | 68 | { |
69 | - $constructors = array_filter($this->methods, static fn (Method $method): bool => $method->isConstructor()); |
|
69 | + $constructors = array_filter($this->methods, static fn(Method $method): bool => $method->isConstructor()); |
|
70 | 70 | $constructor = reset($constructors); |
71 | 71 | |
72 | 72 | return $constructor === false ? [] : $constructor->parameters(); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | return \count(array_filter( |
83 | 83 | $this->attributes, |
84 | - static fn (Attribute $attribute): bool => $attribute->hasVisibility($modifier) |
|
84 | + static fn(Attribute $attribute): bool => $attribute->hasVisibility($modifier) |
|
85 | 85 | )); |
86 | 86 | } |
87 | 87 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | { |
95 | 95 | return \count(array_filter( |
96 | 96 | $this->attributes, |
97 | - static fn (Attribute $attribute): bool => |
|
97 | + static fn(Attribute $attribute): bool => |
|
98 | 98 | $attribute->hasTypeDeclaration() && $attribute->hasVisibility($modifier) |
99 | 99 | )); |
100 | 100 | } |
@@ -152,6 +152,6 @@ discard block |
||
152 | 152 | */ |
153 | 153 | public function isAbstract(): bool |
154 | 154 | { |
155 | - return \count(array_filter($this->methods(), static fn (Method $method): bool => $method->isAbstract())) > 0; |
|
155 | + return \count(array_filter($this->methods(), static fn(Method $method): bool => $method->isAbstract())) > 0; |
|
156 | 156 | } |
157 | 157 | } |
@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | public function identifier(): string |
21 | 21 | { |
22 | - return (string) $this->name(); |
|
22 | + return (string)$this->name(); |
|
23 | 23 | } |
24 | 24 | } |