@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | */ |
38 | 38 | abstract class AbstractCollectionPersister implements CachedCollectionPersister |
39 | 39 | { |
40 | - /** |
|
41 | - * @var \Doctrine\ORM\UnitOfWork |
|
42 | - */ |
|
40 | + /** |
|
41 | + * @var \Doctrine\ORM\UnitOfWork |
|
42 | + */ |
|
43 | 43 | protected $uow; |
44 | 44 | |
45 | 45 | /** |
@@ -67,9 +67,9 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected $association; |
69 | 69 | |
70 | - /** |
|
71 | - * @var array |
|
72 | - */ |
|
70 | + /** |
|
71 | + * @var array |
|
72 | + */ |
|
73 | 73 | protected $queuedCache = []; |
74 | 74 | |
75 | 75 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | public function getCacheLogger() |
75 | 75 | { |
76 | - return $this->cacheLogger; |
|
76 | + return $this->cacheLogger; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | ); |
116 | 116 | } |
117 | 117 | |
118 | - return $this->queryValidator; |
|
118 | + return $this->queryValidator; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | /** |
@@ -153,7 +153,7 @@ |
||
153 | 153 | */ |
154 | 154 | public function newDefaultAnnotationDriver($paths = [], $useSimpleAnnotationReader = true) |
155 | 155 | { |
156 | - AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php'); |
|
156 | + AnnotationRegistry::registerFile(__DIR__.'/Mapping/Driver/DoctrineAnnotations.php'); |
|
157 | 157 | |
158 | 158 | if ($useSimpleAnnotationReader) { |
159 | 159 | // Register the ORM Annotations in the AnnotationRegistry |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | foreach ($joinColumns as $joinColumn) { |
132 | 132 | $columnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform); |
133 | 133 | $referencedName = $joinColumn['referencedColumnName']; |
134 | - $conditions[] = 't.' . $columnName . ' = ?'; |
|
134 | + $conditions[] = 't.'.$columnName.' = ?'; |
|
135 | 135 | $params[] = $id[$sourceClass->getFieldForColumn($referencedName)]; |
136 | 136 | $types[] = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em); |
137 | 137 | } |
@@ -160,9 +160,9 @@ discard block |
||
160 | 160 | }*/ |
161 | 161 | |
162 | 162 | $sql = 'SELECT COUNT(*)' |
163 | - . ' FROM ' . $joinTableName . ' t' |
|
163 | + . ' FROM '.$joinTableName.' t' |
|
164 | 164 | . $joinTargetEntitySQL |
165 | - . ' WHERE ' . implode(' AND ', $conditions); |
|
165 | + . ' WHERE '.implode(' AND ', $conditions); |
|
166 | 166 | |
167 | 167 | return $this->conn->fetchColumn($sql, $params, 0, $types); |
168 | 168 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true); |
192 | 192 | |
193 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
193 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
194 | 194 | |
195 | 195 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
196 | 196 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | |
207 | 207 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true); |
208 | 208 | |
209 | - $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
209 | + $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
210 | 210 | |
211 | 211 | return (bool) $this->conn->fetchColumn($sql, $params, 0, $types); |
212 | 212 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | |
223 | 223 | list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false); |
224 | 224 | |
225 | - $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); |
|
225 | + $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses); |
|
226 | 226 | |
227 | 227 | return (bool) $this->conn->executeUpdate($sql, $params, $types); |
228 | 228 | } |
@@ -271,11 +271,11 @@ discard block |
||
271 | 271 | $rsm = new Query\ResultSetMappingBuilder($this->em); |
272 | 272 | $rsm->addRootEntityFromClassMetadata($targetClass->name, 'te'); |
273 | 273 | |
274 | - $sql = 'SELECT ' . $rsm->generateSelectClause() |
|
275 | - . ' FROM ' . $tableName . ' te' |
|
276 | - . ' JOIN ' . $joinTable . ' t ON' |
|
274 | + $sql = 'SELECT '.$rsm->generateSelectClause() |
|
275 | + . ' FROM '.$tableName.' te' |
|
276 | + . ' JOIN '.$joinTable.' t ON' |
|
277 | 277 | . implode(' AND ', $onConditions) |
278 | - . ' WHERE ' . implode(' AND ', $whereClauses); |
|
278 | + . ' WHERE '.implode(' AND ', $whereClauses); |
|
279 | 279 | |
280 | 280 | $sql .= $this->getOrderingSql($criteria, $targetClass); |
281 | 281 | |
@@ -316,8 +316,8 @@ discard block |
||
316 | 316 | |
317 | 317 | // A join is needed if there is filtering on the target entity |
318 | 318 | $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform); |
319 | - $joinSql = ' JOIN ' . $tableName . ' te' |
|
320 | - . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
319 | + $joinSql = ' JOIN '.$tableName.' te' |
|
320 | + . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping)); |
|
321 | 321 | |
322 | 322 | return [$joinSql, $filterSql]; |
323 | 323 | } |
@@ -336,12 +336,12 @@ discard block |
||
336 | 336 | |
337 | 337 | foreach ($this->em->getFilters()->getEnabledFilters() as $filter) { |
338 | 338 | if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) { |
339 | - $filterClauses[] = '(' . $filterExpr . ')'; |
|
339 | + $filterClauses[] = '('.$filterExpr.')'; |
|
340 | 340 | } |
341 | 341 | } |
342 | 342 | |
343 | 343 | return $filterClauses |
344 | - ? '(' . implode(' AND ', $filterClauses) . ')' |
|
344 | + ? '('.implode(' AND ', $filterClauses).')' |
|
345 | 345 | : ''; |
346 | 346 | } |
347 | 347 | |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform); |
370 | 370 | $refColumnName = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform); |
371 | 371 | |
372 | - $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName; |
|
372 | + $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName; |
|
373 | 373 | } |
374 | 374 | |
375 | 375 | return $conditions; |
@@ -391,8 +391,8 @@ discard block |
||
391 | 391 | $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform); |
392 | 392 | } |
393 | 393 | |
394 | - return 'DELETE FROM ' . $joinTable |
|
395 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?'; |
|
394 | + return 'DELETE FROM '.$joinTable |
|
395 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?'; |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | /** |
@@ -451,8 +451,8 @@ discard block |
||
451 | 451 | } |
452 | 452 | |
453 | 453 | return [ |
454 | - 'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
455 | - . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?', |
|
454 | + 'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
455 | + . ' WHERE '.implode(' = ? AND ', $columns).' = ?', |
|
456 | 456 | $types, |
457 | 457 | ]; |
458 | 458 | } |
@@ -500,10 +500,10 @@ discard block |
||
500 | 500 | } |
501 | 501 | |
502 | 502 | return [ |
503 | - 'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
504 | - . ' (' . implode(', ', $columns) . ')' |
|
503 | + 'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform) |
|
504 | + . ' ('.implode(', ', $columns).')' |
|
505 | 505 | . ' VALUES' |
506 | - . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')', |
|
506 | + . ' ('.implode(', ', array_fill(0, count($columns), '?')).')', |
|
507 | 507 | $types, |
508 | 508 | ]; |
509 | 509 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | $sourceClass = $this->em->getClassMetadata($mapping['sourceEntity']); |
589 | 589 | $targetClass = $this->em->getClassMetadata($mapping['targetEntity']); |
590 | 590 | |
591 | - if (! $mapping['isOwningSide']) { |
|
591 | + if ( ! $mapping['isOwningSide']) { |
|
592 | 592 | $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']); |
593 | 593 | $mapping = $associationSourceClass->associationMappings[$mapping['mappedBy']]; |
594 | 594 | $joinColumns = $mapping['joinTable']['joinColumns']; |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | $targetRelationMode = 'relationToTargetKeyColumns'; |
602 | 602 | } |
603 | 603 | |
604 | - $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t'; |
|
604 | + $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t'; |
|
605 | 605 | $whereClauses = []; |
606 | 606 | $params = []; |
607 | 607 | $types = []; |
@@ -612,14 +612,14 @@ discard block |
||
612 | 612 | $joinConditions = []; |
613 | 613 | |
614 | 614 | foreach ($joinColumns as $joinTableColumn) { |
615 | - $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName']; |
|
615 | + $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName']; |
|
616 | 616 | } |
617 | 617 | |
618 | 618 | $tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform); |
619 | - $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions); |
|
619 | + $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions); |
|
620 | 620 | $columnName = $targetClass->getColumnName($indexBy); |
621 | 621 | |
622 | - $whereClauses[] = 'tr.' . $columnName . ' = ?'; |
|
622 | + $whereClauses[] = 'tr.'.$columnName.' = ?'; |
|
623 | 623 | $params[] = $key; |
624 | 624 | $types[] = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em); |
625 | 625 | } |
@@ -627,7 +627,7 @@ discard block |
||
627 | 627 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
628 | 628 | if (isset($mapping[$sourceRelationMode][$joinTableColumn])) { |
629 | 629 | $column = $mapping[$sourceRelationMode][$joinTableColumn]; |
630 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
630 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
631 | 631 | $params[] = $sourceClass->containsForeignIdentifier |
632 | 632 | ? $id[$sourceClass->getFieldForColumn($column)] |
633 | 633 | : $id[$sourceClass->fieldNames[$column]]; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | } elseif ( ! $joinNeeded) { |
636 | 636 | $column = $mapping[$targetRelationMode][$joinTableColumn]; |
637 | 637 | |
638 | - $whereClauses[] = 't.' . $joinTableColumn . ' = ?'; |
|
638 | + $whereClauses[] = 't.'.$joinTableColumn.' = ?'; |
|
639 | 639 | $params[] = $key; |
640 | 640 | $types[] = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em); |
641 | 641 | } |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
646 | 646 | |
647 | 647 | if ($filterSql) { |
648 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
648 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
649 | 649 | $whereClauses[] = $filterSql; |
650 | 650 | } |
651 | 651 | } |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | $types = []; |
690 | 690 | |
691 | 691 | foreach ($mapping['joinTableColumns'] as $joinTableColumn) { |
692 | - $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?'; |
|
692 | + $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?'; |
|
693 | 693 | |
694 | 694 | if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) { |
695 | 695 | $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn]; |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping); |
712 | 712 | |
713 | 713 | if ($filterSql) { |
714 | - $quotedJoinTable .= ' ' . $joinTargetEntitySQL; |
|
714 | + $quotedJoinTable .= ' '.$joinTargetEntitySQL; |
|
715 | 715 | $whereClauses[] = $filterSql; |
716 | 716 | } |
717 | 717 | } |
@@ -760,10 +760,10 @@ discard block |
||
760 | 760 | $targetClass, |
761 | 761 | $this->platform |
762 | 762 | ); |
763 | - $orderBy[] = $field . ' ' . $direction; |
|
763 | + $orderBy[] = $field.' '.$direction; |
|
764 | 764 | } |
765 | 765 | |
766 | - return ' ORDER BY ' . implode(', ', $orderBy); |
|
766 | + return ' ORDER BY '.implode(', ', $orderBy); |
|
767 | 767 | } |
768 | 768 | return ''; |
769 | 769 | } |
@@ -40,12 +40,12 @@ |
||
40 | 40 | $ids = []; |
41 | 41 | |
42 | 42 | foreach ($id as $key => $value) { |
43 | - $ids[] = $key . '(' . $value . ')'; |
|
43 | + $ids[] = $key.'('.$value.')'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | 47 | return new self( |
48 | - 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' |
|
48 | + 'Entity of type \''.$className.'\''.($ids ? ' for IDs '.implode(', ', $ids) : '').' was not found' |
|
49 | 49 | ); |
50 | 50 | } |
51 | 51 | } |
@@ -108,10 +108,10 @@ discard block |
||
108 | 108 | // It's a joined result |
109 | 109 | |
110 | 110 | $parent = $this->_rsm->parentAliasMap[$dqlAlias]; |
111 | - $path = $parent . '.' . $dqlAlias; |
|
111 | + $path = $parent.'.'.$dqlAlias; |
|
112 | 112 | |
113 | 113 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
114 | - if ( ! isset($nonemptyComponents[$parent]) ) { |
|
114 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
115 | 115 | continue; |
116 | 116 | } |
117 | 117 | |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | if ($this->_rsm->isMixed && isset($this->_rootAliases[$parent])) { |
121 | 121 | $first = reset($this->_resultPointers); |
122 | 122 | // TODO: Exception if $key === null ? |
123 | - $baseElement =& $this->_resultPointers[$parent][key($first)]; |
|
123 | + $baseElement = & $this->_resultPointers[$parent][key($first)]; |
|
124 | 124 | } else if (isset($this->_resultPointers[$parent])) { |
125 | - $baseElement =& $this->_resultPointers[$parent]; |
|
125 | + $baseElement = & $this->_resultPointers[$parent]; |
|
126 | 126 | } else { |
127 | 127 | unset($this->_resultPointers[$dqlAlias]); // Ticket #1228 |
128 | 128 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | } |
174 | 174 | } |
175 | 175 | |
176 | - $coll =& $baseElement[$relationAlias]; |
|
176 | + $coll = & $baseElement[$relationAlias]; |
|
177 | 177 | |
178 | 178 | if (is_array($coll)) { |
179 | 179 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $entityKey = $this->_rsm->entityMappings[$dqlAlias] ?: 0; |
186 | 186 | |
187 | 187 | // if this row has a NULL value for the root result id then make it a null result. |
188 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
188 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
189 | 189 | $result[] = $this->_rsm->isMixed |
190 | 190 | ? [$entityKey => null] |
191 | 191 | : null; |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $resultKey = $this->_resultCounter - 1; |
247 | 247 | } |
248 | 248 | |
249 | - $scalarCount = (isset($rowData['scalars'])? count($rowData['scalars']): 0); |
|
249 | + $scalarCount = (isset($rowData['scalars']) ? count($rowData['scalars']) : 0); |
|
250 | 250 | |
251 | 251 | foreach ($rowData['newObjects'] as $objIndex => $newObject) { |
252 | 252 | $class = $newObject['class']; |
@@ -284,13 +284,13 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | if ($oneToOne) { |
287 | - $this->_resultPointers[$dqlAlias] =& $coll; |
|
287 | + $this->_resultPointers[$dqlAlias] = & $coll; |
|
288 | 288 | |
289 | 289 | return; |
290 | 290 | } |
291 | 291 | |
292 | 292 | if ($index !== false) { |
293 | - $this->_resultPointers[$dqlAlias] =& $coll[$index]; |
|
293 | + $this->_resultPointers[$dqlAlias] = & $coll[$index]; |
|
294 | 294 | |
295 | 295 | return; |
296 | 296 | } |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | } |
301 | 301 | |
302 | 302 | end($coll); |
303 | - $this->_resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
303 | + $this->_resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
304 | 304 | |
305 | 305 | return; |
306 | 306 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $expressionList[] = $this->dispatch($child); |
115 | 115 | } |
116 | 116 | |
117 | - switch($expr->getType()) { |
|
117 | + switch ($expr->getType()) { |
|
118 | 118 | case CompositeExpression::TYPE_AND: |
119 | 119 | return new Expr\Andx($expressionList); |
120 | 120 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | return new Expr\Orx($expressionList); |
123 | 123 | |
124 | 124 | default: |
125 | - throw new \RuntimeException("Unknown composite " . $expr->getType()); |
|
125 | + throw new \RuntimeException("Unknown composite ".$expr->getType()); |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | throw new QueryException('No aliases are set before invoking walkComparison().'); |
137 | 137 | } |
138 | 138 | |
139 | - $field = $this->queryAliases[0] . '.' . $comparison->getField(); |
|
139 | + $field = $this->queryAliases[0].'.'.$comparison->getField(); |
|
140 | 140 | |
141 | - foreach($this->queryAliases as $alias) { |
|
142 | - if(strpos($comparison->getField() . '.', $alias . '.') === 0) { |
|
141 | + foreach ($this->queryAliases as $alias) { |
|
142 | + if (strpos($comparison->getField().'.', $alias.'.') === 0) { |
|
143 | 143 | $field = $comparison->getField(); |
144 | 144 | break; |
145 | 145 | } |
@@ -149,13 +149,13 @@ discard block |
||
149 | 149 | |
150 | 150 | foreach ($this->parameters as $parameter) { |
151 | 151 | if ($parameter->getName() === $parameterName) { |
152 | - $parameterName .= '_' . count($this->parameters); |
|
152 | + $parameterName .= '_'.count($this->parameters); |
|
153 | 153 | break; |
154 | 154 | } |
155 | 155 | } |
156 | 156 | |
157 | 157 | $parameter = new Parameter($parameterName, $this->walkValue($comparison->getValue())); |
158 | - $placeholder = ':' . $parameterName; |
|
158 | + $placeholder = ':'.$parameterName; |
|
159 | 159 | |
160 | 160 | switch ($comparison->getOperator()) { |
161 | 161 | case Comparison::IN: |
@@ -182,17 +182,17 @@ discard block |
||
182 | 182 | |
183 | 183 | return $this->expr->neq($field, $placeholder); |
184 | 184 | case Comparison::CONTAINS: |
185 | - $parameter->setValue('%' . $parameter->getValue() . '%', $parameter->getType()); |
|
185 | + $parameter->setValue('%'.$parameter->getValue().'%', $parameter->getType()); |
|
186 | 186 | $this->parameters[] = $parameter; |
187 | 187 | |
188 | 188 | return $this->expr->like($field, $placeholder); |
189 | 189 | case Comparison::STARTS_WITH: |
190 | - $parameter->setValue($parameter->getValue() . '%', $parameter->getType()); |
|
190 | + $parameter->setValue($parameter->getValue().'%', $parameter->getType()); |
|
191 | 191 | $this->parameters[] = $parameter; |
192 | 192 | |
193 | 193 | return $this->expr->like($field, $placeholder); |
194 | 194 | case Comparison::ENDS_WITH: |
195 | - $parameter->setValue('%' . $parameter->getValue(), $parameter->getType()); |
|
195 | + $parameter->setValue('%'.$parameter->getValue(), $parameter->getType()); |
|
196 | 196 | $this->parameters[] = $parameter; |
197 | 197 | |
198 | 198 | return $this->expr->like($field, $placeholder); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | ); |
209 | 209 | } |
210 | 210 | |
211 | - throw new \RuntimeException("Unknown comparison operator: " . $comparison->getOperator()); |
|
211 | + throw new \RuntimeException("Unknown comparison operator: ".$comparison->getOperator()); |
|
212 | 212 | } |
213 | 213 | } |
214 | 214 |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $message = "The mapping of field '{$field}' is invalid: The option '{$expectedOption}' is required."; |
285 | 285 | |
286 | 286 | if ( ! empty($hint)) { |
287 | - $message .= ' (Hint: ' . $hint . ')'; |
|
287 | + $message .= ' (Hint: '.$hint.')'; |
|
288 | 288 | } |
289 | 289 | |
290 | 290 | return new self($message); |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | public static function reflectionFailure($entity, \ReflectionException $previousException) |
316 | 316 | { |
317 | - return new self('An error occurred in ' . $entity, 0, $previousException); |
|
317 | + return new self('An error occurred in '.$entity, 0, $previousException); |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | */ |
326 | 326 | public static function joinColumnMustPointToMappedField($className, $joinColumn) |
327 | 327 | { |
328 | - return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' |
|
329 | - . $className . ' since it is referenced by a join column of another class.'); |
|
328 | + return new self('The column '.$joinColumn.' must be mapped to a field in class ' |
|
329 | + . $className.' since it is referenced by a join column of another class.'); |
|
330 | 330 | } |
331 | 331 | |
332 | 332 | /** |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | */ |
432 | 432 | public static function noIdDefined($entity) |
433 | 433 | { |
434 | - return new self('No ID defined for entity ' . $entity); |
|
434 | + return new self('No ID defined for entity '.$entity); |
|
435 | 435 | } |
436 | 436 | |
437 | 437 | /** |
@@ -456,12 +456,12 @@ discard block |
||
456 | 456 | public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) |
457 | 457 | { |
458 | 458 | if ( ! empty($path)) { |
459 | - $path = '[' . $path . ']'; |
|
459 | + $path = '['.$path.']'; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | return new self( |
463 | - 'File mapping drivers must have a valid directory path, ' . |
|
464 | - 'however the given path ' . $path . ' seems to be incorrect!' |
|
463 | + 'File mapping drivers must have a valid directory path, '. |
|
464 | + 'however the given path '.$path.' seems to be incorrect!' |
|
465 | 465 | ); |
466 | 466 | } |
467 | 467 | |
@@ -492,11 +492,11 @@ discard block |
||
492 | 492 | public static function duplicateDiscriminatorEntry($className, array $entries, array $map) |
493 | 493 | { |
494 | 494 | return new self( |
495 | - "The entries " . implode(', ', $entries) . " in discriminator map of class '" . $className . "' is duplicated. " . |
|
496 | - "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. " . |
|
497 | - "The entries of the current map are: @DiscriminatorMap({" . implode(', ', array_map( |
|
495 | + "The entries ".implode(', ', $entries)." in discriminator map of class '".$className."' is duplicated. ". |
|
496 | + "If the discriminator map is automatically generated you have to convert it to an explicit discriminator map now. ". |
|
497 | + "The entries of the current map are: @DiscriminatorMap({".implode(', ', array_map( |
|
498 | 498 | function($a, $b) { return "'$a': '$b'"; }, array_keys($map), array_values($map) |
499 | - )) . "})" |
|
499 | + ))."})" |
|
500 | 500 | ); |
501 | 501 | } |
502 | 502 | |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | public static function illegalOrphanRemoval($className, $field) |
644 | 644 | { |
645 | 645 | return new self("Orphan removal is only allowed on one-to-one and one-to-many ". |
646 | - "associations, but " . $className."#" .$field . " is not."); |
|
646 | + "associations, but ".$className."#".$field." is not."); |
|
647 | 647 | } |
648 | 648 | |
649 | 649 | /** |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | */ |
676 | 676 | public static function noInheritanceOnMappedSuperClass($className) |
677 | 677 | { |
678 | - return new self("It is not supported to define inheritance information on a mapped superclass '" . $className . "'."); |
|
678 | + return new self("It is not supported to define inheritance information on a mapped superclass '".$className."'."); |
|
679 | 679 | } |
680 | 680 | |
681 | 681 | /** |
@@ -687,8 +687,8 @@ discard block |
||
687 | 687 | public static function mappedClassNotPartOfDiscriminatorMap($className, $rootClassName) |
688 | 688 | { |
689 | 689 | return new self( |
690 | - "Entity '" . $className . "' has to be part of the discriminator map of '" . $rootClassName . "' " . |
|
691 | - "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class " . |
|
690 | + "Entity '".$className."' has to be part of the discriminator map of '".$rootClassName."' ". |
|
691 | + "to be properly mapped in the inheritance hierarchy. Alternatively you can make '".$className."' an abstract class ". |
|
692 | 692 | "to avoid this exception from occurring." |
693 | 693 | ); |
694 | 694 | } |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | */ |
702 | 702 | public static function lifecycleCallbackMethodNotFound($className, $methodName) |
703 | 703 | { |
704 | - return new self("Entity '" . $className . "' has no method '" . $methodName . "' to be registered as lifecycle callback."); |
|
704 | + return new self("Entity '".$className."' has no method '".$methodName."' to be registered as lifecycle callback."); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | /** |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | */ |
748 | 748 | public static function invalidFetchMode($className, $annotation) |
749 | 749 | { |
750 | - return new self("Entity '" . $className . "' has a mapping with invalid fetch mode '" . $annotation . "'"); |
|
750 | + return new self("Entity '".$className."' has a mapping with invalid fetch mode '".$annotation."'"); |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | /** |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | */ |
758 | 758 | public static function compositeKeyAssignedIdGeneratorRequired($className) |
759 | 759 | { |
760 | - return new self("Entity '". $className . "' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
760 | + return new self("Entity '".$className."' has a composite identifier but uses an ID generator other than manually assigning (Identity, Sequence). This is not supported."); |
|
761 | 761 | } |
762 | 762 | |
763 | 763 | /** |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | */ |
770 | 770 | public static function invalidTargetEntityClass($targetEntity, $sourceEntity, $associationName) |
771 | 771 | { |
772 | - return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'."); |
|
772 | + return new self("The target-entity ".$targetEntity." cannot be found in '".$sourceEntity."#".$associationName."'."); |
|
773 | 773 | } |
774 | 774 | |
775 | 775 | /** |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | */ |
782 | 782 | public static function invalidCascadeOption(array $cascades, $className, $propertyName) |
783 | 783 | { |
784 | - $cascades = implode(", ", array_map(function ($e) { return "'" . $e . "'"; }, $cascades)); |
|
784 | + $cascades = implode(", ", array_map(function($e) { return "'".$e."'"; }, $cascades)); |
|
785 | 785 | |
786 | 786 | return new self(sprintf( |
787 | 787 | "You have specified invalid cascade options for %s::$%s: %s; available options: 'remove', 'persist', 'refresh', 'merge', and 'detach'", |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | { |
814 | 814 | return new self( |
815 | 815 | sprintf( |
816 | - 'Infinite nesting detected for embedded property %s::%s. ' . |
|
816 | + 'Infinite nesting detected for embedded property %s::%s. '. |
|
817 | 817 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
818 | 818 | $className, |
819 | 819 | $propertyName |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $sql = $type->convertToPHPValueSQL($sql, $this->platform); |
77 | 77 | } |
78 | 78 | |
79 | - return $sql . ' AS ' . $columnAlias; |
|
79 | + return $sql.' AS '.$columnAlias; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -94,6 +94,6 @@ discard block |
||
94 | 94 | |
95 | 95 | $this->currentPersisterContext->rsm->addMetaResult('r', $columnAlias, $joinColumnName, false, $type); |
96 | 96 | |
97 | - return $tableAlias . '.' . $quotedColumnName . ' AS ' . $columnAlias; |
|
97 | + return $tableAlias.'.'.$quotedColumnName.' AS '.$columnAlias; |
|
98 | 98 | } |
99 | 99 | } |