@@ -73,7 +73,7 @@ |
||
| 73 | 73 | public function walkCompositeExpression(CompositeExpression $expr) |
| 74 | 74 | { |
| 75 | 75 | $expressions = []; |
| 76 | - foreach($expr->getExpressionList() as $expression) { |
|
| 76 | + foreach ($expr->getExpressionList() as $expression) { |
|
| 77 | 77 | $expressions[] = $this->dispatch($expression); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | foreach ($joinColumns as $joinColumn) { |
| 135 | 135 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); |
| 136 | 136 | $referencedName = $joinColumn['referencedColumnName']; |
| 137 | - $conditions[] = 't.' . $columnName . ' = ?'; |
|
| 137 | + $conditions[] = 't.'.$columnName.' = ?'; |
|
| 138 | 138 | $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; |
| 139 | 139 | $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); |
| 140 | 140 | } |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | }*/ |
| 164 | 164 | |
| 165 | 165 | $sql = 'SELECT COUNT(*)' |
| 166 | - . ' FROM ' . $joinTableName . ' t' |
|
| 166 | + . ' FROM '.$joinTableName.' t' |
|
| 167 | 167 | . $joinTargetEntitySQL |
| 168 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
| 168 | + . ' WHERE '.implode(' AND ', $conditions); |
|
| 169 | 169 | |
| 170 | 170 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
| 171 | 171 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | |
| 194 | 194 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
| 195 | 195 | |
| 196 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 196 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 197 | 197 | |
| 198 | 198 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 199 | 199 | } |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
| 211 | 211 | |
| 212 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 212 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 213 | 213 | |
| 214 | 214 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
| 215 | 215 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
| 227 | 227 | |
| 228 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
| 228 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
| 229 | 229 | |
| 230 | 230 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
| 231 | 231 | } |
@@ -251,10 +251,10 @@ discard block |
||
| 251 | 251 | |
| 252 | 252 | $whereClauseExpressionVisitor = new QueryExpressionVisitor(['te']); |
| 253 | 253 | $whereExpr = $whereClauseExpressionVisitor->dispatch($mappedExpr); |
| 254 | - $queryBuilder->where($whereExpr . ''); |
|
| 254 | + $queryBuilder->where($whereExpr.''); |
|
| 255 | 255 | |
| 256 | 256 | /** @var Parameter $parameter */ |
| 257 | - foreach($whereClauseExpressionVisitor->getParameters() as $parameter) { |
|
| 257 | + foreach ($whereClauseExpressionVisitor->getParameters() as $parameter) { |
|
| 258 | 258 | $queryBuilder->setParameter($parameter->getName(), $parameter->getValue(), $parameter->getType()); |
| 259 | 259 | } |
| 260 | 260 | } |
@@ -301,8 +301,8 @@ discard block |
||
| 301 | 301 | |
| 302 | 302 | // A join is needed if there is filtering on the target entity |
| 303 | 303 | $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); |
| 304 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
| 305 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
| 304 | + $joinSql = ' JOIN '.$tableName.' te' |
|
| 305 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
| 306 | 306 | |
| 307 | 307 | return array($joinSql, $filterSql); |
| 308 | 308 | } |
@@ -321,12 +321,12 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
| 323 | 323 | if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
| 324 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
| 324 | + $filterClauses[] = '('.$filterExpr.')'; |
|
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | return $filterClauses |
| 329 | - ? '(' . implode(' AND ', $filterClauses) . ')' |
|
| 329 | + ? '('.implode(' AND ', $filterClauses).')' |
|
| 330 | 330 | : ''; |
| 331 | 331 | } |
| 332 | 332 | |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 355 | 355 | $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
| 356 | 356 | |
| 357 | - $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; |
|
| 357 | + $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName; |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | return $conditions; |
@@ -376,8 +376,8 @@ discard block |
||
| 376 | 376 | $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | - return 'DELETE FROM ' . $joinTable |
|
| 380 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
| 379 | + return 'DELETE FROM '.$joinTable |
|
| 380 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | /** |
@@ -436,8 +436,8 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return array( |
| 439 | - 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 440 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', |
|
| 439 | + 'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 440 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?', |
|
| 441 | 441 | $types, |
| 442 | 442 | ); |
| 443 | 443 | } |
@@ -485,10 +485,10 @@ discard block |
||
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | return array( |
| 488 | - 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 489 | - . ' (' . implode(', ', $columns) . ')' |
|
| 488 | + 'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
| 489 | + . ' ('.implode(', ', $columns).')' |
|
| 490 | 490 | . ' VALUES' |
| 491 | - . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', |
|
| 491 | + . ' ('.implode(', ', array_fill(0, count($columns), '?')).')', |
|
| 492 | 492 | $types, |
| 493 | 493 | ); |
| 494 | 494 | } |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); |
| 574 | 574 | $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); |
| 575 | 575 | |
| 576 | - if (! $mapping['isOwningSide']) { |
|
| 576 | + if ( ! $mapping['isOwningSide']) { |
|
| 577 | 577 | $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); |
| 578 | 578 | $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; |
| 579 | 579 | $joinColumns = $mapping['joinTable']['joinColumns']; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | $targetRelationMode = 'relationToTargetKeyColumns'; |
| 587 | 587 | } |
| 588 | 588 | |
| 589 | - $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; |
|
| 589 | + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t'; |
|
| 590 | 590 | $whereClauses = array(); |
| 591 | 591 | $params = array(); |
| 592 | 592 | $types = array(); |
@@ -597,14 +597,14 @@ discard block |
||
| 597 | 597 | $joinConditions = array(); |
| 598 | 598 | |
| 599 | 599 | foreach ($joinColumns as $joinTableColumn) { |
| 600 | - $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; |
|
| 600 | + $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName']; |
|
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); |
| 604 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
| 604 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
| 605 | 605 | $columnName = $targetClass->getColumnName($indexBy); |
| 606 | 606 | |
| 607 | - $whereClauses[] = 'tr.' . $columnName . ' = ?'; |
|
| 607 | + $whereClauses[] = 'tr.'.$columnName.' = ?'; |
|
| 608 | 608 | $params[] = $key; |
| 609 | 609 | $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); |
| 610 | 610 | } |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
| 613 | 613 | if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { |
| 614 | 614 | $column = $mapping[$sourceRelationMode][$joinTableColumn]; |
| 615 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
| 615 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
| 616 | 616 | $params[] = $sourceClass->containsForeignIdentifier |
| 617 | 617 | ? $id[$sourceClass->getFieldForColumn($column)] |
| 618 | 618 | : $id[$sourceClass->fieldNames[$column]]; |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | } elseif ( ! $joinNeeded) { |
| 621 | 621 | $column = $mapping[$targetRelationMode][$joinTableColumn]; |
| 622 | 622 | |
| 623 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
| 623 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
| 624 | 624 | $params[] = $key; |
| 625 | 625 | $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); |
| 626 | 626 | } |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
| 631 | 631 | |
| 632 | 632 | if ($filterSql) { |
| 633 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 633 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 634 | 634 | $whereClauses[] = $filterSql; |
| 635 | 635 | } |
| 636 | 636 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | $types = array(); |
| 675 | 675 | |
| 676 | 676 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
| 677 | - $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; |
|
| 677 | + $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?'; |
|
| 678 | 678 | |
| 679 | 679 | if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { |
| 680 | 680 | $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; |
@@ -696,7 +696,7 @@ discard block |
||
| 696 | 696 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
| 697 | 697 | |
| 698 | 698 | if ($filterSql) { |
| 699 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
| 699 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
| 700 | 700 | $whereClauses[] = $filterSql; |
| 701 | 701 | } |
| 702 | 702 | } |