@@ -11,7 +11,7 @@ |
||
| 11 | 11 | use Rector\Set\ValueObject\SetList; |
| 12 | 12 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
| 13 | 13 | |
| 14 | -return static function (ContainerConfigurator $containerConfigurator): void { |
|
| 14 | +return static function(ContainerConfigurator $containerConfigurator): void { |
|
| 15 | 15 | // get parameters |
| 16 | 16 | $parameters = $containerConfigurator->parameters(); |
| 17 | 17 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $edges = []; |
| 59 | 59 | foreach ($variables as $parameter) { |
| 60 | - if (! $this->needAssociation($class, $parameter)) { |
|
| 60 | + if (!$this->needAssociation($class, $parameter)) { |
|
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | $edges[] = $this->addAssociation($class, $parameter, $codebase); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | private function needAssociation(ClassDefinition $class, HasType $attribute): bool |
| 76 | 76 | { |
| 77 | - return $attribute->isAReference() && ! $this->isAssociationResolved($class, $attribute); |
|
| 77 | + return $attribute->isAReference() && !$this->isAssociationResolved($class, $attribute); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | private function isAssociationResolved(ClassDefinition $class, HasType $attribute): bool |
@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $this->execute($dotFile, $imageFile); |
| 47 | 47 | |
| 48 | - $image = (string) file_get_contents($imageFile); |
|
| 48 | + $image = (string)file_get_contents($imageFile); |
|
| 49 | 49 | |
| 50 | 50 | $this->fileSystem->remove($dotFile); |
| 51 | 51 | $this->fileSystem->remove($imageFile); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | $process = $this->process ?? new Process([$this->command(), '-Tpng', '-o', $outputFile, $inputFile]); |
| 62 | 62 | $process->run(); |
| 63 | - if (! $process->isSuccessful()) { |
|
| 63 | + if (!$process->isSuccessful()) { |
|
| 64 | 64 | throw ImageGenerationFailure::withOutput($process->getErrorOutput()); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | /** @param mixed[] $input */ |
| 39 | 39 | public function __construct(array $input) |
| 40 | 40 | { |
| 41 | - $this->searchRecursively = (bool) $input['recursive']; |
|
| 42 | - $this->extractAssociations = (bool) $input['associations']; |
|
| 43 | - $this->hidePrivate = (bool) $input['hide-private']; |
|
| 44 | - $this->hideProtected = (bool) $input['hide-protected']; |
|
| 45 | - $this->hideAttributes = (bool) $input['hide-attributes']; |
|
| 46 | - $this->hideMethods = (bool) $input['hide-methods']; |
|
| 47 | - $this->hideEmptyBlocks = (bool) $input['hide-empty-blocks']; |
|
| 41 | + $this->searchRecursively = (bool)$input['recursive']; |
|
| 42 | + $this->extractAssociations = (bool)$input['associations']; |
|
| 43 | + $this->hidePrivate = (bool)$input['hide-private']; |
|
| 44 | + $this->hideProtected = (bool)$input['hide-protected']; |
|
| 45 | + $this->hideAttributes = (bool)$input['hide-attributes']; |
|
| 46 | + $this->hideMethods = (bool)$input['hide-methods']; |
|
| 47 | + $this->hideEmptyBlocks = (bool)$input['hide-empty-blocks']; |
|
| 48 | 48 | $this->setTheme($input['theme']); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -22,17 +22,17 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function add(Definition $definition): void |
| 24 | 24 | { |
| 25 | - $this->definitions[(string) $definition->name()] = $definition; |
|
| 25 | + $this->definitions[(string)$definition->name()] = $definition; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function has(Name $name): bool |
| 29 | 29 | { |
| 30 | - return isset($this->definitions[(string) $name]); |
|
| 30 | + return isset($this->definitions[(string)$name]); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function get(Name $name): Definition |
| 34 | 34 | { |
| 35 | - return $this->definitions[(string) $name]; |
|
| 35 | + return $this->definitions[(string)$name]; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** @return Definition[] */ |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | /** @see HasType::isAReference() for more details */ |
| 16 | 16 | public function isAReference(): bool |
| 17 | 17 | { |
| 18 | - return $this->hasTypeDeclaration() && ! $this->type->isBuiltIn(); |
|
| 18 | + return $this->hasTypeDeclaration() && !$this->type->isBuiltIn(); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** @see HasType::hasTypeDeclaration() for more details */ |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function leaveNode(Node $node) |
| 34 | 34 | { |
| 35 | - if ($node instanceof Class_ && ! $node->isAnonymous()) { |
|
| 35 | + if ($node instanceof Class_ && !$node->isAnonymous()) { |
|
| 36 | 36 | $this->codebase->add($this->builder->build($node)); |
| 37 | 37 | } |
| 38 | 38 | return null; |
@@ -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; |