@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $fieldName = (string) $overrideElement['name']; |
302 | 302 | $property = $classMetadata->getProperty($fieldName); |
303 | 303 | |
304 | - if (! $property) { |
|
304 | + if ( ! $property) { |
|
305 | 305 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
306 | 306 | } |
307 | 307 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $fieldName = (string) $overrideElement['name']; |
336 | 336 | $property = $classMetadata->getProperty($fieldName); |
337 | 337 | |
338 | - if (! $property) { |
|
338 | + if ( ! $property) { |
|
339 | 339 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
340 | 340 | } |
341 | 341 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | // Check for fetch |
394 | 394 | if (isset($overrideElement['fetch'])) { |
395 | 395 | $override->setFetchMode( |
396 | - constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch']) |
|
396 | + constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch']) |
|
397 | 397 | ); |
398 | 398 | } |
399 | 399 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | // Evaluate <lifecycle-callbacks...> |
405 | 405 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
406 | 406 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
407 | - $eventName = constant(Events::class . '::' . (string) $lifecycleCallback['type']); |
|
407 | + $eventName = constant(Events::class.'::'.(string) $lifecycleCallback['type']); |
|
408 | 408 | $methodName = (string) $lifecycleCallback['method']; |
409 | 409 | |
410 | 410 | $classMetadata->addLifecycleCallback($eventName, $methodName); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
417 | 417 | $listenerClassName = (string) $listenerElement['class']; |
418 | 418 | |
419 | - if (! class_exists($listenerClassName)) { |
|
419 | + if ( ! class_exists($listenerClassName)) { |
|
420 | 420 | throw Mapping\MappingException::entityListenerClassNotFound( |
421 | 421 | $listenerClassName, |
422 | 422 | $classMetadata->getClassName() |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | return $this->classNames; |
205 | 205 | } |
206 | 206 | |
207 | - if (! $this->paths) { |
|
207 | + if ( ! $this->paths) { |
|
208 | 208 | throw Mapping\MappingException::pathRequired(); |
209 | 209 | } |
210 | 210 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $includedFiles = []; |
213 | 213 | |
214 | 214 | foreach ($this->paths as $path) { |
215 | - if (! is_dir($path)) { |
|
215 | + if ( ! is_dir($path)) { |
|
216 | 216 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
217 | 217 | } |
218 | 218 | |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), |
222 | 222 | RecursiveIteratorIterator::LEAVES_ONLY |
223 | 223 | ), |
224 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
224 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
225 | 225 | RecursiveRegexIterator::GET_MATCH |
226 | 226 | ); |
227 | 227 | |
228 | 228 | foreach ($iterator as $file) { |
229 | 229 | $sourceFile = $file[0]; |
230 | 230 | |
231 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
231 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
232 | 232 | $sourceFile = realpath($sourceFile); |
233 | 233 | } |
234 | 234 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | ->withCacheAnnotation($classAnnotations[Annotation\Cache::class] ?? null) |
295 | 295 | ->build(); |
296 | 296 | |
297 | - if (! $classMetadata->isEmbeddedClass) { |
|
297 | + if ( ! $classMetadata->isEmbeddedClass) { |
|
298 | 298 | $this->attachLifecycleCallbacks($classAnnotations, $reflectionClass, $classMetadata); |
299 | 299 | $this->attachEntityListeners($classAnnotations, $classMetadata); |
300 | 300 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | ]; |
366 | 366 | |
367 | 367 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
368 | - if (! class_exists($listenerClassName)) { |
|
368 | + if ( ! class_exists($listenerClassName)) { |
|
369 | 369 | throw Mapping\MappingException::entityListenerClassNotFound( |
370 | 370 | $listenerClassName, |
371 | 371 | $metadata->getClassName() |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | $fieldName = $associationOverrideAnnotation->name; |
454 | 454 | $property = $metadata->getProperty($fieldName); |
455 | 455 | |
456 | - if (! $property) { |
|
456 | + if ( ! $property) { |
|
457 | 457 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
458 | 458 | } |
459 | 459 | |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | |
507 | 507 | // Check for fetch |
508 | 508 | if ($associationOverrideAnnotation->fetch) { |
509 | - $override->setFetchMode(constant(Mapping\FetchMode::class . '::' . $associationOverrideAnnotation->fetch)); |
|
509 | + $override->setFetchMode(constant(Mapping\FetchMode::class.'::'.$associationOverrideAnnotation->fetch)); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | $metadata->setPropertyOverride($override); |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | $fieldName = $attributeOverrideAnnotation->name; |
528 | 528 | $property = $metadata->getProperty($fieldName); |
529 | 529 | |
530 | - if (! $property) { |
|
530 | + if ( ! $property) { |
|
531 | 531 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
532 | 532 | } |
533 | 533 | |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
557 | 557 | |
558 | 558 | foreach ($classAnnotations as $key => $annot) { |
559 | - if (! is_numeric($key)) { |
|
559 | + if ( ! is_numeric($key)) { |
|
560 | 560 | continue; |
561 | 561 | } |
562 | 562 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
575 | 575 | |
576 | 576 | foreach ($propertyAnnotations as $key => $annot) { |
577 | - if (! is_numeric($key)) { |
|
577 | + if ( ! is_numeric($key)) { |
|
578 | 578 | continue; |
579 | 579 | } |
580 | 580 | |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
593 | 593 | |
594 | 594 | foreach ($methodAnnotations as $key => $annot) { |
595 | - if (! is_numeric($key)) { |
|
595 | + if ( ! is_numeric($key)) { |
|
596 | 596 | continue; |
597 | 597 | } |
598 | 598 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->metadataBuildingContext = $metadataBuildingContext; |
67 | 67 | $this->tableMetadataBuilder = $tableMetadataBuilder ?: new TableMetadataBuilder($metadataBuildingContext); |
68 | 68 | $this->cacheMetadataBuilder = $cacheMetadataBuilder ?: new CacheMetadataBuilder($metadataBuildingContext); |
69 | - $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
69 | + $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder ?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function withClassName(string $className) : ClassMetadataBuilder |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | && $parentMetadata->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
234 | 234 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
235 | 235 | do { |
236 | - if (! $parentMetadata->isMappedSuperclass) { |
|
236 | + if ( ! $parentMetadata->isMappedSuperclass) { |
|
237 | 237 | $tableMetadata = $parentMetadata->table; |
238 | 238 | break; |
239 | 239 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function prepare() |
55 | 55 | { |
56 | - if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
56 | + if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
57 | 57 | $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true; |
58 | 58 | } |
59 | 59 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | // Remember which associations are "fetch joined", so that we know where to inject |
65 | 65 | // collection stubs or proxies and where not. |
66 | - if (! isset($this->rsm->relationMap[$dqlAlias])) { |
|
66 | + if ( ! isset($this->rsm->relationMap[$dqlAlias])) { |
|
67 | 67 | continue; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
71 | 71 | |
72 | - if (! isset($this->rsm->aliasMap[$parent])) { |
|
72 | + if ( ! isset($this->rsm->aliasMap[$parent])) { |
|
73 | 73 | throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent); |
74 | 74 | } |
75 | 75 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $class = $this->getClassMetadata($className); |
96 | 96 | $inverseAssoc = $class->getProperty($association->getInversedBy()); |
97 | 97 | |
98 | - if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
98 | + if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
99 | 99 | continue; |
100 | 100 | } |
101 | 101 | |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | $value = $association->getValue($entity); |
162 | 162 | $oid = spl_object_id($entity); |
163 | 163 | |
164 | - if (! $value instanceof PersistentCollection) { |
|
164 | + if ( ! $value instanceof PersistentCollection) { |
|
165 | 165 | $value = $association->wrap($entity, $value, $this->em); |
166 | 166 | |
167 | 167 | $association->setValue($entity, $value); |
168 | 168 | |
169 | 169 | $this->uow->setOriginalEntityProperty($oid, $fieldName, $value); |
170 | 170 | |
171 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
171 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
172 | 172 | } elseif (isset($this->hints[Query::HINT_REFRESH]) || |
173 | 173 | (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized()) |
174 | 174 | ) { |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | $value->setInitialized(true); |
178 | 178 | $value->unwrap()->clear(); |
179 | 179 | |
180 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
180 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
181 | 181 | } else { |
182 | 182 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
183 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
183 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | return $value; |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | if (isset($this->rsm->discriminatorColumns[$dqlAlias])) { |
204 | 204 | $fieldName = $this->rsm->discriminatorColumns[$dqlAlias]; |
205 | 205 | |
206 | - if (! isset($this->rsm->metaMappings[$fieldName])) { |
|
206 | + if ( ! isset($this->rsm->metaMappings[$fieldName])) { |
|
207 | 207 | throw HydrationException::missingDiscriminatorMetaMappingColumn($className, $fieldName, $dqlAlias); |
208 | 208 | } |
209 | 209 | |
210 | 210 | $discrColumn = $this->rsm->metaMappings[$fieldName]; |
211 | 211 | |
212 | - if (! isset($data[$discrColumn])) { |
|
212 | + if ( ! isset($data[$discrColumn])) { |
|
213 | 213 | throw HydrationException::missingDiscriminatorColumn($className, $discrColumn, $dqlAlias); |
214 | 214 | } |
215 | 215 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $discrMap = $this->metadataCache[$className]->discriminatorMap; |
221 | 221 | $discriminatorValue = (string) $data[$discrColumn]; |
222 | 222 | |
223 | - if (! isset($discrMap[$discriminatorValue])) { |
|
223 | + if ( ! isset($discrMap[$discriminatorValue])) { |
|
224 | 224 | throw HydrationException::invalidDiscriminatorValue($discriminatorValue, array_keys($discrMap)); |
225 | 225 | } |
226 | 226 | |
@@ -296,10 +296,10 @@ discard block |
||
296 | 296 | $parentAlias = $this->rsm->parentAliasMap[$dqlAlias]; |
297 | 297 | // we need the $path to save into the identifier map which entities were already |
298 | 298 | // seen for this parent-child relationship |
299 | - $path = $parentAlias . '.' . $dqlAlias; |
|
299 | + $path = $parentAlias.'.'.$dqlAlias; |
|
300 | 300 | |
301 | 301 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
302 | - if (! isset($nonemptyComponents[$parentAlias])) { |
|
302 | + if ( ! isset($nonemptyComponents[$parentAlias])) { |
|
303 | 303 | // TODO: Add special case code where we hydrate the right join objects into identity map at least |
304 | 304 | continue; |
305 | 305 | } |
@@ -330,15 +330,15 @@ discard block |
||
330 | 330 | $oid = spl_object_id($parentObject); |
331 | 331 | |
332 | 332 | // Check the type of the relation (many or single-valued) |
333 | - if (! ($association instanceof ToOneAssociationMetadata)) { |
|
333 | + if ( ! ($association instanceof ToOneAssociationMetadata)) { |
|
334 | 334 | // PATH A: Collection-valued association |
335 | 335 | $reflFieldValue = $association->getValue($parentObject); |
336 | 336 | |
337 | 337 | if (isset($nonemptyComponents[$dqlAlias])) { |
338 | - $collKey = $oid . $relationField; |
|
338 | + $collKey = $oid.$relationField; |
|
339 | 339 | if (isset($this->initializedCollections[$collKey])) { |
340 | 340 | $reflFieldValue = $this->initializedCollections[$collKey]; |
341 | - } elseif (! isset($this->existingCollections[$collKey])) { |
|
341 | + } elseif ( ! isset($this->existingCollections[$collKey])) { |
|
342 | 342 | $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
343 | 343 | } |
344 | 344 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $index = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false; |
347 | 347 | $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false; |
348 | 348 | |
349 | - if (! $indexExists || ! $indexIsValid) { |
|
349 | + if ( ! $indexExists || ! $indexIsValid) { |
|
350 | 350 | if (isset($this->existingCollections[$collKey])) { |
351 | 351 | $element = $this->getEntityFromIdentityMap($entityName, $data); |
352 | 352 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | // Update result pointer |
376 | 376 | $this->resultPointers[$dqlAlias] = $reflFieldValue[$index]; |
377 | 377 | } |
378 | - } elseif (! $reflFieldValue) { |
|
378 | + } elseif ( ! $reflFieldValue) { |
|
379 | 379 | $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
380 | 380 | } elseif ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) { |
381 | 381 | $reflFieldValue->setInitialized(true); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | // PATH B: Single-valued association |
385 | 385 | $reflFieldValue = $association->getValue($parentObject); |
386 | 386 | |
387 | - if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
387 | + if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
388 | 388 | ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) { |
389 | 389 | // we only need to take action if this value is null, |
390 | 390 | // we refresh the entity or its an uninitialized proxy. |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
446 | 446 | |
447 | 447 | // if this row has a NULL value for the root result id then make it a null result. |
448 | - if (! isset($nonemptyComponents[$dqlAlias])) { |
|
448 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
449 | 449 | if ($this->rsm->isMixed) { |
450 | 450 | $result[] = [$entityKey => null]; |
451 | 451 | } else { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } |
458 | 458 | |
459 | 459 | // check for existing result from the iterations before |
460 | - if (! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) { |
|
460 | + if ( ! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) { |
|
461 | 461 | $element = $this->getEntity($data, $dqlAlias); |
462 | 462 | |
463 | 463 | if ($this->rsm->isMixed) { |
@@ -500,13 +500,13 @@ discard block |
||
500 | 500 | } |
501 | 501 | } |
502 | 502 | |
503 | - if (! isset($resultKey)) { |
|
503 | + if ( ! isset($resultKey)) { |
|
504 | 504 | $this->resultCounter++; |
505 | 505 | } |
506 | 506 | |
507 | 507 | // Append scalar values to mixed result sets |
508 | 508 | if (isset($rowData['scalars'])) { |
509 | - if (! isset($resultKey)) { |
|
509 | + if ( ! isset($resultKey)) { |
|
510 | 510 | $resultKey = isset($this->rsm->indexByMap['scalars']) |
511 | 511 | ? $row[$this->rsm->indexByMap['scalars']] |
512 | 512 | : $this->resultCounter - 1; |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | |
520 | 520 | // Append new object to mixed result sets |
521 | 521 | if (isset($rowData['newObjects'])) { |
522 | - if (! isset($resultKey)) { |
|
522 | + if ( ! isset($resultKey)) { |
|
523 | 523 | $resultKey = $this->resultCounter - 1; |
524 | 524 | } |
525 | 525 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function testForeignKeyOnSTIWithMultipleMapping() : void |
20 | 20 | { |
21 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
21 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
22 | 22 | $this->markTestSkipped('Platform does not support foreign keys.'); |
23 | 23 | } |
24 | 24 | $schema = $this->schemaTool->getSchemaFromMetadata( |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | $pkColumns = []; |
181 | 181 | |
182 | 182 | foreach ($class->getPropertiesIterator() 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->getPropertiesIterator() 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()) { |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $generator = $property->getValueGenerator()->getGenerator(); |
335 | 335 | $quotedName = $generator->getSequenceName(); |
336 | 336 | |
337 | - if (! $schema->hasSequence($quotedName)) { |
|
337 | + if ( ! $schema->hasSequence($quotedName)) { |
|
338 | 338 | $schema->createSequence($quotedName, $generator->getAllocationSize()); |
339 | 339 | } |
340 | 340 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
350 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
351 | 351 | $schema->visit(new RemoveNamespacedAssets()); |
352 | 352 | } |
353 | 353 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | break; |
387 | 387 | } |
388 | 388 | |
389 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
389 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
390 | 390 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
391 | 391 | } |
392 | 392 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | $pkColumns = []; |
405 | 405 | |
406 | 406 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
407 | - if (! ($property instanceof FieldMetadata)) { |
|
407 | + if ( ! ($property instanceof FieldMetadata)) { |
|
408 | 408 | continue; |
409 | 409 | } |
410 | 410 | |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
509 | 509 | { |
510 | 510 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
511 | - if (! ($property instanceof AssociationMetadata)) { |
|
511 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
512 | 512 | continue; |
513 | 513 | } |
514 | 514 | |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | continue; |
517 | 517 | } |
518 | 518 | |
519 | - if (! $property->isOwningSide()) { |
|
519 | + if ( ! $property->isOwningSide()) { |
|
520 | 520 | continue; |
521 | 521 | } |
522 | 522 | |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | $idColumns = $class->getIdentifierColumns($this->em); |
607 | 607 | $idColumnNameList = array_keys($idColumns); |
608 | 608 | |
609 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
609 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
610 | 610 | return null; |
611 | 611 | } |
612 | 612 | |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
615 | 615 | $property = $class->getProperty($fieldName); |
616 | 616 | |
617 | - if (! ($property instanceof AssociationMetadata)) { |
|
617 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
618 | 618 | continue; |
619 | 619 | } |
620 | 620 | |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $joinColumn->getReferencedColumnName() |
671 | 671 | ); |
672 | 672 | |
673 | - if (! $definingClass) { |
|
673 | + if ( ! $definingClass) { |
|
674 | 674 | throw MissingColumnException::fromColumnSourceAndTarget( |
675 | 675 | $joinColumn->getReferencedColumnName(), |
676 | 676 | $mapping->getSourceEntity(), |
@@ -685,14 +685,14 @@ discard block |
||
685 | 685 | $localColumns[] = $quotedColumnName; |
686 | 686 | $foreignColumns[] = $quotedReferencedColumnName; |
687 | 687 | |
688 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
688 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
689 | 689 | // Only add the column to the table if it does not exist already. |
690 | 690 | // It might exist already if the foreign key is mapped into a regular |
691 | 691 | // property as well. |
692 | 692 | $property = $definingClass->getProperty($referencedFieldName); |
693 | 693 | $columnDef = null; |
694 | 694 | |
695 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
695 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
696 | 696 | $columnDef = $joinColumn->getColumnDefinition(); |
697 | 697 | } elseif ($property->getColumnDefinition()) { |
698 | 698 | $columnDef = $property->getColumnDefinition(); |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
725 | 725 | } |
726 | 726 | |
727 | - if (! empty($joinColumn->getOnDelete())) { |
|
727 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
728 | 728 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
729 | 729 | } |
730 | 730 | } |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
736 | 736 | } |
737 | 737 | |
738 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
738 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
739 | 739 | |
740 | 740 | if ($this->platform->supportsForeignKeyConstraints()) { |
741 | 741 | if (isset($addedFks[$compositeName]) |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | } |
754 | 754 | |
755 | 755 | $blacklistedFks[$compositeName] = true; |
756 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
756 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
757 | 757 | $addedFks[$compositeName] = [ |
758 | 758 | 'foreignTableName' => $foreignTableName, |
759 | 759 | 'foreignColumns' => $foreignColumns, |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | $fullSchema = $sm->createSchema(); |
854 | 854 | |
855 | 855 | foreach ($fullSchema->getTables() as $table) { |
856 | - if (! $schema->hasTable($table->getName())) { |
|
856 | + if ( ! $schema->hasTable($table->getName())) { |
|
857 | 857 | foreach ($table->getForeignKeys() as $foreignKey) { |
858 | 858 | /** @var $foreignKey ForeignKeyConstraint */ |
859 | 859 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | if ($table->hasPrimaryKey()) { |
879 | 879 | $columns = $table->getPrimaryKey()->getColumns(); |
880 | 880 | if (count($columns) === 1) { |
881 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
881 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
882 | 882 | if ($fullSchema->hasSequence($checkSequence)) { |
883 | 883 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
884 | 884 | } |