@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | // association (table). Without initializing the collection. |
331 | 331 | $removed = parent::remove($key); |
332 | 332 | |
333 | - if (! $removed) { |
|
333 | + if ( ! $removed) { |
|
334 | 334 | return $removed; |
335 | 335 | } |
336 | 336 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function removeElement($element) |
353 | 353 | { |
354 | - if (! $this->initialized && |
|
354 | + if ( ! $this->initialized && |
|
355 | 355 | $this->association !== null && |
356 | 356 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) { |
357 | 357 | if ($this->collection->contains($element)) { |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | |
366 | 366 | $removed = parent::removeElement($element); |
367 | 367 | |
368 | - if (! $removed) { |
|
368 | + if ( ! $removed) { |
|
369 | 369 | return $removed; |
370 | 370 | } |
371 | 371 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | public function containsKey($key) |
388 | 388 | { |
389 | - if (! $this->initialized && |
|
389 | + if ( ! $this->initialized && |
|
390 | 390 | $this->association !== null && |
391 | 391 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY && |
392 | 392 | $this->association->getIndexedBy()) { |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | */ |
404 | 404 | public function contains($element) |
405 | 405 | { |
406 | - if (! $this->initialized && |
|
406 | + if ( ! $this->initialized && |
|
407 | 407 | $this->association !== null && |
408 | 408 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) { |
409 | 409 | $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); |
@@ -419,11 +419,11 @@ discard block |
||
419 | 419 | */ |
420 | 420 | public function get($key) |
421 | 421 | { |
422 | - if (! $this->initialized && |
|
422 | + if ( ! $this->initialized && |
|
423 | 423 | $this->association !== null && |
424 | 424 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY && |
425 | 425 | $this->association->getIndexedBy()) { |
426 | - if (! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) { |
|
426 | + if ( ! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) { |
|
427 | 427 | return $this->em->find($this->typeClass->getClassName(), $key); |
428 | 428 | } |
429 | 429 | |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | */ |
439 | 439 | public function count() |
440 | 440 | { |
441 | - if (! $this->initialized && |
|
441 | + if ( ! $this->initialized && |
|
442 | 442 | $this->association !== null && |
443 | 443 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) { |
444 | 444 | $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association); |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | */ |
503 | 503 | public function offsetSet($offset, $value) |
504 | 504 | { |
505 | - if (! isset($offset)) { |
|
505 | + if ( ! isset($offset)) { |
|
506 | 506 | $this->add($value); |
507 | 507 | return; |
508 | 508 | } |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | */ |
597 | 597 | public function slice($offset, $length = null) |
598 | 598 | { |
599 | - if (! $this->initialized && |
|
599 | + if ( ! $this->initialized && |
|
600 | 600 | ! $this->isDirty && |
601 | 601 | $this->association !== null && |
602 | 602 | $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public static function fromClassAndAssociation(string $class, string $associationName) : self |
13 | 13 | { |
14 | 14 | return new self(sprintf( |
15 | - 'Cannot match on %s::%s with a non-object value. Matching objects by id is ' . |
|
15 | + 'Cannot match on %s::%s with a non-object value. Matching objects by id is '. |
|
16 | 16 | 'not compatible with matching on an in-memory collection, which compares objects by reference.', |
17 | 17 | $class, |
18 | 18 | $associationName |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
46 | 46 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
47 | 47 | |
48 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
48 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
49 | 49 | |
50 | 50 | // Append subclass columns |
51 | 51 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | /** @var JoinColumnMetadata $joinColumn */ |
70 | 70 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
71 | 71 | |
72 | - if (! $joinColumn->getType()) { |
|
72 | + if ( ! $joinColumn->getType()) { |
|
73 | 73 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
74 | 74 | } |
75 | 75 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $conditionSql .= ' AND '; |
124 | 124 | } |
125 | 125 | |
126 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
126 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $conditionSql .= ' AND '; |
138 | 138 | } |
139 | 139 | |
140 | - return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL(); |
|
140 | + return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL(); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | return sprintf( |
166 | 166 | '%s IN (%s)', |
167 | - $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform), |
|
167 | + $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform), |
|
168 | 168 | implode(', ', $values) |
169 | 169 | ); |
170 | 170 | } |
@@ -56,6 +56,6 @@ |
||
56 | 56 | $columnType |
57 | 57 | ); |
58 | 58 | |
59 | - return $columnType->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias; |
|
59 | + return $columnType->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias; |
|
60 | 60 | } |
61 | 61 | } |
@@ -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 | } |
@@ -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 |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | // It's a joined result |
86 | 86 | |
87 | 87 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
88 | - $path = $parent . '.' . $dqlAlias; |
|
88 | + $path = $parent.'.'.$dqlAlias; |
|
89 | 89 | |
90 | 90 | // missing parent data, skipping as RIGHT JOIN hydration is not supported. |
91 | - if (! isset($nonemptyComponents[$parent])) { |
|
91 | + if ( ! isset($nonemptyComponents[$parent])) { |
|
92 | 92 | continue; |
93 | 93 | } |
94 | 94 | |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | if ($this->rsm->isMixed && isset($this->rootAliases[$parent])) { |
98 | 98 | $first = reset($this->resultPointers); |
99 | 99 | // TODO: Exception if $key === null ? |
100 | - $baseElement =& $this->resultPointers[$parent][key($first)]; |
|
100 | + $baseElement = & $this->resultPointers[$parent][key($first)]; |
|
101 | 101 | } elseif (isset($this->resultPointers[$parent])) { |
102 | - $baseElement =& $this->resultPointers[$parent]; |
|
102 | + $baseElement = & $this->resultPointers[$parent]; |
|
103 | 103 | } else { |
104 | 104 | unset($this->resultPointers[$dqlAlias]); // Ticket #1228 |
105 | 105 | |
@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | $relation = $parentClass->getProperty($relationAlias); |
112 | 112 | |
113 | 113 | // Check the type of the relation (many or single-valued) |
114 | - if (! $relation instanceof ToOneAssociationMetadata) { |
|
114 | + if ( ! $relation instanceof ToOneAssociationMetadata) { |
|
115 | 115 | $oneToOne = false; |
116 | 116 | |
117 | - if (! isset($baseElement[$relationAlias])) { |
|
117 | + if ( ! isset($baseElement[$relationAlias])) { |
|
118 | 118 | $baseElement[$relationAlias] = []; |
119 | 119 | } |
120 | 120 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $index = $indexExists ? $this->identifierMap[$path][$id[$parent]][$id[$dqlAlias]] : false; |
124 | 124 | $indexIsValid = $index !== false ? isset($baseElement[$relationAlias][$index]) : false; |
125 | 125 | |
126 | - if (! $indexExists || ! $indexIsValid) { |
|
126 | + if ( ! $indexExists || ! $indexIsValid) { |
|
127 | 127 | $element = $data; |
128 | 128 | |
129 | 129 | if (isset($this->rsm->indexByMap[$dqlAlias])) { |
@@ -140,16 +140,16 @@ discard block |
||
140 | 140 | } else { |
141 | 141 | $oneToOne = true; |
142 | 142 | |
143 | - if (! isset($nonemptyComponents[$dqlAlias]) && |
|
143 | + if ( ! isset($nonemptyComponents[$dqlAlias]) && |
|
144 | 144 | ! isset($baseElement[$relationAlias]) |
145 | 145 | ) { |
146 | 146 | $baseElement[$relationAlias] = null; |
147 | - } elseif (! isset($baseElement[$relationAlias])) { |
|
147 | + } elseif ( ! isset($baseElement[$relationAlias])) { |
|
148 | 148 | $baseElement[$relationAlias] = $data; |
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | - $coll =& $baseElement[$relationAlias]; |
|
152 | + $coll = & $baseElement[$relationAlias]; |
|
153 | 153 | |
154 | 154 | if (is_array($coll)) { |
155 | 155 | $this->updateResultPointer($coll, $index, $dqlAlias, $oneToOne); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
162 | 162 | |
163 | 163 | // if this row has a NULL value for the root result id then make it a null result. |
164 | - if (! isset($nonemptyComponents[$dqlAlias])) { |
|
164 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
165 | 165 | $result[] = $this->rsm->isMixed |
166 | 166 | ? [$entityKey => null] |
167 | 167 | : null; |
@@ -198,13 +198,13 @@ discard block |
||
198 | 198 | } |
199 | 199 | } |
200 | 200 | |
201 | - if (! isset($resultKey)) { |
|
201 | + if ( ! isset($resultKey)) { |
|
202 | 202 | $this->resultCounter++; |
203 | 203 | } |
204 | 204 | |
205 | 205 | // Append scalar values to mixed result sets |
206 | 206 | if (isset($rowData['scalars'])) { |
207 | - if (! isset($resultKey)) { |
|
207 | + if ( ! isset($resultKey)) { |
|
208 | 208 | // this only ever happens when no object is fetched (scalar result only) |
209 | 209 | $resultKey = isset($this->rsm->indexByMap['scalars']) |
210 | 210 | ? $row[$this->rsm->indexByMap['scalars']] |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | // Append new object to mixed result sets |
220 | 220 | if (isset($rowData['newObjects'])) { |
221 | - if (! isset($resultKey)) { |
|
221 | + if ( ! isset($resultKey)) { |
|
222 | 222 | $resultKey = $this->resultCounter - 1; |
223 | 223 | } |
224 | 224 | |
@@ -260,22 +260,22 @@ discard block |
||
260 | 260 | } |
261 | 261 | |
262 | 262 | if ($oneToOne) { |
263 | - $this->resultPointers[$dqlAlias] =& $coll; |
|
263 | + $this->resultPointers[$dqlAlias] = & $coll; |
|
264 | 264 | |
265 | 265 | return; |
266 | 266 | } |
267 | 267 | |
268 | 268 | if ($index !== false) { |
269 | - $this->resultPointers[$dqlAlias] =& $coll[$index]; |
|
269 | + $this->resultPointers[$dqlAlias] = & $coll[$index]; |
|
270 | 270 | |
271 | 271 | return; |
272 | 272 | } |
273 | 273 | |
274 | - if (! $coll) { |
|
274 | + if ( ! $coll) { |
|
275 | 275 | return; |
276 | 276 | } |
277 | 277 | |
278 | 278 | end($coll); |
279 | - $this->resultPointers[$dqlAlias] =& $coll[key($coll)]; |
|
279 | + $this->resultPointers[$dqlAlias] = & $coll[key($coll)]; |
|
280 | 280 | } |
281 | 281 | } |