@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @var array{persistent:object[], non-persistent: object[]} |
33 | 33 | */ |
34 | 34 | protected $testPacks = [ |
35 | - 'persistent' => [], // Entités créées non modifiables |
|
35 | + 'persistent' => [], // Entités créées non modifiables |
|
36 | 36 | 'non-persistent' => [] // Entités créées et détruites aprés un test |
37 | 37 | ]; |
38 | 38 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | // On ajoute la classe de l'entité uniquement si elle n'est pas déjà dans le tableau et si le test pack n'a pas démarré de savepoint |
162 | 162 | foreach ($entityClasses as $entityClassName) { |
163 | - if (! in_array($entityClassName, $this->entityClasses)) { |
|
163 | + if (!in_array($entityClassName, $this->entityClasses)) { |
|
164 | 164 | if ($this->initialized) { |
165 | 165 | $this->create([$entityClassName]); |
166 | 166 | } else { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function onInit(callable $callback) |
222 | 222 | { |
223 | - if (! $this->initialized) { |
|
223 | + if (!$this->initialized) { |
|
224 | 224 | $this->once('testpack.initialized', $callback); |
225 | 225 | } |
226 | 226 |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $this->_attributes['dbConfig'] = $this->_attributes['dbConfig']($this); |
112 | 112 | } |
113 | 113 | |
114 | - if (! $this->_attributes['dbConfig'] instanceof ConnectionConfig) { |
|
114 | + if (!$this->_attributes['dbConfig'] instanceof ConnectionConfig) { |
|
115 | 115 | /** @psalm-suppress InternalProperty */ |
116 | 116 | $this->_attributes['dbConfig'] = new ConnectionConfig((array) $this->_attributes['dbConfig']); |
117 | 117 | } |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | #[ReadOperation] |
325 | 325 | public function loadRelations($entity, $relations): void |
326 | 326 | { |
327 | - foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) { |
|
327 | + foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) { |
|
328 | 328 | $this->relation($relationName)->loadIfNotLoaded( |
329 | 329 | new SingleEntityIndexer($this->mapper, $entity), |
330 | 330 | $meta['relations'], |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | #[ReadOperation] |
348 | 348 | public function reloadRelations($entity, $relations): void |
349 | 349 | { |
350 | - foreach (Relation::sanitizeRelations((array)$relations) as $relationName => $meta) { |
|
350 | + foreach (Relation::sanitizeRelations((array) $relations) as $relationName => $meta) { |
|
351 | 351 | $this->relation($relationName)->load( |
352 | 352 | new SingleEntityIndexer($this->mapper, $entity), |
353 | 353 | $meta['relations'], |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | #[WriteOperation] |
388 | 388 | public function saveAll($entity, $relations): int |
389 | 389 | { |
390 | - $relations = Relation::sanitizeRelations((array)$relations); |
|
390 | + $relations = Relation::sanitizeRelations((array) $relations); |
|
391 | 391 | |
392 | 392 | return $this->transaction(function() use($entity, $relations) { |
393 | 393 | $nb = $this->save($entity); |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | #[WriteOperation] |
407 | 407 | public function deleteAll($entity, $relations): int |
408 | 408 | { |
409 | - $relations = Relation::sanitizeRelations((array)$relations); |
|
409 | + $relations = Relation::sanitizeRelations((array) $relations); |
|
410 | 410 | |
411 | 411 | return $this->transaction(function() use($entity, $relations) { |
412 | 412 | $nb = $this->delete($entity); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | public function setGenerator($generator): void |
289 | 289 | { |
290 | 290 | if (!is_string($generator) && !$generator instanceof GeneratorInterface) { |
291 | - throw new LogicException('Trying to set an invalid generator in "' . get_class($this) . '"'); |
|
291 | + throw new LogicException('Trying to set an invalid generator in "'.get_class($this).'"'); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | $this->generator = $generator; |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $relations = $this->relations(); |
515 | 515 | |
516 | 516 | if (!isset($relations[$relationName])) { |
517 | - throw new RelationNotFoundException('Relation "' . $relationName . '" is not set in ' . $this->metadata->entityName); |
|
517 | + throw new RelationNotFoundException('Relation "'.$relationName.'" is not set in '.$this->metadata->entityName); |
|
518 | 518 | } |
519 | 519 | |
520 | 520 | return $relations[$relationName]; |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | */ |
689 | 689 | public function scopes() |
690 | 690 | { |
691 | - throw new LogicException('No scopes have been defined in "' . get_class($this) . '"'); |
|
691 | + throw new LogicException('No scopes have been defined in "'.get_class($this).'"'); |
|
692 | 692 | } |
693 | 693 | |
694 | 694 | /** |
@@ -890,7 +890,7 @@ discard block |
||
890 | 890 | $attributePath = $attribute; |
891 | 891 | $path = null; |
892 | 892 | } else { |
893 | - $attributePath = $embeddedMeta['path'] . '.' . $attribute; |
|
893 | + $attributePath = $embeddedMeta['path'].'.'.$attribute; |
|
894 | 894 | $path = $embeddedMeta['path']; |
895 | 895 | } |
896 | 896 | |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | |
945 | 945 | $this->sequence = [ |
946 | 946 | 'connection' => $sequence['connection'] ?? $this->connection, |
947 | - 'table' => $sequence['table'] ?? $this->table . '_seq', |
|
947 | + 'table' => $sequence['table'] ?? $this->table.'_seq', |
|
948 | 948 | 'column' => $sequence['column'] ?? 'id', |
949 | 949 | 'options' => $sequence['tableOptions'] ?? [], |
950 | 950 | ]; |