@@ -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 |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | } |
399 | 399 | |
400 | 400 | foreach ($this->queryComponents as $dqlAlias => $qComp) { |
401 | - if (! isset($this->identVariableExpressions[$dqlAlias])) { |
|
401 | + if ( ! isset($this->identVariableExpressions[$dqlAlias])) { |
|
402 | 402 | continue; |
403 | 403 | } |
404 | 404 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $tokenStr = substr($dql, $tokenPos, $length); |
464 | 464 | |
465 | 465 | // Building informative message |
466 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
466 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
467 | 467 | |
468 | 468 | throw QueryException::semanticalError( |
469 | 469 | $message, |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | $identVariable = $deferredItem['expression']; |
567 | 567 | |
568 | 568 | // Check if IdentificationVariable exists in queryComponents |
569 | - if (! isset($this->queryComponents[$identVariable])) { |
|
569 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
570 | 570 | $this->semanticalError( |
571 | 571 | sprintf("'%s' is not defined.", $identVariable), |
572 | 572 | $deferredItem['token'] |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | $qComp = $this->queryComponents[$identVariable]; |
577 | 577 | |
578 | 578 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
579 | - if (! isset($qComp['metadata'])) { |
|
579 | + if ( ! isset($qComp['metadata'])) { |
|
580 | 580 | $this->semanticalError( |
581 | 581 | sprintf("'%s' does not point to a Class.", $identVariable), |
582 | 582 | $deferredItem['token'] |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | // If the namespace is not given then assumes the first FROM entity namespace |
611 | 611 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
612 | 612 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
613 | - $fqcn = $namespace . '\\' . $className; |
|
613 | + $fqcn = $namespace.'\\'.$className; |
|
614 | 614 | |
615 | 615 | if (class_exists($fqcn)) { |
616 | 616 | $expression->className = $fqcn; |
@@ -618,13 +618,13 @@ discard block |
||
618 | 618 | } |
619 | 619 | } |
620 | 620 | |
621 | - if (! class_exists($className)) { |
|
621 | + if ( ! class_exists($className)) { |
|
622 | 622 | $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token); |
623 | 623 | } |
624 | 624 | |
625 | 625 | $class = new ReflectionClass($className); |
626 | 626 | |
627 | - if (! $class->isInstantiable()) { |
|
627 | + if ( ! $class->isInstantiable()) { |
|
628 | 628 | $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token); |
629 | 629 | } |
630 | 630 | |
@@ -681,7 +681,7 @@ discard block |
||
681 | 681 | $resultVariable = $deferredItem['expression']; |
682 | 682 | |
683 | 683 | // Check if ResultVariable exists in queryComponents |
684 | - if (! isset($this->queryComponents[$resultVariable])) { |
|
684 | + if ( ! isset($this->queryComponents[$resultVariable])) { |
|
685 | 685 | $this->semanticalError( |
686 | 686 | sprintf("'%s' is not defined.", $resultVariable), |
687 | 687 | $deferredItem['token'] |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | $qComp = $this->queryComponents[$resultVariable]; |
692 | 692 | |
693 | 693 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
694 | - if (! isset($qComp['resultVariable'])) { |
|
694 | + if ( ! isset($qComp['resultVariable'])) { |
|
695 | 695 | $this->semanticalError( |
696 | 696 | sprintf("'%s' does not point to a ResultVariable.", $resultVariable), |
697 | 697 | $deferredItem['token'] |
@@ -733,9 +733,9 @@ discard block |
||
733 | 733 | $property = $class->getProperty($field); |
734 | 734 | |
735 | 735 | // Check if field or association exists |
736 | - if (! $property) { |
|
736 | + if ( ! $property) { |
|
737 | 737 | $this->semanticalError( |
738 | - 'Class ' . $class->getClassName() . ' has no field or association named ' . $field, |
|
738 | + 'Class '.$class->getClassName().' has no field or association named '.$field, |
|
739 | 739 | $deferredItem['token'] |
740 | 740 | ); |
741 | 741 | } |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | // Validate if PathExpression is one of the expected types |
752 | 752 | $expectedType = $pathExpression->expectedType; |
753 | 753 | |
754 | - if (! ($expectedType & $fieldType)) { |
|
754 | + if ( ! ($expectedType & $fieldType)) { |
|
755 | 755 | // We need to recognize which was expected type(s) |
756 | 756 | $expectedStringTypes = []; |
757 | 757 | |
@@ -773,8 +773,8 @@ discard block |
||
773 | 773 | // Build the error message |
774 | 774 | $semanticalError = 'Invalid PathExpression. '; |
775 | 775 | $semanticalError .= count($expectedStringTypes) === 1 |
776 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
777 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
776 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
777 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
778 | 778 | |
779 | 779 | $this->semanticalError($semanticalError, $deferredItem['token']); |
780 | 780 | } |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | |
787 | 787 | private function processRootEntityAliasSelected() |
788 | 788 | { |
789 | - if (! $this->identVariableExpressions) { |
|
789 | + if ( ! $this->identVariableExpressions) { |
|
790 | 790 | return; |
791 | 791 | } |
792 | 792 | |
@@ -943,7 +943,7 @@ discard block |
||
943 | 943 | |
944 | 944 | [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']); |
945 | 945 | |
946 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
946 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
947 | 947 | } |
948 | 948 | |
949 | 949 | /** |
@@ -1022,9 +1022,9 @@ discard block |
||
1022 | 1022 | { |
1023 | 1023 | $identVariable = $this->IdentificationVariable(); |
1024 | 1024 | |
1025 | - if (! isset($this->queryComponents[$identVariable])) { |
|
1025 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
1026 | 1026 | $this->semanticalError( |
1027 | - 'Identification Variable ' . $identVariable . ' used in join path expression but was not defined before.' |
|
1027 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1028 | 1028 | ); |
1029 | 1029 | } |
1030 | 1030 | |
@@ -1038,8 +1038,8 @@ discard block |
||
1038 | 1038 | $class = $qComp['metadata']; |
1039 | 1039 | $property = $class->getProperty($field); |
1040 | 1040 | |
1041 | - if (! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1042 | - $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field); |
|
1041 | + if ( ! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1042 | + $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field); |
|
1043 | 1043 | } |
1044 | 1044 | |
1045 | 1045 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1070 | 1070 | $this->match(Lexer::T_DOT); |
1071 | 1071 | $this->match(Lexer::T_IDENTIFIER); |
1072 | - $field .= '.' . $this->lexer->token['value']; |
|
1072 | + $field .= '.'.$this->lexer->token['value']; |
|
1073 | 1073 | } |
1074 | 1074 | } |
1075 | 1075 | |
@@ -1451,7 +1451,7 @@ discard block |
||
1451 | 1451 | // Still need to decide between IdentificationVariable or ResultVariable |
1452 | 1452 | $lookaheadValue = $this->lexer->lookahead['value']; |
1453 | 1453 | |
1454 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
1454 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
1455 | 1455 | $this->semanticalError('Cannot group by undefined identification or result variable.'); |
1456 | 1456 | } |
1457 | 1457 | |
@@ -1799,7 +1799,7 @@ discard block |
||
1799 | 1799 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1800 | 1800 | $this->match(Lexer::T_DOT); |
1801 | 1801 | $this->match(Lexer::T_IDENTIFIER); |
1802 | - $field .= '.' . $this->lexer->token['value']; |
|
1802 | + $field .= '.'.$this->lexer->token['value']; |
|
1803 | 1803 | } |
1804 | 1804 | |
1805 | 1805 | $partialFieldSet[] = $field; |
@@ -1813,7 +1813,7 @@ discard block |
||
1813 | 1813 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1814 | 1814 | $this->match(Lexer::T_DOT); |
1815 | 1815 | $this->match(Lexer::T_IDENTIFIER); |
1816 | - $field .= '.' . $this->lexer->token['value']; |
|
1816 | + $field .= '.'.$this->lexer->token['value']; |
|
1817 | 1817 | } |
1818 | 1818 | |
1819 | 1819 | $partialFieldSet[] = $field; |
@@ -2419,7 +2419,7 @@ discard block |
||
2419 | 2419 | |
2420 | 2420 | // Phase 1 AST optimization: Prevent AST\ConditionalFactor |
2421 | 2421 | // if only one AST\ConditionalPrimary is defined |
2422 | - if (! $not) { |
|
2422 | + if ( ! $not) { |
|
2423 | 2423 | return $conditionalPrimary; |
2424 | 2424 | } |
2425 | 2425 | |
@@ -2438,7 +2438,7 @@ discard block |
||
2438 | 2438 | { |
2439 | 2439 | $condPrimary = new AST\ConditionalPrimary(); |
2440 | 2440 | |
2441 | - if (! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2441 | + if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2442 | 2442 | $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); |
2443 | 2443 | |
2444 | 2444 | return $condPrimary; |
@@ -2607,7 +2607,7 @@ discard block |
||
2607 | 2607 | $this->match(Lexer::T_OF); |
2608 | 2608 | } |
2609 | 2609 | |
2610 | - $collMemberExpr = new AST\CollectionMemberExpression( |
|
2610 | + $collMemberExpr = new AST\CollectionMemberExpression( |
|
2611 | 2611 | $entityExpr, |
2612 | 2612 | $this->CollectionValuedPathExpression() |
2613 | 2613 | ); |
@@ -2941,7 +2941,7 @@ discard block |
||
2941 | 2941 | $lookaheadType = $this->lexer->lookahead['type']; |
2942 | 2942 | $isDistinct = false; |
2943 | 2943 | |
2944 | - if (! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2944 | + if ( ! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2945 | 2945 | $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT'); |
2946 | 2946 | } |
2947 | 2947 | |
@@ -2971,7 +2971,7 @@ discard block |
||
2971 | 2971 | $lookaheadType = $this->lexer->lookahead['type']; |
2972 | 2972 | $value = $this->lexer->lookahead['value']; |
2973 | 2973 | |
2974 | - if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2974 | + if ( ! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2975 | 2975 | $this->syntaxError('ALL, ANY or SOME'); |
2976 | 2976 | } |
2977 | 2977 | |
@@ -3209,7 +3209,7 @@ discard block |
||
3209 | 3209 | $lookaheadValue = $this->lexer->lookahead['value']; |
3210 | 3210 | |
3211 | 3211 | // Validate existing component |
3212 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
3212 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
3213 | 3213 | $this->semanticalError('Cannot add having condition on undefined result variable.'); |
3214 | 3214 | } |
3215 | 3215 | |
@@ -3220,7 +3220,7 @@ discard block |
||
3220 | 3220 | } |
3221 | 3221 | |
3222 | 3222 | // Validating ResultVariable |
3223 | - if (! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3223 | + if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3224 | 3224 | $this->semanticalError('Cannot add having condition on a non result variable.'); |
3225 | 3225 | } |
3226 | 3226 |
@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | */ |
271 | 271 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
272 | 272 | { |
273 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
273 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
274 | 274 | |
275 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
276 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
275 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
276 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | return $this->tableAliasMap[$tableName]; |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
293 | 293 | { |
294 | - $tableName .= $dqlAlias ? '@[' . $dqlAlias . ']' : ''; |
|
294 | + $tableName .= $dqlAlias ? '@['.$dqlAlias.']' : ''; |
|
295 | 295 | |
296 | 296 | $this->tableAliasMap[$tableName] = $alias; |
297 | 297 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | public function getSQLColumnAlias() |
307 | 307 | { |
308 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
308 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
@@ -332,14 +332,14 @@ discard block |
||
332 | 332 | |
333 | 333 | // If this is a joined association we must use left joins to preserve the correct result. |
334 | 334 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
335 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
335 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
336 | 336 | |
337 | 337 | $sqlParts = []; |
338 | 338 | |
339 | 339 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
340 | 340 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
341 | 341 | |
342 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
342 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -363,14 +363,14 @@ discard block |
||
363 | 363 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
364 | 364 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
365 | 365 | |
366 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
366 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
367 | 367 | |
368 | 368 | $sqlParts = []; |
369 | 369 | |
370 | 370 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
371 | 371 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
372 | 372 | |
373 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
373 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
374 | 374 | } |
375 | 375 | |
376 | 376 | $sql .= implode(' AND ', $sqlParts); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $qComp = $this->queryComponents[$dqlAlias]; |
392 | 392 | $association = $qComp['relation']; |
393 | 393 | |
394 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
394 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
395 | 395 | continue; |
396 | 396 | } |
397 | 397 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $property = $qComp['metadata']->getProperty($fieldName); |
400 | 400 | $tableName = $property->getTableName(); |
401 | 401 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
402 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
402 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
403 | 403 | |
404 | 404 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
405 | 405 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | } |
408 | 408 | |
409 | 409 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
410 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
410 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
411 | 411 | } |
412 | 412 | } |
413 | 413 | |
@@ -447,19 +447,19 @@ discard block |
||
447 | 447 | $discrColumnType = $discrColumn->getType(); |
448 | 448 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
449 | 449 | $sqlTableAlias = $this->useSqlTableAliases |
450 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
450 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
451 | 451 | : ''; |
452 | 452 | |
453 | 453 | $sqlParts[] = sprintf( |
454 | 454 | '%s IN (%s)', |
455 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
455 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
456 | 456 | implode(', ', $values) |
457 | 457 | ); |
458 | 458 | } |
459 | 459 | |
460 | 460 | $sql = implode(' AND ', $sqlParts); |
461 | 461 | |
462 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
462 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
463 | 463 | } |
464 | 464 | |
465 | 465 | /** |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | */ |
473 | 473 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
474 | 474 | { |
475 | - if (! $this->em->hasFilters()) { |
|
475 | + if ( ! $this->em->hasFilters()) { |
|
476 | 476 | return ''; |
477 | 477 | } |
478 | 478 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
506 | 506 | |
507 | 507 | if ($filterExpr !== '') { |
508 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
508 | + $filterClauses[] = '('.$filterExpr.')'; |
|
509 | 509 | } |
510 | 510 | } |
511 | 511 | |
@@ -536,11 +536,11 @@ discard block |
||
536 | 536 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
537 | 537 | } |
538 | 538 | |
539 | - if (! $AST->orderByClause) { |
|
539 | + if ( ! $AST->orderByClause) { |
|
540 | 540 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
541 | 541 | |
542 | 542 | if ($orderBySql) { |
543 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
543 | + $sql .= ' ORDER BY '.$orderBySql; |
|
544 | 544 | } |
545 | 545 | } |
546 | 546 | |
@@ -553,11 +553,11 @@ discard block |
||
553 | 553 | } |
554 | 554 | |
555 | 555 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
556 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
556 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
560 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
560 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | } |
566 | 566 | |
567 | 567 | foreach ($this->selectedClasses as $selectedClass) { |
568 | - if (! $selectedClass['class']->isVersioned()) { |
|
568 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
569 | 569 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
570 | 570 | } |
571 | 571 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
615 | 615 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
616 | 616 | |
617 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
617 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
618 | 618 | } |
619 | 619 | |
620 | 620 | return implode(', ', $sqlParts); |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | { |
633 | 633 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
634 | 634 | |
635 | - if (! $fieldName) { |
|
635 | + if ( ! $fieldName) { |
|
636 | 636 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
637 | 637 | } |
638 | 638 | |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | $property = $class->getProperty($fieldName); |
662 | 662 | |
663 | 663 | if ($this->useSqlTableAliases) { |
664 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
664 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
665 | 665 | } |
666 | 666 | |
667 | 667 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
676 | 676 | $association = $class->getProperty($fieldName); |
677 | 677 | |
678 | - if (! $association->isOwningSide()) { |
|
678 | + if ( ! $association->isOwningSide()) { |
|
679 | 679 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
680 | 680 | } |
681 | 681 | |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | $joinColumn = reset($joinColumns); |
690 | 690 | |
691 | 691 | if ($this->useSqlTableAliases) { |
692 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
692 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
693 | 693 | } |
694 | 694 | |
695 | 695 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | */ |
708 | 708 | public function walkSelectClause($selectClause) |
709 | 709 | { |
710 | - $sql = 'SELECT ' . ($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
710 | + $sql = 'SELECT '.($selectClause->isDistinct ? 'DISTINCT ' : ''); |
|
711 | 711 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
712 | 712 | |
713 | 713 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | |
751 | 751 | $sqlSelectExpressions[] = sprintf( |
752 | 752 | '%s AS %s', |
753 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
753 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
754 | 754 | $sqlColumnAlias |
755 | 755 | ); |
756 | 756 | |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | |
761 | 761 | // Add foreign key columns of class and also parent classes |
762 | 762 | foreach ($class->getPropertiesIterator() as $association) { |
763 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
763 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
764 | 764 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
765 | 765 | continue; |
766 | 766 | } |
@@ -775,7 +775,7 @@ discard block |
||
775 | 775 | $columnAlias = $this->getSQLColumnAlias(); |
776 | 776 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
777 | 777 | |
778 | - if (! $joinColumn->getType()) { |
|
778 | + if ( ! $joinColumn->getType()) { |
|
779 | 779 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
780 | 780 | } |
781 | 781 | |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | } |
792 | 792 | |
793 | 793 | // Add foreign key columns to SQL, if necessary |
794 | - if (! $addMetaColumns) { |
|
794 | + if ( ! $addMetaColumns) { |
|
795 | 795 | continue; |
796 | 796 | } |
797 | 797 | |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | continue; |
806 | 806 | } |
807 | 807 | |
808 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
808 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
809 | 809 | continue; |
810 | 810 | } |
811 | 811 | |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $columnAlias = $this->getSQLColumnAlias(); |
820 | 820 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
821 | 821 | |
822 | - if (! $joinColumn->getType()) { |
|
822 | + if ( ! $joinColumn->getType()) { |
|
823 | 823 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
824 | 824 | } |
825 | 825 | |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | } |
837 | 837 | } |
838 | 838 | |
839 | - return $sql . implode(', ', $sqlSelectExpressions); |
|
839 | + return $sql.implode(', ', $sqlSelectExpressions); |
|
840 | 840 | } |
841 | 841 | |
842 | 842 | /** |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
852 | 852 | } |
853 | 853 | |
854 | - return ' FROM ' . implode(', ', $sqlParts); |
|
854 | + return ' FROM '.implode(', ', $sqlParts); |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | /** |
@@ -926,8 +926,8 @@ discard block |
||
926 | 926 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
927 | 927 | $lockMode = $this->query->getHint(Query::HINT_LOCK_MODE); |
928 | 928 | $sql = $lockMode !== false |
929 | - ? $this->platform->appendLockHint($tableName . ' ' . $tableAlias, $lockMode) |
|
930 | - : $tableName . ' ' . $tableAlias; |
|
929 | + ? $this->platform->appendLockHint($tableName.' '.$tableAlias, $lockMode) |
|
930 | + : $tableName.' '.$tableAlias; |
|
931 | 931 | |
932 | 932 | if ($class->inheritanceType !== InheritanceType::JOINED) { |
933 | 933 | return $sql; |
@@ -935,11 +935,11 @@ discard block |
||
935 | 935 | |
936 | 936 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
937 | 937 | |
938 | - if (! $buildNestedJoins) { |
|
939 | - return $sql . $classTableInheritanceJoins; |
|
938 | + if ( ! $buildNestedJoins) { |
|
939 | + return $sql.$classTableInheritanceJoins; |
|
940 | 940 | } |
941 | 941 | |
942 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
942 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
943 | 943 | } |
944 | 944 | |
945 | 945 | /** |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | : $association; |
976 | 976 | |
977 | 977 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
978 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
978 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
979 | 979 | if ($association instanceof ToManyAssociationMetadata) { |
980 | 980 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
981 | 981 | } |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | } |
1030 | 1030 | |
1031 | 1031 | $targetTableJoin = [ |
1032 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1032 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1033 | 1033 | 'condition' => implode(' AND ', $conditions), |
1034 | 1034 | ]; |
1035 | 1035 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | ); |
1057 | 1057 | } |
1058 | 1058 | |
1059 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1059 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1060 | 1060 | |
1061 | 1061 | // Join target table |
1062 | 1062 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1094,7 +1094,7 @@ discard block |
||
1094 | 1094 | } |
1095 | 1095 | |
1096 | 1096 | $targetTableJoin = [ |
1097 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1097 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1098 | 1098 | 'condition' => implode(' AND ', $conditions), |
1099 | 1099 | ]; |
1100 | 1100 | } else { |
@@ -1102,23 +1102,23 @@ discard block |
||
1102 | 1102 | } |
1103 | 1103 | |
1104 | 1104 | // Handle WITH clause |
1105 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1105 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1106 | 1106 | |
1107 | 1107 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1108 | 1108 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1109 | 1109 | |
1110 | 1110 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1111 | 1111 | if ($withCondition) { |
1112 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1112 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1113 | 1113 | } else { |
1114 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1114 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1115 | 1115 | } |
1116 | 1116 | } else { |
1117 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1117 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1118 | 1118 | } |
1119 | 1119 | |
1120 | 1120 | if ($withCondition) { |
1121 | - $sql .= ' AND ' . $withCondition; |
|
1121 | + $sql .= ' AND '.$withCondition; |
|
1122 | 1122 | } |
1123 | 1123 | |
1124 | 1124 | // Apply the indexes |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1153 | 1153 | } |
1154 | 1154 | |
1155 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1155 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1156 | 1156 | } |
1157 | 1157 | |
1158 | 1158 | /** |
@@ -1169,10 +1169,10 @@ discard block |
||
1169 | 1169 | $this->orderedColumnsMap[$sql] = $type; |
1170 | 1170 | |
1171 | 1171 | if ($expr instanceof AST\Subselect) { |
1172 | - return '(' . $sql . ') ' . $type; |
|
1172 | + return '('.$sql.') '.$type; |
|
1173 | 1173 | } |
1174 | 1174 | |
1175 | - return $sql . ' ' . $type; |
|
1175 | + return $sql.' '.$type; |
|
1176 | 1176 | } |
1177 | 1177 | |
1178 | 1178 | /** |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | */ |
1181 | 1181 | public function walkHavingClause($havingClause) |
1182 | 1182 | { |
1183 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1183 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | /** |
@@ -1203,7 +1203,7 @@ discard block |
||
1203 | 1203 | $conditions = []; |
1204 | 1204 | |
1205 | 1205 | if ($join->conditionalExpression) { |
1206 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1206 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | $isUnconditionalJoin = empty($conditions); |
@@ -1228,7 +1228,7 @@ discard block |
||
1228 | 1228 | } |
1229 | 1229 | |
1230 | 1230 | if ($conditions) { |
1231 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1231 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1232 | 1232 | } |
1233 | 1233 | |
1234 | 1234 | break; |
@@ -1258,7 +1258,7 @@ discard block |
||
1258 | 1258 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1259 | 1259 | } |
1260 | 1260 | |
1261 | - return $sql . implode(', ', $scalarExpressions) . ')'; |
|
1261 | + return $sql.implode(', ', $scalarExpressions).')'; |
|
1262 | 1262 | } |
1263 | 1263 | |
1264 | 1264 | /** |
@@ -1278,7 +1278,7 @@ discard block |
||
1278 | 1278 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1279 | 1279 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1280 | 1280 | |
1281 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1281 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1282 | 1282 | } |
1283 | 1283 | |
1284 | 1284 | /** |
@@ -1291,11 +1291,11 @@ discard block |
||
1291 | 1291 | $sql = 'CASE'; |
1292 | 1292 | |
1293 | 1293 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1294 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1295 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1294 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1295 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1296 | 1296 | } |
1297 | 1297 | |
1298 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1298 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1299 | 1299 | |
1300 | 1300 | return $sql; |
1301 | 1301 | } |
@@ -1309,14 +1309,14 @@ discard block |
||
1309 | 1309 | */ |
1310 | 1310 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1311 | 1311 | { |
1312 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1312 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1313 | 1313 | |
1314 | 1314 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1315 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1316 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1315 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1316 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1317 | 1317 | } |
1318 | 1318 | |
1319 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1319 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1320 | 1320 | |
1321 | 1321 | return $sql; |
1322 | 1322 | } |
@@ -1357,7 +1357,7 @@ discard block |
||
1357 | 1357 | |
1358 | 1358 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1359 | 1359 | |
1360 | - if (! $hidden) { |
|
1360 | + if ( ! $hidden) { |
|
1361 | 1361 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1362 | 1362 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1363 | 1363 | } |
@@ -1378,11 +1378,11 @@ discard block |
||
1378 | 1378 | $columnAlias = $this->getSQLColumnAlias(); |
1379 | 1379 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1380 | 1380 | |
1381 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1381 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1382 | 1382 | |
1383 | 1383 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1384 | 1384 | |
1385 | - if (! $hidden) { |
|
1385 | + if ( ! $hidden) { |
|
1386 | 1386 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1387 | 1387 | // but this is not a feasible solution; assume 'string'. |
1388 | 1388 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1393,11 +1393,11 @@ discard block |
||
1393 | 1393 | $columnAlias = $this->getSQLColumnAlias(); |
1394 | 1394 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1395 | 1395 | |
1396 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1396 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1397 | 1397 | |
1398 | 1398 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1399 | 1399 | |
1400 | - if (! $hidden) { |
|
1400 | + if ( ! $hidden) { |
|
1401 | 1401 | // We cannot resolve field type here; assume 'string'. |
1402 | 1402 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1403 | 1403 | } |
@@ -1421,7 +1421,7 @@ discard block |
||
1421 | 1421 | $class = $queryComp['metadata']; |
1422 | 1422 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1423 | 1423 | |
1424 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1424 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1425 | 1425 | $this->selectedClasses[$dqlAlias] = [ |
1426 | 1426 | 'class' => $class, |
1427 | 1427 | 'dqlAlias' => $dqlAlias, |
@@ -1433,7 +1433,7 @@ discard block |
||
1433 | 1433 | |
1434 | 1434 | // Select all fields from the queried class |
1435 | 1435 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
1436 | - if (! ($property instanceof FieldMetadata)) { |
|
1436 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1437 | 1437 | continue; |
1438 | 1438 | } |
1439 | 1439 | |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | $subClass = $this->em->getClassMetadata($subClassName); |
1469 | 1469 | |
1470 | 1470 | foreach ($subClass->getPropertiesIterator() as $fieldName => $property) { |
1471 | - if (! ($property instanceof FieldMetadata)) { |
|
1471 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1472 | 1472 | continue; |
1473 | 1473 | } |
1474 | 1474 | |
@@ -1507,7 +1507,7 @@ discard block |
||
1507 | 1507 | */ |
1508 | 1508 | public function walkQuantifiedExpression($qExpr) |
1509 | 1509 | { |
1510 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1510 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1511 | 1511 | } |
1512 | 1512 | |
1513 | 1513 | /** |
@@ -1547,7 +1547,7 @@ discard block |
||
1547 | 1547 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1548 | 1548 | } |
1549 | 1549 | |
1550 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1550 | + return ' FROM '.implode(', ', $sqlParts); |
|
1551 | 1551 | } |
1552 | 1552 | |
1553 | 1553 | /** |
@@ -1555,7 +1555,7 @@ discard block |
||
1555 | 1555 | */ |
1556 | 1556 | public function walkSimpleSelectClause($simpleSelectClause) |
1557 | 1557 | { |
1558 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1558 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1559 | 1559 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1560 | 1560 | } |
1561 | 1561 | |
@@ -1589,7 +1589,7 @@ discard block |
||
1589 | 1589 | break; |
1590 | 1590 | |
1591 | 1591 | case $e instanceof AST\Subselect: |
1592 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1592 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1593 | 1593 | break; |
1594 | 1594 | |
1595 | 1595 | case $e instanceof AST\PathExpression: |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | $class = $qComp['metadata']; |
1599 | 1599 | $fieldType = $class->getProperty($e->field)->getType(); |
1600 | 1600 | |
1601 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1601 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1602 | 1602 | break; |
1603 | 1603 | |
1604 | 1604 | case $e instanceof AST\Literal: |
@@ -1612,11 +1612,11 @@ discard block |
||
1612 | 1612 | break; |
1613 | 1613 | } |
1614 | 1614 | |
1615 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1615 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1616 | 1616 | break; |
1617 | 1617 | |
1618 | 1618 | default: |
1619 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1619 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1620 | 1620 | break; |
1621 | 1621 | } |
1622 | 1622 | |
@@ -1649,10 +1649,10 @@ discard block |
||
1649 | 1649 | case $expr instanceof AST\Subselect: |
1650 | 1650 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1651 | 1651 | |
1652 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1652 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1653 | 1653 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1654 | 1654 | |
1655 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1655 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1656 | 1656 | break; |
1657 | 1657 | |
1658 | 1658 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1669,7 +1669,7 @@ discard block |
||
1669 | 1669 | $columnAlias = $this->getSQLColumnAlias(); |
1670 | 1670 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1671 | 1671 | |
1672 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1672 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1673 | 1673 | break; |
1674 | 1674 | |
1675 | 1675 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1689,8 +1689,8 @@ discard block |
||
1689 | 1689 | */ |
1690 | 1690 | public function walkAggregateExpression($aggExpression) |
1691 | 1691 | { |
1692 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1693 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1692 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1693 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1694 | 1694 | } |
1695 | 1695 | |
1696 | 1696 | /** |
@@ -1704,7 +1704,7 @@ discard block |
||
1704 | 1704 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1705 | 1705 | } |
1706 | 1706 | |
1707 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1707 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1708 | 1708 | } |
1709 | 1709 | |
1710 | 1710 | /** |
@@ -1713,7 +1713,7 @@ discard block |
||
1713 | 1713 | public function walkGroupByItem($groupByItem) |
1714 | 1714 | { |
1715 | 1715 | // StateFieldPathExpression |
1716 | - if (! is_string($groupByItem)) { |
|
1716 | + if ( ! is_string($groupByItem)) { |
|
1717 | 1717 | return $this->walkPathExpression($groupByItem); |
1718 | 1718 | } |
1719 | 1719 | |
@@ -1767,7 +1767,7 @@ discard block |
||
1767 | 1767 | { |
1768 | 1768 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1769 | 1769 | $tableName = $class->getTableName(); |
1770 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1770 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1771 | 1771 | |
1772 | 1772 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1773 | 1773 | |
@@ -1783,12 +1783,12 @@ discard block |
||
1783 | 1783 | { |
1784 | 1784 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1785 | 1785 | $tableName = $class->getTableName(); |
1786 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1786 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1787 | 1787 | |
1788 | 1788 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1789 | 1789 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1790 | 1790 | |
1791 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1791 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1792 | 1792 | } |
1793 | 1793 | |
1794 | 1794 | /** |
@@ -1799,7 +1799,7 @@ discard block |
||
1799 | 1799 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1800 | 1800 | $this->useSqlTableAliases = false; |
1801 | 1801 | |
1802 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1802 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1803 | 1803 | $newValue = $updateItem->newValue; |
1804 | 1804 | |
1805 | 1805 | switch (true) { |
@@ -1843,7 +1843,7 @@ discard block |
||
1843 | 1843 | |
1844 | 1844 | if ($filterClauses) { |
1845 | 1845 | if ($condSql) { |
1846 | - $condSql = '(' . $condSql . ') AND '; |
|
1846 | + $condSql = '('.$condSql.') AND '; |
|
1847 | 1847 | } |
1848 | 1848 | |
1849 | 1849 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1851,11 +1851,11 @@ discard block |
||
1851 | 1851 | } |
1852 | 1852 | |
1853 | 1853 | if ($condSql) { |
1854 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1854 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1855 | 1855 | } |
1856 | 1856 | |
1857 | 1857 | if ($discrSql) { |
1858 | - return ' WHERE ' . $discrSql; |
|
1858 | + return ' WHERE '.$discrSql; |
|
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | return ''; |
@@ -1868,7 +1868,7 @@ discard block |
||
1868 | 1868 | { |
1869 | 1869 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1870 | 1870 | // if only one ConditionalTerm is defined |
1871 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1871 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1872 | 1872 | return $this->walkConditionalTerm($condExpr); |
1873 | 1873 | } |
1874 | 1874 | |
@@ -1882,7 +1882,7 @@ discard block |
||
1882 | 1882 | { |
1883 | 1883 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1884 | 1884 | // if only one ConditionalFactor is defined |
1885 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1885 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1886 | 1886 | return $this->walkConditionalFactor($condTerm); |
1887 | 1887 | } |
1888 | 1888 | |
@@ -1898,7 +1898,7 @@ discard block |
||
1898 | 1898 | // if only one ConditionalPrimary is defined |
1899 | 1899 | return ! ($factor instanceof AST\ConditionalFactor) |
1900 | 1900 | ? $this->walkConditionalPrimary($factor) |
1901 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1901 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1902 | 1902 | } |
1903 | 1903 | |
1904 | 1904 | /** |
@@ -1913,7 +1913,7 @@ discard block |
||
1913 | 1913 | if ($primary->isConditionalExpression()) { |
1914 | 1914 | $condExpr = $primary->conditionalExpression; |
1915 | 1915 | |
1916 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1916 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1917 | 1917 | } |
1918 | 1918 | |
1919 | 1919 | return ''; |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | { |
1927 | 1927 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1928 | 1928 | |
1929 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1929 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1930 | 1930 | |
1931 | 1931 | return $sql; |
1932 | 1932 | } |
@@ -1974,7 +1974,7 @@ discard block |
||
1974 | 1974 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1975 | 1975 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1976 | 1976 | |
1977 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1977 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1978 | 1978 | |
1979 | 1979 | $sqlParts = []; |
1980 | 1980 | |
@@ -1995,7 +1995,7 @@ discard block |
||
1995 | 1995 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
1996 | 1996 | } |
1997 | 1997 | |
1998 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
1998 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
1999 | 1999 | } |
2000 | 2000 | |
2001 | 2001 | $sql .= implode(' AND ', $sqlParts); |
@@ -2009,7 +2009,7 @@ discard block |
||
2009 | 2009 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2010 | 2010 | |
2011 | 2011 | // join to target table |
2012 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2012 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2013 | 2013 | |
2014 | 2014 | // join conditions |
2015 | 2015 | $joinSqlParts = []; |
@@ -2058,13 +2058,13 @@ discard block |
||
2058 | 2058 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2059 | 2059 | } |
2060 | 2060 | |
2061 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2061 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2062 | 2062 | } |
2063 | 2063 | |
2064 | 2064 | $sql .= implode(' AND ', $sqlParts); |
2065 | 2065 | } |
2066 | 2066 | |
2067 | - return $sql . ')'; |
|
2067 | + return $sql.')'; |
|
2068 | 2068 | } |
2069 | 2069 | |
2070 | 2070 | /** |
@@ -2075,7 +2075,7 @@ discard block |
||
2075 | 2075 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2076 | 2076 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2077 | 2077 | |
2078 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2078 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2079 | 2079 | } |
2080 | 2080 | |
2081 | 2081 | /** |
@@ -2084,19 +2084,19 @@ discard block |
||
2084 | 2084 | public function walkNullComparisonExpression($nullCompExpr) |
2085 | 2085 | { |
2086 | 2086 | $expression = $nullCompExpr->expression; |
2087 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2087 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2088 | 2088 | |
2089 | 2089 | // Handle ResultVariable |
2090 | 2090 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2091 | - return $this->walkResultVariable($expression) . $comparison; |
|
2091 | + return $this->walkResultVariable($expression).$comparison; |
|
2092 | 2092 | } |
2093 | 2093 | |
2094 | 2094 | // Handle InputParameter mapping inclusion to ParserResult |
2095 | 2095 | if ($expression instanceof AST\InputParameter) { |
2096 | - return $this->walkInputParameter($expression) . $comparison; |
|
2096 | + return $this->walkInputParameter($expression).$comparison; |
|
2097 | 2097 | } |
2098 | 2098 | |
2099 | - return $expression->dispatch($this) . $comparison; |
|
2099 | + return $expression->dispatch($this).$comparison; |
|
2100 | 2100 | } |
2101 | 2101 | |
2102 | 2102 | /** |
@@ -2104,7 +2104,7 @@ discard block |
||
2104 | 2104 | */ |
2105 | 2105 | public function walkInExpression($inExpr) |
2106 | 2106 | { |
2107 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2107 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2108 | 2108 | |
2109 | 2109 | $sql .= $inExpr->subselect |
2110 | 2110 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2129,12 +2129,12 @@ discard block |
||
2129 | 2129 | $discrColumnType = $discrColumn->getType(); |
2130 | 2130 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2131 | 2131 | $sqlTableAlias = $this->useSqlTableAliases |
2132 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2132 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2133 | 2133 | : ''; |
2134 | 2134 | |
2135 | 2135 | return sprintf( |
2136 | 2136 | '%s %sIN %s', |
2137 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2137 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2138 | 2138 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2139 | 2139 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2140 | 2140 | ); |
@@ -2178,8 +2178,8 @@ discard block |
||
2178 | 2178 | $sql .= ' NOT'; |
2179 | 2179 | } |
2180 | 2180 | |
2181 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2182 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2181 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2182 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2183 | 2183 | |
2184 | 2184 | return $sql; |
2185 | 2185 | } |
@@ -2194,7 +2194,7 @@ discard block |
||
2194 | 2194 | ? $this->walkResultVariable($stringExpr) |
2195 | 2195 | : $stringExpr->dispatch($this); |
2196 | 2196 | |
2197 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2197 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2198 | 2198 | |
2199 | 2199 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2200 | 2200 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2207,7 +2207,7 @@ discard block |
||
2207 | 2207 | } |
2208 | 2208 | |
2209 | 2209 | if ($likeExpr->escapeChar) { |
2210 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2210 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2211 | 2211 | } |
2212 | 2212 | |
2213 | 2213 | return $sql; |
@@ -2234,7 +2234,7 @@ discard block |
||
2234 | 2234 | ? $leftExpr->dispatch($this) |
2235 | 2235 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2236 | 2236 | |
2237 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2237 | + $sql .= ' '.$compExpr->operator.' '; |
|
2238 | 2238 | |
2239 | 2239 | $sql .= $rightExpr instanceof AST\Node |
2240 | 2240 | ? $rightExpr->dispatch($this) |
@@ -2270,7 +2270,7 @@ discard block |
||
2270 | 2270 | { |
2271 | 2271 | return $arithmeticExpr->isSimpleArithmeticExpression() |
2272 | 2272 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2273 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2273 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2274 | 2274 | } |
2275 | 2275 | |
2276 | 2276 | /** |
@@ -2278,7 +2278,7 @@ discard block |
||
2278 | 2278 | */ |
2279 | 2279 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2280 | 2280 | { |
2281 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2281 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2282 | 2282 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2283 | 2283 | } |
2284 | 2284 | |
@@ -2298,7 +2298,7 @@ discard block |
||
2298 | 2298 | |
2299 | 2299 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2300 | 2300 | // if only one ArithmeticFactor is defined |
2301 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2301 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2302 | 2302 | return $this->walkArithmeticFactor($term); |
2303 | 2303 | } |
2304 | 2304 | |
@@ -2318,13 +2318,13 @@ discard block |
||
2318 | 2318 | |
2319 | 2319 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2320 | 2320 | // if only one ArithmeticPrimary is defined |
2321 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2321 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2322 | 2322 | return $this->walkArithmeticPrimary($factor); |
2323 | 2323 | } |
2324 | 2324 | |
2325 | 2325 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2326 | 2326 | |
2327 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2327 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2328 | 2328 | } |
2329 | 2329 | |
2330 | 2330 | /** |
@@ -2337,7 +2337,7 @@ discard block |
||
2337 | 2337 | public function walkArithmeticPrimary($primary) |
2338 | 2338 | { |
2339 | 2339 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2340 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2340 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2341 | 2341 | } |
2342 | 2342 | |
2343 | 2343 | if ($primary instanceof AST\Node) { |
@@ -2395,7 +2395,7 @@ discard block |
||
2395 | 2395 | $entityClassName = $entityClass->getClassName(); |
2396 | 2396 | |
2397 | 2397 | if ($entityClassName !== $rootClass->getClassName()) { |
2398 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2398 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2399 | 2399 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2400 | 2400 | } |
2401 | 2401 | } |
@@ -2407,6 +2407,6 @@ discard block |
||
2407 | 2407 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2408 | 2408 | } |
2409 | 2409 | |
2410 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2410 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2411 | 2411 | } |
2412 | 2412 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function generateProxyClasses(array $classes) : int |
58 | 58 | { |
59 | - $concreteClasses = array_filter($classes, static function (ClassMetadata $metadata) : bool { |
|
59 | + $concreteClasses = array_filter($classes, static function(ClassMetadata $metadata) : bool { |
|
60 | 60 | return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract()); |
61 | 61 | }); |
62 | 62 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | ->proxyFactory |
66 | 66 | ->createProxy( |
67 | 67 | $metadata->getClassName(), |
68 | - static function () { |
|
68 | + static function() { |
|
69 | 69 | // empty closure, serves its purpose, for now |
70 | 70 | }, |
71 | 71 | $this->skippedFieldsFqns($metadata) |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : Closure |
104 | 104 | { |
105 | - return static function ( |
|
105 | + return static function( |
|
106 | 106 | GhostObjectInterface $ghostObject, |
107 | 107 | string $method, |
108 | 108 | // we don't care |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $identifier = $persister->getIdentifier($ghostObject); |
122 | 122 | |
123 | 123 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
124 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
124 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
125 | 125 | $initializer = $originalInitializer; |
126 | 126 | |
127 | 127 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $transientFieldsFqns = []; |
154 | 154 | |
155 | 155 | foreach ($metadata->getPropertiesIterator() as $name => $property) { |
156 | - if (! $property instanceof TransientMetadata) { |
|
156 | + if ( ! $property instanceof TransientMetadata) { |
|
157 | 157 | continue; |
158 | 158 | } |
159 | 159 | |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | private function propertyFqcn(ReflectionProperty $property) : string |
192 | 192 | { |
193 | 193 | if ($property->isPrivate()) { |
194 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
194 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | if ($property->isProtected()) { |
198 | - return "\0*\0" . $property->getName(); |
|
198 | + return "\0*\0".$property->getName(); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return $property->getName(); |
@@ -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,7 +685,7 @@ 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. |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | 'notnull' => ! $joinColumn->isNullable(), |
695 | 695 | ] + $this->gatherColumnOptions($property->getOptions()); |
696 | 696 | |
697 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
697 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
698 | 698 | $columnOptions['columnDefinition'] = $joinColumn->getColumnDefinition(); |
699 | 699 | } elseif ($property->getColumnDefinition()) { |
700 | 700 | $columnOptions['columnDefinition'] = $property->getColumnDefinition(); |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
721 | 721 | } |
722 | 722 | |
723 | - if (! empty($joinColumn->getOnDelete())) { |
|
723 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
724 | 724 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
725 | 725 | } |
726 | 726 | } |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
732 | 732 | } |
733 | 733 | |
734 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
734 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
735 | 735 | |
736 | 736 | if (isset($addedFks[$compositeName]) |
737 | 737 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | } |
749 | 749 | |
750 | 750 | $blacklistedFks[$compositeName] = true; |
751 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
751 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
752 | 752 | $addedFks[$compositeName] = [ |
753 | 753 | 'foreignTableName' => $foreignTableName, |
754 | 754 | '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 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 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $association = $collection->getMapping(); |
39 | 39 | |
40 | - if (! $association->isOwningSide()) { |
|
40 | + if ( ! $association->isOwningSide()) { |
|
41 | 41 | return; // ignore inverse side |
42 | 42 | } |
43 | 43 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | /** @var JoinColumnMetadata $joinColumn */ |
50 | 50 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
51 | 51 | |
52 | - if (! $joinColumn->getType()) { |
|
52 | + if ( ! $joinColumn->getType()) { |
|
53 | 53 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
54 | 54 | } |
55 | 55 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | $association = $collection->getMapping(); |
71 | 71 | |
72 | - if (! $association->isOwningSide()) { |
|
72 | + if ( ! $association->isOwningSide()) { |
|
73 | 73 | return; // ignore inverse side |
74 | 74 | } |
75 | 75 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | { |
101 | 101 | $association = $collection->getMapping(); |
102 | 102 | |
103 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
103 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
104 | 104 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
105 | 105 | } |
106 | 106 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
145 | 145 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
146 | 146 | |
147 | - if (! $joinColumn->getType()) { |
|
147 | + if ( ! $joinColumn->getType()) { |
|
148 | 148 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
149 | 149 | } |
150 | 150 | |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | }*/ |
177 | 177 | |
178 | 178 | $sql = 'SELECT COUNT(*)' |
179 | - . ' FROM ' . $joinTableName . ' t' |
|
179 | + . ' FROM '.$joinTableName.' t' |
|
180 | 180 | . $joinTargetEntitySQL |
181 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
181 | + . ' WHERE '.implode(' AND ', $conditions); |
|
182 | 182 | |
183 | 183 | return $this->conn->fetchColumn($sql, $params, $types); |
184 | 184 | } |
@@ -201,13 +201,13 @@ discard block |
||
201 | 201 | { |
202 | 202 | $association = $collection->getMapping(); |
203 | 203 | |
204 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
204 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
205 | 205 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
206 | 206 | } |
207 | 207 | |
208 | 208 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
209 | 209 | |
210 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
210 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
211 | 211 | |
212 | 212 | return (bool) $this->conn->fetchColumn($sql, $params, $types); |
213 | 213 | } |
@@ -217,13 +217,13 @@ discard block |
||
217 | 217 | */ |
218 | 218 | public function contains(PersistentCollection $collection, $element) |
219 | 219 | { |
220 | - if (! $this->isValidEntityState($element)) { |
|
220 | + if ( ! $this->isValidEntityState($element)) { |
|
221 | 221 | return false; |
222 | 222 | } |
223 | 223 | |
224 | 224 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, true); |
225 | 225 | |
226 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
226 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
227 | 227 | |
228 | 228 | return (bool) $this->conn->fetchColumn($sql, $params, $types); |
229 | 229 | } |
@@ -233,13 +233,13 @@ discard block |
||
233 | 233 | */ |
234 | 234 | public function removeElement(PersistentCollection $collection, $element) |
235 | 235 | { |
236 | - if (! $this->isValidEntityState($element)) { |
|
236 | + if ( ! $this->isValidEntityState($element)) { |
|
237 | 237 | return false; |
238 | 238 | } |
239 | 239 | |
240 | 240 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, false); |
241 | 241 | |
242 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
242 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
243 | 243 | |
244 | 244 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
245 | 245 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $onConditions = $this->getOnConditionSQL($association); |
258 | 258 | $whereClauses = $params = $types = []; |
259 | 259 | |
260 | - if (! $association->isOwningSide()) { |
|
260 | + if ( ! $association->isOwningSide()) { |
|
261 | 261 | $association = $targetClass->getProperty($association->getMappedBy()); |
262 | 262 | $joinColumns = $association->getJoinTable()->getInverseJoinColumns(); |
263 | 263 | } else { |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
270 | 270 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
271 | 271 | |
272 | - if (! $joinColumn->getType()) { |
|
272 | + if ( ! $joinColumn->getType()) { |
|
273 | 273 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em)); |
274 | 274 | } |
275 | 275 | |
@@ -297,11 +297,11 @@ discard block |
||
297 | 297 | |
298 | 298 | $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te'); |
299 | 299 | |
300 | - $sql = 'SELECT ' . $resultSetMapping->generateSelectClause() |
|
301 | - . ' FROM ' . $tableName . ' te' |
|
302 | - . ' JOIN ' . $joinTableName . ' t ON' |
|
300 | + $sql = 'SELECT '.$resultSetMapping->generateSelectClause() |
|
301 | + . ' FROM '.$tableName.' te' |
|
302 | + . ' JOIN '.$joinTableName.' t ON' |
|
303 | 303 | . implode(' AND ', $onConditions) |
304 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
304 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
305 | 305 | |
306 | 306 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
307 | 307 | $sql .= $this->getLimitSql($criteria); |
@@ -336,8 +336,8 @@ discard block |
||
336 | 336 | |
337 | 337 | // A join is needed if there is filtering on the target entity |
338 | 338 | $tableName = $rootClass->table->getQuotedQualifiedName($this->platform); |
339 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
340 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($association)); |
|
339 | + $joinSql = ' JOIN '.$tableName.' te' |
|
340 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($association)); |
|
341 | 341 | |
342 | 342 | return [$joinSql, $filterSql]; |
343 | 343 | } |
@@ -358,18 +358,18 @@ discard block |
||
358 | 358 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
359 | 359 | |
360 | 360 | if ($filterExpr) { |
361 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
361 | + $filterClauses[] = '('.$filterExpr.')'; |
|
362 | 362 | } |
363 | 363 | } |
364 | 364 | |
365 | - if (! $filterClauses) { |
|
365 | + if ( ! $filterClauses) { |
|
366 | 366 | return ''; |
367 | 367 | } |
368 | 368 | |
369 | 369 | $filterSql = implode(' AND ', $filterClauses); |
370 | 370 | |
371 | 371 | return isset($filterClauses[1]) |
372 | - ? '(' . $filterSql . ')' |
|
372 | + ? '('.$filterSql.')' |
|
373 | 373 | : $filterSql; |
374 | 374 | } |
375 | 375 | |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
397 | 397 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
398 | 398 | |
399 | - $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName; |
|
399 | + $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | return $conditions; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
419 | 419 | } |
420 | 420 | |
421 | - return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
421 | + return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | /** |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
474 | 474 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
475 | 475 | |
476 | - if (! $joinColumn->getType()) { |
|
476 | + if ( ! $joinColumn->getType()) { |
|
477 | 477 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
478 | 478 | } |
479 | 479 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
487 | 487 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
488 | 488 | |
489 | - if (! $joinColumn->getType()) { |
|
489 | + if ( ! $joinColumn->getType()) { |
|
490 | 490 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
491 | 491 | } |
492 | 492 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
538 | 538 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
539 | 539 | |
540 | - if (! $joinColumn->getType()) { |
|
540 | + if ( ! $joinColumn->getType()) { |
|
541 | 541 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
542 | 542 | } |
543 | 543 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
551 | 551 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
552 | 552 | |
553 | - if (! $joinColumn->getType()) { |
|
553 | + if ( ! $joinColumn->getType()) { |
|
554 | 554 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
555 | 555 | } |
556 | 556 | |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
635 | 635 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
636 | 636 | |
637 | - if (! $owningAssociation->isOwningSide()) { |
|
637 | + if ( ! $owningAssociation->isOwningSide()) { |
|
638 | 638 | $owningAssociation = $targetClass->getProperty($owningAssociation->getMappedBy()); |
639 | 639 | $joinTable = $owningAssociation->getJoinTable(); |
640 | 640 | $joinColumns = $joinTable->getJoinColumns(); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | } |
647 | 647 | |
648 | 648 | $joinTableName = $joinTable->getQuotedQualifiedName($this->platform); |
649 | - $quotedJoinTable = $joinTableName . ' t'; |
|
649 | + $quotedJoinTable = $joinTableName.' t'; |
|
650 | 650 | $whereClauses = []; |
651 | 651 | $params = []; |
652 | 652 | $types = []; |
@@ -660,11 +660,11 @@ discard block |
||
660 | 660 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
661 | 661 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
662 | 662 | |
663 | - $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName; |
|
663 | + $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName; |
|
664 | 664 | } |
665 | 665 | |
666 | 666 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
667 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
667 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
668 | 668 | $indexByProperty = $targetClass->getProperty($indexBy); |
669 | 669 | |
670 | 670 | switch (true) { |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
688 | 688 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
689 | 689 | |
690 | - if (! $joinColumn->getType()) { |
|
690 | + if ( ! $joinColumn->getType()) { |
|
691 | 691 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
692 | 692 | } |
693 | 693 | |
@@ -696,13 +696,13 @@ discard block |
||
696 | 696 | $types[] = $joinColumn->getType(); |
697 | 697 | } |
698 | 698 | |
699 | - if (! $joinNeeded) { |
|
699 | + if ( ! $joinNeeded) { |
|
700 | 700 | foreach ($joinColumns as $joinColumn) { |
701 | 701 | /** @var JoinColumnMetadata $joinColumn */ |
702 | 702 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
703 | 703 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
704 | 704 | |
705 | - if (! $joinColumn->getType()) { |
|
705 | + if ( ! $joinColumn->getType()) { |
|
706 | 706 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
707 | 707 | } |
708 | 708 | |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
717 | 717 | |
718 | 718 | if ($filterSql) { |
719 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
719 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
720 | 720 | $whereClauses[] = $filterSql; |
721 | 721 | } |
722 | 722 | } |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | $association = $collection->getMapping(); |
740 | 740 | $owningAssociation = $association; |
741 | 741 | |
742 | - if (! $association->isOwningSide()) { |
|
742 | + if ( ! $association->isOwningSide()) { |
|
743 | 743 | $sourceClass = $this->em->getClassMetadata($association->getTargetEntity()); |
744 | 744 | $targetClass = $this->em->getClassMetadata($association->getSourceEntity()); |
745 | 745 | $sourceIdentifier = $this->uow->getEntityIdentifier($element); |
@@ -765,11 +765,11 @@ discard block |
||
765 | 765 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
766 | 766 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
767 | 767 | |
768 | - if (! $joinColumn->getType()) { |
|
768 | + if ( ! $joinColumn->getType()) { |
|
769 | 769 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
770 | 770 | } |
771 | 771 | |
772 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
772 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
773 | 773 | $params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
774 | 774 | $types[] = $joinColumn->getType(); |
775 | 775 | } |
@@ -779,11 +779,11 @@ discard block |
||
779 | 779 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
780 | 780 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
781 | 781 | |
782 | - if (! $joinColumn->getType()) { |
|
782 | + if ( ! $joinColumn->getType()) { |
|
783 | 783 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
784 | 784 | } |
785 | 785 | |
786 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
786 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
787 | 787 | $params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
788 | 788 | $types[] = $joinColumn->getType(); |
789 | 789 | } |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
795 | 795 | |
796 | 796 | if ($filterSql) { |
797 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
797 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
798 | 798 | $whereClauses[] = $filterSql; |
799 | 799 | } |
800 | 800 | } |
@@ -839,10 +839,10 @@ discard block |
||
839 | 839 | $property = $targetClass->getProperty($name); |
840 | 840 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
841 | 841 | |
842 | - $orderBy[] = $columnName . ' ' . $direction; |
|
842 | + $orderBy[] = $columnName.' '.$direction; |
|
843 | 843 | } |
844 | 844 | |
845 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
845 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
846 | 846 | } |
847 | 847 | |
848 | 848 | return ''; |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function getDatabasePlatform() : AbstractPlatform |
36 | 36 | { |
37 | - if (! $this->platformMock) { |
|
37 | + if ( ! $this->platformMock) { |
|
38 | 38 | $this->platformMock = new DatabasePlatformMock(); |
39 | 39 | } |
40 | 40 |