@@ -182,11 +182,11 @@ discard block |
||
182 | 182 | $pkColumns = []; |
183 | 183 | |
184 | 184 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
185 | - if (! ($property instanceof FieldMetadata)) { |
|
185 | + if ( ! ($property instanceof FieldMetadata)) { |
|
186 | 186 | continue; |
187 | 187 | } |
188 | 188 | |
189 | - if (! $class->isInheritedProperty($fieldName)) { |
|
189 | + if ( ! $class->isInheritedProperty($fieldName)) { |
|
190 | 190 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
191 | 191 | |
192 | 192 | $this->gatherColumn($class, $property, $table); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | } |
222 | 222 | } |
223 | 223 | |
224 | - if (! empty($inheritedKeyColumns)) { |
|
224 | + if ( ! empty($inheritedKeyColumns)) { |
|
225 | 225 | // Add a FK constraint on the ID column |
226 | 226 | $rootClass = $this->em->getClassMetadata($class->getRootClassName()); |
227 | 227 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | } |
267 | 267 | } |
268 | 268 | |
269 | - if (! $table->hasIndex('primary')) { |
|
269 | + if ( ! $table->hasIndex('primary')) { |
|
270 | 270 | $table->setPrimaryKey($pkColumns); |
271 | 271 | } |
272 | 272 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $processedClasses[$class->getClassName()] = true; |
327 | 327 | |
328 | 328 | foreach ($class->getPropertiesIterator() as $property) { |
329 | - if (! $property instanceof FieldMetadata |
|
329 | + if ( ! $property instanceof FieldMetadata |
|
330 | 330 | || ! $property->hasValueGenerator() |
331 | 331 | || $property->getValueGenerator()->getType() !== GeneratorType::SEQUENCE |
332 | 332 | || $class->getClassName() !== $class->getRootClassName()) { |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | $generator = $property->getValueGenerator()->getGenerator(); |
337 | 337 | $quotedName = $generator->getSequenceName(); |
338 | 338 | |
339 | - if (! $schema->hasSequence($quotedName)) { |
|
339 | + if ( ! $schema->hasSequence($quotedName)) { |
|
340 | 340 | $schema->createSequence($quotedName, $generator->getAllocationSize()); |
341 | 341 | } |
342 | 342 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | } |
350 | 350 | } |
351 | 351 | |
352 | - if (! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
352 | + if ( ! $this->platform->supportsSchemas() && ! $this->platform->canEmulateSchemas()) { |
|
353 | 353 | $schema->visit(new RemoveNamespacedAssets()); |
354 | 354 | } |
355 | 355 | |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | break; |
389 | 389 | } |
390 | 390 | |
391 | - if (! empty($discrColumn->getColumnDefinition())) { |
|
391 | + if ( ! empty($discrColumn->getColumnDefinition())) { |
|
392 | 392 | $options['columnDefinition'] = $discrColumn->getColumnDefinition(); |
393 | 393 | } |
394 | 394 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | private function gatherRelationsSql($class, $table, $schema, &$addedFks, &$blacklistedFks) |
519 | 519 | { |
520 | 520 | foreach ($class->getPropertiesIterator() as $fieldName => $property) { |
521 | - if (! ($property instanceof AssociationMetadata)) { |
|
521 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
522 | 522 | continue; |
523 | 523 | } |
524 | 524 | |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | continue; |
527 | 527 | } |
528 | 528 | |
529 | - if (! $property->isOwningSide()) { |
|
529 | + if ( ! $property->isOwningSide()) { |
|
530 | 530 | continue; |
531 | 531 | } |
532 | 532 | |
@@ -616,7 +616,7 @@ discard block |
||
616 | 616 | $idColumns = $class->getIdentifierColumns($this->em); |
617 | 617 | $idColumnNameList = array_keys($idColumns); |
618 | 618 | |
619 | - if (! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
619 | + if ( ! in_array($referencedColumnName, $idColumnNameList, true)) { |
|
620 | 620 | return null; |
621 | 621 | } |
622 | 622 | |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | foreach ($class->getIdentifierFieldNames() as $fieldName) { |
625 | 625 | $property = $class->getProperty($fieldName); |
626 | 626 | |
627 | - if (! ($property instanceof AssociationMetadata)) { |
|
627 | + if ( ! ($property instanceof AssociationMetadata)) { |
|
628 | 628 | continue; |
629 | 629 | } |
630 | 630 | |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $joinColumn->getReferencedColumnName() |
681 | 681 | ); |
682 | 682 | |
683 | - if (! $definingClass) { |
|
683 | + if ( ! $definingClass) { |
|
684 | 684 | throw MissingColumnException::fromColumnSourceAndTarget( |
685 | 685 | $joinColumn->getReferencedColumnName(), |
686 | 686 | $mapping->getSourceEntity(), |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | $localColumns[] = $quotedColumnName; |
696 | 696 | $foreignColumns[] = $quotedReferencedColumnName; |
697 | 697 | |
698 | - if (! $theJoinTable->hasColumn($quotedColumnName)) { |
|
698 | + if ( ! $theJoinTable->hasColumn($quotedColumnName)) { |
|
699 | 699 | // Only add the column to the table if it does not exist already. |
700 | 700 | // It might exist already if the foreign key is mapped into a regular |
701 | 701 | // property as well. |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | 'notnull' => ! $joinColumn->isNullable(), |
705 | 705 | ] + $this->gatherColumnOptions($property->getOptions()); |
706 | 706 | |
707 | - if (! empty($joinColumn->getColumnDefinition())) { |
|
707 | + if ( ! empty($joinColumn->getColumnDefinition())) { |
|
708 | 708 | $columnOptions['columnDefinition'] = $joinColumn->getColumnDefinition(); |
709 | 709 | } elseif ($property->getColumnDefinition()) { |
710 | 710 | $columnOptions['columnDefinition'] = $property->getColumnDefinition(); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | $uniqueConstraints[] = ['columns' => [$quotedColumnName]]; |
731 | 731 | } |
732 | 732 | |
733 | - if (! empty($joinColumn->getOnDelete())) { |
|
733 | + if ( ! empty($joinColumn->getOnDelete())) { |
|
734 | 734 | $fkOptions['onDelete'] = $joinColumn->getOnDelete(); |
735 | 735 | } |
736 | 736 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | $theJoinTable->addUniqueIndex($unique['columns'], is_numeric($indexName) ? null : $indexName); |
742 | 742 | } |
743 | 743 | |
744 | - $compositeName = $theJoinTable->getName() . '.' . implode('', $localColumns); |
|
744 | + $compositeName = $theJoinTable->getName().'.'.implode('', $localColumns); |
|
745 | 745 | |
746 | 746 | if (isset($addedFks[$compositeName]) |
747 | 747 | && ($foreignTableName !== $addedFks[$compositeName]['foreignTableName'] |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | } |
759 | 759 | |
760 | 760 | $blacklistedFks[$compositeName] = true; |
761 | - } elseif (! isset($blacklistedFks[$compositeName])) { |
|
761 | + } elseif ( ! isset($blacklistedFks[$compositeName])) { |
|
762 | 762 | $addedFks[$compositeName] = [ |
763 | 763 | 'foreignTableName' => $foreignTableName, |
764 | 764 | 'foreignColumns' => $foreignColumns, |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | $fullSchema = $sm->createSchema(); |
858 | 858 | |
859 | 859 | foreach ($fullSchema->getTables() as $table) { |
860 | - if (! $schema->hasTable($table->getName())) { |
|
860 | + if ( ! $schema->hasTable($table->getName())) { |
|
861 | 861 | foreach ($table->getForeignKeys() as $foreignKey) { |
862 | 862 | /** @var $foreignKey ForeignKeyConstraint */ |
863 | 863 | if ($schema->hasTable($foreignKey->getForeignTableName())) { |
@@ -882,7 +882,7 @@ discard block |
||
882 | 882 | if ($table->hasPrimaryKey()) { |
883 | 883 | $columns = $table->getPrimaryKey()->getColumns(); |
884 | 884 | if (count($columns) === 1) { |
885 | - $checkSequence = $table->getName() . '_' . $columns[0] . '_seq'; |
|
885 | + $checkSequence = $table->getName().'_'.$columns[0].'_seq'; |
|
886 | 886 | if ($fullSchema->hasSequence($checkSequence)) { |
887 | 887 | $visitor->acceptSequence($fullSchema->getSequence($checkSequence)); |
888 | 888 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | $association = $collection->getMapping(); |
39 | 39 | |
40 | - if (! $association->isOwningSide()) { |
|
40 | + if ( ! $association->isOwningSide()) { |
|
41 | 41 | return; // ignore inverse side |
42 | 42 | } |
43 | 43 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $association = $collection->getMapping(); |
64 | 64 | |
65 | - if (! $association->isOwningSide()) { |
|
65 | + if ( ! $association->isOwningSide()) { |
|
66 | 66 | return; // ignore inverse side |
67 | 67 | } |
68 | 68 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | $association = $collection->getMapping(); |
95 | 95 | |
96 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
96 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
97 | 97 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
98 | 98 | } |
99 | 99 | |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | }*/ |
166 | 166 | |
167 | 167 | $sql = 'SELECT COUNT(*)' |
168 | - . ' FROM ' . $joinTableName . ' t' |
|
168 | + . ' FROM '.$joinTableName.' t' |
|
169 | 169 | . $joinTargetEntitySQL |
170 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
170 | + . ' WHERE '.implode(' AND ', $conditions); |
|
171 | 171 | |
172 | 172 | return $this->conn->fetchColumn($sql, $params, $types); |
173 | 173 | } |
@@ -190,13 +190,13 @@ discard block |
||
190 | 190 | { |
191 | 191 | $association = $collection->getMapping(); |
192 | 192 | |
193 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
193 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
194 | 194 | throw new BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
195 | 195 | } |
196 | 196 | |
197 | 197 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
198 | 198 | |
199 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
199 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
200 | 200 | |
201 | 201 | return (bool) $this->conn->fetchColumn($sql, $params, $types); |
202 | 202 | } |
@@ -206,13 +206,13 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function contains(PersistentCollection $collection, $element) |
208 | 208 | { |
209 | - if (! $this->isValidEntityState($element)) { |
|
209 | + if ( ! $this->isValidEntityState($element)) { |
|
210 | 210 | return false; |
211 | 211 | } |
212 | 212 | |
213 | 213 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, true); |
214 | 214 | |
215 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
215 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
216 | 216 | |
217 | 217 | return (bool) $this->conn->fetchColumn($sql, $params, $types); |
218 | 218 | } |
@@ -222,13 +222,13 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public function removeElement(PersistentCollection $collection, $element) |
224 | 224 | { |
225 | - if (! $this->isValidEntityState($element)) { |
|
225 | + if ( ! $this->isValidEntityState($element)) { |
|
226 | 226 | return false; |
227 | 227 | } |
228 | 228 | |
229 | 229 | [$quotedJoinTable, $whereClauses, $params, $types] = $this->getJoinTableRestrictions($collection, $element, false); |
230 | 230 | |
231 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
231 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
232 | 232 | |
233 | 233 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
234 | 234 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $onConditions = $this->getOnConditionSQL($association); |
247 | 247 | $whereClauses = $params = $types = []; |
248 | 248 | |
249 | - if (! $association->isOwningSide()) { |
|
249 | + if ( ! $association->isOwningSide()) { |
|
250 | 250 | $association = $targetClass->getProperty($association->getMappedBy()); |
251 | 251 | $joinColumns = $association->getJoinTable()->getInverseJoinColumns(); |
252 | 252 | } else { |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | |
283 | 283 | $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te'); |
284 | 284 | |
285 | - $sql = 'SELECT ' . $resultSetMapping->generateSelectClause() |
|
286 | - . ' FROM ' . $tableName . ' te' |
|
287 | - . ' JOIN ' . $joinTableName . ' t ON' |
|
285 | + $sql = 'SELECT '.$resultSetMapping->generateSelectClause() |
|
286 | + . ' FROM '.$tableName.' te' |
|
287 | + . ' JOIN '.$joinTableName.' t ON' |
|
288 | 288 | . implode(' AND ', $onConditions) |
289 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
289 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
290 | 290 | |
291 | 291 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
292 | 292 | $sql .= $this->getLimitSql($criteria); |
@@ -321,8 +321,8 @@ discard block |
||
321 | 321 | |
322 | 322 | // A join is needed if there is filtering on the target entity |
323 | 323 | $tableName = $rootClass->table->getQuotedQualifiedName($this->platform); |
324 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
325 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($association)); |
|
324 | + $joinSql = ' JOIN '.$tableName.' te' |
|
325 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($association)); |
|
326 | 326 | |
327 | 327 | return [$joinSql, $filterSql]; |
328 | 328 | } |
@@ -343,18 +343,18 @@ discard block |
||
343 | 343 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
344 | 344 | |
345 | 345 | if ($filterExpr) { |
346 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
346 | + $filterClauses[] = '('.$filterExpr.')'; |
|
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | - if (! $filterClauses) { |
|
350 | + if ( ! $filterClauses) { |
|
351 | 351 | return ''; |
352 | 352 | } |
353 | 353 | |
354 | 354 | $filterSql = implode(' AND ', $filterClauses); |
355 | 355 | |
356 | 356 | return isset($filterClauses[1]) |
357 | - ? '(' . $filterSql . ')' |
|
357 | + ? '('.$filterSql.')' |
|
358 | 358 | : $filterSql; |
359 | 359 | } |
360 | 360 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
382 | 382 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
383 | 383 | |
384 | - $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName; |
|
384 | + $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName; |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | return $conditions; |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
404 | 404 | } |
405 | 405 | |
406 | - return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
406 | + return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | /** |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
600 | 600 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
601 | 601 | |
602 | - if (! $owningAssociation->isOwningSide()) { |
|
602 | + if ( ! $owningAssociation->isOwningSide()) { |
|
603 | 603 | $owningAssociation = $targetClass->getProperty($owningAssociation->getMappedBy()); |
604 | 604 | $joinTable = $owningAssociation->getJoinTable(); |
605 | 605 | $joinColumns = $joinTable->getJoinColumns(); |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | } |
612 | 612 | |
613 | 613 | $joinTableName = $joinTable->getQuotedQualifiedName($this->platform); |
614 | - $quotedJoinTable = $joinTableName . ' t'; |
|
614 | + $quotedJoinTable = $joinTableName.' t'; |
|
615 | 615 | $whereClauses = []; |
616 | 616 | $params = []; |
617 | 617 | $types = []; |
@@ -625,11 +625,11 @@ discard block |
||
625 | 625 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
626 | 626 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
627 | 627 | |
628 | - $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName; |
|
628 | + $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName; |
|
629 | 629 | } |
630 | 630 | |
631 | 631 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
632 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
632 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
633 | 633 | $indexByProperty = $targetClass->getProperty($indexBy); |
634 | 634 | |
635 | 635 | switch (true) { |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $types[] = $joinColumn->getType(); |
657 | 657 | } |
658 | 658 | |
659 | - if (! $joinNeeded) { |
|
659 | + if ( ! $joinNeeded) { |
|
660 | 660 | foreach ($joinColumns as $joinColumn) { |
661 | 661 | /** @var JoinColumnMetadata $joinColumn */ |
662 | 662 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
672 | 672 | |
673 | 673 | if ($filterSql) { |
674 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
674 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
675 | 675 | $whereClauses[] = $filterSql; |
676 | 676 | } |
677 | 677 | } |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | $association = $collection->getMapping(); |
695 | 695 | $owningAssociation = $association; |
696 | 696 | |
697 | - if (! $association->isOwningSide()) { |
|
697 | + if ( ! $association->isOwningSide()) { |
|
698 | 698 | $sourceClass = $this->em->getClassMetadata($association->getTargetEntity()); |
699 | 699 | $targetClass = $this->em->getClassMetadata($association->getSourceEntity()); |
700 | 700 | $sourceIdentifier = $this->uow->getEntityIdentifier($element); |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
721 | 721 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
722 | 722 | |
723 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
723 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
724 | 724 | $params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
725 | 725 | $types[] = $joinColumn->getType(); |
726 | 726 | } |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
731 | 731 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
732 | 732 | |
733 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
733 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
734 | 734 | $params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
735 | 735 | $types[] = $joinColumn->getType(); |
736 | 736 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | [$joinTargetEntitySQL, $filterSql] = $this->getFilterSql($association); |
742 | 742 | |
743 | 743 | if ($filterSql) { |
744 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
744 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
745 | 745 | $whereClauses[] = $filterSql; |
746 | 746 | } |
747 | 747 | } |
@@ -786,10 +786,10 @@ discard block |
||
786 | 786 | $property = $targetClass->getProperty($name); |
787 | 787 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
788 | 788 | |
789 | - $orderBy[] = $columnName . ' ' . $direction; |
|
789 | + $orderBy[] = $columnName.' '.$direction; |
|
790 | 790 | } |
791 | 791 | |
792 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
792 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
793 | 793 | } |
794 | 794 | |
795 | 795 | return ''; |
@@ -294,16 +294,16 @@ discard block |
||
294 | 294 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
295 | 295 | $columnName = $this->platform->quoteIdentifier($versionProperty->getColumnName()); |
296 | 296 | $identifier = array_map( |
297 | - function ($columnName) { |
|
297 | + function($columnName) { |
|
298 | 298 | return $this->platform->quoteIdentifier($columnName); |
299 | 299 | }, |
300 | 300 | array_keys($versionedClass->getIdentifierColumns($this->em)) |
301 | 301 | ); |
302 | 302 | |
303 | 303 | // FIXME: Order with composite keys might not be correct |
304 | - $sql = 'SELECT ' . $columnName |
|
305 | - . ' FROM ' . $tableName |
|
306 | - . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?'; |
|
304 | + $sql = 'SELECT '.$columnName |
|
305 | + . ' FROM '.$tableName |
|
306 | + . ' WHERE '.implode(' = ? AND ', $identifier).' = ?'; |
|
307 | 307 | |
308 | 308 | $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id); |
309 | 309 | $versionType = $versionProperty->getType(); |
@@ -341,13 +341,13 @@ discard block |
||
341 | 341 | $tableName = $this->class->getTableName(); |
342 | 342 | $updateData = $this->prepareUpdateData($entity); |
343 | 343 | |
344 | - if (! isset($updateData[$tableName])) { |
|
344 | + if ( ! isset($updateData[$tableName])) { |
|
345 | 345 | return; |
346 | 346 | } |
347 | 347 | |
348 | 348 | $data = $updateData[$tableName]; |
349 | 349 | |
350 | - if (! $data) { |
|
350 | + if ( ! $data) { |
|
351 | 351 | return; |
352 | 352 | } |
353 | 353 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | |
400 | 400 | if ($value !== null) { |
401 | 401 | // @todo guilhermeblanco Make sure we do not have flat association values. |
402 | - if (! is_array($value)) { |
|
402 | + if ( ! is_array($value)) { |
|
403 | 403 | $value = [$targetClass->identifier[0] => $value]; |
404 | 404 | } |
405 | 405 | |
@@ -495,18 +495,18 @@ discard block |
||
495 | 495 | case Type::SMALLINT: |
496 | 496 | case Type::INTEGER: |
497 | 497 | case Type::BIGINT: |
498 | - $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1'; |
|
498 | + $set[] = $versionColumnName.' = '.$versionColumnName.' + 1'; |
|
499 | 499 | break; |
500 | 500 | |
501 | 501 | case Type::DATETIME: |
502 | - $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP'; |
|
502 | + $set[] = $versionColumnName.' = CURRENT_TIMESTAMP'; |
|
503 | 503 | break; |
504 | 504 | } |
505 | 505 | } |
506 | 506 | |
507 | - $sql = 'UPDATE ' . $quotedTableName |
|
508 | - . ' SET ' . implode(', ', $set) |
|
509 | - . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; |
|
507 | + $sql = 'UPDATE '.$quotedTableName |
|
508 | + . ' SET '.implode(', ', $set) |
|
509 | + . ' WHERE '.implode(' = ? AND ', $where).' = ?'; |
|
510 | 510 | |
511 | 511 | $result = $this->conn->executeUpdate($sql, $params, $types); |
512 | 512 | |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | protected function deleteJoinTableRecords($identifier) |
524 | 524 | { |
525 | 525 | foreach ($this->class->getPropertiesIterator() as $association) { |
526 | - if (! ($association instanceof ManyToManyAssociationMetadata)) { |
|
526 | + if ( ! ($association instanceof ManyToManyAssociationMetadata)) { |
|
527 | 527 | continue; |
528 | 528 | } |
529 | 529 | |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | $otherKeys = []; |
536 | 536 | $keys = []; |
537 | 537 | |
538 | - if (! $owningAssociation->isOwningSide()) { |
|
538 | + if ( ! $owningAssociation->isOwningSide()) { |
|
539 | 539 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
540 | 540 | $owningAssociation = $class->getProperty($association->getMappedBy()); |
541 | 541 | } |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | } |
646 | 646 | |
647 | 647 | // Only owning side of x-1 associations can have a FK column. |
648 | - if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
648 | + if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) { |
|
649 | 649 | continue; |
650 | 650 | } |
651 | 651 | |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | $propertyName = $this->class->fieldNames[$columnName]; |
689 | 689 | $property = $this->class->getProperty($propertyName); |
690 | 690 | |
691 | - if (! $property) { |
|
691 | + if ( ! $property) { |
|
692 | 692 | return null; |
693 | 693 | } |
694 | 694 | |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | $sourceKeyColumn = $joinColumn->getReferencedColumnName(); |
809 | 809 | $targetKeyColumn = $joinColumn->getColumnName(); |
810 | 810 | |
811 | - if (! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
811 | + if ( ! isset($sourceClass->fieldNames[$sourceKeyColumn])) { |
|
812 | 812 | throw MappingException::joinColumnMustPointToMappedField( |
813 | 813 | $sourceClass->getClassName(), |
814 | 814 | $sourceKeyColumn |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | $criteria = []; |
1036 | 1036 | $parameters = []; |
1037 | 1037 | |
1038 | - if (! $association->isOwningSide()) { |
|
1038 | + if ( ! $association->isOwningSide()) { |
|
1039 | 1039 | $class = $this->em->getClassMetadata($association->getTargetEntity()); |
1040 | 1040 | $owningAssoc = $class->getProperty($association->getMappedBy()); |
1041 | 1041 | } |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | $value = $value[$targetClass->identifier[0]]; |
1064 | 1064 | } |
1065 | 1065 | |
1066 | - $criteria[$joinTableName . '.' . $quotedColumnName] = $value; |
|
1066 | + $criteria[$joinTableName.'.'.$quotedColumnName] = $value; |
|
1067 | 1067 | $parameters[] = [ |
1068 | 1068 | 'value' => $value, |
1069 | 1069 | 'field' => $fieldName, |
@@ -1113,11 +1113,11 @@ discard block |
||
1113 | 1113 | |
1114 | 1114 | switch ($lockMode) { |
1115 | 1115 | case LockMode::PESSIMISTIC_READ: |
1116 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
1116 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
1117 | 1117 | break; |
1118 | 1118 | |
1119 | 1119 | case LockMode::PESSIMISTIC_WRITE: |
1120 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
1120 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
1121 | 1121 | break; |
1122 | 1122 | } |
1123 | 1123 | |
@@ -1128,14 +1128,14 @@ discard block |
||
1128 | 1128 | |
1129 | 1129 | if ($filterSql !== '') { |
1130 | 1130 | $conditionSql = $conditionSql |
1131 | - ? $conditionSql . ' AND ' . $filterSql |
|
1131 | + ? $conditionSql.' AND '.$filterSql |
|
1132 | 1132 | : $filterSql; |
1133 | 1133 | } |
1134 | 1134 | |
1135 | - $select = 'SELECT ' . $columnList; |
|
1136 | - $from = ' FROM ' . $tableName . ' ' . $tableAlias; |
|
1137 | - $join = $this->currentPersisterContext->selectJoinSql . $joinSql; |
|
1138 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : ''); |
|
1135 | + $select = 'SELECT '.$columnList; |
|
1136 | + $from = ' FROM '.$tableName.' '.$tableAlias; |
|
1137 | + $join = $this->currentPersisterContext->selectJoinSql.$joinSql; |
|
1138 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : ''); |
|
1139 | 1139 | $lock = $this->platform->appendLockHint($from, $lockMode); |
1140 | 1140 | $query = $select |
1141 | 1141 | . $lock |
@@ -1143,7 +1143,7 @@ discard block |
||
1143 | 1143 | . $where |
1144 | 1144 | . $orderBySql; |
1145 | 1145 | |
1146 | - return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql; |
|
1146 | + return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql; |
|
1147 | 1147 | } |
1148 | 1148 | |
1149 | 1149 | /** |
@@ -1162,13 +1162,13 @@ discard block |
||
1162 | 1162 | |
1163 | 1163 | if ($filterSql !== '') { |
1164 | 1164 | $conditionSql = $conditionSql |
1165 | - ? $conditionSql . ' AND ' . $filterSql |
|
1165 | + ? $conditionSql.' AND '.$filterSql |
|
1166 | 1166 | : $filterSql; |
1167 | 1167 | } |
1168 | 1168 | |
1169 | 1169 | return 'SELECT COUNT(*) ' |
1170 | - . 'FROM ' . $tableName . ' ' . $tableAlias |
|
1171 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
1170 | + . 'FROM '.$tableName.' '.$tableAlias |
|
1171 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
1172 | 1172 | } |
1173 | 1173 | |
1174 | 1174 | /** |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | */ |
1184 | 1184 | final protected function getOrderBySQL(array $orderBy, $baseTableAlias) |
1185 | 1185 | { |
1186 | - if (! $orderBy) { |
|
1186 | + if ( ! $orderBy) { |
|
1187 | 1187 | return ''; |
1188 | 1188 | } |
1189 | 1189 | |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | foreach ($orderBy as $fieldName => $orientation) { |
1193 | 1193 | $orientation = strtoupper(trim($orientation)); |
1194 | 1194 | |
1195 | - if (! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1195 | + if ( ! in_array($orientation, ['ASC', 'DESC'], true)) { |
|
1196 | 1196 | throw InvalidOrientation::fromClassNameAndField($this->class->getClassName(), $fieldName); |
1197 | 1197 | } |
1198 | 1198 | |
@@ -1202,11 +1202,11 @@ discard block |
||
1202 | 1202 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1203 | 1203 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1204 | 1204 | |
1205 | - $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation; |
|
1205 | + $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation; |
|
1206 | 1206 | |
1207 | 1207 | continue; |
1208 | 1208 | } elseif ($property instanceof AssociationMetadata) { |
1209 | - if (! $property->isOwningSide()) { |
|
1209 | + if ( ! $property->isOwningSide()) { |
|
1210 | 1210 | throw InvalidFindByCall::fromInverseSideUsage( |
1211 | 1211 | $this->class->getClassName(), |
1212 | 1212 | $fieldName |
@@ -1222,7 +1222,7 @@ discard block |
||
1222 | 1222 | /** @var JoinColumnMetadata $joinColumn */ |
1223 | 1223 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1224 | 1224 | |
1225 | - $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation; |
|
1225 | + $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation; |
|
1226 | 1226 | } |
1227 | 1227 | |
1228 | 1228 | continue; |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | throw UnrecognizedField::byName($fieldName); |
1232 | 1232 | } |
1233 | 1233 | |
1234 | - return ' ORDER BY ' . implode(', ', $orderByList); |
|
1234 | + return ' ORDER BY '.implode(', ', $orderByList); |
|
1235 | 1235 | } |
1236 | 1236 | |
1237 | 1237 | /** |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | $isAssocToOneInverseSide = $property instanceof ToOneAssociationMetadata && ! $property->isOwningSide(); |
1274 | 1274 | $isAssocFromOneEager = ! $property instanceof ManyToManyAssociationMetadata && $property->getFetchMode() === FetchMode::EAGER; |
1275 | 1275 | |
1276 | - if (! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1276 | + if ( ! ($isAssocFromOneEager || $isAssocToOneInverseSide)) { |
|
1277 | 1277 | break; |
1278 | 1278 | } |
1279 | 1279 | |
@@ -1288,7 +1288,7 @@ discard block |
||
1288 | 1288 | break; // now this is why you shouldn't use inheritance |
1289 | 1289 | } |
1290 | 1290 | |
1291 | - $assocAlias = 'e' . ($eagerAliasCounter++); |
|
1291 | + $assocAlias = 'e'.($eagerAliasCounter++); |
|
1292 | 1292 | |
1293 | 1293 | $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName); |
1294 | 1294 | |
@@ -1316,14 +1316,14 @@ discard block |
||
1316 | 1316 | $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy()); |
1317 | 1317 | } |
1318 | 1318 | |
1319 | - if (! $property->isOwningSide()) { |
|
1319 | + if ( ! $property->isOwningSide()) { |
|
1320 | 1320 | $owningAssociation = $eagerEntity->getProperty($property->getMappedBy()); |
1321 | 1321 | } |
1322 | 1322 | |
1323 | 1323 | $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias); |
1324 | 1324 | $joinTableName = $eagerEntity->table->getQuotedQualifiedName($this->platform); |
1325 | 1325 | |
1326 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property); |
|
1326 | + $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property); |
|
1327 | 1327 | |
1328 | 1328 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
1329 | 1329 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | $joinCondition[] = $filterSql; |
1348 | 1348 | } |
1349 | 1349 | |
1350 | - $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON '; |
|
1350 | + $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON '; |
|
1351 | 1351 | $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition); |
1352 | 1352 | |
1353 | 1353 | break; |
@@ -1369,7 +1369,7 @@ discard block |
||
1369 | 1369 | */ |
1370 | 1370 | protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r') |
1371 | 1371 | { |
1372 | - if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1372 | + if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) { |
|
1373 | 1373 | return ''; |
1374 | 1374 | } |
1375 | 1375 | |
@@ -1409,7 +1409,7 @@ discard block |
||
1409 | 1409 | $owningAssociation = $association; |
1410 | 1410 | $sourceTableAlias = $this->getSQLTableAlias($this->class->getTableName()); |
1411 | 1411 | |
1412 | - if (! $association->isOwningSide()) { |
|
1412 | + if ( ! $association->isOwningSide()) { |
|
1413 | 1413 | $targetEntity = $this->em->getClassMetadata($association->getTargetEntity()); |
1414 | 1414 | $owningAssociation = $targetEntity->getProperty($association->getMappedBy()); |
1415 | 1415 | } |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | ); |
1431 | 1431 | } |
1432 | 1432 | |
1433 | - return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions); |
|
1433 | + return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions); |
|
1434 | 1434 | } |
1435 | 1435 | |
1436 | 1436 | /** |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | break; |
1495 | 1495 | |
1496 | 1496 | case $property instanceof LocalColumnMetadata: |
1497 | - if ((! $property->hasValueGenerator() || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) |
|
1497 | + if (( ! $property->hasValueGenerator() || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) |
|
1498 | 1498 | || $this->class->identifier[0] !== $name |
1499 | 1499 | ) { |
1500 | 1500 | $columnName = $property->getColumnName(); |
@@ -1552,7 +1552,7 @@ discard block |
||
1552 | 1552 | |
1553 | 1553 | $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName()); |
1554 | 1554 | |
1555 | - return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
1555 | + return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
1556 | 1556 | } |
1557 | 1557 | |
1558 | 1558 | /** |
@@ -1566,14 +1566,14 @@ discard block |
||
1566 | 1566 | protected function getSQLTableAlias($tableName, $assocName = '') |
1567 | 1567 | { |
1568 | 1568 | if ($tableName) { |
1569 | - $tableName .= '#' . $assocName; |
|
1569 | + $tableName .= '#'.$assocName; |
|
1570 | 1570 | } |
1571 | 1571 | |
1572 | 1572 | if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) { |
1573 | 1573 | return $this->currentPersisterContext->sqlTableAliases[$tableName]; |
1574 | 1574 | } |
1575 | 1575 | |
1576 | - $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++; |
|
1576 | + $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++; |
|
1577 | 1577 | |
1578 | 1578 | $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias; |
1579 | 1579 | |
@@ -1599,7 +1599,7 @@ discard block |
||
1599 | 1599 | } |
1600 | 1600 | |
1601 | 1601 | $lock = $this->getLockTablesSql($lockMode); |
1602 | - $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' '; |
|
1602 | + $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' '; |
|
1603 | 1603 | $sql = 'SELECT 1 ' |
1604 | 1604 | . $lock |
1605 | 1605 | . $where |
@@ -1622,7 +1622,7 @@ discard block |
||
1622 | 1622 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
1623 | 1623 | |
1624 | 1624 | return $this->platform->appendLockHint( |
1625 | - 'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()), |
|
1625 | + 'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()), |
|
1626 | 1626 | $lockMode |
1627 | 1627 | ); |
1628 | 1628 | } |
@@ -1672,19 +1672,19 @@ discard block |
||
1672 | 1672 | |
1673 | 1673 | if ($comparison !== null) { |
1674 | 1674 | // special case null value handling |
1675 | - if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value ===null) { |
|
1676 | - $selectedColumns[] = $column . ' IS NULL'; |
|
1675 | + if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && $value === null) { |
|
1676 | + $selectedColumns[] = $column.' IS NULL'; |
|
1677 | 1677 | |
1678 | 1678 | continue; |
1679 | 1679 | } |
1680 | 1680 | |
1681 | 1681 | if ($comparison === Comparison::NEQ && $value === null) { |
1682 | - $selectedColumns[] = $column . ' IS NOT NULL'; |
|
1682 | + $selectedColumns[] = $column.' IS NOT NULL'; |
|
1683 | 1683 | |
1684 | 1684 | continue; |
1685 | 1685 | } |
1686 | 1686 | |
1687 | - $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1687 | + $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder); |
|
1688 | 1688 | |
1689 | 1689 | continue; |
1690 | 1690 | } |
@@ -1732,7 +1732,7 @@ discard block |
||
1732 | 1732 | $tableAlias = $this->getSQLTableAlias($property->getTableName()); |
1733 | 1733 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
1734 | 1734 | |
1735 | - return [$tableAlias . '.' . $columnName]; |
|
1735 | + return [$tableAlias.'.'.$columnName]; |
|
1736 | 1736 | } |
1737 | 1737 | |
1738 | 1738 | if ($property instanceof AssociationMetadata) { |
@@ -1741,7 +1741,7 @@ discard block |
||
1741 | 1741 | |
1742 | 1742 | // Many-To-Many requires join table check for joinColumn |
1743 | 1743 | if ($owningAssociation instanceof ManyToManyAssociationMetadata) { |
1744 | - if (! $owningAssociation->isOwningSide()) { |
|
1744 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1745 | 1745 | $owningAssociation = $association; |
1746 | 1746 | } |
1747 | 1747 | |
@@ -1754,10 +1754,10 @@ discard block |
||
1754 | 1754 | foreach ($joinColumns as $joinColumn) { |
1755 | 1755 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1756 | 1756 | |
1757 | - $columns[] = $joinTableName . '.' . $quotedColumnName; |
|
1757 | + $columns[] = $joinTableName.'.'.$quotedColumnName; |
|
1758 | 1758 | } |
1759 | 1759 | } else { |
1760 | - if (! $owningAssociation->isOwningSide()) { |
|
1760 | + if ( ! $owningAssociation->isOwningSide()) { |
|
1761 | 1761 | throw InvalidFindByCall::fromInverseSideUsage( |
1762 | 1762 | $this->class->getClassName(), |
1763 | 1763 | $field |
@@ -1772,7 +1772,7 @@ discard block |
||
1772 | 1772 | foreach ($owningAssociation->getJoinColumns() as $joinColumn) { |
1773 | 1773 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
1774 | 1774 | |
1775 | - $columns[] = $tableAlias . '.' . $quotedColumnName; |
|
1775 | + $columns[] = $tableAlias.'.'.$quotedColumnName; |
|
1776 | 1776 | } |
1777 | 1777 | } |
1778 | 1778 | |
@@ -1880,7 +1880,7 @@ discard block |
||
1880 | 1880 | $value = $value[$targetClass->identifier[0]]; |
1881 | 1881 | } |
1882 | 1882 | |
1883 | - $criteria[$tableAlias . '.' . $quotedColumnName] = $value; |
|
1883 | + $criteria[$tableAlias.'.'.$quotedColumnName] = $value; |
|
1884 | 1884 | $parameters[] = [ |
1885 | 1885 | 'value' => $value, |
1886 | 1886 | 'field' => $fieldName, |
@@ -1965,7 +1965,7 @@ discard block |
||
1965 | 1965 | case $property instanceof AssociationMetadata: |
1966 | 1966 | $class = $this->em->getClassMetadata($property->getTargetEntity()); |
1967 | 1967 | |
1968 | - if (! $property->isOwningSide()) { |
|
1968 | + if ( ! $property->isOwningSide()) { |
|
1969 | 1969 | $property = $class->getProperty($property->getMappedBy()); |
1970 | 1970 | } |
1971 | 1971 | |
@@ -1985,7 +1985,7 @@ discard block |
||
1985 | 1985 | } |
1986 | 1986 | |
1987 | 1987 | if (is_array($value)) { |
1988 | - return array_map(static function ($type) { |
|
1988 | + return array_map(static function($type) { |
|
1989 | 1989 | return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET; |
1990 | 1990 | }, $types); |
1991 | 1991 | } |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | */ |
2043 | 2043 | private function getIndividualValue($value) |
2044 | 2044 | { |
2045 | - if (! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2045 | + if ( ! is_object($value) || ! $this->em->getMetadataFactory()->hasMetadataFor(StaticClassNameConverter::getClass($value))) { |
|
2046 | 2046 | return $value; |
2047 | 2047 | } |
2048 | 2048 | |
@@ -2056,7 +2056,7 @@ discard block |
||
2056 | 2056 | { |
2057 | 2057 | $criteria = $this->getIdentifier($entity); |
2058 | 2058 | |
2059 | - if (! $criteria) { |
|
2059 | + if ( ! $criteria) { |
|
2060 | 2060 | return false; |
2061 | 2061 | } |
2062 | 2062 | |
@@ -2064,12 +2064,12 @@ discard block |
||
2064 | 2064 | |
2065 | 2065 | $sql = 'SELECT 1 ' |
2066 | 2066 | . $this->getLockTablesSql(null) |
2067 | - . ' WHERE ' . $this->getSelectConditionSQL($criteria); |
|
2067 | + . ' WHERE '.$this->getSelectConditionSQL($criteria); |
|
2068 | 2068 | |
2069 | 2069 | [$params, $types] = $this->expandParameters($criteria); |
2070 | 2070 | |
2071 | 2071 | if ($extraConditions !== null) { |
2072 | - $sql .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions); |
|
2072 | + $sql .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions); |
|
2073 | 2073 | [$criteriaParams, $criteriaTypes] = $this->expandCriteriaParameters($extraConditions); |
2074 | 2074 | |
2075 | 2075 | $params = array_merge($params, $criteriaParams); |
@@ -2079,7 +2079,7 @@ discard block |
||
2079 | 2079 | $filterSql = $this->generateFilterConditionSQL($this->class, $alias); |
2080 | 2080 | |
2081 | 2081 | if ($filterSql) { |
2082 | - $sql .= ' AND ' . $filterSql; |
|
2082 | + $sql .= ' AND '.$filterSql; |
|
2083 | 2083 | } |
2084 | 2084 | |
2085 | 2085 | return (bool) $this->conn->fetchColumn($sql, $params, $types); |
@@ -2092,13 +2092,13 @@ discard block |
||
2092 | 2092 | */ |
2093 | 2093 | protected function getJoinSQLForAssociation(AssociationMetadata $association) |
2094 | 2094 | { |
2095 | - if (! $association->isOwningSide()) { |
|
2095 | + if ( ! $association->isOwningSide()) { |
|
2096 | 2096 | return 'LEFT JOIN'; |
2097 | 2097 | } |
2098 | 2098 | |
2099 | 2099 | // if one of the join columns is nullable, return left join |
2100 | 2100 | foreach ($association->getJoinColumns() as $joinColumn) { |
2101 | - if (! $joinColumn->isNullable()) { |
|
2101 | + if ( ! $joinColumn->isNullable()) { |
|
2102 | 2102 | continue; |
2103 | 2103 | } |
2104 | 2104 | |
@@ -2115,7 +2115,7 @@ discard block |
||
2115 | 2115 | */ |
2116 | 2116 | public function getSQLColumnAlias() |
2117 | 2117 | { |
2118 | - return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++); |
|
2118 | + return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++); |
|
2119 | 2119 | } |
2120 | 2120 | |
2121 | 2121 | /** |
@@ -2134,13 +2134,13 @@ discard block |
||
2134 | 2134 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
2135 | 2135 | |
2136 | 2136 | if ($filterExpr !== '') { |
2137 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
2137 | + $filterClauses[] = '('.$filterExpr.')'; |
|
2138 | 2138 | } |
2139 | 2139 | } |
2140 | 2140 | |
2141 | 2141 | $sql = implode(' AND ', $filterClauses); |
2142 | 2142 | |
2143 | - return $sql ? '(' . $sql . ')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2143 | + return $sql ? '('.$sql.')' : ''; // Wrap again to avoid "X or Y and FilterConditionSQL" |
|
2144 | 2144 | } |
2145 | 2145 | |
2146 | 2146 | /** |