@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools; |
6 | 6 | |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $pkColumns = []; |
181 | 181 | |
182 | 182 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
183 | - if (! ($property instanceof FieldMetadata)) { |
|
183 | + if ( ! ($property instanceof FieldMetadata)) { |
|
184 | 184 | continue; |
185 | 185 | } |
186 | 186 | |
187 | - if (! $class->isInheritedProperty($fieldName)) { |
|
187 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
188 | 188 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
189 | 189 | |
190 | 190 | $this->gatherColumn($class, $property, $table); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
222 | - if (! empty($inheritedKeyColumns)) { |
|
222 | + if ( ! empty($inheritedKeyColumns)) { |
|
223 | 223 | // Add a FK constraint on the ID column |
224 | 224 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
225 | 225 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | } |
266 | 266 | |
267 | - if (! $table->hasIndex('primary')) { |
|
267 | + if ( ! $table->hasIndex('primary')) { |
|
268 | 268 | $table->setPrimaryKey($pkColumns); |
269 | 269 | } |
270 | 270 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $processedClasses[$class->getClassName()] = true; |
325 | 325 | |
326 | 326 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
327 | - if (! $property instanceof FieldMetadata |
|
327 | + if ( ! $property instanceof FieldMetadata |
|
328 | 328 | || ! $property->hasValueGenerator() |
329 | 329 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
330 | 330 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | |
334 | 334 | $quotedName = $this->platform->quoteIdentifier($property->getValueGenerator()->getDefinition()['sequenceName']); |
335 | 335 | |
336 | - if (! $schema->hasSequence($quotedName)) { |
|
336 | + if ( ! $schema->hasSequence($quotedName)) { |
|
337 | 337 | $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']); |
338 | 338 | } |
339 | 339 | } |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | } |
347 | 347 | } |
348 | 348 | |
349 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
349 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
350 | 350 | $schema->visit(new RemoveNamespacedAssets()); |
351 | 351 | } |
352 | 352 | |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | break; |
386 | 386 | } |
387 | 387 | |
388 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
388 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
389 | 389 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
390 | 390 | } |
391 | 391 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $pkColumns = []; |
404 | 404 | |
405 | 405 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
406 | - if (! ($property instanceof FieldMetadata)) { |
|
406 | + if ( ! ($property instanceof FieldMetadata)) { |
|
407 | 407 | continue; |
408 | 408 | } |
409 | 409 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
519 | 519 | { |
520 | 520 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
521 | - if (! ($property instanceof AssociationMetadata)) { |
|
521 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
522 | 522 | continue; |
523 | 523 | } |
524 | 524 | |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | continue; |
527 | 527 | } |
528 | 528 | |
529 | - if (! $property->isOwningSide()) { |
|
529 | + if ( ! $property->isOwningSide()) { |
|
530 | 530 | continue; |
531 | 531 | } |
532 | 532 | |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | $idColumns = $class->getIdentifierColumns($this->em); |
617 | 617 | $idColumnNameList = array_keys($idColumns); |
618 | 618 | |
619 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
619 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
620 | 620 | return null; |
621 | 621 | } |
622 | 622 | |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
625 | 625 | $property = $class->getProperty($fieldName); |
626 | 626 | |
627 | - if (! ($property instanceof AssociationMetadata)) { |
|
627 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
628 | 628 | continue; |
629 | 629 | } |
630 | 630 | |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $joinColumn->getReferencedColumnName() |
681 | 681 | ); |
682 | 682 | |
683 | - if (! $definingClass) { |
|
683 | + if ( ! $definingClass) { |
|
684 | 684 | throw new ORMException(sprintf( |
685 | 685 | 'Column name "%s" referenced for relation from %s towards %s does not exist.', |
686 | 686 | $joinColumn->getReferencedColumnName(), |
@@ -696,14 +696,14 @@ discard block |
||
696 | 696 | $localColumns[] = $quotedColumnName; |
697 | 697 | $foreignColumns[] = $quotedReferencedColumnName; |
698 | 698 | |
699 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
699 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
700 | 700 | // Only add the column to the table if it does not exist already. |
701 | 701 | // It might exist already if the foreign key is mapped into a regular |
702 | 702 | // property as well. |
703 | 703 | $property = $definingClass->getProperty($referencedFieldName); |
704 | 704 | $columnDef = null; |
705 | 705 | |
706 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
706 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
707 | 707 | $columnDef = $joinColumn->getColumnDefinition(); |
708 | 708 | } elseif ($property->getColumnDefinition()) { |
709 | 709 | $columnDef = $property->getColumnDefinition(); |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
738 | 738 | } |
739 | 739 | |
740 | - if (! empty($joinColumn->getOnDelete())) { |
|
740 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
741 | 741 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
742 | 742 | } |
743 | 743 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
749 | 749 | } |
750 | 750 | |
751 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
751 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
752 | 752 | |
753 | 753 | if (isset($addedFks[$compositeName]) |
754 | 754 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | } |
766 | 766 | |
767 | 767 | $blacklistedFks[$compositeName] = true; |
768 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
768 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
769 | 769 | $addedFks[$compositeName] = [ |
770 | 770 | 'foreignTableName' => $foreignTableName, |
771 | 771 | 'foreignColumns' => $foreignColumns, |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | $fullSchema = $sm->createSchema(); |
848 | 848 | |
849 | 849 | foreach ($fullSchema->getTables() as $table) { |
850 | - if (! $schema->hasTable($table->getName())) { |
|
850 | + if ( ! $schema->hasTable($table->getName())) { |
|
851 | 851 | foreach ($table->getForeignKeys() as $foreignKey) { |
852 | 852 | /* @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */ |
853 | 853 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -872,7 +872,7 @@ discard block |
||
872 | 872 | if ($table->hasPrimaryKey()) { |
873 | 873 | $columns = $table->getPrimaryKey()->getColumns(); |
874 | 874 | if (count($columns) === 1) { |
875 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
875 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
876 | 876 | if ($fullSchema->hasSequence($checkSequence)) { |
877 | 877 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
878 | 878 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Mapping; |
6 | 6 | |
@@ -8,6 +8,6 @@ discard block |
||
8 | 8 | { |
9 | 9 | public static function create(string $generatorType) : self |
10 | 10 | { |
11 | - return new self('Unknown generator type: ' . $generatorType); |
|
11 | + return new self('Unknown generator type: '.$generatorType); |
|
12 | 12 | } |
13 | 13 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Mapping; |
6 | 6 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | string $className, |
81 | 81 | ClassMetadataBuildingContext $metadataBuildingContext |
82 | 82 | ) : ?ClassMetadata { |
83 | - if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
83 | + if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) { |
|
84 | 84 | return null; |
85 | 85 | } |
86 | 86 | |
@@ -139,20 +139,20 @@ discard block |
||
139 | 139 | $classMetadata->setCache(clone $parent->getCache()); |
140 | 140 | } |
141 | 141 | |
142 | - if (! empty($parent->namedNativeQueries)) { |
|
142 | + if ( ! empty($parent->namedNativeQueries)) { |
|
143 | 143 | $this->addInheritedNamedNativeQueries($classMetadata, $parent); |
144 | 144 | } |
145 | 145 | |
146 | - if (! empty($parent->sqlResultSetMappings)) { |
|
146 | + if ( ! empty($parent->sqlResultSetMappings)) { |
|
147 | 147 | $this->addInheritedSqlResultSetMappings($classMetadata, $parent); |
148 | 148 | } |
149 | 149 | |
150 | - if (! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) { |
|
150 | + if ( ! empty($parent->entityListeners) && empty($classMetadata->entityListeners)) { |
|
151 | 151 | $classMetadata->entityListeners = $parent->entityListeners; |
152 | 152 | } |
153 | 153 | } |
154 | 154 | |
155 | - if (! $classMetadata->discriminatorMap && $classMetadata->inheritanceType !== InheritanceType::NONE && $classMetadata->isRootEntity()) { |
|
155 | + if ( ! $classMetadata->discriminatorMap && $classMetadata->inheritanceType !== InheritanceType::NONE && $classMetadata->isRootEntity()) { |
|
156 | 156 | $this->addDefaultDiscriminatorMap($classMetadata); |
157 | 157 | } |
158 | 158 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | |
173 | 173 | protected function completeRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
174 | 174 | { |
175 | - if (! $parent || ! $parent->isMappedSuperclass) { |
|
175 | + if ( ! $parent || ! $parent->isMappedSuperclass) { |
|
176 | 176 | return; |
177 | 177 | } |
178 | 178 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | continue; |
191 | 191 | } |
192 | 192 | |
193 | - if (! ($property instanceof ToOneAssociationMetadata)) { |
|
193 | + if ( ! ($property instanceof ToOneAssociationMetadata)) { |
|
194 | 194 | continue; |
195 | 195 | } |
196 | 196 | |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | protected function validateRuntimeMetadata(ClassMetadata $class, ?ClassMetadata $parent = null) : void |
211 | 211 | { |
212 | - if (! $class->getReflectionClass()) { |
|
212 | + if ( ! $class->getReflectionClass()) { |
|
213 | 213 | // only validate if there is a reflection class instance |
214 | 214 | return; |
215 | 215 | } |
@@ -219,13 +219,13 @@ discard block |
||
219 | 219 | $class->validateLifecycleCallbacks($this->getReflectionService()); |
220 | 220 | |
221 | 221 | // verify inheritance |
222 | - if (! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
223 | - if (! $parent) { |
|
224 | - if (! $class->discriminatorMap) { |
|
222 | + if ( ! $class->isMappedSuperclass && $class->inheritanceType !== InheritanceType::NONE) { |
|
223 | + if ( ! $parent) { |
|
224 | + if ( ! $class->discriminatorMap) { |
|
225 | 225 | throw MappingException::missingDiscriminatorMap($class->getClassName()); |
226 | 226 | } |
227 | 227 | |
228 | - if (! $class->discriminatorColumn) { |
|
228 | + if ( ! $class->discriminatorColumn) { |
|
229 | 229 | throw MappingException::missingDiscriminatorColumn($class->getClassName()); |
230 | 230 | } |
231 | 231 | } |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | private function completeIdentifierGeneratorMappings(ClassMetadata $class) : void |
420 | 420 | { |
421 | 421 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
422 | - if (! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) { |
|
422 | + if ( ! $property instanceof FieldMetadata /*&& ! $property instanceof AssocationMetadata*/) { |
|
423 | 423 | continue; |
424 | 424 | } |
425 | 425 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | |
430 | 430 | private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field) |
431 | 431 | { |
432 | - if (! $field->hasValueGenerator()) { |
|
432 | + if ( ! $field->hasValueGenerator()) { |
|
433 | 433 | return; |
434 | 434 | } |
435 | 435 | |
@@ -481,10 +481,10 @@ discard block |
||
481 | 481 | |
482 | 482 | case GeneratorType::CUSTOM: |
483 | 483 | $definition = $generator->getDefinition(); |
484 | - if (! isset($definition['class'])) { |
|
484 | + if ( ! isset($definition['class'])) { |
|
485 | 485 | throw InvalidCustomGenerator::onClassNotConfigured(); |
486 | 486 | } |
487 | - if (! class_exists($definition['class'])) { |
|
487 | + if ( ! class_exists($definition['class'])) { |
|
488 | 488 | throw InvalidCustomGenerator::onMissingClass($definition); |
489 | 489 | } |
490 | 490 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | private function getTargetPlatform() : Platforms\AbstractPlatform |
520 | 520 | { |
521 | - if (! $this->targetPlatform) { |
|
521 | + if ( ! $this->targetPlatform) { |
|
522 | 522 | $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform(); |
523 | 523 | } |
524 | 524 | |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | $generatedProperties = []; |
532 | 532 | |
533 | 533 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
534 | - if (! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) { |
|
534 | + if ( ! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) { |
|
535 | 535 | continue; |
536 | 536 | } |
537 | 537 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools\Pagination; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\EntityManager; |
6 | 6 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | public static function create() : self |
12 | 12 | { |
13 | 13 | return new self( |
14 | - "It's a requirement to specify a Metadata Driver and pass it " . |
|
14 | + "It's a requirement to specify a Metadata Driver and pass it ". |
|
15 | 15 | 'to Doctrine\\ORM\\Configuration::setMetadataDriverImpl().' |
16 | 16 | ); |
17 | 17 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Persisters; |
6 | 6 | |
@@ -10,6 +10,6 @@ discard block |
||
10 | 10 | { |
11 | 11 | public static function fromClassNameAndField(string $className, string $field) : self |
12 | 12 | { |
13 | - return new self('Invalid order by orientation specified for ' . $className . '#' . $field); |
|
13 | + return new self('Invalid order by orientation specified for '.$className.'#'.$field); |
|
14 | 14 | } |
15 | 15 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Configuration; |
6 | 6 | |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public static function fromClassName(string $className) : self |
13 | 13 | { |
14 | 14 | return new self( |
15 | - "Invalid repository class '" . $className . "'. It must be a " . ObjectRepository::class . '.' |
|
15 | + "Invalid repository class '".$className."'. It must be a ".ObjectRepository::class.'.' |
|
16 | 16 | ); |
17 | 17 | } |
18 | 18 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Cache; |
6 | 6 | |
@@ -62,17 +62,17 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function get(QueryCacheKey $key, ResultSetMapping $rsm, array $hints = []) |
64 | 64 | { |
65 | - if (! ($key->cacheMode & Cache::MODE_GET)) { |
|
65 | + if ( ! ($key->cacheMode & Cache::MODE_GET)) { |
|
66 | 66 | return null; |
67 | 67 | } |
68 | 68 | |
69 | 69 | $cacheEntry = $this->region->get($key); |
70 | 70 | |
71 | - if (! $cacheEntry instanceof QueryCacheEntry) { |
|
71 | + if ( ! $cacheEntry instanceof QueryCacheEntry) { |
|
72 | 72 | return null; |
73 | 73 | } |
74 | 74 | |
75 | - if (! $this->validator->isValid($key, $cacheEntry)) { |
|
75 | + if ( ! $this->validator->isValid($key, $cacheEntry)) { |
|
76 | 76 | $this->region->evict($key); |
77 | 77 | |
78 | 78 | return null; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $cm = $this->em->getClassMetadata($entityName); |
90 | 90 | |
91 | - $generateKeys = function (array $entry) use ($cm) : EntityCacheKey { |
|
91 | + $generateKeys = function(array $entry) use ($cm) : EntityCacheKey { |
|
92 | 92 | return new EntityCacheKey($cm->getRootClassName(), $entry['identifier']); |
93 | 93 | }; |
94 | 94 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->cacheLogger->entityCacheHit($regionName, $cacheKeys->identifiers[$index]); |
112 | 112 | } |
113 | 113 | |
114 | - if (! $hasRelation) { |
|
114 | + if ( ! $hasRelation) { |
|
115 | 115 | $result[$index] = $unitOfWork->createEntity( |
116 | 116 | $entityEntry->class, |
117 | 117 | $entityEntry->resolveAssociationEntries($this->em), |
@@ -156,11 +156,11 @@ discard block |
||
156 | 156 | continue; |
157 | 157 | } |
158 | 158 | |
159 | - if (! isset($assoc['list']) || empty($assoc['list'])) { |
|
159 | + if ( ! isset($assoc['list']) || empty($assoc['list'])) { |
|
160 | 160 | continue; |
161 | 161 | } |
162 | 162 | |
163 | - $generateKeys = function ($id) use ($assocMetadata) : EntityCacheKey { |
|
163 | + $generateKeys = function($id) use ($assocMetadata) : EntityCacheKey { |
|
164 | 164 | return new EntityCacheKey($assocMetadata->getRootClassName(), $id); |
165 | 165 | }; |
166 | 166 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | throw FeatureNotImplemented::multipleRootEntities(); |
239 | 239 | } |
240 | 240 | |
241 | - if (! $rsm->isSelect) { |
|
241 | + if ( ! $rsm->isSelect) { |
|
242 | 242 | throw FeatureNotImplemented::nonSelectStatements(); |
243 | 243 | } |
244 | 244 | |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | throw FeatureNotImplemented::partialEntities(); |
247 | 247 | } |
248 | 248 | |
249 | - if (! ($key->cacheMode & Cache::MODE_PUT)) { |
|
249 | + if ( ! ($key->cacheMode & Cache::MODE_PUT)) { |
|
250 | 250 | return false; |
251 | 251 | } |
252 | 252 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $unitOfWork = $this->em->getUnitOfWork(); |
257 | 257 | $persister = $unitOfWork->getEntityPersister($entityName); |
258 | 258 | |
259 | - if (! ($persister instanceof CachedPersister)) { |
|
259 | + if ( ! ($persister instanceof CachedPersister)) { |
|
260 | 260 | throw NonCacheableEntity::fromEntity($entityName); |
261 | 261 | } |
262 | 262 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | |
269 | 269 | if (($key->cacheMode & Cache::MODE_REFRESH) || ! $region->contains($entityKey)) { |
270 | 270 | // Cancel put result if entity put fail |
271 | - if (! $persister->storeEntityCache($entity, $entityKey)) { |
|
271 | + if ( ! $persister->storeEntityCache($entity, $entityKey)) { |
|
272 | 272 | return false; |
273 | 273 | } |
274 | 274 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | } |
303 | 303 | |
304 | 304 | // store single nested association |
305 | - if (! is_array($assocValue)) { |
|
305 | + if ( ! is_array($assocValue)) { |
|
306 | 306 | // Cancel put result if association put fail |
307 | 307 | if ($this->storeAssociationCache($key, $association, $assocValue) === null) { |
308 | 308 | return false; |
@@ -342,9 +342,9 @@ discard block |
||
342 | 342 | $assocIdentifier = $unitOfWork->getEntityIdentifier($assocValue); |
343 | 343 | $entityKey = new EntityCacheKey($assocMetadata->getRootClassName(), $assocIdentifier); |
344 | 344 | |
345 | - if ((! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
345 | + if (( ! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
346 | 346 | // Entity put fail |
347 | - if (! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
347 | + if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
348 | 348 | return null; |
349 | 349 | } |
350 | 350 | } |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | |
365 | 365 | if (($key->cacheMode & Cache::MODE_REFRESH) || ! $assocRegion->contains($entityKey)) { |
366 | 366 | // Entity put fail |
367 | - if (! $assocPersister->storeEntityCache($assocItem, $entityKey)) { |
|
367 | + if ( ! $assocPersister->storeEntityCache($assocItem, $entityKey)) { |
|
368 | 368 | return null; |
369 | 369 | } |
370 | 370 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Repository; |
6 | 6 | |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | string $associationFieldName |
14 | 14 | ) : self { |
15 | 15 | return new self( |
16 | - "You cannot search for the association field '" . $entityName . '#' . $associationFieldName . "', " . |
|
16 | + "You cannot search for the association field '".$entityName.'#'.$associationFieldName."', ". |
|
17 | 17 | 'because it is the inverse side of an association. Find methods only work on owning side associations.' |
18 | 18 | ); |
19 | 19 | } |