@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $this->statements['offset'] = null; |
275 | 275 | $this->statements['aggregate'] = ['pagination', $this->getPaginationColumns($column)]; |
276 | 276 | |
277 | - $count = (int)$this->execute()->current()['aggregate']; |
|
277 | + $count = (int) $this->execute()->current()['aggregate']; |
|
278 | 278 | |
279 | 279 | $this->compilerState->invalidate(['columns', 'orders']); |
280 | 280 | $this->statements = $statements; |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | #[ReadOperation] |
321 | 321 | public function count(?string $column = null): int |
322 | 322 | { |
323 | - return (int)$this->aggregate(__FUNCTION__, $column); |
|
323 | + return (int) $this->aggregate(__FUNCTION__, $column); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | #[ReadOperation] |
330 | 330 | public function avg(?string $column = null): float |
331 | 331 | { |
332 | - return (float)$this->aggregate(__FUNCTION__, $column); |
|
332 | + return (float) $this->aggregate(__FUNCTION__, $column); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | #[ReadOperation] |
357 | 357 | public function sum(?string $column = null): float |
358 | 358 | { |
359 | - return (float)$this->aggregate(__FUNCTION__, $column); |
|
359 | + return (float) $this->aggregate(__FUNCTION__, $column); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /** |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | # build a regular expression for each parameter |
620 | 620 | foreach ($values as $key => $value) { |
621 | 621 | if (is_string($key)) { |
622 | - $keys[] = '/:' . $key . '/'; |
|
622 | + $keys[] = '/:'.$key.'/'; |
|
623 | 623 | } else { |
624 | 624 | $keys[] = '/[?]/'; |
625 | 625 | } |
@@ -126,7 +126,7 @@ |
||
126 | 126 | $this->addCommand($key, $value); |
127 | 127 | } else { |
128 | 128 | // Column with operator |
129 | - $key = explode(' ', trim($key), 2); |
|
129 | + $key = explode(' ', trim($key), 2); |
|
130 | 130 | $parts[] = [ |
131 | 131 | 'column' => $key[0], |
132 | 132 | 'operator' => isset($key[1]) ? $key[1] : '=', |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public static function instance(): self |
38 | 38 | { |
39 | - if (self::$instance === null) { |
|
39 | + if (self::$instance === null) { |
|
40 | 40 | return self::$instance = new self; |
41 | 41 | } |
42 | 42 |
@@ -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(); |