@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $fieldName = (string) $overrideElement['name']; |
302 | 302 | $property = $classMetadata->getProperty($fieldName); |
303 | 303 | |
304 | - if (! $property) { |
|
304 | + if ( ! $property) { |
|
305 | 305 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
306 | 306 | } |
307 | 307 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $fieldName = (string) $overrideElement['name']; |
336 | 336 | $property = $classMetadata->getProperty($fieldName); |
337 | 337 | |
338 | - if (! $property) { |
|
338 | + if ( ! $property) { |
|
339 | 339 | throw Mapping\MappingException::invalidOverrideFieldName($classMetadata->getClassName(), $fieldName); |
340 | 340 | } |
341 | 341 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | // Check for fetch |
394 | 394 | if (isset($overrideElement['fetch'])) { |
395 | 395 | $override->setFetchMode( |
396 | - constant('Doctrine\ORM\Mapping\FetchMode::' . (string) $overrideElement['fetch']) |
|
396 | + constant('Doctrine\ORM\Mapping\FetchMode::'.(string) $overrideElement['fetch']) |
|
397 | 397 | ); |
398 | 398 | } |
399 | 399 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | // Evaluate <lifecycle-callbacks...> |
405 | 405 | if (isset($xmlRoot->{'lifecycle-callbacks'})) { |
406 | 406 | foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { |
407 | - $eventName = constant(Events::class . '::' . (string) $lifecycleCallback['type']); |
|
407 | + $eventName = constant(Events::class.'::'.(string) $lifecycleCallback['type']); |
|
408 | 408 | $methodName = (string) $lifecycleCallback['method']; |
409 | 409 | |
410 | 410 | $classMetadata->addLifecycleCallback($eventName, $methodName); |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | foreach ($xmlRoot->{'entity-listeners'}->{'entity-listener'} as $listenerElement) { |
417 | 417 | $listenerClassName = (string) $listenerElement['class']; |
418 | 418 | |
419 | - if (! class_exists($listenerClassName)) { |
|
419 | + if ( ! class_exists($listenerClassName)) { |
|
420 | 420 | throw Mapping\MappingException::entityListenerClassNotFound( |
421 | 421 | $listenerClassName, |
422 | 422 | $classMetadata->getClassName() |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | return $this->classNames; |
205 | 205 | } |
206 | 206 | |
207 | - if (! $this->paths) { |
|
207 | + if ( ! $this->paths) { |
|
208 | 208 | throw Mapping\MappingException::pathRequired(); |
209 | 209 | } |
210 | 210 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $includedFiles = []; |
213 | 213 | |
214 | 214 | foreach ($this->paths as $path) { |
215 | - if (! is_dir($path)) { |
|
215 | + if ( ! is_dir($path)) { |
|
216 | 216 | throw Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
217 | 217 | } |
218 | 218 | |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), |
222 | 222 | RecursiveIteratorIterator::LEAVES_ONLY |
223 | 223 | ), |
224 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
224 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
225 | 225 | RecursiveRegexIterator::GET_MATCH |
226 | 226 | ); |
227 | 227 | |
228 | 228 | foreach ($iterator as $file) { |
229 | 229 | $sourceFile = $file[0]; |
230 | 230 | |
231 | - if (! preg_match('(^phar:)i', $sourceFile)) { |
|
231 | + if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
232 | 232 | $sourceFile = realpath($sourceFile); |
233 | 233 | } |
234 | 234 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | ->withCacheAnnotation($classAnnotations[Annotation\Cache::class] ?? null) |
295 | 295 | ->build(); |
296 | 296 | |
297 | - if (! $classMetadata->isEmbeddedClass) { |
|
297 | + if ( ! $classMetadata->isEmbeddedClass) { |
|
298 | 298 | $this->attachLifecycleCallbacks($classAnnotations, $reflectionClass, $classMetadata); |
299 | 299 | $this->attachEntityListeners($classAnnotations, $classMetadata); |
300 | 300 | } |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | ]; |
366 | 366 | |
367 | 367 | foreach ($entityListenersAnnot->value as $listenerClassName) { |
368 | - if (! class_exists($listenerClassName)) { |
|
368 | + if ( ! class_exists($listenerClassName)) { |
|
369 | 369 | throw Mapping\MappingException::entityListenerClassNotFound( |
370 | 370 | $listenerClassName, |
371 | 371 | $metadata->getClassName() |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | $fieldName = $associationOverrideAnnotation->name; |
454 | 454 | $property = $metadata->getProperty($fieldName); |
455 | 455 | |
456 | - if (! $property) { |
|
456 | + if ( ! $property) { |
|
457 | 457 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
458 | 458 | } |
459 | 459 | |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | |
507 | 507 | // Check for fetch |
508 | 508 | if ($associationOverrideAnnotation->fetch) { |
509 | - $override->setFetchMode(constant(Mapping\FetchMode::class . '::' . $associationOverrideAnnotation->fetch)); |
|
509 | + $override->setFetchMode(constant(Mapping\FetchMode::class.'::'.$associationOverrideAnnotation->fetch)); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | $metadata->setPropertyOverride($override); |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | $fieldName = $attributeOverrideAnnotation->name; |
528 | 528 | $property = $metadata->getProperty($fieldName); |
529 | 529 | |
530 | - if (! $property) { |
|
530 | + if ( ! $property) { |
|
531 | 531 | throw Mapping\MappingException::invalidOverrideFieldName($metadata->getClassName(), $fieldName); |
532 | 532 | } |
533 | 533 | |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | $classAnnotations = $this->reader->getClassAnnotations($reflectionClass); |
557 | 557 | |
558 | 558 | foreach ($classAnnotations as $key => $annot) { |
559 | - if (! is_numeric($key)) { |
|
559 | + if ( ! is_numeric($key)) { |
|
560 | 560 | continue; |
561 | 561 | } |
562 | 562 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | $propertyAnnotations = $this->reader->getPropertyAnnotations($reflectionProperty); |
575 | 575 | |
576 | 576 | foreach ($propertyAnnotations as $key => $annot) { |
577 | - if (! is_numeric($key)) { |
|
577 | + if ( ! is_numeric($key)) { |
|
578 | 578 | continue; |
579 | 579 | } |
580 | 580 | |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $methodAnnotations = $this->reader->getMethodAnnotations($reflectionMethod); |
593 | 593 | |
594 | 594 | foreach ($methodAnnotations as $key => $annot) { |
595 | - if (! is_numeric($key)) { |
|
595 | + if ( ! is_numeric($key)) { |
|
596 | 596 | continue; |
597 | 597 | } |
598 | 598 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $this->metadataBuildingContext = $metadataBuildingContext; |
67 | 67 | $this->tableMetadataBuilder = $tableMetadataBuilder ?: new TableMetadataBuilder($metadataBuildingContext); |
68 | 68 | $this->cacheMetadataBuilder = $cacheMetadataBuilder ?: new CacheMetadataBuilder($metadataBuildingContext); |
69 | - $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
69 | + $this->discriminatorColumnMetadataBuilder = $discriminatorColumnMetadataBuilder ?: new DiscriminatorColumnMetadataBuilder($metadataBuildingContext); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function withClassName(string $className) : ClassMetadataBuilder |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | && $parentMetadata->inheritanceType === Mapping\InheritanceType::SINGLE_TABLE) { |
234 | 234 | // Handle the case where a middle mapped super class inherits from a single table inheritance tree. |
235 | 235 | do { |
236 | - if (! $parentMetadata->isMappedSuperclass) { |
|
236 | + if ( ! $parentMetadata->isMappedSuperclass) { |
|
237 | 237 | $tableMetadata = $parentMetadata->table; |
238 | 238 | break; |
239 | 239 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function prepare() |
55 | 55 | { |
56 | - if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
56 | + if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
57 | 57 | $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true; |
58 | 58 | } |
59 | 59 | |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | |
64 | 64 | // Remember which associations are "fetch joined", so that we know where to inject |
65 | 65 | // collection stubs or proxies and where not. |
66 | - if (! isset($this->rsm->relationMap[$dqlAlias])) { |
|
66 | + if ( ! isset($this->rsm->relationMap[$dqlAlias])) { |
|
67 | 67 | continue; |
68 | 68 | } |
69 | 69 | |
70 | 70 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
71 | 71 | |
72 | - if (! isset($this->rsm->aliasMap[$parent])) { |
|
72 | + if ( ! isset($this->rsm->aliasMap[$parent])) { |
|
73 | 73 | throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent); |
74 | 74 | } |
75 | 75 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $class = $this->getClassMetadata($className); |
96 | 96 | $inverseAssoc = $class->getProperty($association->getInversedBy()); |
97 | 97 | |
98 | - if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
98 | + if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
99 | 99 | continue; |
100 | 100 | } |
101 | 101 | |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | $value = $association->getValue($entity); |
162 | 162 | $oid = spl_object_id($entity); |
163 | 163 | |
164 | - if (! $value instanceof PersistentCollection) { |
|
164 | + if ( ! $value instanceof PersistentCollection) { |
|
165 | 165 | $value = $association->wrap($entity, $value, $this->em); |
166 | 166 | |
167 | 167 | $association->setValue($entity, $value); |
168 | 168 | |
169 | 169 | $this->uow->setOriginalEntityProperty($oid, $fieldName, $value); |
170 | 170 | |
171 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
171 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
172 | 172 | } elseif (isset($this->hints[Query::HINT_REFRESH]) || |
173 | 173 | (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized()) |
174 | 174 | ) { |
@@ -177,10 +177,10 @@ discard block |
||
177 | 177 | $value->setInitialized(true); |
178 | 178 | $value->unwrap()->clear(); |
179 | 179 | |
180 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
180 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
181 | 181 | } else { |
182 | 182 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
183 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
183 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | return $value; |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | if (isset($this->rsm->discriminatorColumns[$dqlAlias])) { |
204 | 204 | $fieldName = $this->rsm->discriminatorColumns[$dqlAlias]; |
205 | 205 | |
206 | - if (! isset($this->rsm->metaMappings[$fieldName])) { |
|
206 | + if ( ! isset($this->rsm->metaMappings[$fieldName])) { |
|
207 | 207 | throw HydrationException::missingDiscriminatorMetaMappingColumn($className, $fieldName, $dqlAlias); |
208 | 208 | } |
209 | 209 | |
210 | 210 | $discrColumn = $this->rsm->metaMappings[$fieldName]; |
211 | 211 | |
212 | - if (! isset($data[$discrColumn])) { |
|
212 | + if ( ! isset($data[$discrColumn])) { |
|
213 | 213 | throw HydrationException::missingDiscriminatorColumn($className, $discrColumn, $dqlAlias); |
214 | 214 | } |
215 | 215 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $discrMap = $this->metadataCache[$className]->discriminatorMap; |
221 | 221 | $discriminatorValue = (string) $data[$discrColumn]; |
222 | 222 | |
223 | - if (! isset($discrMap[$discriminatorValue])) { |
|
223 | + if ( ! isset($discrMap[$discriminatorValue])) { |
|
224 | 224 | throw HydrationException::invalidDiscriminatorValue($discriminatorValue, array_keys($discrMap)); |
225 | 225 | } |
226 | 226 | |
@@ -296,10 +296,10 @@ discard block |
||
296 | 296 | $parentAlias = $this->rsm->parentAliasMap[$dqlAlias]; |
297 | 297 | // we need the $path to save into the identifier map which entities were already |
298 | 298 | // seen for this parent-child relationship |
299 | - $path = $parentAlias . '.' . $dqlAlias; |
|
299 | + $path = $parentAlias.'.'.$dqlAlias; |
|
300 | 300 | |
301 | 301 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
302 | - if (! isset($nonemptyComponents[$parentAlias])) { |
|
302 | + if ( ! isset($nonemptyComponents[$parentAlias])) { |
|
303 | 303 | // TODO: Add special case code where we hydrate the right join objects into identity map at least |
304 | 304 | continue; |
305 | 305 | } |
@@ -330,15 +330,15 @@ discard block |
||
330 | 330 | $oid = spl_object_id($parentObject); |
331 | 331 | |
332 | 332 | // Check the type of the relation (many or single-valued) |
333 | - if (! ($association instanceof ToOneAssociationMetadata)) { |
|
333 | + if ( ! ($association instanceof ToOneAssociationMetadata)) { |
|
334 | 334 | // PATH A: Collection-valued association |
335 | 335 | $reflFieldValue = $association->getValue($parentObject); |
336 | 336 | |
337 | 337 | if (isset($nonemptyComponents[$dqlAlias])) { |
338 | - $collKey = $oid . $relationField; |
|
338 | + $collKey = $oid.$relationField; |
|
339 | 339 | if (isset($this->initializedCollections[$collKey])) { |
340 | 340 | $reflFieldValue = $this->initializedCollections[$collKey]; |
341 | - } elseif (! isset($this->existingCollections[$collKey])) { |
|
341 | + } elseif ( ! isset($this->existingCollections[$collKey])) { |
|
342 | 342 | $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
343 | 343 | } |
344 | 344 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $index = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false; |
347 | 347 | $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false; |
348 | 348 | |
349 | - if (! $indexExists || ! $indexIsValid) { |
|
349 | + if ( ! $indexExists || ! $indexIsValid) { |
|
350 | 350 | if (isset($this->existingCollections[$collKey])) { |
351 | 351 | $element = $this->getEntityFromIdentityMap($entityName, $data); |
352 | 352 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | // Update result pointer |
376 | 376 | $this->resultPointers[$dqlAlias] = $reflFieldValue[$index]; |
377 | 377 | } |
378 | - } elseif (! $reflFieldValue) { |
|
378 | + } elseif ( ! $reflFieldValue) { |
|
379 | 379 | $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
380 | 380 | } elseif ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) { |
381 | 381 | $reflFieldValue->setInitialized(true); |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | // PATH B: Single-valued association |
385 | 385 | $reflFieldValue = $association->getValue($parentObject); |
386 | 386 | |
387 | - if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
387 | + if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
388 | 388 | ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) { |
389 | 389 | // we only need to take action if this value is null, |
390 | 390 | // we refresh the entity or its an uninitialized proxy. |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
446 | 446 | |
447 | 447 | // if this row has a NULL value for the root result id then make it a null result. |
448 | - if (! isset($nonemptyComponents[$dqlAlias])) { |
|
448 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
449 | 449 | if ($this->rsm->isMixed) { |
450 | 450 | $result[] = [$entityKey => null]; |
451 | 451 | } else { |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | } |
458 | 458 | |
459 | 459 | // check for existing result from the iterations before |
460 | - if (! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) { |
|
460 | + if ( ! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) { |
|
461 | 461 | $element = $this->getEntity($data, $dqlAlias); |
462 | 462 | |
463 | 463 | if ($this->rsm->isMixed) { |
@@ -500,13 +500,13 @@ discard block |
||
500 | 500 | } |
501 | 501 | } |
502 | 502 | |
503 | - if (! isset($resultKey)) { |
|
503 | + if ( ! isset($resultKey)) { |
|
504 | 504 | $this->resultCounter++; |
505 | 505 | } |
506 | 506 | |
507 | 507 | // Append scalar values to mixed result sets |
508 | 508 | if (isset($rowData['scalars'])) { |
509 | - if (! isset($resultKey)) { |
|
509 | + if ( ! isset($resultKey)) { |
|
510 | 510 | $resultKey = isset($this->rsm->indexByMap['scalars']) |
511 | 511 | ? $row[$this->rsm->indexByMap['scalars']] |
512 | 512 | : $this->resultCounter - 1; |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | |
520 | 520 | // Append new object to mixed result sets |
521 | 521 | if (isset($rowData['newObjects'])) { |
522 | - if (! isset($resultKey)) { |
|
522 | + if ( ! isset($resultKey)) { |
|
523 | 523 | $resultKey = $this->resultCounter - 1; |
524 | 524 | } |
525 | 525 |
@@ -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,7 +926,7 @@ discard block |
||
926 | 926 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
927 | 927 | |
928 | 928 | $sql = $this->platform->appendLockHint( |
929 | - $tableName . ' ' . $tableAlias, |
|
929 | + $tableName.' '.$tableAlias, |
|
930 | 930 | $this->query->getHint(Query::HINT_LOCK_MODE) |
931 | 931 | ); |
932 | 932 | |
@@ -936,11 +936,11 @@ discard block |
||
936 | 936 | |
937 | 937 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
938 | 938 | |
939 | - if (! $buildNestedJoins) { |
|
940 | - return $sql . $classTableInheritanceJoins; |
|
939 | + if ( ! $buildNestedJoins) { |
|
940 | + return $sql.$classTableInheritanceJoins; |
|
941 | 941 | } |
942 | 942 | |
943 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
943 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
944 | 944 | } |
945 | 945 | |
946 | 946 | /** |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | : $association; |
977 | 977 | |
978 | 978 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
979 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
979 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
980 | 980 | if ($association instanceof ToManyAssociationMetadata) { |
981 | 981 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
982 | 982 | } |
@@ -1030,7 +1030,7 @@ discard block |
||
1030 | 1030 | } |
1031 | 1031 | |
1032 | 1032 | $targetTableJoin = [ |
1033 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1033 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1034 | 1034 | 'condition' => implode(' AND ', $conditions), |
1035 | 1035 | ]; |
1036 | 1036 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1057,7 +1057,7 @@ discard block |
||
1057 | 1057 | ); |
1058 | 1058 | } |
1059 | 1059 | |
1060 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1060 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1061 | 1061 | |
1062 | 1062 | // Join target table |
1063 | 1063 | $sql .= $joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | $targetTableJoin = [ |
1098 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1098 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1099 | 1099 | 'condition' => implode(' AND ', $conditions), |
1100 | 1100 | ]; |
1101 | 1101 | } else { |
@@ -1103,23 +1103,23 @@ discard block |
||
1103 | 1103 | } |
1104 | 1104 | |
1105 | 1105 | // Handle WITH clause |
1106 | - $withCondition = $condExpr === null ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1106 | + $withCondition = $condExpr === null ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1107 | 1107 | |
1108 | 1108 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1109 | 1109 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1110 | 1110 | |
1111 | 1111 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1112 | 1112 | if ($withCondition) { |
1113 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1113 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1114 | 1114 | } else { |
1115 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1115 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1116 | 1116 | } |
1117 | 1117 | } else { |
1118 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1118 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1119 | 1119 | } |
1120 | 1120 | |
1121 | 1121 | if ($withCondition) { |
1122 | - $sql .= ' AND ' . $withCondition; |
|
1122 | + $sql .= ' AND '.$withCondition; |
|
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | // Apply the indexes |
@@ -1153,7 +1153,7 @@ discard block |
||
1153 | 1153 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1154 | 1154 | } |
1155 | 1155 | |
1156 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1156 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1157 | 1157 | } |
1158 | 1158 | |
1159 | 1159 | /** |
@@ -1170,10 +1170,10 @@ discard block |
||
1170 | 1170 | $this->orderedColumnsMap[$sql] = $type; |
1171 | 1171 | |
1172 | 1172 | if ($expr instanceof AST\Subselect) { |
1173 | - return '(' . $sql . ') ' . $type; |
|
1173 | + return '('.$sql.') '.$type; |
|
1174 | 1174 | } |
1175 | 1175 | |
1176 | - return $sql . ' ' . $type; |
|
1176 | + return $sql.' '.$type; |
|
1177 | 1177 | } |
1178 | 1178 | |
1179 | 1179 | /** |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | */ |
1182 | 1182 | public function walkHavingClause($havingClause) |
1183 | 1183 | { |
1184 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1184 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1185 | 1185 | } |
1186 | 1186 | |
1187 | 1187 | /** |
@@ -1204,7 +1204,7 @@ discard block |
||
1204 | 1204 | $conditions = []; |
1205 | 1205 | |
1206 | 1206 | if ($join->conditionalExpression) { |
1207 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1207 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1208 | 1208 | } |
1209 | 1209 | |
1210 | 1210 | $isUnconditionalJoin = empty($conditions); |
@@ -1229,7 +1229,7 @@ discard block |
||
1229 | 1229 | } |
1230 | 1230 | |
1231 | 1231 | if ($conditions) { |
1232 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1232 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1233 | 1233 | } |
1234 | 1234 | |
1235 | 1235 | break; |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1260 | 1260 | } |
1261 | 1261 | |
1262 | - return $sql . implode(', ', $scalarExpressions) . ')'; |
|
1262 | + return $sql.implode(', ', $scalarExpressions).')'; |
|
1263 | 1263 | } |
1264 | 1264 | |
1265 | 1265 | /** |
@@ -1279,7 +1279,7 @@ discard block |
||
1279 | 1279 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1280 | 1280 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1281 | 1281 | |
1282 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1282 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1283 | 1283 | } |
1284 | 1284 | |
1285 | 1285 | /** |
@@ -1292,11 +1292,11 @@ discard block |
||
1292 | 1292 | $sql = 'CASE'; |
1293 | 1293 | |
1294 | 1294 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1295 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1296 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1295 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1296 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1297 | 1297 | } |
1298 | 1298 | |
1299 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1299 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1300 | 1300 | |
1301 | 1301 | return $sql; |
1302 | 1302 | } |
@@ -1310,14 +1310,14 @@ discard block |
||
1310 | 1310 | */ |
1311 | 1311 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1312 | 1312 | { |
1313 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1313 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1314 | 1314 | |
1315 | 1315 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1316 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1317 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1316 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1317 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1318 | 1318 | } |
1319 | 1319 | |
1320 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1320 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1321 | 1321 | |
1322 | 1322 | return $sql; |
1323 | 1323 | } |
@@ -1358,7 +1358,7 @@ discard block |
||
1358 | 1358 | |
1359 | 1359 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1360 | 1360 | |
1361 | - if (! $hidden) { |
|
1361 | + if ( ! $hidden) { |
|
1362 | 1362 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1363 | 1363 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1364 | 1364 | } |
@@ -1379,11 +1379,11 @@ discard block |
||
1379 | 1379 | $columnAlias = $this->getSQLColumnAlias(); |
1380 | 1380 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1381 | 1381 | |
1382 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1382 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1383 | 1383 | |
1384 | 1384 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1385 | 1385 | |
1386 | - if (! $hidden) { |
|
1386 | + if ( ! $hidden) { |
|
1387 | 1387 | if ($expr instanceof Query\AST\TypedExpression) { |
1388 | 1388 | $type = $expr->getReturnType(); |
1389 | 1389 | } else { |
@@ -1399,11 +1399,11 @@ discard block |
||
1399 | 1399 | $columnAlias = $this->getSQLColumnAlias(); |
1400 | 1400 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1401 | 1401 | |
1402 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1402 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1403 | 1403 | |
1404 | 1404 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1405 | 1405 | |
1406 | - if (! $hidden) { |
|
1406 | + if ( ! $hidden) { |
|
1407 | 1407 | // We cannot resolve field type here; assume 'string'. |
1408 | 1408 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1409 | 1409 | } |
@@ -1427,7 +1427,7 @@ discard block |
||
1427 | 1427 | $class = $queryComp['metadata']; |
1428 | 1428 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1429 | 1429 | |
1430 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1430 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1431 | 1431 | $this->selectedClasses[$dqlAlias] = [ |
1432 | 1432 | 'class' => $class, |
1433 | 1433 | 'dqlAlias' => $dqlAlias, |
@@ -1439,7 +1439,7 @@ discard block |
||
1439 | 1439 | |
1440 | 1440 | // Select all fields from the queried class |
1441 | 1441 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
1442 | - if (! ($property instanceof FieldMetadata)) { |
|
1442 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1443 | 1443 | continue; |
1444 | 1444 | } |
1445 | 1445 | |
@@ -1474,7 +1474,7 @@ discard block |
||
1474 | 1474 | $subClass = $this->em->getClassMetadata($subClassName); |
1475 | 1475 | |
1476 | 1476 | foreach ($subClass->getPropertiesIterator() as $fieldName => $property) { |
1477 | - if (! ($property instanceof FieldMetadata)) { |
|
1477 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1478 | 1478 | continue; |
1479 | 1479 | } |
1480 | 1480 | |
@@ -1513,7 +1513,7 @@ discard block |
||
1513 | 1513 | */ |
1514 | 1514 | public function walkQuantifiedExpression($qExpr) |
1515 | 1515 | { |
1516 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1516 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1517 | 1517 | } |
1518 | 1518 | |
1519 | 1519 | /** |
@@ -1553,7 +1553,7 @@ discard block |
||
1553 | 1553 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1554 | 1554 | } |
1555 | 1555 | |
1556 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1556 | + return ' FROM '.implode(', ', $sqlParts); |
|
1557 | 1557 | } |
1558 | 1558 | |
1559 | 1559 | /** |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | */ |
1562 | 1562 | public function walkSimpleSelectClause($simpleSelectClause) |
1563 | 1563 | { |
1564 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1564 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1565 | 1565 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1566 | 1566 | } |
1567 | 1567 | |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | break; |
1596 | 1596 | |
1597 | 1597 | case $e instanceof AST\Subselect: |
1598 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1598 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1599 | 1599 | break; |
1600 | 1600 | |
1601 | 1601 | case $e instanceof AST\PathExpression: |
@@ -1604,7 +1604,7 @@ discard block |
||
1604 | 1604 | $class = $qComp['metadata']; |
1605 | 1605 | $fieldType = $class->getProperty($e->field)->getType(); |
1606 | 1606 | |
1607 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1607 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1608 | 1608 | break; |
1609 | 1609 | |
1610 | 1610 | case $e instanceof AST\Literal: |
@@ -1618,11 +1618,11 @@ discard block |
||
1618 | 1618 | break; |
1619 | 1619 | } |
1620 | 1620 | |
1621 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1621 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1622 | 1622 | break; |
1623 | 1623 | |
1624 | 1624 | default: |
1625 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1625 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1626 | 1626 | break; |
1627 | 1627 | } |
1628 | 1628 | |
@@ -1655,10 +1655,10 @@ discard block |
||
1655 | 1655 | case $expr instanceof AST\Subselect: |
1656 | 1656 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1657 | 1657 | |
1658 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1658 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1659 | 1659 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1660 | 1660 | |
1661 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1661 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1662 | 1662 | break; |
1663 | 1663 | |
1664 | 1664 | case $expr instanceof AST\Functions\FunctionNode: |
@@ -1675,7 +1675,7 @@ discard block |
||
1675 | 1675 | $columnAlias = $this->getSQLColumnAlias(); |
1676 | 1676 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1677 | 1677 | |
1678 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1678 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1679 | 1679 | break; |
1680 | 1680 | |
1681 | 1681 | case $expr instanceof AST\ParenthesisExpression: |
@@ -1695,8 +1695,8 @@ discard block |
||
1695 | 1695 | */ |
1696 | 1696 | public function walkAggregateExpression($aggExpression) |
1697 | 1697 | { |
1698 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1699 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1698 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1699 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1700 | 1700 | } |
1701 | 1701 | |
1702 | 1702 | /** |
@@ -1710,7 +1710,7 @@ discard block |
||
1710 | 1710 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1711 | 1711 | } |
1712 | 1712 | |
1713 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1713 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1714 | 1714 | } |
1715 | 1715 | |
1716 | 1716 | /** |
@@ -1719,7 +1719,7 @@ discard block |
||
1719 | 1719 | public function walkGroupByItem($groupByItem) |
1720 | 1720 | { |
1721 | 1721 | // StateFieldPathExpression |
1722 | - if (! is_string($groupByItem)) { |
|
1722 | + if ( ! is_string($groupByItem)) { |
|
1723 | 1723 | return $this->walkPathExpression($groupByItem); |
1724 | 1724 | } |
1725 | 1725 | |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | { |
1774 | 1774 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1775 | 1775 | $tableName = $class->getTableName(); |
1776 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1776 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1777 | 1777 | |
1778 | 1778 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1779 | 1779 | |
@@ -1789,12 +1789,12 @@ discard block |
||
1789 | 1789 | { |
1790 | 1790 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1791 | 1791 | $tableName = $class->getTableName(); |
1792 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1792 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1793 | 1793 | |
1794 | 1794 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1795 | 1795 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1796 | 1796 | |
1797 | - return $sql . ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1797 | + return $sql.' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1798 | 1798 | } |
1799 | 1799 | |
1800 | 1800 | /** |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1806 | 1806 | $this->useSqlTableAliases = false; |
1807 | 1807 | |
1808 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1808 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1809 | 1809 | $newValue = $updateItem->newValue; |
1810 | 1810 | |
1811 | 1811 | switch (true) { |
@@ -1849,7 +1849,7 @@ discard block |
||
1849 | 1849 | |
1850 | 1850 | if ($filterClauses) { |
1851 | 1851 | if ($condSql) { |
1852 | - $condSql = '(' . $condSql . ') AND '; |
|
1852 | + $condSql = '('.$condSql.') AND '; |
|
1853 | 1853 | } |
1854 | 1854 | |
1855 | 1855 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1857,11 +1857,11 @@ discard block |
||
1857 | 1857 | } |
1858 | 1858 | |
1859 | 1859 | if ($condSql) { |
1860 | - return ' WHERE ' . (! $discrSql ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1860 | + return ' WHERE '.( ! $discrSql ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1861 | 1861 | } |
1862 | 1862 | |
1863 | 1863 | if ($discrSql) { |
1864 | - return ' WHERE ' . $discrSql; |
|
1864 | + return ' WHERE '.$discrSql; |
|
1865 | 1865 | } |
1866 | 1866 | |
1867 | 1867 | return ''; |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | { |
1875 | 1875 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1876 | 1876 | // if only one ConditionalTerm is defined |
1877 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1877 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1878 | 1878 | return $this->walkConditionalTerm($condExpr); |
1879 | 1879 | } |
1880 | 1880 | |
@@ -1888,7 +1888,7 @@ discard block |
||
1888 | 1888 | { |
1889 | 1889 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1890 | 1890 | // if only one ConditionalFactor is defined |
1891 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1891 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1892 | 1892 | return $this->walkConditionalFactor($condTerm); |
1893 | 1893 | } |
1894 | 1894 | |
@@ -1904,7 +1904,7 @@ discard block |
||
1904 | 1904 | // if only one ConditionalPrimary is defined |
1905 | 1905 | return ! ($factor instanceof AST\ConditionalFactor) |
1906 | 1906 | ? $this->walkConditionalPrimary($factor) |
1907 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1907 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1908 | 1908 | } |
1909 | 1909 | |
1910 | 1910 | /** |
@@ -1919,7 +1919,7 @@ discard block |
||
1919 | 1919 | if ($primary->isConditionalExpression()) { |
1920 | 1920 | $condExpr = $primary->conditionalExpression; |
1921 | 1921 | |
1922 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1922 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1923 | 1923 | } |
1924 | 1924 | |
1925 | 1925 | return ''; |
@@ -1932,7 +1932,7 @@ discard block |
||
1932 | 1932 | { |
1933 | 1933 | $sql = $existsExpr->not ? 'NOT ' : ''; |
1934 | 1934 | |
1935 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1935 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1936 | 1936 | |
1937 | 1937 | return $sql; |
1938 | 1938 | } |
@@ -1980,7 +1980,7 @@ discard block |
||
1980 | 1980 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1981 | 1981 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1982 | 1982 | |
1983 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1983 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1984 | 1984 | |
1985 | 1985 | $sqlParts = []; |
1986 | 1986 | |
@@ -2001,7 +2001,7 @@ discard block |
||
2001 | 2001 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2002 | 2002 | } |
2003 | 2003 | |
2004 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2004 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2005 | 2005 | } |
2006 | 2006 | |
2007 | 2007 | $sql .= implode(' AND ', $sqlParts); |
@@ -2015,7 +2015,7 @@ discard block |
||
2015 | 2015 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2016 | 2016 | |
2017 | 2017 | // join to target table |
2018 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2018 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2019 | 2019 | |
2020 | 2020 | // join conditions |
2021 | 2021 | $joinSqlParts = []; |
@@ -2064,13 +2064,13 @@ discard block |
||
2064 | 2064 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2065 | 2065 | } |
2066 | 2066 | |
2067 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2067 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2068 | 2068 | } |
2069 | 2069 | |
2070 | 2070 | $sql .= implode(' AND ', $sqlParts); |
2071 | 2071 | } |
2072 | 2072 | |
2073 | - return $sql . ')'; |
|
2073 | + return $sql.')'; |
|
2074 | 2074 | } |
2075 | 2075 | |
2076 | 2076 | /** |
@@ -2081,7 +2081,7 @@ discard block |
||
2081 | 2081 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2082 | 2082 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2083 | 2083 | |
2084 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2084 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2085 | 2085 | } |
2086 | 2086 | |
2087 | 2087 | /** |
@@ -2090,19 +2090,19 @@ discard block |
||
2090 | 2090 | public function walkNullComparisonExpression($nullCompExpr) |
2091 | 2091 | { |
2092 | 2092 | $expression = $nullCompExpr->expression; |
2093 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2093 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2094 | 2094 | |
2095 | 2095 | // Handle ResultVariable |
2096 | 2096 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2097 | - return $this->walkResultVariable($expression) . $comparison; |
|
2097 | + return $this->walkResultVariable($expression).$comparison; |
|
2098 | 2098 | } |
2099 | 2099 | |
2100 | 2100 | // Handle InputParameter mapping inclusion to ParserResult |
2101 | 2101 | if ($expression instanceof AST\InputParameter) { |
2102 | - return $this->walkInputParameter($expression) . $comparison; |
|
2102 | + return $this->walkInputParameter($expression).$comparison; |
|
2103 | 2103 | } |
2104 | 2104 | |
2105 | - return $expression->dispatch($this) . $comparison; |
|
2105 | + return $expression->dispatch($this).$comparison; |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | 2108 | /** |
@@ -2110,7 +2110,7 @@ discard block |
||
2110 | 2110 | */ |
2111 | 2111 | public function walkInExpression($inExpr) |
2112 | 2112 | { |
2113 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2113 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2114 | 2114 | |
2115 | 2115 | $sql .= $inExpr->subselect |
2116 | 2116 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2135,12 +2135,12 @@ discard block |
||
2135 | 2135 | $discrColumnType = $discrColumn->getType(); |
2136 | 2136 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2137 | 2137 | $sqlTableAlias = $this->useSqlTableAliases |
2138 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2138 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2139 | 2139 | : ''; |
2140 | 2140 | |
2141 | 2141 | return sprintf( |
2142 | 2142 | '%s %sIN %s', |
2143 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2143 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2144 | 2144 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2145 | 2145 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2146 | 2146 | ); |
@@ -2184,8 +2184,8 @@ discard block |
||
2184 | 2184 | $sql .= ' NOT'; |
2185 | 2185 | } |
2186 | 2186 | |
2187 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2188 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2187 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2188 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2189 | 2189 | |
2190 | 2190 | return $sql; |
2191 | 2191 | } |
@@ -2200,7 +2200,7 @@ discard block |
||
2200 | 2200 | ? $this->walkResultVariable($stringExpr) |
2201 | 2201 | : $stringExpr->dispatch($this); |
2202 | 2202 | |
2203 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2203 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2204 | 2204 | |
2205 | 2205 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2206 | 2206 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2213,7 +2213,7 @@ discard block |
||
2213 | 2213 | } |
2214 | 2214 | |
2215 | 2215 | if ($likeExpr->escapeChar) { |
2216 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2216 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2217 | 2217 | } |
2218 | 2218 | |
2219 | 2219 | return $sql; |
@@ -2240,7 +2240,7 @@ discard block |
||
2240 | 2240 | ? $leftExpr->dispatch($this) |
2241 | 2241 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2242 | 2242 | |
2243 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2243 | + $sql .= ' '.$compExpr->operator.' '; |
|
2244 | 2244 | |
2245 | 2245 | $sql .= $rightExpr instanceof AST\Node |
2246 | 2246 | ? $rightExpr->dispatch($this) |
@@ -2276,7 +2276,7 @@ discard block |
||
2276 | 2276 | { |
2277 | 2277 | return $arithmeticExpr->isSimpleArithmeticExpression() |
2278 | 2278 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2279 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2279 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2280 | 2280 | } |
2281 | 2281 | |
2282 | 2282 | /** |
@@ -2284,7 +2284,7 @@ discard block |
||
2284 | 2284 | */ |
2285 | 2285 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2286 | 2286 | { |
2287 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2287 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2288 | 2288 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2289 | 2289 | } |
2290 | 2290 | |
@@ -2304,7 +2304,7 @@ discard block |
||
2304 | 2304 | |
2305 | 2305 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2306 | 2306 | // if only one ArithmeticFactor is defined |
2307 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2307 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2308 | 2308 | return $this->walkArithmeticFactor($term); |
2309 | 2309 | } |
2310 | 2310 | |
@@ -2324,13 +2324,13 @@ discard block |
||
2324 | 2324 | |
2325 | 2325 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2326 | 2326 | // if only one ArithmeticPrimary is defined |
2327 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2327 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2328 | 2328 | return $this->walkArithmeticPrimary($factor); |
2329 | 2329 | } |
2330 | 2330 | |
2331 | 2331 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2332 | 2332 | |
2333 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2333 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2334 | 2334 | } |
2335 | 2335 | |
2336 | 2336 | /** |
@@ -2343,7 +2343,7 @@ discard block |
||
2343 | 2343 | public function walkArithmeticPrimary($primary) |
2344 | 2344 | { |
2345 | 2345 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2346 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2346 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2347 | 2347 | } |
2348 | 2348 | |
2349 | 2349 | if ($primary instanceof AST\Node) { |
@@ -2401,7 +2401,7 @@ discard block |
||
2401 | 2401 | $entityClassName = $entityClass->getClassName(); |
2402 | 2402 | |
2403 | 2403 | if ($entityClassName !== $rootClass->getClassName()) { |
2404 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2404 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2405 | 2405 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2406 | 2406 | } |
2407 | 2407 | } |
@@ -2413,6 +2413,6 @@ discard block |
||
2413 | 2413 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2414 | 2414 | } |
2415 | 2415 | |
2416 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2416 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2417 | 2417 | } |
2418 | 2418 | } |