@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $classMetadata = $this->em->getClassMetadata($class); |
124 | 124 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
125 | 125 | |
126 | - if (! $this->isInheritanceSupported($classMetadata)) { |
|
126 | + if ( ! $this->isInheritanceSupported($classMetadata)) { |
|
127 | 127 | throw new \InvalidArgumentException( |
128 | 128 | 'ResultSetMapping builder does not currently support your inheritance scheme.' |
129 | 129 | ); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | ); |
164 | 164 | } |
165 | 165 | |
166 | - if (! $joinColumn->getType()) { |
|
166 | + if ( ! $joinColumn->getType()) { |
|
167 | 167 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
168 | 168 | } |
169 | 169 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | { |
203 | 203 | switch ($mode) { |
204 | 204 | case self::COLUMN_RENAMING_INCREMENT: |
205 | - return $columnName . $this->sqlCounter++; |
|
205 | + return $columnName.$this->sqlCounter++; |
|
206 | 206 | |
207 | 207 | case self::COLUMN_RENAMING_CUSTOM: |
208 | 208 | return $customRenameColumns[$columnName] ?? $columnName; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $sql .= ', '; |
234 | 234 | } |
235 | 235 | |
236 | - $sql .= $tableAlias . '.'; |
|
236 | + $sql .= $tableAlias.'.'; |
|
237 | 237 | |
238 | 238 | if (isset($this->fieldMappings[$columnName])) { |
239 | 239 | $class = $this->em->getClassMetadata($this->declaringClasses[$columnName]); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $sql .= $this->discriminatorColumns[$dqlAlias]; |
246 | 246 | } |
247 | 247 | |
248 | - $sql .= ' AS ' . $columnName; |
|
248 | + $sql .= ' AS '.$columnName; |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | return $sql; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $found = false; |
223 | 223 | |
224 | 224 | foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) { |
225 | - if (! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
225 | + if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) { |
|
226 | 226 | continue; |
227 | 227 | } |
228 | 228 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | // field name => class name of declaring class |
332 | 332 | $this->declaringClasses[$columnName] = $declaringClass ?: $this->aliasMap[$alias]; |
333 | 333 | |
334 | - if (! $this->isMixed && $this->scalarMappings) { |
|
334 | + if ( ! $this->isMixed && $this->scalarMappings) { |
|
335 | 335 | $this->isMixed = true; |
336 | 336 | } |
337 | 337 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $this->scalarMappings[$columnName] = $alias; |
377 | 377 | $this->typeMappings[$columnName] = $type; |
378 | 378 | |
379 | - if (! $this->isMixed && $this->fieldMappings) { |
|
379 | + if ( ! $this->isMixed && $this->fieldMappings) { |
|
380 | 380 | $this->isMixed = true; |
381 | 381 | } |
382 | 382 |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | } |
396 | 396 | |
397 | 397 | foreach ($this->queryComponents as $dqlAlias => $qComp) { |
398 | - if (! isset($this->identVariableExpressions[$dqlAlias])) { |
|
398 | + if ( ! isset($this->identVariableExpressions[$dqlAlias])) { |
|
399 | 399 | continue; |
400 | 400 | } |
401 | 401 | |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | $tokenStr = substr($dql, (int) $token['position'], $length); |
460 | 460 | |
461 | 461 | // Building informative message |
462 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
462 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
463 | 463 | |
464 | 464 | throw QueryException::semanticalError( |
465 | 465 | $message, |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | $identVariable = $deferredItem['expression']; |
563 | 563 | |
564 | 564 | // Check if IdentificationVariable exists in queryComponents |
565 | - if (! isset($this->queryComponents[$identVariable])) { |
|
565 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
566 | 566 | $this->semanticalError( |
567 | 567 | sprintf("'%s' is not defined.", $identVariable), |
568 | 568 | $deferredItem['token'] |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | $qComp = $this->queryComponents[$identVariable]; |
573 | 573 | |
574 | 574 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
575 | - if (! isset($qComp['metadata'])) { |
|
575 | + if ( ! isset($qComp['metadata'])) { |
|
576 | 576 | $this->semanticalError( |
577 | 577 | sprintf("'%s' does not point to a Class.", $identVariable), |
578 | 578 | $deferredItem['token'] |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | // If the namespace is not given then assumes the first FROM entity namespace |
607 | 607 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
608 | 608 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
609 | - $fqcn = $namespace . '\\' . $className; |
|
609 | + $fqcn = $namespace.'\\'.$className; |
|
610 | 610 | |
611 | 611 | if (class_exists($fqcn)) { |
612 | 612 | $expression->className = $fqcn; |
@@ -614,13 +614,13 @@ discard block |
||
614 | 614 | } |
615 | 615 | } |
616 | 616 | |
617 | - if (! class_exists($className)) { |
|
617 | + if ( ! class_exists($className)) { |
|
618 | 618 | $this->semanticalError(sprintf('Class "%s" is not defined.', $className), $token); |
619 | 619 | } |
620 | 620 | |
621 | 621 | $class = new \ReflectionClass($className); |
622 | 622 | |
623 | - if (! $class->isInstantiable()) { |
|
623 | + if ( ! $class->isInstantiable()) { |
|
624 | 624 | $this->semanticalError(sprintf('Class "%s" can not be instantiated.', $className), $token); |
625 | 625 | } |
626 | 626 | |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | $resultVariable = $deferredItem['expression']; |
678 | 678 | |
679 | 679 | // Check if ResultVariable exists in queryComponents |
680 | - if (! isset($this->queryComponents[$resultVariable])) { |
|
680 | + if ( ! isset($this->queryComponents[$resultVariable])) { |
|
681 | 681 | $this->semanticalError( |
682 | 682 | sprintf("'%s' is not defined.", $resultVariable), |
683 | 683 | $deferredItem['token'] |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | $qComp = $this->queryComponents[$resultVariable]; |
688 | 688 | |
689 | 689 | // Check if queryComponent points to an AbstractSchemaName or a ResultVariable |
690 | - if (! isset($qComp['resultVariable'])) { |
|
690 | + if ( ! isset($qComp['resultVariable'])) { |
|
691 | 691 | $this->semanticalError( |
692 | 692 | sprintf("'%s' does not point to a ResultVariable.", $resultVariable), |
693 | 693 | $deferredItem['token'] |
@@ -729,9 +729,9 @@ discard block |
||
729 | 729 | $property = $class->getProperty($field); |
730 | 730 | |
731 | 731 | // Check if field or association exists |
732 | - if (! $property) { |
|
732 | + if ( ! $property) { |
|
733 | 733 | $this->semanticalError( |
734 | - 'Class ' . $class->getClassName() . ' has no field or association named ' . $field, |
|
734 | + 'Class '.$class->getClassName().' has no field or association named '.$field, |
|
735 | 735 | $deferredItem['token'] |
736 | 736 | ); |
737 | 737 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | // Validate if PathExpression is one of the expected types |
749 | 749 | $expectedType = $pathExpression->expectedType; |
750 | 750 | |
751 | - if (! ($expectedType & $fieldType)) { |
|
751 | + if ( ! ($expectedType & $fieldType)) { |
|
752 | 752 | // We need to recognize which was expected type(s) |
753 | 753 | $expectedStringTypes = []; |
754 | 754 | |
@@ -770,8 +770,8 @@ discard block |
||
770 | 770 | // Build the error message |
771 | 771 | $semanticalError = 'Invalid PathExpression. '; |
772 | 772 | $semanticalError .= count($expectedStringTypes) === 1 |
773 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
774 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
773 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
774 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
775 | 775 | |
776 | 776 | $this->semanticalError($semanticalError, $deferredItem['token']); |
777 | 777 | } |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | |
784 | 784 | private function processRootEntityAliasSelected() |
785 | 785 | { |
786 | - if (! $this->identVariableExpressions) { |
|
786 | + if ( ! $this->identVariableExpressions) { |
|
787 | 787 | return; |
788 | 788 | } |
789 | 789 | |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | |
941 | 941 | [$namespaceAlias, $simpleClassName] = explode(':', $this->lexer->token['value']); |
942 | 942 | |
943 | - return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
943 | + return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
944 | 944 | } |
945 | 945 | |
946 | 946 | /** |
@@ -1019,9 +1019,9 @@ discard block |
||
1019 | 1019 | { |
1020 | 1020 | $identVariable = $this->IdentificationVariable(); |
1021 | 1021 | |
1022 | - if (! isset($this->queryComponents[$identVariable])) { |
|
1022 | + if ( ! isset($this->queryComponents[$identVariable])) { |
|
1023 | 1023 | $this->semanticalError( |
1024 | - 'Identification Variable ' . $identVariable . ' used in join path expression but was not defined before.' |
|
1024 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1025 | 1025 | ); |
1026 | 1026 | } |
1027 | 1027 | |
@@ -1035,8 +1035,8 @@ discard block |
||
1035 | 1035 | $class = $qComp['metadata']; |
1036 | 1036 | $property = $class->getProperty($field); |
1037 | 1037 | |
1038 | - if (! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1039 | - $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field); |
|
1038 | + if ( ! ($property !== null && $property instanceof AssociationMetadata)) { |
|
1039 | + $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field); |
|
1040 | 1040 | } |
1041 | 1041 | |
1042 | 1042 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -1066,7 +1066,7 @@ discard block |
||
1066 | 1066 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1067 | 1067 | $this->match(Lexer::T_DOT); |
1068 | 1068 | $this->match(Lexer::T_IDENTIFIER); |
1069 | - $field .= '.' . $this->lexer->token['value']; |
|
1069 | + $field .= '.'.$this->lexer->token['value']; |
|
1070 | 1070 | } |
1071 | 1071 | } |
1072 | 1072 | |
@@ -1450,7 +1450,7 @@ discard block |
||
1450 | 1450 | // Still need to decide between IdentificationVariable or ResultVariable |
1451 | 1451 | $lookaheadValue = $this->lexer->lookahead['value']; |
1452 | 1452 | |
1453 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
1453 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
1454 | 1454 | $this->semanticalError('Cannot group by undefined identification or result variable.'); |
1455 | 1455 | } |
1456 | 1456 | |
@@ -1798,7 +1798,7 @@ discard block |
||
1798 | 1798 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1799 | 1799 | $this->match(Lexer::T_DOT); |
1800 | 1800 | $this->match(Lexer::T_IDENTIFIER); |
1801 | - $field .= '.' . $this->lexer->token['value']; |
|
1801 | + $field .= '.'.$this->lexer->token['value']; |
|
1802 | 1802 | } |
1803 | 1803 | |
1804 | 1804 | $partialFieldSet[] = $field; |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | while ($this->lexer->isNextToken(Lexer::T_DOT)) { |
1813 | 1813 | $this->match(Lexer::T_DOT); |
1814 | 1814 | $this->match(Lexer::T_IDENTIFIER); |
1815 | - $field .= '.' . $this->lexer->token['value']; |
|
1815 | + $field .= '.'.$this->lexer->token['value']; |
|
1816 | 1816 | } |
1817 | 1817 | |
1818 | 1818 | $partialFieldSet[] = $field; |
@@ -2433,7 +2433,7 @@ discard block |
||
2433 | 2433 | |
2434 | 2434 | // Phase 1 AST optimization: Prevent AST\ConditionalFactor |
2435 | 2435 | // if only one AST\ConditionalPrimary is defined |
2436 | - if (! $not) { |
|
2436 | + if ( ! $not) { |
|
2437 | 2437 | return $conditionalPrimary; |
2438 | 2438 | } |
2439 | 2439 | |
@@ -2452,7 +2452,7 @@ discard block |
||
2452 | 2452 | { |
2453 | 2453 | $condPrimary = new AST\ConditionalPrimary(); |
2454 | 2454 | |
2455 | - if (! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2455 | + if ( ! $this->lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS)) { |
|
2456 | 2456 | $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); |
2457 | 2457 | |
2458 | 2458 | return $condPrimary; |
@@ -2620,7 +2620,7 @@ discard block |
||
2620 | 2620 | $this->match(Lexer::T_OF); |
2621 | 2621 | } |
2622 | 2622 | |
2623 | - $collMemberExpr = new AST\CollectionMemberExpression( |
|
2623 | + $collMemberExpr = new AST\CollectionMemberExpression( |
|
2624 | 2624 | $entityExpr, |
2625 | 2625 | $this->CollectionValuedPathExpression() |
2626 | 2626 | ); |
@@ -2955,7 +2955,7 @@ discard block |
||
2955 | 2955 | $lookaheadType = $this->lexer->lookahead['type']; |
2956 | 2956 | $isDistinct = false; |
2957 | 2957 | |
2958 | - if (! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2958 | + if ( ! in_array($lookaheadType, [Lexer::T_COUNT, Lexer::T_AVG, Lexer::T_MAX, Lexer::T_MIN, Lexer::T_SUM], true)) { |
|
2959 | 2959 | $this->syntaxError('One of: MAX, MIN, AVG, SUM, COUNT'); |
2960 | 2960 | } |
2961 | 2961 | |
@@ -2985,7 +2985,7 @@ discard block |
||
2985 | 2985 | $lookaheadType = $this->lexer->lookahead['type']; |
2986 | 2986 | $value = $this->lexer->lookahead['value']; |
2987 | 2987 | |
2988 | - if (! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2988 | + if ( ! in_array($lookaheadType, [Lexer::T_ALL, Lexer::T_ANY, Lexer::T_SOME], true)) { |
|
2989 | 2989 | $this->syntaxError('ALL, ANY or SOME'); |
2990 | 2990 | } |
2991 | 2991 | |
@@ -3223,7 +3223,7 @@ discard block |
||
3223 | 3223 | $lookaheadValue = $this->lexer->lookahead['value']; |
3224 | 3224 | |
3225 | 3225 | // Validate existing component |
3226 | - if (! isset($this->queryComponents[$lookaheadValue])) { |
|
3226 | + if ( ! isset($this->queryComponents[$lookaheadValue])) { |
|
3227 | 3227 | $this->semanticalError('Cannot add having condition on undefined result variable.'); |
3228 | 3228 | } |
3229 | 3229 | |
@@ -3234,7 +3234,7 @@ discard block |
||
3234 | 3234 | } |
3235 | 3235 | |
3236 | 3236 | // Validating ResultVariable |
3237 | - if (! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3237 | + if ( ! isset($this->queryComponents[$lookaheadValue]['resultVariable'])) { |
|
3238 | 3238 | $this->semanticalError('Cannot add having condition on a non result variable.'); |
3239 | 3239 | } |
3240 | 3240 |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function startProduction($name) |
47 | 47 | { |
48 | - $this->println('(' . $name); |
|
48 | + $this->println('('.$name); |
|
49 | 49 | $this->indent++; |
50 | 50 | } |
51 | 51 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function println($str) |
69 | 69 | { |
70 | - if (! $this->silent) { |
|
70 | + if ( ! $this->silent) { |
|
71 | 71 | echo str_repeat(' ', $this->indent), $str, "\n"; |
72 | 72 | } |
73 | 73 | } |
@@ -274,10 +274,10 @@ discard block |
||
274 | 274 | */ |
275 | 275 | public function getSQLTableAlias($tableName, $dqlAlias = '') |
276 | 276 | { |
277 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
277 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
278 | 278 | |
279 | - if (! isset($this->tableAliasMap[$tableName])) { |
|
280 | - $this->tableAliasMap[$tableName] = 't' . $this->tableAliasCounter++; |
|
279 | + if ( ! isset($this->tableAliasMap[$tableName])) { |
|
280 | + $this->tableAliasMap[$tableName] = 't'.$this->tableAliasCounter++; |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | return $this->tableAliasMap[$tableName]; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function setSQLTableAlias($tableName, $alias, $dqlAlias = '') |
297 | 297 | { |
298 | - $tableName .= ($dqlAlias) ? '@[' . $dqlAlias . ']' : ''; |
|
298 | + $tableName .= ($dqlAlias) ? '@['.$dqlAlias.']' : ''; |
|
299 | 299 | |
300 | 300 | $this->tableAliasMap[$tableName] = $alias; |
301 | 301 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function getSQLColumnAlias() |
311 | 311 | { |
312 | - return $this->platform->getSQLResultCasing('c' . $this->aliasCounter++); |
|
312 | + return $this->platform->getSQLResultCasing('c'.$this->aliasCounter++); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** |
@@ -336,14 +336,14 @@ discard block |
||
336 | 336 | |
337 | 337 | // If this is a joined association we must use left joins to preserve the correct result. |
338 | 338 | $sql .= isset($this->queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; |
339 | - $sql .= 'JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
339 | + $sql .= 'JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
340 | 340 | |
341 | 341 | $sqlParts = []; |
342 | 342 | |
343 | 343 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
344 | 344 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
345 | 345 | |
346 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
346 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | $filterSql = $this->generateFilterConditionSQL($parentClass, $tableAlias); |
@@ -367,14 +367,14 @@ discard block |
||
367 | 367 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
368 | 368 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName(), $dqlAlias); |
369 | 369 | |
370 | - $sql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
370 | + $sql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
371 | 371 | |
372 | 372 | $sqlParts = []; |
373 | 373 | |
374 | 374 | foreach ($subClass->getIdentifierColumns($this->em) as $column) { |
375 | 375 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
376 | 376 | |
377 | - $sqlParts[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
377 | + $sqlParts[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
378 | 378 | } |
379 | 379 | |
380 | 380 | $sql .= implode(' AND ', $sqlParts); |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | $qComp = $this->queryComponents[$dqlAlias]; |
396 | 396 | $association = $qComp['relation']; |
397 | 397 | |
398 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
398 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
399 | 399 | continue; |
400 | 400 | } |
401 | 401 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $property = $qComp['metadata']->getProperty($fieldName); |
404 | 404 | $tableName = $property->getTableName(); |
405 | 405 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
406 | - $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias) . '.' . $columnName; |
|
406 | + $orderedColumn = $this->getSQLTableAlias($tableName, $dqlAlias).'.'.$columnName; |
|
407 | 407 | |
408 | 408 | // OrderByClause should replace an ordered relation. see - DDC-2475 |
409 | 409 | if (isset($this->orderedColumnsMap[$orderedColumn])) { |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | } |
412 | 412 | |
413 | 413 | $this->orderedColumnsMap[$orderedColumn] = $orientation; |
414 | - $orderedColumns[] = $orderedColumn . ' ' . $orientation; |
|
414 | + $orderedColumns[] = $orderedColumn.' '.$orientation; |
|
415 | 415 | } |
416 | 416 | } |
417 | 417 | |
@@ -451,19 +451,19 @@ discard block |
||
451 | 451 | $discrColumnType = $discrColumn->getType(); |
452 | 452 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
453 | 453 | $sqlTableAlias = ($this->useSqlTableAliases) |
454 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
454 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
455 | 455 | : ''; |
456 | 456 | |
457 | 457 | $sqlParts[] = sprintf( |
458 | 458 | '%s IN (%s)', |
459 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
459 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
460 | 460 | implode(', ', $values) |
461 | 461 | ); |
462 | 462 | } |
463 | 463 | |
464 | 464 | $sql = implode(' AND ', $sqlParts); |
465 | 465 | |
466 | - return isset($sqlParts[1]) ? '(' . $sql . ')' : $sql; |
|
466 | + return isset($sqlParts[1]) ? '('.$sql.')' : $sql; |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | */ |
477 | 477 | private function generateFilterConditionSQL(ClassMetadata $targetEntity, $targetTableAlias) |
478 | 478 | { |
479 | - if (! $this->em->hasFilters()) { |
|
479 | + if ( ! $this->em->hasFilters()) { |
|
480 | 480 | return ''; |
481 | 481 | } |
482 | 482 | |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
510 | 510 | |
511 | 511 | if ($filterExpr !== '') { |
512 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
512 | + $filterClauses[] = '('.$filterExpr.')'; |
|
513 | 513 | } |
514 | 514 | } |
515 | 515 | |
@@ -540,11 +540,11 @@ discard block |
||
540 | 540 | $sql .= $this->walkOrderByClause($AST->orderByClause); |
541 | 541 | } |
542 | 542 | |
543 | - if (! $AST->orderByClause) { |
|
543 | + if ( ! $AST->orderByClause) { |
|
544 | 544 | $orderBySql = $this->generateOrderedCollectionOrderByItems(); |
545 | 545 | |
546 | 546 | if ($orderBySql) { |
547 | - $sql .= ' ORDER BY ' . $orderBySql; |
|
547 | + $sql .= ' ORDER BY '.$orderBySql; |
|
548 | 548 | } |
549 | 549 | } |
550 | 550 | |
@@ -557,11 +557,11 @@ discard block |
||
557 | 557 | } |
558 | 558 | |
559 | 559 | if ($lockMode === LockMode::PESSIMISTIC_READ) { |
560 | - return $sql . ' ' . $this->platform->getReadLockSQL(); |
|
560 | + return $sql.' '.$this->platform->getReadLockSQL(); |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | if ($lockMode === LockMode::PESSIMISTIC_WRITE) { |
564 | - return $sql . ' ' . $this->platform->getWriteLockSQL(); |
|
564 | + return $sql.' '.$this->platform->getWriteLockSQL(); |
|
565 | 565 | } |
566 | 566 | |
567 | 567 | if ($lockMode !== LockMode::OPTIMISTIC) { |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | } |
570 | 570 | |
571 | 571 | foreach ($this->selectedClasses as $selectedClass) { |
572 | - if (! $selectedClass['class']->isVersioned()) { |
|
572 | + if ( ! $selectedClass['class']->isVersioned()) { |
|
573 | 573 | throw OptimisticLockException::lockFailed($selectedClass['class']->getClassName()); |
574 | 574 | } |
575 | 575 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | foreach ($class->getIdentifierColumns($this->em) as $column) { |
619 | 619 | $quotedColumnName = $this->platform->quoteIdentifier($column->getColumnName()); |
620 | 620 | |
621 | - $sqlParts[] = $tableAlias . '.' . $quotedColumnName; |
|
621 | + $sqlParts[] = $tableAlias.'.'.$quotedColumnName; |
|
622 | 622 | } |
623 | 623 | |
624 | 624 | return implode(', ', $sqlParts); |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | { |
637 | 637 | $class = $this->queryComponents[$identificationVariable]['metadata']; |
638 | 638 | |
639 | - if (! $fieldName) { |
|
639 | + if ( ! $fieldName) { |
|
640 | 640 | return $this->getSQLTableAlias($class->getTableName(), $identificationVariable); |
641 | 641 | } |
642 | 642 | |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | $property = $class->getProperty($fieldName); |
666 | 666 | |
667 | 667 | if ($this->useSqlTableAliases) { |
668 | - $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName) . '.'; |
|
668 | + $sql .= $this->walkIdentificationVariable($dqlAlias, $fieldName).'.'; |
|
669 | 669 | } |
670 | 670 | |
671 | 671 | $sql .= $this->platform->quoteIdentifier($property->getColumnName()); |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | $class = $this->queryComponents[$dqlAlias]['metadata']; |
680 | 680 | $association = $class->getProperty($fieldName); |
681 | 681 | |
682 | - if (! $association->isOwningSide()) { |
|
682 | + if ( ! $association->isOwningSide()) { |
|
683 | 683 | throw QueryException::associationPathInverseSideNotSupported($pathExpr); |
684 | 684 | } |
685 | 685 | |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | $joinColumn = reset($joinColumns); |
694 | 694 | |
695 | 695 | if ($this->useSqlTableAliases) { |
696 | - $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias) . '.'; |
|
696 | + $sql .= $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias).'.'; |
|
697 | 697 | } |
698 | 698 | |
699 | 699 | $sql .= $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | */ |
712 | 712 | public function walkSelectClause($selectClause) |
713 | 713 | { |
714 | - $sql = 'SELECT ' . (($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
714 | + $sql = 'SELECT '.(($selectClause->isDistinct) ? 'DISTINCT ' : ''); |
|
715 | 715 | $sqlSelectExpressions = array_filter(array_map([$this, 'walkSelectExpression'], $selectClause->selectExpressions)); |
716 | 716 | |
717 | 717 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && $selectClause->isDistinct) { |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | |
755 | 755 | $sqlSelectExpressions[] = sprintf( |
756 | 756 | '%s AS %s', |
757 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . '.' . $quotedColumnName, $this->platform), |
|
757 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.'.'.$quotedColumnName, $this->platform), |
|
758 | 758 | $sqlColumnAlias |
759 | 759 | ); |
760 | 760 | |
@@ -764,7 +764,7 @@ discard block |
||
764 | 764 | |
765 | 765 | // Add foreign key columns of class and also parent classes |
766 | 766 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
767 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
767 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide()) |
|
768 | 768 | || ( ! $addMetaColumns && ! $association->isPrimaryKey())) { |
769 | 769 | continue; |
770 | 770 | } |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | $columnAlias = $this->getSQLColumnAlias(); |
780 | 780 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
781 | 781 | |
782 | - if (! $joinColumn->getType()) { |
|
782 | + if ( ! $joinColumn->getType()) { |
|
783 | 783 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
784 | 784 | } |
785 | 785 | |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | } |
796 | 796 | |
797 | 797 | // Add foreign key columns to SQL, if necessary |
798 | - if (! $addMetaColumns) { |
|
798 | + if ( ! $addMetaColumns) { |
|
799 | 799 | continue; |
800 | 800 | } |
801 | 801 | |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | continue; |
810 | 810 | } |
811 | 811 | |
812 | - if (! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
812 | + if ( ! ($association instanceof ToOneAssociationMetadata && $association->isOwningSide())) { |
|
813 | 813 | continue; |
814 | 814 | } |
815 | 815 | |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | $columnAlias = $this->getSQLColumnAlias(); |
824 | 824 | $sqlTableAlias = $this->getSQLTableAlias($joinColumn->getTableName(), $dqlAlias); |
825 | 825 | |
826 | - if (! $joinColumn->getType()) { |
|
826 | + if ( ! $joinColumn->getType()) { |
|
827 | 827 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
828 | 828 | } |
829 | 829 | |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($identificationVariableDecl); |
858 | 858 | } |
859 | 859 | |
860 | - return ' FROM ' . implode(', ', $sqlParts); |
|
860 | + return ' FROM '.implode(', ', $sqlParts); |
|
861 | 861 | } |
862 | 862 | |
863 | 863 | /** |
@@ -932,7 +932,7 @@ discard block |
||
932 | 932 | $tableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
933 | 933 | |
934 | 934 | $sql = $this->platform->appendLockHint( |
935 | - $tableName . ' ' . $tableAlias, |
|
935 | + $tableName.' '.$tableAlias, |
|
936 | 936 | $this->query->getHint(Query::HINT_LOCK_MODE) |
937 | 937 | ); |
938 | 938 | |
@@ -942,11 +942,11 @@ discard block |
||
942 | 942 | |
943 | 943 | $classTableInheritanceJoins = $this->generateClassTableInheritanceJoins($class, $dqlAlias); |
944 | 944 | |
945 | - if (! $buildNestedJoins) { |
|
946 | - return $sql . $classTableInheritanceJoins; |
|
945 | + if ( ! $buildNestedJoins) { |
|
946 | + return $sql.$classTableInheritanceJoins; |
|
947 | 947 | } |
948 | 948 | |
949 | - return $classTableInheritanceJoins === '' ? $sql : '(' . $sql . $classTableInheritanceJoins . ')'; |
|
949 | + return $classTableInheritanceJoins === '' ? $sql : '('.$sql.$classTableInheritanceJoins.')'; |
|
950 | 950 | } |
951 | 951 | |
952 | 952 | /** |
@@ -983,7 +983,7 @@ discard block |
||
983 | 983 | ; |
984 | 984 | |
985 | 985 | if ($this->query->getHint(Query::HINT_INTERNAL_ITERATION) === true && |
986 | - (! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
986 | + ( ! $this->query->getHint(self::HINT_DISTINCT) || isset($this->selectedClasses[$joinedDqlAlias]))) { |
|
987 | 987 | if ($association instanceof ToManyAssociationMetadata) { |
988 | 988 | throw QueryException::iterateWithFetchJoinNotAllowed($owningAssociation); |
989 | 989 | } |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | $targetTableJoin = [ |
1040 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1040 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1041 | 1041 | 'condition' => implode(' AND ', $conditions), |
1042 | 1042 | ]; |
1043 | 1043 | } elseif ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
@@ -1065,7 +1065,7 @@ discard block |
||
1065 | 1065 | ); |
1066 | 1066 | } |
1067 | 1067 | |
1068 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' ON ' . implode(' AND ', $conditions); |
|
1068 | + $sql .= $joinTableName.' '.$joinTableAlias.' ON '.implode(' AND ', $conditions); |
|
1069 | 1069 | |
1070 | 1070 | // Join target table |
1071 | 1071 | $sql .= ($joinType === AST\Join::JOIN_TYPE_LEFT || $joinType === AST\Join::JOIN_TYPE_LEFTOUTER) ? ' LEFT JOIN ' : ' INNER JOIN '; |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | } |
1105 | 1105 | |
1106 | 1106 | $targetTableJoin = [ |
1107 | - 'table' => $targetTableName . ' ' . $targetTableAlias, |
|
1107 | + 'table' => $targetTableName.' '.$targetTableAlias, |
|
1108 | 1108 | 'condition' => implode(' AND ', $conditions), |
1109 | 1109 | ]; |
1110 | 1110 | } else { |
@@ -1112,23 +1112,23 @@ discard block |
||
1112 | 1112 | } |
1113 | 1113 | |
1114 | 1114 | // Handle WITH clause |
1115 | - $withCondition = ($condExpr === null) ? '' : ('(' . $this->walkConditionalExpression($condExpr) . ')'); |
|
1115 | + $withCondition = ($condExpr === null) ? '' : ('('.$this->walkConditionalExpression($condExpr).')'); |
|
1116 | 1116 | |
1117 | 1117 | if ($targetClass->inheritanceType === InheritanceType::JOINED) { |
1118 | 1118 | $ctiJoins = $this->generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); |
1119 | 1119 | |
1120 | 1120 | // If we have WITH condition, we need to build nested joins for target class table and cti joins |
1121 | 1121 | if ($withCondition) { |
1122 | - $sql .= '(' . $targetTableJoin['table'] . $ctiJoins . ') ON ' . $targetTableJoin['condition']; |
|
1122 | + $sql .= '('.$targetTableJoin['table'].$ctiJoins.') ON '.$targetTableJoin['condition']; |
|
1123 | 1123 | } else { |
1124 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition'] . $ctiJoins; |
|
1124 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition'].$ctiJoins; |
|
1125 | 1125 | } |
1126 | 1126 | } else { |
1127 | - $sql .= $targetTableJoin['table'] . ' ON ' . $targetTableJoin['condition']; |
|
1127 | + $sql .= $targetTableJoin['table'].' ON '.$targetTableJoin['condition']; |
|
1128 | 1128 | } |
1129 | 1129 | |
1130 | 1130 | if ($withCondition) { |
1131 | - $sql .= ' AND ' . $withCondition; |
|
1131 | + $sql .= ' AND '.$withCondition; |
|
1132 | 1132 | } |
1133 | 1133 | |
1134 | 1134 | // Apply the indexes |
@@ -1162,7 +1162,7 @@ discard block |
||
1162 | 1162 | $orderByItems = array_merge($orderByItems, (array) $collectionOrderByItems); |
1163 | 1163 | } |
1164 | 1164 | |
1165 | - return ' ORDER BY ' . implode(', ', $orderByItems); |
|
1165 | + return ' ORDER BY '.implode(', ', $orderByItems); |
|
1166 | 1166 | } |
1167 | 1167 | |
1168 | 1168 | /** |
@@ -1179,10 +1179,10 @@ discard block |
||
1179 | 1179 | $this->orderedColumnsMap[$sql] = $type; |
1180 | 1180 | |
1181 | 1181 | if ($expr instanceof AST\Subselect) { |
1182 | - return '(' . $sql . ') ' . $type; |
|
1182 | + return '('.$sql.') '.$type; |
|
1183 | 1183 | } |
1184 | 1184 | |
1185 | - return $sql . ' ' . $type; |
|
1185 | + return $sql.' '.$type; |
|
1186 | 1186 | } |
1187 | 1187 | |
1188 | 1188 | /** |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | */ |
1191 | 1191 | public function walkHavingClause($havingClause) |
1192 | 1192 | { |
1193 | - return ' HAVING ' . $this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1193 | + return ' HAVING '.$this->walkConditionalExpression($havingClause->conditionalExpression); |
|
1194 | 1194 | } |
1195 | 1195 | |
1196 | 1196 | /** |
@@ -1213,7 +1213,7 @@ discard block |
||
1213 | 1213 | $conditions = []; |
1214 | 1214 | |
1215 | 1215 | if ($join->conditionalExpression) { |
1216 | - $conditions[] = '(' . $this->walkConditionalExpression($join->conditionalExpression) . ')'; |
|
1216 | + $conditions[] = '('.$this->walkConditionalExpression($join->conditionalExpression).')'; |
|
1217 | 1217 | } |
1218 | 1218 | |
1219 | 1219 | $isUnconditionalJoin = empty($conditions); |
@@ -1238,7 +1238,7 @@ discard block |
||
1238 | 1238 | } |
1239 | 1239 | |
1240 | 1240 | if ($conditions) { |
1241 | - $sql .= $condExprConjunction . implode(' AND ', $conditions); |
|
1241 | + $sql .= $condExprConjunction.implode(' AND ', $conditions); |
|
1242 | 1242 | } |
1243 | 1243 | |
1244 | 1244 | break; |
@@ -1268,7 +1268,7 @@ discard block |
||
1268 | 1268 | $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression); |
1269 | 1269 | } |
1270 | 1270 | |
1271 | - $sql .= implode(', ', $scalarExpressions) . ')'; |
|
1271 | + $sql .= implode(', ', $scalarExpressions).')'; |
|
1272 | 1272 | |
1273 | 1273 | return $sql; |
1274 | 1274 | } |
@@ -1290,7 +1290,7 @@ discard block |
||
1290 | 1290 | ? $this->conn->quote($nullIfExpression->secondExpression) |
1291 | 1291 | : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression); |
1292 | 1292 | |
1293 | - return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')'; |
|
1293 | + return 'NULLIF('.$firstExpression.', '.$secondExpression.')'; |
|
1294 | 1294 | } |
1295 | 1295 | |
1296 | 1296 | /** |
@@ -1303,11 +1303,11 @@ discard block |
||
1303 | 1303 | $sql = 'CASE'; |
1304 | 1304 | |
1305 | 1305 | foreach ($generalCaseExpression->whenClauses as $whenClause) { |
1306 | - $sql .= ' WHEN ' . $this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1307 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1306 | + $sql .= ' WHEN '.$this->walkConditionalExpression($whenClause->caseConditionExpression); |
|
1307 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($whenClause->thenScalarExpression); |
|
1308 | 1308 | } |
1309 | 1309 | |
1310 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression) . ' END'; |
|
1310 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($generalCaseExpression->elseScalarExpression).' END'; |
|
1311 | 1311 | |
1312 | 1312 | return $sql; |
1313 | 1313 | } |
@@ -1321,14 +1321,14 @@ discard block |
||
1321 | 1321 | */ |
1322 | 1322 | public function walkSimpleCaseExpression($simpleCaseExpression) |
1323 | 1323 | { |
1324 | - $sql = 'CASE ' . $this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1324 | + $sql = 'CASE '.$this->walkStateFieldPathExpression($simpleCaseExpression->caseOperand); |
|
1325 | 1325 | |
1326 | 1326 | foreach ($simpleCaseExpression->simpleWhenClauses as $simpleWhenClause) { |
1327 | - $sql .= ' WHEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1328 | - $sql .= ' THEN ' . $this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1327 | + $sql .= ' WHEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->caseScalarExpression); |
|
1328 | + $sql .= ' THEN '.$this->walkSimpleArithmeticExpression($simpleWhenClause->thenScalarExpression); |
|
1329 | 1329 | } |
1330 | 1330 | |
1331 | - $sql .= ' ELSE ' . $this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression) . ' END'; |
|
1331 | + $sql .= ' ELSE '.$this->walkSimpleArithmeticExpression($simpleCaseExpression->elseScalarExpression).' END'; |
|
1332 | 1332 | |
1333 | 1333 | return $sql; |
1334 | 1334 | } |
@@ -1369,7 +1369,7 @@ discard block |
||
1369 | 1369 | |
1370 | 1370 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1371 | 1371 | |
1372 | - if (! $hidden) { |
|
1372 | + if ( ! $hidden) { |
|
1373 | 1373 | $this->rsm->addScalarResult($columnAlias, $resultAlias, $property->getType()); |
1374 | 1374 | $this->scalarFields[$dqlAlias][$fieldName] = $columnAlias; |
1375 | 1375 | } |
@@ -1390,11 +1390,11 @@ discard block |
||
1390 | 1390 | $columnAlias = $this->getSQLColumnAlias(); |
1391 | 1391 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1392 | 1392 | |
1393 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1393 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1394 | 1394 | |
1395 | 1395 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1396 | 1396 | |
1397 | - if (! $hidden) { |
|
1397 | + if ( ! $hidden) { |
|
1398 | 1398 | // Conceptually we could resolve field type here by traverse through AST to retrieve field type, |
1399 | 1399 | // but this is not a feasible solution; assume 'string'. |
1400 | 1400 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
@@ -1405,11 +1405,11 @@ discard block |
||
1405 | 1405 | $columnAlias = $this->getSQLColumnAlias(); |
1406 | 1406 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1407 | 1407 | |
1408 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1408 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1409 | 1409 | |
1410 | 1410 | $this->scalarResultAliasMap[$resultAlias] = $columnAlias; |
1411 | 1411 | |
1412 | - if (! $hidden) { |
|
1412 | + if ( ! $hidden) { |
|
1413 | 1413 | // We cannot resolve field type here; assume 'string'. |
1414 | 1414 | $this->rsm->addScalarResult($columnAlias, $resultAlias, Type::getType('string')); |
1415 | 1415 | } |
@@ -1433,7 +1433,7 @@ discard block |
||
1433 | 1433 | $class = $queryComp['metadata']; |
1434 | 1434 | $resultAlias = $selectExpression->fieldIdentificationVariable ?: null; |
1435 | 1435 | |
1436 | - if (! isset($this->selectedClasses[$dqlAlias])) { |
|
1436 | + if ( ! isset($this->selectedClasses[$dqlAlias])) { |
|
1437 | 1437 | $this->selectedClasses[$dqlAlias] = [ |
1438 | 1438 | 'class' => $class, |
1439 | 1439 | 'dqlAlias' => $dqlAlias, |
@@ -1445,7 +1445,7 @@ discard block |
||
1445 | 1445 | |
1446 | 1446 | // Select all fields from the queried class |
1447 | 1447 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1448 | - if (! ($property instanceof FieldMetadata)) { |
|
1448 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1449 | 1449 | continue; |
1450 | 1450 | } |
1451 | 1451 | |
@@ -1480,7 +1480,7 @@ discard block |
||
1480 | 1480 | $subClass = $this->em->getClassMetadata($subClassName); |
1481 | 1481 | |
1482 | 1482 | foreach ($subClass->getDeclaredPropertiesIterator() as $fieldName => $property) { |
1483 | - if (! ($property instanceof FieldMetadata)) { |
|
1483 | + if ( ! ($property instanceof FieldMetadata)) { |
|
1484 | 1484 | continue; |
1485 | 1485 | } |
1486 | 1486 | |
@@ -1519,7 +1519,7 @@ discard block |
||
1519 | 1519 | */ |
1520 | 1520 | public function walkQuantifiedExpression($qExpr) |
1521 | 1521 | { |
1522 | - return ' ' . strtoupper($qExpr->type) . '(' . $this->walkSubselect($qExpr->subselect) . ')'; |
|
1522 | + return ' '.strtoupper($qExpr->type).'('.$this->walkSubselect($qExpr->subselect).')'; |
|
1523 | 1523 | } |
1524 | 1524 | |
1525 | 1525 | /** |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | $sqlParts[] = $this->walkIdentificationVariableDeclaration($subselectIdVarDecl); |
1560 | 1560 | } |
1561 | 1561 | |
1562 | - return ' FROM ' . implode(', ', $sqlParts); |
|
1562 | + return ' FROM '.implode(', ', $sqlParts); |
|
1563 | 1563 | } |
1564 | 1564 | |
1565 | 1565 | /** |
@@ -1567,7 +1567,7 @@ discard block |
||
1567 | 1567 | */ |
1568 | 1568 | public function walkSimpleSelectClause($simpleSelectClause) |
1569 | 1569 | { |
1570 | - return 'SELECT' . ($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1570 | + return 'SELECT'.($simpleSelectClause->isDistinct ? ' DISTINCT' : '') |
|
1571 | 1571 | . $this->walkSimpleSelectExpression($simpleSelectClause->simpleSelectExpression); |
1572 | 1572 | } |
1573 | 1573 | |
@@ -1600,7 +1600,7 @@ discard block |
||
1600 | 1600 | break; |
1601 | 1601 | |
1602 | 1602 | case ($e instanceof AST\Subselect): |
1603 | - $sqlSelectExpressions[] = '(' . $e->dispatch($this) . ') AS ' . $columnAlias; |
|
1603 | + $sqlSelectExpressions[] = '('.$e->dispatch($this).') AS '.$columnAlias; |
|
1604 | 1604 | break; |
1605 | 1605 | |
1606 | 1606 | case ($e instanceof AST\PathExpression): |
@@ -1609,7 +1609,7 @@ discard block |
||
1609 | 1609 | $class = $qComp['metadata']; |
1610 | 1610 | $fieldType = $class->getProperty($e->field)->getType(); |
1611 | 1611 | |
1612 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1612 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1613 | 1613 | break; |
1614 | 1614 | |
1615 | 1615 | case ($e instanceof AST\Literal): |
@@ -1623,11 +1623,11 @@ discard block |
||
1623 | 1623 | break; |
1624 | 1624 | } |
1625 | 1625 | |
1626 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1626 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1627 | 1627 | break; |
1628 | 1628 | |
1629 | 1629 | default: |
1630 | - $sqlSelectExpressions[] = trim((string) $e->dispatch($this)) . ' AS ' . $columnAlias; |
|
1630 | + $sqlSelectExpressions[] = trim((string) $e->dispatch($this)).' AS '.$columnAlias; |
|
1631 | 1631 | break; |
1632 | 1632 | } |
1633 | 1633 | |
@@ -1660,10 +1660,10 @@ discard block |
||
1660 | 1660 | case ($expr instanceof AST\Subselect): |
1661 | 1661 | $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->scalarResultCounter++; |
1662 | 1662 | |
1663 | - $columnAlias = 'sclr' . $this->aliasCounter++; |
|
1663 | + $columnAlias = 'sclr'.$this->aliasCounter++; |
|
1664 | 1664 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1665 | 1665 | |
1666 | - $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias; |
|
1666 | + $sql .= '('.$this->walkSubselect($expr).') AS '.$columnAlias; |
|
1667 | 1667 | break; |
1668 | 1668 | |
1669 | 1669 | case ($expr instanceof AST\Functions\FunctionNode): |
@@ -1680,7 +1680,7 @@ discard block |
||
1680 | 1680 | $columnAlias = $this->getSQLColumnAlias(); |
1681 | 1681 | $this->scalarResultAliasMap[$alias] = $columnAlias; |
1682 | 1682 | |
1683 | - $sql .= $expr->dispatch($this) . ' AS ' . $columnAlias; |
|
1683 | + $sql .= $expr->dispatch($this).' AS '.$columnAlias; |
|
1684 | 1684 | break; |
1685 | 1685 | |
1686 | 1686 | case ($expr instanceof AST\ParenthesisExpression): |
@@ -1700,8 +1700,8 @@ discard block |
||
1700 | 1700 | */ |
1701 | 1701 | public function walkAggregateExpression($aggExpression) |
1702 | 1702 | { |
1703 | - return $aggExpression->functionName . '(' . ($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1704 | - . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression) . ')'; |
|
1703 | + return $aggExpression->functionName.'('.($aggExpression->isDistinct ? 'DISTINCT ' : '') |
|
1704 | + . $this->walkSimpleArithmeticExpression($aggExpression->pathExpression).')'; |
|
1705 | 1705 | } |
1706 | 1706 | |
1707 | 1707 | /** |
@@ -1715,7 +1715,7 @@ discard block |
||
1715 | 1715 | $sqlParts[] = $this->walkGroupByItem($groupByItem); |
1716 | 1716 | } |
1717 | 1717 | |
1718 | - return ' GROUP BY ' . implode(', ', $sqlParts); |
|
1718 | + return ' GROUP BY '.implode(', ', $sqlParts); |
|
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | /** |
@@ -1724,7 +1724,7 @@ discard block |
||
1724 | 1724 | public function walkGroupByItem($groupByItem) |
1725 | 1725 | { |
1726 | 1726 | // StateFieldPathExpression |
1727 | - if (! is_string($groupByItem)) { |
|
1727 | + if ( ! is_string($groupByItem)) { |
|
1728 | 1728 | return $this->walkPathExpression($groupByItem); |
1729 | 1729 | } |
1730 | 1730 | |
@@ -1778,7 +1778,7 @@ discard block |
||
1778 | 1778 | { |
1779 | 1779 | $class = $this->em->getClassMetadata($deleteClause->abstractSchemaName); |
1780 | 1780 | $tableName = $class->getTableName(); |
1781 | - $sql = 'DELETE FROM ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1781 | + $sql = 'DELETE FROM '.$class->table->getQuotedQualifiedName($this->platform); |
|
1782 | 1782 | |
1783 | 1783 | $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable); |
1784 | 1784 | |
@@ -1794,12 +1794,12 @@ discard block |
||
1794 | 1794 | { |
1795 | 1795 | $class = $this->em->getClassMetadata($updateClause->abstractSchemaName); |
1796 | 1796 | $tableName = $class->getTableName(); |
1797 | - $sql = 'UPDATE ' . $class->table->getQuotedQualifiedName($this->platform); |
|
1797 | + $sql = 'UPDATE '.$class->table->getQuotedQualifiedName($this->platform); |
|
1798 | 1798 | |
1799 | 1799 | $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable); |
1800 | 1800 | $this->rootAliases[] = $updateClause->aliasIdentificationVariable; |
1801 | 1801 | |
1802 | - $sql .= ' SET ' . implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1802 | + $sql .= ' SET '.implode(', ', array_map([$this, 'walkUpdateItem'], $updateClause->updateItems)); |
|
1803 | 1803 | |
1804 | 1804 | return $sql; |
1805 | 1805 | } |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | $useTableAliasesBefore = $this->useSqlTableAliases; |
1813 | 1813 | $this->useSqlTableAliases = false; |
1814 | 1814 | |
1815 | - $sql = $this->walkPathExpression($updateItem->pathExpression) . ' = '; |
|
1815 | + $sql = $this->walkPathExpression($updateItem->pathExpression).' = '; |
|
1816 | 1816 | $newValue = $updateItem->newValue; |
1817 | 1817 | |
1818 | 1818 | switch (true) { |
@@ -1856,7 +1856,7 @@ discard block |
||
1856 | 1856 | |
1857 | 1857 | if ($filterClauses) { |
1858 | 1858 | if ($condSql) { |
1859 | - $condSql = '(' . $condSql . ') AND '; |
|
1859 | + $condSql = '('.$condSql.') AND '; |
|
1860 | 1860 | } |
1861 | 1861 | |
1862 | 1862 | $condSql .= implode(' AND ', $filterClauses); |
@@ -1864,11 +1864,11 @@ discard block |
||
1864 | 1864 | } |
1865 | 1865 | |
1866 | 1866 | if ($condSql) { |
1867 | - return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql); |
|
1867 | + return ' WHERE '.(( ! $discrSql) ? $condSql : '('.$condSql.') AND '.$discrSql); |
|
1868 | 1868 | } |
1869 | 1869 | |
1870 | 1870 | if ($discrSql) { |
1871 | - return ' WHERE ' . $discrSql; |
|
1871 | + return ' WHERE '.$discrSql; |
|
1872 | 1872 | } |
1873 | 1873 | |
1874 | 1874 | return ''; |
@@ -1881,7 +1881,7 @@ discard block |
||
1881 | 1881 | { |
1882 | 1882 | // Phase 2 AST optimization: Skip processing of ConditionalExpression |
1883 | 1883 | // if only one ConditionalTerm is defined |
1884 | - if (! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1884 | + if ( ! ($condExpr instanceof AST\ConditionalExpression)) { |
|
1885 | 1885 | return $this->walkConditionalTerm($condExpr); |
1886 | 1886 | } |
1887 | 1887 | |
@@ -1895,7 +1895,7 @@ discard block |
||
1895 | 1895 | { |
1896 | 1896 | // Phase 2 AST optimization: Skip processing of ConditionalTerm |
1897 | 1897 | // if only one ConditionalFactor is defined |
1898 | - if (! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1898 | + if ( ! ($condTerm instanceof AST\ConditionalTerm)) { |
|
1899 | 1899 | return $this->walkConditionalFactor($condTerm); |
1900 | 1900 | } |
1901 | 1901 | |
@@ -1911,7 +1911,7 @@ discard block |
||
1911 | 1911 | // if only one ConditionalPrimary is defined |
1912 | 1912 | return ( ! ($factor instanceof AST\ConditionalFactor)) |
1913 | 1913 | ? $this->walkConditionalPrimary($factor) |
1914 | - : ($factor->not ? 'NOT ' : '') . $this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1914 | + : ($factor->not ? 'NOT ' : '').$this->walkConditionalPrimary($factor->conditionalPrimary); |
|
1915 | 1915 | } |
1916 | 1916 | |
1917 | 1917 | /** |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | if ($primary->isConditionalExpression()) { |
1927 | 1927 | $condExpr = $primary->conditionalExpression; |
1928 | 1928 | |
1929 | - return '(' . $this->walkConditionalExpression($condExpr) . ')'; |
|
1929 | + return '('.$this->walkConditionalExpression($condExpr).')'; |
|
1930 | 1930 | } |
1931 | 1931 | } |
1932 | 1932 | |
@@ -1937,7 +1937,7 @@ discard block |
||
1937 | 1937 | { |
1938 | 1938 | $sql = ($existsExpr->not) ? 'NOT ' : ''; |
1939 | 1939 | |
1940 | - $sql .= 'EXISTS (' . $this->walkSubselect($existsExpr->subselect) . ')'; |
|
1940 | + $sql .= 'EXISTS ('.$this->walkSubselect($existsExpr->subselect).')'; |
|
1941 | 1941 | |
1942 | 1942 | return $sql; |
1943 | 1943 | } |
@@ -1986,7 +1986,7 @@ discard block |
||
1986 | 1986 | $targetTableAlias = $this->getSQLTableAlias($targetClass->getTableName()); |
1987 | 1987 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
1988 | 1988 | |
1989 | - $sql .= $targetTableName . ' ' . $targetTableAlias . ' WHERE '; |
|
1989 | + $sql .= $targetTableName.' '.$targetTableAlias.' WHERE '; |
|
1990 | 1990 | |
1991 | 1991 | $sqlParts = []; |
1992 | 1992 | |
@@ -2007,7 +2007,7 @@ discard block |
||
2007 | 2007 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2008 | 2008 | } |
2009 | 2009 | |
2010 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2010 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2011 | 2011 | } |
2012 | 2012 | |
2013 | 2013 | $sql .= implode(' AND ', $sqlParts); |
@@ -2021,7 +2021,7 @@ discard block |
||
2021 | 2021 | $sourceTableAlias = $this->getSQLTableAlias($class->getTableName(), $dqlAlias); |
2022 | 2022 | |
2023 | 2023 | // join to target table |
2024 | - $sql .= $joinTableName . ' ' . $joinTableAlias . ' INNER JOIN ' . $targetTableName . ' ' . $targetTableAlias . ' ON '; |
|
2024 | + $sql .= $joinTableName.' '.$joinTableAlias.' INNER JOIN '.$targetTableName.' '.$targetTableAlias.' ON '; |
|
2025 | 2025 | |
2026 | 2026 | // join conditions |
2027 | 2027 | $joinSqlParts = []; |
@@ -2072,13 +2072,13 @@ discard block |
||
2072 | 2072 | $this->parserResult->addParameterMapping($dqlParamKey, $this->sqlParamIndex++); |
2073 | 2073 | } |
2074 | 2074 | |
2075 | - $sqlParts[] = $targetTableAlias . '.' . $quotedTargetColumnName . ' = ' . $entitySql; |
|
2075 | + $sqlParts[] = $targetTableAlias.'.'.$quotedTargetColumnName.' = '.$entitySql; |
|
2076 | 2076 | } |
2077 | 2077 | |
2078 | 2078 | $sql .= implode(' AND ', $sqlParts); |
2079 | 2079 | } |
2080 | 2080 | |
2081 | - return $sql . ')'; |
|
2081 | + return $sql.')'; |
|
2082 | 2082 | } |
2083 | 2083 | |
2084 | 2084 | /** |
@@ -2089,7 +2089,7 @@ discard block |
||
2089 | 2089 | $sizeFunc = new AST\Functions\SizeFunction('size'); |
2090 | 2090 | $sizeFunc->collectionPathExpression = $emptyCollCompExpr->expression; |
2091 | 2091 | |
2092 | - return $sizeFunc->getSql($this) . ($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2092 | + return $sizeFunc->getSql($this).($emptyCollCompExpr->not ? ' > 0' : ' = 0'); |
|
2093 | 2093 | } |
2094 | 2094 | |
2095 | 2095 | /** |
@@ -2098,19 +2098,19 @@ discard block |
||
2098 | 2098 | public function walkNullComparisonExpression($nullCompExpr) |
2099 | 2099 | { |
2100 | 2100 | $expression = $nullCompExpr->expression; |
2101 | - $comparison = ' IS' . ($nullCompExpr->not ? ' NOT' : '') . ' NULL'; |
|
2101 | + $comparison = ' IS'.($nullCompExpr->not ? ' NOT' : '').' NULL'; |
|
2102 | 2102 | |
2103 | 2103 | // Handle ResultVariable |
2104 | 2104 | if (is_string($expression) && isset($this->queryComponents[$expression]['resultVariable'])) { |
2105 | - return $this->walkResultVariable($expression) . $comparison; |
|
2105 | + return $this->walkResultVariable($expression).$comparison; |
|
2106 | 2106 | } |
2107 | 2107 | |
2108 | 2108 | // Handle InputParameter mapping inclusion to ParserResult |
2109 | 2109 | if ($expression instanceof AST\InputParameter) { |
2110 | - return $this->walkInputParameter($expression) . $comparison; |
|
2110 | + return $this->walkInputParameter($expression).$comparison; |
|
2111 | 2111 | } |
2112 | 2112 | |
2113 | - return $expression->dispatch($this) . $comparison; |
|
2113 | + return $expression->dispatch($this).$comparison; |
|
2114 | 2114 | } |
2115 | 2115 | |
2116 | 2116 | /** |
@@ -2118,7 +2118,7 @@ discard block |
||
2118 | 2118 | */ |
2119 | 2119 | public function walkInExpression($inExpr) |
2120 | 2120 | { |
2121 | - $sql = $this->walkArithmeticExpression($inExpr->expression) . ($inExpr->not ? ' NOT' : '') . ' IN ('; |
|
2121 | + $sql = $this->walkArithmeticExpression($inExpr->expression).($inExpr->not ? ' NOT' : '').' IN ('; |
|
2122 | 2122 | |
2123 | 2123 | $sql .= ($inExpr->subselect) |
2124 | 2124 | ? $this->walkSubselect($inExpr->subselect) |
@@ -2142,12 +2142,12 @@ discard block |
||
2142 | 2142 | $discrColumnType = $discrColumn->getType(); |
2143 | 2143 | $quotedColumnName = $this->platform->quoteIdentifier($discrColumn->getColumnName()); |
2144 | 2144 | $sqlTableAlias = $this->useSqlTableAliases |
2145 | - ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias) . '.' |
|
2145 | + ? $this->getSQLTableAlias($discrColumn->getTableName(), $dqlAlias).'.' |
|
2146 | 2146 | : ''; |
2147 | 2147 | |
2148 | 2148 | return sprintf( |
2149 | 2149 | '%s %sIN %s', |
2150 | - $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias . $quotedColumnName, $this->platform), |
|
2150 | + $discrColumnType->convertToDatabaseValueSQL($sqlTableAlias.$quotedColumnName, $this->platform), |
|
2151 | 2151 | ($instanceOfExpr->not ? 'NOT ' : ''), |
2152 | 2152 | $this->getChildDiscriminatorsFromClassMetadata($discrClass, $instanceOfExpr) |
2153 | 2153 | ); |
@@ -2194,8 +2194,8 @@ discard block |
||
2194 | 2194 | $sql .= ' NOT'; |
2195 | 2195 | } |
2196 | 2196 | |
2197 | - $sql .= ' BETWEEN ' . $this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2198 | - . ' AND ' . $this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2197 | + $sql .= ' BETWEEN '.$this->walkArithmeticExpression($betweenExpr->leftBetweenExpression) |
|
2198 | + . ' AND '.$this->walkArithmeticExpression($betweenExpr->rightBetweenExpression); |
|
2199 | 2199 | |
2200 | 2200 | return $sql; |
2201 | 2201 | } |
@@ -2210,7 +2210,7 @@ discard block |
||
2210 | 2210 | ? $this->walkResultVariable($stringExpr) |
2211 | 2211 | : $stringExpr->dispatch($this); |
2212 | 2212 | |
2213 | - $sql = $leftExpr . ($likeExpr->not ? ' NOT' : '') . ' LIKE '; |
|
2213 | + $sql = $leftExpr.($likeExpr->not ? ' NOT' : '').' LIKE '; |
|
2214 | 2214 | |
2215 | 2215 | if ($likeExpr->stringPattern instanceof AST\InputParameter) { |
2216 | 2216 | $sql .= $this->walkInputParameter($likeExpr->stringPattern); |
@@ -2223,7 +2223,7 @@ discard block |
||
2223 | 2223 | } |
2224 | 2224 | |
2225 | 2225 | if ($likeExpr->escapeChar) { |
2226 | - $sql .= ' ESCAPE ' . $this->walkLiteral($likeExpr->escapeChar); |
|
2226 | + $sql .= ' ESCAPE '.$this->walkLiteral($likeExpr->escapeChar); |
|
2227 | 2227 | } |
2228 | 2228 | |
2229 | 2229 | return $sql; |
@@ -2250,7 +2250,7 @@ discard block |
||
2250 | 2250 | ? $leftExpr->dispatch($this) |
2251 | 2251 | : (is_numeric($leftExpr) ? $leftExpr : $this->conn->quote($leftExpr)); |
2252 | 2252 | |
2253 | - $sql .= ' ' . $compExpr->operator . ' '; |
|
2253 | + $sql .= ' '.$compExpr->operator.' '; |
|
2254 | 2254 | |
2255 | 2255 | $sql .= ($rightExpr instanceof AST\Node) |
2256 | 2256 | ? $rightExpr->dispatch($this) |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | { |
2287 | 2287 | return ($arithmeticExpr->isSimpleArithmeticExpression()) |
2288 | 2288 | ? $this->walkSimpleArithmeticExpression($arithmeticExpr->simpleArithmeticExpression) |
2289 | - : '(' . $this->walkSubselect($arithmeticExpr->subselect) . ')'; |
|
2289 | + : '('.$this->walkSubselect($arithmeticExpr->subselect).')'; |
|
2290 | 2290 | } |
2291 | 2291 | |
2292 | 2292 | /** |
@@ -2294,7 +2294,7 @@ discard block |
||
2294 | 2294 | */ |
2295 | 2295 | public function walkSimpleArithmeticExpression($simpleArithmeticExpr) |
2296 | 2296 | { |
2297 | - if (! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2297 | + if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) { |
|
2298 | 2298 | return $this->walkArithmeticTerm($simpleArithmeticExpr); |
2299 | 2299 | } |
2300 | 2300 | |
@@ -2314,7 +2314,7 @@ discard block |
||
2314 | 2314 | |
2315 | 2315 | // Phase 2 AST optimization: Skip processing of ArithmeticTerm |
2316 | 2316 | // if only one ArithmeticFactor is defined |
2317 | - if (! ($term instanceof AST\ArithmeticTerm)) { |
|
2317 | + if ( ! ($term instanceof AST\ArithmeticTerm)) { |
|
2318 | 2318 | return $this->walkArithmeticFactor($term); |
2319 | 2319 | } |
2320 | 2320 | |
@@ -2334,13 +2334,13 @@ discard block |
||
2334 | 2334 | |
2335 | 2335 | // Phase 2 AST optimization: Skip processing of ArithmeticFactor |
2336 | 2336 | // if only one ArithmeticPrimary is defined |
2337 | - if (! ($factor instanceof AST\ArithmeticFactor)) { |
|
2337 | + if ( ! ($factor instanceof AST\ArithmeticFactor)) { |
|
2338 | 2338 | return $this->walkArithmeticPrimary($factor); |
2339 | 2339 | } |
2340 | 2340 | |
2341 | 2341 | $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : ''); |
2342 | 2342 | |
2343 | - return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2343 | + return $sign.$this->walkArithmeticPrimary($factor->arithmeticPrimary); |
|
2344 | 2344 | } |
2345 | 2345 | |
2346 | 2346 | /** |
@@ -2353,7 +2353,7 @@ discard block |
||
2353 | 2353 | public function walkArithmeticPrimary($primary) |
2354 | 2354 | { |
2355 | 2355 | if ($primary instanceof AST\SimpleArithmeticExpression) { |
2356 | - return '(' . $this->walkSimpleArithmeticExpression($primary) . ')'; |
|
2356 | + return '('.$this->walkSimpleArithmeticExpression($primary).')'; |
|
2357 | 2357 | } |
2358 | 2358 | |
2359 | 2359 | if ($primary instanceof AST\Node) { |
@@ -2411,7 +2411,7 @@ discard block |
||
2411 | 2411 | $entityClassName = $entityClass->getClassName(); |
2412 | 2412 | |
2413 | 2413 | if ($entityClassName !== $rootClass->getClassName()) { |
2414 | - if (! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2414 | + if ( ! $entityClass->getReflectionClass()->isSubclassOf($rootClass->getClassName())) { |
|
2415 | 2415 | throw QueryException::instanceOfUnrelatedClass($entityClassName, $rootClass->getClassName()); |
2416 | 2416 | } |
2417 | 2417 | } |
@@ -2423,6 +2423,6 @@ discard block |
||
2423 | 2423 | $sqlParameterList[] = $this->conn->quote($discriminator); |
2424 | 2424 | } |
2425 | 2425 | |
2426 | - return '(' . implode(', ', $sqlParameterList) . ')'; |
|
2426 | + return '('.implode(', ', $sqlParameterList).')'; |
|
2427 | 2427 | } |
2428 | 2428 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public static function syntaxError($message, $previous = null) |
34 | 34 | { |
35 | - return new self('[Syntax Error] ' . $message, 0, $previous); |
|
35 | + return new self('[Syntax Error] '.$message, 0, $previous); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public static function semanticalError($message, $previous = null) |
45 | 45 | { |
46 | - return new self('[Semantical Error] ' . $message, 0, $previous); |
|
46 | + return new self('[Semantical Error] '.$message, 0, $previous); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public static function invalidParameterType($expected, $received) |
64 | 64 | { |
65 | - return new self('Invalid parameter type, ' . $received . ' given, but ' . $expected . ' expected.'); |
|
65 | + return new self('Invalid parameter type, '.$received.' given, but '.$expected.' expected.'); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public static function invalidParameterPosition($pos) |
74 | 74 | { |
75 | - return new self('Invalid parameter position: ' . $pos); |
|
75 | + return new self('Invalid parameter position: '.$pos); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public static function tooManyParameters($expected, $received) |
85 | 85 | { |
86 | - return new self('Too many parameters: the query defines ' . $expected . ' parameters and you bound ' . $received); |
|
86 | + return new self('Too many parameters: the query defines '.$expected.' parameters and you bound '.$received); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public static function tooFewParameters($expected, $received) |
96 | 96 | { |
97 | - return new self('Too few parameters: the query defines ' . $expected . ' parameters but you only bound ' . $received); |
|
97 | + return new self('Too few parameters: the query defines '.$expected.' parameters but you only bound '.$received); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public static function invalidParameterFormat($value) |
106 | 106 | { |
107 | - return new self('Invalid parameter format, ' . $value . ' given, but :<name> or ?<num> expected.'); |
|
107 | + return new self('Invalid parameter format, '.$value.' given, but :<name> or ?<num> expected.'); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public static function unknownParameter($key) |
116 | 116 | { |
117 | - return new self('Invalid parameter: token ' . $key . ' is not defined in the query.'); |
|
117 | + return new self('Invalid parameter: token '.$key.' is not defined in the query.'); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | public static function invalidPathExpression($pathExpr) |
134 | 134 | { |
135 | 135 | return new self( |
136 | - "Invalid PathExpression '" . $pathExpr->identificationVariable . '.' . $pathExpr->field . "'." |
|
136 | + "Invalid PathExpression '".$pathExpr->identificationVariable.'.'.$pathExpr->field."'." |
|
137 | 137 | ); |
138 | 138 | } |
139 | 139 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public static function invalidLiteral($literal) |
146 | 146 | { |
147 | - return new self("Invalid literal '" . $literal . "'"); |
|
147 | + return new self("Invalid literal '".$literal."'"); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
@@ -155,8 +155,8 @@ discard block |
||
155 | 155 | public static function iterateWithFetchJoinCollectionNotAllowed($assoc) |
156 | 156 | { |
157 | 157 | return new self( |
158 | - 'Invalid query operation: Not allowed to iterate over fetch join collections ' . |
|
159 | - 'in class ' . $assoc['sourceEntity'] . ' association ' . $assoc['fieldName'] |
|
158 | + 'Invalid query operation: Not allowed to iterate over fetch join collections '. |
|
159 | + 'in class '.$assoc['sourceEntity'].' association '.$assoc['fieldName'] |
|
160 | 160 | ); |
161 | 161 | } |
162 | 162 | |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | public static function partialObjectsAreDangerous() |
167 | 167 | { |
168 | 168 | return new self( |
169 | - 'Loading partial objects is dangerous. Fetch full objects or consider ' . |
|
170 | - 'using a different fetch mode. If you really want partial objects, ' . |
|
169 | + 'Loading partial objects is dangerous. Fetch full objects or consider '. |
|
170 | + 'using a different fetch mode. If you really want partial objects, '. |
|
171 | 171 | 'set the doctrine.forcePartialLoad query hint to TRUE.' |
172 | 172 | ); |
173 | 173 | } |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | public static function overwritingJoinConditionsNotYetSupported($assoc) |
181 | 181 | { |
182 | 182 | return new self( |
183 | - 'Unsupported query operation: It is not yet possible to overwrite the join ' . |
|
184 | - 'conditions in class ' . $assoc['sourceEntityName'] . ' association ' . $assoc['fieldName'] . '. ' . |
|
183 | + 'Unsupported query operation: It is not yet possible to overwrite the join '. |
|
184 | + 'conditions in class '.$assoc['sourceEntityName'].' association '.$assoc['fieldName'].'. '. |
|
185 | 185 | 'Use WITH to append additional join conditions to the association.' |
186 | 186 | ); |
187 | 187 | } |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | public static function associationPathInverseSideNotSupported(PathExpression $pathExpr) |
193 | 193 | { |
194 | 194 | return new self( |
195 | - 'A single-valued association path expression to an inverse side is not supported in DQL queries. ' . |
|
196 | - 'Instead of "' . $pathExpr->identificationVariable . '.' . $pathExpr->field . '" use an explicit join.' |
|
195 | + 'A single-valued association path expression to an inverse side is not supported in DQL queries. '. |
|
196 | + 'Instead of "'.$pathExpr->identificationVariable.'.'.$pathExpr->field.'" use an explicit join.' |
|
197 | 197 | ); |
198 | 198 | } |
199 | 199 | |
@@ -217,8 +217,8 @@ discard block |
||
217 | 217 | public static function associationPathCompositeKeyNotSupported() |
218 | 218 | { |
219 | 219 | return new self( |
220 | - 'A single-valued association path expression to an entity with a composite primary ' . |
|
221 | - 'key is not supported. Explicitly name the components of the composite primary key ' . |
|
220 | + 'A single-valued association path expression to an entity with a composite primary '. |
|
221 | + 'key is not supported. Explicitly name the components of the composite primary key '. |
|
222 | 222 | 'in the query.' |
223 | 223 | ); |
224 | 224 | } |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | */ |
232 | 232 | public static function instanceOfUnrelatedClass($className, $rootClass) |
233 | 233 | { |
234 | - return new self("Cannot check if a child of '" . $rootClass . "' is instanceof '" . $className . "', " . |
|
234 | + return new self("Cannot check if a child of '".$rootClass."' is instanceof '".$className."', ". |
|
235 | 235 | 'inheritance hierarchy does not exists between these two classes.'); |
236 | 236 | } |
237 | 237 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | public static function invalidQueryComponent($dqlAlias) |
244 | 244 | { |
245 | 245 | return new self( |
246 | - "Invalid query component given for DQL alias '" . $dqlAlias . "', " . |
|
246 | + "Invalid query component given for DQL alias '".$dqlAlias."', ". |
|
247 | 247 | "requires 'metadata', 'parent', 'relation', 'map', 'nestingLevel' and 'token' keys." |
248 | 248 | ); |
249 | 249 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function generateProxyClasses(array $classes) : int |
56 | 56 | { |
57 | - $concreteClasses = array_filter($classes, function (ClassMetadata $metadata) : bool { |
|
57 | + $concreteClasses = array_filter($classes, function(ClassMetadata $metadata) : bool { |
|
58 | 58 | return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract()); |
59 | 59 | }); |
60 | 60 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | ->proxyFactory |
64 | 64 | ->createProxy( |
65 | 65 | $metadata->getClassName(), |
66 | - function () { |
|
66 | + function() { |
|
67 | 67 | // empty closure, serves its purpose, for now |
68 | 68 | }, |
69 | 69 | $this->skippedFieldsFqns($metadata) |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | ->getUnitOfWork() |
88 | 88 | ->getEntityPersister($metadata->getClassName()); |
89 | 89 | |
90 | - $proxyInstance = $this |
|
90 | + $proxyInstance = $this |
|
91 | 91 | ->proxyFactory |
92 | 92 | ->createProxy( |
93 | 93 | $metadata->getClassName(), |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | |
107 | 107 | private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : \Closure |
108 | 108 | { |
109 | - return function ( |
|
109 | + return function( |
|
110 | 110 | GhostObjectInterface $ghostObject, |
111 | 111 | string $method, |
112 | 112 | // we don't care |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $identifier = $persister->getIdentifier($ghostObject); |
125 | 125 | |
126 | 126 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
127 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
127 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
128 | 128 | $initializer = $originalInitializer; |
129 | 129 | |
130 | 130 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $transientFieldsFqns = []; |
157 | 157 | |
158 | 158 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) { |
159 | - if (! $property instanceof TransientMetadata) { |
|
159 | + if ( ! $property instanceof TransientMetadata) { |
|
160 | 160 | continue; |
161 | 161 | } |
162 | 162 | |
@@ -194,11 +194,11 @@ discard block |
||
194 | 194 | private function propertyFqcn(\ReflectionProperty $property) : string |
195 | 195 | { |
196 | 196 | if ($property->isPrivate()) { |
197 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
197 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | if ($property->isProtected()) { |
201 | - return "\0*\0" . $property->getName(); |
|
201 | + return "\0*\0".$property->getName(); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | return $property->getName(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $expectedLockVersion = ($expectedLockVersion instanceof \DateTime) ? $expectedLockVersion->getTimestamp() : $expectedLockVersion; |
58 | 58 | $actualLockVersion = ($actualLockVersion instanceof \DateTime) ? $actualLockVersion->getTimestamp() : $actualLockVersion; |
59 | 59 | |
60 | - return new self('The optimistic lock failed, version ' . $expectedLockVersion . ' was expected, but is actually ' . $actualLockVersion, $entity); |
|
60 | + return new self('The optimistic lock failed, version '.$expectedLockVersion.' was expected, but is actually '.$actualLockVersion, $entity); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -67,6 +67,6 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public static function notVersioned($entityName) |
69 | 69 | { |
70 | - return new self('Cannot obtain optimistic lock on unversioned entity ' . $entityName, null); |
|
70 | + return new self('Cannot obtain optimistic lock on unversioned entity '.$entityName, null); |
|
71 | 71 | } |
72 | 72 | } |
@@ -176,11 +176,11 @@ discard block |
||
176 | 176 | $pkColumns = []; |
177 | 177 | |
178 | 178 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
179 | - if (! ($property instanceof FieldMetadata)) { |
|
179 | + if ( ! ($property instanceof FieldMetadata)) { |
|
180 | 180 | continue; |
181 | 181 | } |
182 | 182 | |
183 | - if (! $class->isInheritedProperty($fieldName)) { |
|
183 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
184 | 184 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
185 | 185 | |
186 | 186 | $this->gatherColumn($class, $property, $table); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | } |
217 | 217 | |
218 | - if (! empty($inheritedKeyColumns)) { |
|
218 | + if ( ! empty($inheritedKeyColumns)) { |
|
219 | 219 | // Add a FK constraint on the ID column |
220 | 220 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
221 | 221 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | } |
262 | 262 | |
263 | - if (! $table->hasIndex('primary')) { |
|
263 | + if ( ! $table->hasIndex('primary')) { |
|
264 | 264 | $table->setPrimaryKey($pkColumns); |
265 | 265 | } |
266 | 266 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $processedClasses[$class->getClassName()] = true; |
321 | 321 | |
322 | 322 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
323 | - if (! $property instanceof FieldMetadata |
|
323 | + if ( ! $property instanceof FieldMetadata |
|
324 | 324 | || ! $property->hasValueGenerator() |
325 | 325 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
326 | 326 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | $quotedName = $this->platform->quoteIdentifier($property->getValueGenerator()->getDefinition()['sequenceName']); |
331 | 331 | |
332 | - if (! $schema->hasSequence($quotedName)) { |
|
332 | + if ( ! $schema->hasSequence($quotedName)) { |
|
333 | 333 | $schema->createSequence($quotedName, $property->getValueGenerator()->getDefinition()['allocationSize']); |
334 | 334 | } |
335 | 335 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
345 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
345 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
346 | 346 | $schema->visit(new RemoveNamespacedAssets()); |
347 | 347 | } |
348 | 348 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | break; |
382 | 382 | } |
383 | 383 | |
384 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
384 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
385 | 385 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
386 | 386 | } |
387 | 387 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | $pkColumns = []; |
400 | 400 | |
401 | 401 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
402 | - if (! ($property instanceof FieldMetadata)) { |
|
402 | + if ( ! ($property instanceof FieldMetadata)) { |
|
403 | 403 | continue; |
404 | 404 | } |
405 | 405 | |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
515 | 515 | { |
516 | 516 | foreach ($class->getDeclaredPropertiesIterator() as $fieldName => $property) { |
517 | - if (! ($property instanceof AssociationMetadata)) { |
|
517 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
518 | 518 | continue; |
519 | 519 | } |
520 | 520 | |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | continue; |
523 | 523 | } |
524 | 524 | |
525 | - if (! $property->isOwningSide()) { |
|
525 | + if ( ! $property->isOwningSide()) { |
|
526 | 526 | continue; |
527 | 527 | } |
528 | 528 | |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | $idColumns = $class->getIdentifierColumns($this->em); |
613 | 613 | $idColumnNameList = array_keys($idColumns); |
614 | 614 | |
615 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
615 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
616 | 616 | return null; |
617 | 617 | } |
618 | 618 | |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
621 | 621 | $property = $class->getProperty($fieldName); |
622 | 622 | |
623 | - if (! ($property instanceof AssociationMetadata)) { |
|
623 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
624 | 624 | continue; |
625 | 625 | } |
626 | 626 | |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | $joinColumn->getReferencedColumnName() |
677 | 677 | ); |
678 | 678 | |
679 | - if (! $definingClass) { |
|
679 | + if ( ! $definingClass) { |
|
680 | 680 | throw MissingColumnException::fromColumnSourceAndTarget( |
681 | 681 | $joinColumn->getReferencedColumnName(), |
682 | 682 | $mapping->getSourceEntity(), |
@@ -691,14 +691,14 @@ discard block |
||
691 | 691 | $localColumns[] = $quotedColumnName; |
692 | 692 | $foreignColumns[] = $quotedReferencedColumnName; |
693 | 693 | |
694 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
694 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
695 | 695 | // Only add the column to the table if it does not exist already. |
696 | 696 | // It might exist already if the foreign key is mapped into a regular |
697 | 697 | // property as well. |
698 | 698 | $property = $definingClass->getProperty($referencedFieldName); |
699 | 699 | $columnDef = null; |
700 | 700 | |
701 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
701 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
702 | 702 | $columnDef = $joinColumn->getColumnDefinition(); |
703 | 703 | } elseif ($property->getColumnDefinition()) { |
704 | 704 | $columnDef = $property->getColumnDefinition(); |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
733 | 733 | } |
734 | 734 | |
735 | - if (! empty($joinColumn->getOnDelete())) { |
|
735 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
736 | 736 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
737 | 737 | } |
738 | 738 | } |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
744 | 744 | } |
745 | 745 | |
746 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
746 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
747 | 747 | |
748 | 748 | if (isset($addedFks[$compositeName]) |
749 | 749 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | } |
761 | 761 | |
762 | 762 | $blacklistedFks[$compositeName] = true; |
763 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
763 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
764 | 764 | $addedFks[$compositeName] = [ |
765 | 765 | 'foreignTableName' => $foreignTableName, |
766 | 766 | 'foreignColumns' => $foreignColumns, |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | $fullSchema = $sm->createSchema(); |
843 | 843 | |
844 | 844 | foreach ($fullSchema->getTables() as $table) { |
845 | - if (! $schema->hasTable($table->getName())) { |
|
845 | + if ( ! $schema->hasTable($table->getName())) { |
|
846 | 846 | foreach ($table->getForeignKeys() as $foreignKey) { |
847 | 847 | /** @var $foreignKey \Doctrine\DBAL\Schema\ForeignKeyConstraint */ |
848 | 848 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | if ($table->hasPrimaryKey()) { |
868 | 868 | $columns = $table->getPrimaryKey()->getColumns(); |
869 | 869 | if (count($columns) === 1) { |
870 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
870 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
871 | 871 | if ($fullSchema->hasSequence($checkSequence)) { |
872 | 872 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
873 | 873 | } |