@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | foreach ($joinColumns as $joinColumn) { |
133 | 133 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); |
134 | 134 | $referencedName = $joinColumn['referencedColumnName']; |
135 | - $conditions[] = 't.' . $columnName . ' = ?'; |
|
135 | + $conditions[] = 't.'.$columnName.' = ?'; |
|
136 | 136 | $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; |
137 | 137 | $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); |
138 | 138 | } |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | }*/ |
162 | 162 | |
163 | 163 | $sql = 'SELECT COUNT(*)' |
164 | - . ' FROM ' . $joinTableName . ' t' |
|
164 | + . ' FROM '.$joinTableName.' t' |
|
165 | 165 | . $joinTargetEntitySQL |
166 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
166 | + . ' WHERE '.implode(' AND ', $conditions); |
|
167 | 167 | |
168 | 168 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
169 | 169 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
193 | 193 | |
194 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
194 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
195 | 195 | |
196 | 196 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
197 | 197 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
209 | 209 | |
210 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
210 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
211 | 211 | |
212 | 212 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
213 | 213 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
225 | 225 | |
226 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
226 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
227 | 227 | |
228 | 228 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
229 | 229 | } |
@@ -272,11 +272,11 @@ discard block |
||
272 | 272 | $rsm = new Query\ResultSetMappingBuilder($this->em); |
273 | 273 | $rsm->addRootEntityFromClassMetadata($targetClass->name, 'te'); |
274 | 274 | |
275 | - $sql = 'SELECT ' . $rsm->generateSelectClause() |
|
276 | - . ' FROM ' . $tableName . ' te' |
|
277 | - . ' JOIN ' . $joinTable . ' t ON' |
|
275 | + $sql = 'SELECT '.$rsm->generateSelectClause() |
|
276 | + . ' FROM '.$tableName.' te' |
|
277 | + . ' JOIN '.$joinTable.' t ON' |
|
278 | 278 | . implode(' AND ', $onConditions) |
279 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
279 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
280 | 280 | |
281 | 281 | $sql .= $this->getOrderingSql($criteria); |
282 | 282 | |
@@ -317,8 +317,8 @@ discard block |
||
317 | 317 | |
318 | 318 | // A join is needed if there is filtering on the target entity |
319 | 319 | $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); |
320 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
321 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
320 | + $joinSql = ' JOIN '.$tableName.' te' |
|
321 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
322 | 322 | |
323 | 323 | return array($joinSql, $filterSql); |
324 | 324 | } |
@@ -337,12 +337,12 @@ discard block |
||
337 | 337 | |
338 | 338 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
339 | 339 | if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
340 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
340 | + $filterClauses[] = '('.$filterExpr.')'; |
|
341 | 341 | } |
342 | 342 | } |
343 | 343 | |
344 | 344 | return $filterClauses |
345 | - ? '(' . implode(' AND ', $filterClauses) . ')' |
|
345 | + ? '('.implode(' AND ', $filterClauses).')' |
|
346 | 346 | : ''; |
347 | 347 | } |
348 | 348 | |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
371 | 371 | $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
372 | 372 | |
373 | - $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; |
|
373 | + $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName; |
|
374 | 374 | } |
375 | 375 | |
376 | 376 | return $conditions; |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
393 | 393 | } |
394 | 394 | |
395 | - return 'DELETE FROM ' . $joinTable |
|
396 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
395 | + return 'DELETE FROM '.$joinTable |
|
396 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
@@ -452,8 +452,8 @@ discard block |
||
452 | 452 | } |
453 | 453 | |
454 | 454 | return array( |
455 | - 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
456 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', |
|
455 | + 'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
456 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?', |
|
457 | 457 | $types, |
458 | 458 | ); |
459 | 459 | } |
@@ -501,10 +501,10 @@ discard block |
||
501 | 501 | } |
502 | 502 | |
503 | 503 | return array( |
504 | - 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
505 | - . ' (' . implode(', ', $columns) . ')' |
|
504 | + 'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
505 | + . ' ('.implode(', ', $columns).')' |
|
506 | 506 | . ' VALUES' |
507 | - . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', |
|
507 | + . ' ('.implode(', ', array_fill(0, count($columns), '?')).')', |
|
508 | 508 | $types, |
509 | 509 | ); |
510 | 510 | } |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); |
590 | 590 | $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); |
591 | 591 | |
592 | - if (! $mapping['isOwningSide']) { |
|
592 | + if ( ! $mapping['isOwningSide']) { |
|
593 | 593 | $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); |
594 | 594 | $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; |
595 | 595 | $joinColumns = $mapping['joinTable']['joinColumns']; |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | $targetRelationMode = 'relationToTargetKeyColumns'; |
603 | 603 | } |
604 | 604 | |
605 | - $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; |
|
605 | + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t'; |
|
606 | 606 | $whereClauses = array(); |
607 | 607 | $params = array(); |
608 | 608 | $types = array(); |
@@ -613,14 +613,14 @@ discard block |
||
613 | 613 | $joinConditions = array(); |
614 | 614 | |
615 | 615 | foreach ($joinColumns as $joinTableColumn) { |
616 | - $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; |
|
616 | + $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName']; |
|
617 | 617 | } |
618 | 618 | |
619 | 619 | $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); |
620 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
620 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
621 | 621 | $columnName = $targetClass->getColumnName($indexBy); |
622 | 622 | |
623 | - $whereClauses[] = 'tr.' . $columnName . ' = ?'; |
|
623 | + $whereClauses[] = 'tr.'.$columnName.' = ?'; |
|
624 | 624 | $params[] = $key; |
625 | 625 | $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); |
626 | 626 | } |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
629 | 629 | if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { |
630 | 630 | $column = $mapping[$sourceRelationMode][$joinTableColumn]; |
631 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
631 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
632 | 632 | $params[] = $sourceClass->containsForeignIdentifier |
633 | 633 | ? $id[$sourceClass->getFieldForColumn($column)] |
634 | 634 | : $id[$sourceClass->fieldNames[$column]]; |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | } elseif ( ! $joinNeeded) { |
637 | 637 | $column = $mapping[$targetRelationMode][$joinTableColumn]; |
638 | 638 | |
639 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
639 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
640 | 640 | $params[] = $key; |
641 | 641 | $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); |
642 | 642 | } |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
647 | 647 | |
648 | 648 | if ($filterSql) { |
649 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
649 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
650 | 650 | $whereClauses[] = $filterSql; |
651 | 651 | } |
652 | 652 | } |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | $types = array(); |
691 | 691 | |
692 | 692 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
693 | - $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; |
|
693 | + $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?'; |
|
694 | 694 | |
695 | 695 | if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { |
696 | 696 | $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
713 | 713 | |
714 | 714 | if ($filterSql) { |
715 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
715 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
716 | 716 | $whereClauses[] = $filterSql; |
717 | 717 | } |
718 | 718 | } |
@@ -755,10 +755,10 @@ discard block |
||
755 | 755 | if ($orderings) { |
756 | 756 | $orderBy = []; |
757 | 757 | foreach ($orderings as $field => $direction) { |
758 | - $orderBy[] = $field . ' ' . $direction; |
|
758 | + $orderBy[] = $field.' '.$direction; |
|
759 | 759 | } |
760 | 760 | |
761 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
761 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
762 | 762 | } |
763 | 763 | return ''; |
764 | 764 | } |