@@ -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 | } |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | /** @param mixed[] $configuration */ |
| 23 | 23 | public function __construct(array $configuration) |
| 24 | 24 | { |
| 25 | - $extractAssociations = (bool) ($configuration['associations'] ?? false); |
|
| 25 | + $extractAssociations = (bool)($configuration['associations'] ?? false); |
|
| 26 | 26 | $this->associationsBuilder = $extractAssociations ? new EdgesBuilder() : new NoAssociationsBuilder(); |
| 27 | 27 | $theme = new ThemeName($configuration['theme']); |
| 28 | - $hideEmptyBlocks = (bool) ($configuration['hide-empty-blocks'] ?? false); |
|
| 28 | + $hideEmptyBlocks = (bool)($configuration['hide-empty-blocks'] ?? false); |
|
| 29 | 29 | $this->digraphStyle = $hideEmptyBlocks |
| 30 | 30 | ? DigraphStyle::withoutEmptyBlocks($theme) |
| 31 | 31 | : DigraphStyle::default($theme); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | ->pipe($this->findCode) |
| 53 | 53 | ->pipe($this->parseCode) |
| 54 | 54 | ->pipe($this->createDigraph) |
| 55 | - ->pipe(fn (OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 55 | + ->pipe(fn(OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 56 | 56 | |
| 57 | 57 | $pipeline->process($input->codebaseDirectory()); |
| 58 | 58 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ->pipe($this->parseCode) |
| 51 | 51 | ->pipe($this->createDigraph) |
| 52 | 52 | ->pipe($this->createClassDiagram) |
| 53 | - ->pipe(fn (OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 53 | + ->pipe(fn(OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 54 | 54 | |
| 55 | 55 | $pipeline->process($input->codebaseDirectory()); |
| 56 | 56 | } |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | ->pipe($this->findCode) |
| 48 | 48 | ->pipe($this->parseCode) |
| 49 | 49 | ->pipe($this->calculateStatistics) |
| 50 | - ->pipe(fn (OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 50 | + ->pipe(fn(OutputContent $content) => $this->saveFile->saveTo($content, $input->filePath())); |
|
| 51 | 51 | |
| 52 | 52 | $pipeline->process($input->codebaseDirectory()); |
| 53 | 53 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function __construct(string $name) |
| 18 | 18 | { |
| 19 | - if (! \in_array($name, self::VALID_NAMES, true)) { |
|
| 19 | + if (!\in_array($name, self::VALID_NAMES, true)) { |
|
| 20 | 20 | throw UnknownTheme::named($name, self::VALID_NAMES); |
| 21 | 21 | } |
| 22 | 22 | $this->name = $name; |
@@ -22,11 +22,11 @@ |
||
| 22 | 22 | /** @param mixed[] $options */ |
| 23 | 23 | public function __construct(array $options) |
| 24 | 24 | { |
| 25 | - $this->extractAssociations = (bool) ($options['associations'] ?? false); |
|
| 26 | - $this->hidePrivate = (bool) ($options['hide-private'] ?? false); |
|
| 27 | - $this->hideProtected = (bool) ($options['hide-protected'] ?? false); |
|
| 28 | - $this->hideAttributes = (bool) ($options['hide-attributes'] ?? false); |
|
| 29 | - $this->hideMethods = (bool) ($options['hide-methods'] ?? false); |
|
| 25 | + $this->extractAssociations = (bool)($options['associations'] ?? false); |
|
| 26 | + $this->hidePrivate = (bool)($options['hide-private'] ?? false); |
|
| 27 | + $this->hideProtected = (bool)($options['hide-protected'] ?? false); |
|
| 28 | + $this->hideAttributes = (bool)($options['hide-attributes'] ?? false); |
|
| 29 | + $this->hideMethods = (bool)($options['hide-methods'] ?? false); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function extractAssociations(): bool |
@@ -15,9 +15,9 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | final class VisibilityBuilder |
| 17 | 17 | { |
| 18 | - public function build(Property|ClassMethod|ClassConst $member): Visibility |
|
| 18 | + public function build(Property | ClassMethod | ClassConst $member): Visibility |
|
| 19 | 19 | { |
| 20 | - return match (true) { |
|
| 20 | + return match(true) { |
|
| 21 | 21 | $member->isPublic() => Visibility::public(), |
| 22 | 22 | $member->isPrivate() => Visibility::private(), |
| 23 | 23 | default => Visibility::protected(), |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | public function fromFlags(int $flags): Visibility |
| 28 | 28 | { |
| 29 | - return match (true) { |
|
| 30 | - (bool) ($flags & Class_::MODIFIER_PUBLIC) => Visibility::public(), |
|
| 31 | - (bool) ($flags & Class_::MODIFIER_PROTECTED) => Visibility::protected(), |
|
| 32 | - (bool) ($flags & Class_::MODIFIER_PRIVATE) => Visibility::private(), |
|
| 29 | + return match(true) { |
|
| 30 | + (bool)($flags & Class_::MODIFIER_PUBLIC) => Visibility::public(), |
|
| 31 | + (bool)($flags & Class_::MODIFIER_PROTECTED) => Visibility::protected(), |
|
| 32 | + (bool)($flags & Class_::MODIFIER_PRIVATE) => Visibility::private(), |
|
| 33 | 33 | default => throw UnknownVisibilityFlag::withValue($flags) |
| 34 | 34 | }; |
| 35 | 35 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | public function leaveNode(Node $node) |
| 26 | 26 | { |
| 27 | - if (! $node instanceof Class_) { |
|
| 27 | + if (!$node instanceof Class_) { |
|
| 28 | 28 | return null; |
| 29 | 29 | } |
| 30 | 30 | if ($node->isAnonymous()) { |