@@ -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; |
@@ -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 |
@@ -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 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function addExternalDefinitionsTo(Codebase $codebase): void |
28 | 28 | { |
29 | - array_map(static fn (RelationshipsResolver $resolver) => $resolver->resolve($codebase), $this->resolvers); |
|
29 | + array_map(static fn(RelationshipsResolver $resolver) => $resolver->resolve($codebase), $this->resolvers); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** @param RelationshipsResolver[] $resolvers */ |
@@ -72,7 +72,7 @@ |
||
72 | 72 | { |
73 | 73 | $process = new Process([$this->name->command(), '-Tpng', '-o', $outputFile, $inputFile]); |
74 | 74 | $process->run(); |
75 | - if (! $process->isSuccessful()) { |
|
75 | + if (!$process->isSuccessful()) { |
|
76 | 76 | throw ImageGenerationFailure::withOutput($process->getErrorOutput()); |
77 | 77 | } |
78 | 78 | } |