@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | public function setGenerator($generator): void |
| 305 | 305 | { |
| 306 | 306 | if (!is_string($generator) && !$generator instanceof GeneratorInterface) { |
| 307 | - throw new LogicException('Trying to set an invalid generator in "' . get_class($this) . '"'); |
|
| 307 | + throw new LogicException('Trying to set an invalid generator in "'.get_class($this).'"'); |
|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | $this->generator = $generator; |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $relations = $this->relations(); |
| 547 | 547 | |
| 548 | 548 | if (!isset($relations[$relationName])) { |
| 549 | - throw new RelationNotFoundException('Relation "' . $relationName . '" is not set in ' . $this->metadata->entityName); |
|
| 549 | + throw new RelationNotFoundException('Relation "'.$relationName.'" is not set in '.$this->metadata->entityName); |
|
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | return $relations[$relationName]; |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | */ |
| 729 | 729 | public function scopes(): array |
| 730 | 730 | { |
| 731 | - throw new LogicException('No scopes have been defined in "' . get_class($this) . '"'); |
|
| 731 | + throw new LogicException('No scopes have been defined in "'.get_class($this).'"'); |
|
| 732 | 732 | } |
| 733 | 733 | |
| 734 | 734 | /** |
@@ -635,7 +635,7 @@ |
||
| 635 | 635 | public function field(string $name) |
| 636 | 636 | { |
| 637 | 637 | if (!isset($this->fields[$name])) { |
| 638 | - throw new \RuntimeException('Field ' . $name . ' not found'); |
|
| 638 | + throw new \RuntimeException('Field '.$name.' not found'); |
|
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | $this->current = $name; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function resolve(string $entityClass): string |
| 27 | 27 | { |
| 28 | - return $entityClass . $this->suffix; |
|
| 28 | + return $entityClass.$this->suffix; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $relation = parent::relation($relationName); |
| 53 | 53 | |
| 54 | 54 | if ($this->isDiscriminatedMapper() && $relation['type'] == Relation::BY_INHERITANCE) { |
| 55 | - throw new \RuntimeException('Relation type not allowed from relation "' . $relationName . '" in ' . $this->getEntityClass()); |
|
| 55 | + throw new \RuntimeException('Relation type not allowed from relation "'.$relationName.'" in '.$this->getEntityClass()); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | return $relation; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $discriminatorField = $this->metadata()->attributes[$this->discriminatorColumn]['field']; |
| 156 | 156 | |
| 157 | 157 | if (empty($data[$discriminatorField])) { |
| 158 | - throw new \Exception('Discriminator field "' . $discriminatorField . '" not found'); |
|
| 158 | + throw new \Exception('Discriminator field "'.$discriminatorField.'" not found'); |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | return $data[$discriminatorField]; |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | public function getDiscriminatorType($discriminatorValue): string |
| 175 | 175 | { |
| 176 | 176 | if (empty($this->discriminatorMap[$discriminatorValue])) { |
| 177 | - throw new \Exception('Unknown discriminator type "' . $discriminatorValue . '"'); |
|
| 177 | + throw new \Exception('Unknown discriminator type "'.$discriminatorValue.'"'); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | return $this->discriminatorMap[$discriminatorValue]; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public static function generate(string $prefix, array $parts, int $length = self::DEFAULT_LENGTH) |
| 22 | 22 | { |
| 23 | - $hash = implode('', array_map(function ($part) { |
|
| 23 | + $hash = implode('', array_map(function($part) { |
|
| 24 | 24 | return dechex(crc32($part)); |
| 25 | 25 | }, $parts)); |
| 26 | 26 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public function diff(bool $listDrop = true): array |
| 72 | 72 | { |
| 73 | 73 | $queries = $this->schema() |
| 74 | - ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) { |
|
| 74 | + ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) { |
|
| 75 | 75 | $schema->useDrop($listDrop); |
| 76 | 76 | $schema->add($this->table()); |
| 77 | 77 | }) |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $sequenceQueries = $schemaSequence |
| 85 | - ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) { |
|
| 85 | + ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) { |
|
| 86 | 86 | $schema->useDrop($listDrop); |
| 87 | 87 | $schema->add($this->sequence()); |
| 88 | 88 | }) |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | /** @var ConnectionInterface&\Doctrine\DBAL\Connection $connection */ |
| 161 | 161 | $connection = $this->connection($this->metadata->sequence['connection']); |
| 162 | - $table = $this->metadata->sequence['table']; |
|
| 162 | + $table = $this->metadata->sequence['table']; |
|
| 163 | 163 | |
| 164 | 164 | /** @psalm-suppress UndefinedInterfaceMethod */ |
| 165 | 165 | $nb = $connection->from($table)->count(); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function setListDropColumn($flag): void |
| 32 | 32 | { |
| 33 | - $this->listDropColumn = (bool)$flag; |
|
| 33 | + $this->listDropColumn = (bool) $flag; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function all(): array |
| 44 | 44 | { |
| 45 | - $indexes = $this->extractIndexes($this->metadata->indexes); |
|
| 45 | + $indexes = $this->extractIndexes($this->metadata->indexes); |
|
| 46 | 46 | |
| 47 | 47 | $primary = $this->primary(); |
| 48 | 48 | $indexes[$primary->name()] = $primary; |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | return $migrations; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - return array_filter($migrations, function (MigrationInterface $migration) use ($stage) { |
|
| 115 | + return array_filter($migrations, function(MigrationInterface $migration) use ($stage) { |
|
| 116 | 116 | return $migration->stage() === $stage; |
| 117 | 117 | }); |
| 118 | 118 | } |