@@ -73,13 +73,13 @@ |
||
| 73 | 73 | |
| 74 | 74 | switch ($expr->getType()) { |
| 75 | 75 | case CompositeExpression::TYPE_AND: |
| 76 | - return '(' . implode(' AND ', $expressionList) . ')'; |
|
| 76 | + return '('.implode(' AND ', $expressionList).')'; |
|
| 77 | 77 | |
| 78 | 78 | case CompositeExpression::TYPE_OR: |
| 79 | - return '(' . implode(' OR ', $expressionList) . ')'; |
|
| 79 | + return '('.implode(' OR ', $expressionList).')'; |
|
| 80 | 80 | |
| 81 | 81 | default: |
| 82 | - throw new \RuntimeException('Unknown composite ' . $expr->getType()); |
|
| 82 | + throw new \RuntimeException('Unknown composite '.$expr->getType()); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -79,13 +79,13 @@ |
||
| 79 | 79 | |
| 80 | 80 | switch ($comparison->getOperator()) { |
| 81 | 81 | case Comparison::CONTAINS: |
| 82 | - return '%' . $value . '%'; |
|
| 82 | + return '%'.$value.'%'; |
|
| 83 | 83 | |
| 84 | 84 | case Comparison::STARTS_WITH: |
| 85 | - return $value . '%'; |
|
| 85 | + return $value.'%'; |
|
| 86 | 86 | |
| 87 | 87 | case Comparison::ENDS_WITH: |
| 88 | - return '%' . $value; |
|
| 88 | + return '%'.$value; |
|
| 89 | 89 | |
| 90 | 90 | default: |
| 91 | 91 | return $value; |
@@ -10,6 +10,6 @@ |
||
| 10 | 10 | { |
| 11 | 11 | public static function fromClassNameAndField(string $className, string $field) : self |
| 12 | 12 | { |
| 13 | - return new self('Invalid order by orientation specified for ' . $className . '#' . $field); |
|
| 13 | + return new self('Invalid order by orientation specified for '.$className.'#'.$field); |
|
| 14 | 14 | } |
| 15 | 15 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $association = $collection->getMapping(); |
| 38 | 38 | |
| 39 | - if (! $association->isOwningSide()) { |
|
| 39 | + if ( ! $association->isOwningSide()) { |
|
| 40 | 40 | return; // ignore inverse side |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | /** @var JoinColumnMetadata $joinColumn */ |
| 49 | 49 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 50 | 50 | |
| 51 | - if (! $joinColumn->getType()) { |
|
| 51 | + if ( ! $joinColumn->getType()) { |
|
| 52 | 52 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | { |
| 69 | 69 | $association = $collection->getMapping(); |
| 70 | 70 | |
| 71 | - if (! $association->isOwningSide()) { |
|
| 71 | + if ( ! $association->isOwningSide()) { |
|
| 72 | 72 | return; // ignore inverse side |
| 73 | 73 | } |
| 74 | 74 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $association = $collection->getMapping(); |
| 101 | 101 | |
| 102 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 102 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 103 | 103 | throw new \BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 147 | 147 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 148 | 148 | |
| 149 | - if (! $joinColumn->getType()) { |
|
| 149 | + if ( ! $joinColumn->getType()) { |
|
| 150 | 150 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -178,9 +178,9 @@ discard block |
||
| 178 | 178 | }*/ |
| 179 | 179 | |
| 180 | 180 | $sql = 'SELECT COUNT(*)' |
| 181 | - . ' FROM ' . $joinTableName . ' t' |
|
| 181 | + . ' FROM '.$joinTableName.' t' |
|
| 182 | 182 | . $joinTargetEntitySQL |
| 183 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
| 183 | + . ' WHERE '.implode(' AND ', $conditions); |
|
| 184 | 184 | |
| 185 | 185 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
| 186 | 186 | } |
@@ -202,13 +202,13 @@ discard block |
||
| 202 | 202 | { |
| 203 | 203 | $association = $collection->getMapping(); |
| 204 | 204 | |
| 205 | - if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 205 | + if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) { |
|
| 206 | 206 | throw new \BadMethodCallException('Selecting a collection by index is only supported on indexed collections.'); |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
| 210 | 210 | |
| 211 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 211 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 212 | 212 | |
| 213 | 213 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 214 | 214 | } |
@@ -218,13 +218,13 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | public function contains(PersistentCollection $collection, $element) |
| 220 | 220 | { |
| 221 | - if (! $this->isValidEntityState($element)) { |
|
| 221 | + if ( ! $this->isValidEntityState($element)) { |
|
| 222 | 222 | return false; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
| 226 | 226 | |
| 227 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 227 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 228 | 228 | |
| 229 | 229 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 230 | 230 | } |
@@ -234,13 +234,13 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | public function removeElement(PersistentCollection $collection, $element) |
| 236 | 236 | { |
| 237 | - if (! $this->isValidEntityState($element)) { |
|
| 237 | + if ( ! $this->isValidEntityState($element)) { |
|
| 238 | 238 | return false; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
| 242 | 242 | |
| 243 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 243 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 244 | 244 | |
| 245 | 245 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
| 246 | 246 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $onConditions = $this->getOnConditionSQL($association); |
| 259 | 259 | $whereClauses = $params = $types = []; |
| 260 | 260 | |
| 261 | - if (! $association->isOwningSide()) { |
|
| 261 | + if ( ! $association->isOwningSide()) { |
|
| 262 | 262 | $association = $targetClass->getProperty($association->getMappedBy()); |
| 263 | 263 | $joinColumns = $association->getJoinTable()->getInverseJoinColumns(); |
| 264 | 264 | } else { |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 271 | 271 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 272 | 272 | |
| 273 | - if (! $joinColumn->getType()) { |
|
| 273 | + if ( ! $joinColumn->getType()) { |
|
| 274 | 274 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em)); |
| 275 | 275 | } |
| 276 | 276 | |
@@ -298,11 +298,11 @@ discard block |
||
| 298 | 298 | |
| 299 | 299 | $resultSetMapping->addRootEntityFromClassMetadata($targetClass->getClassName(), 'te'); |
| 300 | 300 | |
| 301 | - $sql = 'SELECT ' . $resultSetMapping->generateSelectClause() |
|
| 302 | - . ' FROM ' . $tableName . ' te' |
|
| 303 | - . ' JOIN ' . $joinTableName . ' t ON' |
|
| 301 | + $sql = 'SELECT '.$resultSetMapping->generateSelectClause() |
|
| 302 | + . ' FROM '.$tableName.' te' |
|
| 303 | + . ' JOIN '.$joinTableName.' t ON' |
|
| 304 | 304 | . implode(' AND ', $onConditions) |
| 305 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 305 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
| 306 | 306 | |
| 307 | 307 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
| 308 | 308 | $sql .= $this->getLimitSql($criteria); |
@@ -337,8 +337,8 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | // A join is needed if there is filtering on the target entity |
| 339 | 339 | $tableName = $rootClass->table->getQuotedQualifiedName($this->platform); |
| 340 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
| 341 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($association)); |
|
| 340 | + $joinSql = ' JOIN '.$tableName.' te' |
|
| 341 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($association)); |
|
| 342 | 342 | |
| 343 | 343 | return [$joinSql, $filterSql]; |
| 344 | 344 | } |
@@ -359,18 +359,18 @@ discard block |
||
| 359 | 359 | $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias); |
| 360 | 360 | |
| 361 | 361 | if ($filterExpr) { |
| 362 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
| 362 | + $filterClauses[] = '('.$filterExpr.')'; |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | - if (! $filterClauses) { |
|
| 366 | + if ( ! $filterClauses) { |
|
| 367 | 367 | return ''; |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | $filterSql = implode(' AND ', $filterClauses); |
| 371 | 371 | |
| 372 | 372 | return isset($filterClauses[1]) |
| 373 | - ? '(' . $filterSql . ')' |
|
| 373 | + ? '('.$filterSql.')' |
|
| 374 | 374 | : $filterSql |
| 375 | 375 | ; |
| 376 | 376 | } |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 400 | 400 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
| 401 | 401 | |
| 402 | - $conditions[] = ' t.' . $quotedColumnName . ' = te.' . $quotedReferencedColumnName; |
|
| 402 | + $conditions[] = ' t.'.$quotedColumnName.' = te.'.$quotedReferencedColumnName; |
|
| 403 | 403 | } |
| 404 | 404 | |
| 405 | 405 | return $conditions; |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | $columns[] = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | - return 'DELETE FROM ' . $joinTableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
| 424 | + return 'DELETE FROM '.$joinTableName.' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /** |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 477 | 477 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 478 | 478 | |
| 479 | - if (! $joinColumn->getType()) { |
|
| 479 | + if ( ! $joinColumn->getType()) { |
|
| 480 | 480 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 481 | 481 | } |
| 482 | 482 | |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 490 | 490 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 491 | 491 | |
| 492 | - if (! $joinColumn->getType()) { |
|
| 492 | + if ( ! $joinColumn->getType()) { |
|
| 493 | 493 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 494 | 494 | } |
| 495 | 495 | |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 541 | 541 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 542 | 542 | |
| 543 | - if (! $joinColumn->getType()) { |
|
| 543 | + if ( ! $joinColumn->getType()) { |
|
| 544 | 544 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em)); |
| 545 | 545 | } |
| 546 | 546 | |
@@ -553,7 +553,7 @@ discard block |
||
| 553 | 553 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 554 | 554 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 555 | 555 | |
| 556 | - if (! $joinColumn->getType()) { |
|
| 556 | + if ( ! $joinColumn->getType()) { |
|
| 557 | 557 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 558 | 558 | } |
| 559 | 559 | |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | $sourceClass = $this->em->getClassMetadata($owningAssociation->getSourceEntity()); |
| 638 | 638 | $targetClass = $this->em->getClassMetadata($owningAssociation->getTargetEntity()); |
| 639 | 639 | |
| 640 | - if (! $owningAssociation->isOwningSide()) { |
|
| 640 | + if ( ! $owningAssociation->isOwningSide()) { |
|
| 641 | 641 | $owningAssociation = $targetClass->getProperty($owningAssociation->getMappedBy()); |
| 642 | 642 | $joinTable = $owningAssociation->getJoinTable(); |
| 643 | 643 | $joinColumns = $joinTable->getJoinColumns(); |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | } |
| 650 | 650 | |
| 651 | 651 | $joinTableName = $joinTable->getQuotedQualifiedName($this->platform); |
| 652 | - $quotedJoinTable = $joinTableName . ' t'; |
|
| 652 | + $quotedJoinTable = $joinTableName.' t'; |
|
| 653 | 653 | $whereClauses = []; |
| 654 | 654 | $params = []; |
| 655 | 655 | $types = []; |
@@ -663,11 +663,11 @@ discard block |
||
| 663 | 663 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 664 | 664 | $quotedReferencedColumnName = $this->platform->quoteIdentifier($joinColumn->getReferencedColumnName()); |
| 665 | 665 | |
| 666 | - $joinConditions[] = ' t.' . $quotedColumnName . ' = tr.' . $quotedReferencedColumnName; |
|
| 666 | + $joinConditions[] = ' t.'.$quotedColumnName.' = tr.'.$quotedReferencedColumnName; |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | $tableName = $targetClass->table->getQuotedQualifiedName($this->platform); |
| 670 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
| 670 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
| 671 | 671 | $indexByProperty = $targetClass->getProperty($indexBy); |
| 672 | 672 | |
| 673 | 673 | switch (true) { |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 691 | 691 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 692 | 692 | |
| 693 | - if (! $joinColumn->getType()) { |
|
| 693 | + if ( ! $joinColumn->getType()) { |
|
| 694 | 694 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 695 | 695 | } |
| 696 | 696 | |
@@ -699,13 +699,13 @@ discard block |
||
| 699 | 699 | $types[] = $joinColumn->getType(); |
| 700 | 700 | } |
| 701 | 701 | |
| 702 | - if (! $joinNeeded) { |
|
| 702 | + if ( ! $joinNeeded) { |
|
| 703 | 703 | foreach ($joinColumns as $joinColumn) { |
| 704 | 704 | /** @var JoinColumnMetadata $joinColumn */ |
| 705 | 705 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 706 | 706 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 707 | 707 | |
| 708 | - if (! $joinColumn->getType()) { |
|
| 708 | + if ( ! $joinColumn->getType()) { |
|
| 709 | 709 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 710 | 710 | } |
| 711 | 711 | |
@@ -719,7 +719,7 @@ discard block |
||
| 719 | 719 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association); |
| 720 | 720 | |
| 721 | 721 | if ($filterSql) { |
| 722 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 722 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 723 | 723 | $whereClauses[] = $filterSql; |
| 724 | 724 | } |
| 725 | 725 | } |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | $association = $collection->getMapping(); |
| 743 | 743 | $owningAssociation = $association; |
| 744 | 744 | |
| 745 | - if (! $association->isOwningSide()) { |
|
| 745 | + if ( ! $association->isOwningSide()) { |
|
| 746 | 746 | $sourceClass = $this->em->getClassMetadata($association->getTargetEntity()); |
| 747 | 747 | $targetClass = $this->em->getClassMetadata($association->getSourceEntity()); |
| 748 | 748 | $sourceIdentifier = $this->uow->getEntityIdentifier($element); |
@@ -768,11 +768,11 @@ discard block |
||
| 768 | 768 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 769 | 769 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 770 | 770 | |
| 771 | - if (! $joinColumn->getType()) { |
|
| 771 | + if ( ! $joinColumn->getType()) { |
|
| 772 | 772 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 773 | 773 | } |
| 774 | 774 | |
| 775 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
| 775 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
| 776 | 776 | $params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
| 777 | 777 | $types[] = $joinColumn->getType(); |
| 778 | 778 | } |
@@ -782,11 +782,11 @@ discard block |
||
| 782 | 782 | $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 783 | 783 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 784 | 784 | |
| 785 | - if (! $joinColumn->getType()) { |
|
| 785 | + if ( ! $joinColumn->getType()) { |
|
| 786 | 786 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | - $whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
|
| 789 | + $whereClauses[] = ($addFilters ? 't.' : '').$quotedColumnName.' = ?'; |
|
| 790 | 790 | $params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
| 791 | 791 | $types[] = $joinColumn->getType(); |
| 792 | 792 | } |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association); |
| 798 | 798 | |
| 799 | 799 | if ($filterSql) { |
| 800 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 800 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 801 | 801 | $whereClauses[] = $filterSql; |
| 802 | 802 | } |
| 803 | 803 | } |
@@ -842,10 +842,10 @@ discard block |
||
| 842 | 842 | $property = $targetClass->getProperty($name); |
| 843 | 843 | $columnName = $this->platform->quoteIdentifier($property->getColumnName()); |
| 844 | 844 | |
| 845 | - $orderBy[] = $columnName . ' ' . $direction; |
|
| 845 | + $orderBy[] = $columnName.' '.$direction; |
|
| 846 | 846 | } |
| 847 | 847 | |
| 848 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
| 848 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
| 849 | 849 | } |
| 850 | 850 | return ''; |
| 851 | 851 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | 'u__status' => 'developer', |
| 64 | 64 | 'u__username' => 'jwage', |
| 65 | 65 | 'u__name' => 'Jonathan', |
| 66 | - 'sclr0' => 'JWAGE' . $i, |
|
| 66 | + 'sclr0' => 'JWAGE'.$i, |
|
| 67 | 67 | 'p__phonenumber' => '91', |
| 68 | 68 | ]; |
| 69 | 69 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $isInitialized = $collection->isInitialized(); |
| 62 | 62 | $isDirty = $collection->isDirty(); |
| 63 | 63 | |
| 64 | - if (! $isInitialized && ! $isDirty) { |
|
| 64 | + if ( ! $isInitialized && ! $isDirty) { |
|
| 65 | 65 | return; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $this->addToAssertionCount(1); |
| 30 | 30 | } catch (QueryException $e) { |
| 31 | 31 | if ($debug) { |
| 32 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 32 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $this->fail($e->getMessage()); |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | $this->fail('No syntax errors were detected, when syntax errors were expected'); |
| 45 | 45 | } catch (QueryException $e) { |
| 46 | 46 | if ($debug) { |
| 47 | - echo $e->getMessage() . PHP_EOL; |
|
| 48 | - echo $e->getTraceAsString() . PHP_EOL; |
|
| 47 | + echo $e->getMessage().PHP_EOL; |
|
| 48 | + echo $e->getTraceAsString().PHP_EOL; |
|
| 49 | 49 | } |
| 50 | 50 | $this->addToAssertionCount(1); |
| 51 | 51 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'], |
| 108 | 108 | |
| 109 | 109 | /* Checks for invalid AbstractSchemaName */ |
| 110 | - ['SELECT u FROM UnknownClass u'], // unknown |
|
| 110 | + ['SELECT u FROM UnknownClass u'], // unknown |
|
| 111 | 111 | ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash |
| 112 | 112 | ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\) |
| 113 | 113 | ['SELECT u FROM Unknown\Class\ u'], // unknown, syntactically bogus (trailing \) |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | */ |
| 574 | 574 | public function testDQLKeywordInJoinIsAllowed() : void |
| 575 | 575 | { |
| 576 | - self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 576 | + self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g'); |
|
| 577 | 577 | } |
| 578 | 578 | |
| 579 | 579 | /** |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | */ |
| 582 | 582 | public function testDQLKeywordInConditionIsAllowed() : void |
| 583 | 583 | { |
| 584 | - self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 584 | + self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0'); |
|
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | /* The exception is currently thrown in the SQLWalker, not earlier. |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | */ |
| 687 | 687 | public function testNewLiteralExpression() : void |
| 688 | 688 | { |
| 689 | - self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 689 | + self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 690 | 690 | } |
| 691 | 691 | |
| 692 | 692 | /** |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | */ |
| 695 | 695 | public function testNewLiteralWithSubselectExpression() : void |
| 696 | 696 | { |
| 697 | - self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 697 | + self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u"); |
|
| 698 | 698 | } |
| 699 | 699 | |
| 700 | 700 | public function testStringPrimaryAcceptsAggregateExpression() : void |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | $query = $this->em->createQuery( |
| 41 | 41 | 'SELECT CONCAT(e.type, MIN(e.version)) pair' |
| 42 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
| 42 | + . ' FROM '.GH7286Entity::class.' e' |
|
| 43 | 43 | . ' WHERE e.type IS NOT NULL' |
| 44 | 44 | . ' GROUP BY e.type' |
| 45 | 45 | . ' ORDER BY e.type' |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $query = $this->em->createQuery( |
| 65 | 65 | 'SELECT CC(e.type, MIN(e.version)) pair' |
| 66 | - . ' FROM ' . GH7286Entity::class . ' e' |
|
| 66 | + . ' FROM '.GH7286Entity::class.' e' |
|
| 67 | 67 | . ' WHERE e.type IS NOT NULL AND e.type != :type' |
| 68 | 68 | . ' GROUP BY e.type' |
| 69 | 69 | ); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | protected function loadDriver() |
| 29 | 29 | { |
| 30 | - return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml'); |
|
| 30 | + return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml'); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function testClassTableInheritanceDiscriminatorMap() : void |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | */ |
| 171 | 171 | public function testValidateXmlSchema($xmlMappingFile) : void |
| 172 | 172 | { |
| 173 | - $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd'; |
|
| 173 | + $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd'; |
|
| 174 | 174 | $dom = new \DOMDocument(); |
| 175 | 175 | |
| 176 | 176 | $dom->load($xmlMappingFile); |
@@ -180,14 +180,14 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | public static function dataValidSchema() |
| 182 | 182 | { |
| 183 | - $list = glob(__DIR__ . '/xml/*.xml'); |
|
| 183 | + $list = glob(__DIR__.'/xml/*.xml'); |
|
| 184 | 184 | $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm']; |
| 185 | 185 | |
| 186 | - $list = array_filter($list, function ($item) use ($invalid) { |
|
| 186 | + $list = array_filter($list, function($item) use ($invalid) { |
|
| 187 | 187 | return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true); |
| 188 | 188 | }); |
| 189 | 189 | |
| 190 | - return array_map(function ($item) { |
|
| 190 | + return array_map(function($item) { |
|
| 191 | 191 | return [$item]; |
| 192 | 192 | }, $list); |
| 193 | 193 | } |