@@ -254,8 +254,8 @@ discard block |
||
254 | 254 | */ |
255 | 255 | private function resolveMagicCall($method, $by, array $arguments) |
256 | 256 | { |
257 | - if (! $arguments) { |
|
258 | - throw InvalidMagicMethodCall::onMissingParameter($method . $by); |
|
257 | + if ( ! $arguments) { |
|
258 | + throw InvalidMagicMethodCall::onMissingParameter($method.$by); |
|
259 | 259 | } |
260 | 260 | |
261 | 261 | $fieldName = lcfirst(Inflector::classify($by)); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | throw InvalidMagicMethodCall::becauseFieldNotFoundIn( |
265 | 265 | $this->entityName, |
266 | 266 | $fieldName, |
267 | - $method . $by |
|
267 | + $method.$by |
|
268 | 268 | ); |
269 | 269 | } |
270 | 270 |
@@ -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 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | foreach ($data as $columnName => $value) { |
112 | - if (! is_array($id) || ! isset($id[$columnName])) { |
|
112 | + if ( ! is_array($id) || ! isset($id[$columnName])) { |
|
113 | 113 | $type = $this->columns[$columnName]->getType(); |
114 | 114 | |
115 | 115 | $stmt->bindValue($paramIndex++, $value, $type); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | $updateData = $this->prepareUpdateData($entity); |
135 | 135 | |
136 | - if (! $updateData) { |
|
136 | + if ( ! $updateData) { |
|
137 | 137 | return; |
138 | 138 | } |
139 | 139 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $versionedClass = $this->class->versionProperty->getDeclaringClass(); |
152 | 152 | $versionedTable = $versionedClass->getTableName(); |
153 | 153 | |
154 | - if (! isset($updateData[$versionedTable])) { |
|
154 | + if ( ! isset($updateData[$versionedTable])) { |
|
155 | 155 | $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform); |
156 | 156 | |
157 | 157 | $this->updateTable($entity, $tableName, [], true); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | if ($filterSql) { |
234 | 234 | $conditionSql .= $conditionSql |
235 | - ? ' AND ' . $filterSql |
|
235 | + ? ' AND '.$filterSql |
|
236 | 236 | : $filterSql; |
237 | 237 | } |
238 | 238 | |
@@ -240,26 +240,26 @@ discard block |
||
240 | 240 | |
241 | 241 | switch ($lockMode) { |
242 | 242 | case LockMode::PESSIMISTIC_READ: |
243 | - $lockSql = ' ' . $this->platform->getReadLockSQL(); |
|
243 | + $lockSql = ' '.$this->platform->getReadLockSQL(); |
|
244 | 244 | break; |
245 | 245 | |
246 | 246 | case LockMode::PESSIMISTIC_WRITE: |
247 | - $lockSql = ' ' . $this->platform->getWriteLockSQL(); |
|
247 | + $lockSql = ' '.$this->platform->getWriteLockSQL(); |
|
248 | 248 | break; |
249 | 249 | } |
250 | 250 | |
251 | 251 | $tableName = $this->class->table->getQuotedQualifiedName($this->platform); |
252 | - $from = ' FROM ' . $tableName . ' ' . $baseTableAlias; |
|
253 | - $where = $conditionSql !== '' ? ' WHERE ' . $conditionSql : ''; |
|
252 | + $from = ' FROM '.$tableName.' '.$baseTableAlias; |
|
253 | + $where = $conditionSql !== '' ? ' WHERE '.$conditionSql : ''; |
|
254 | 254 | $lock = $this->platform->appendLockHint($from, $lockMode); |
255 | 255 | $columnList = $this->getSelectColumnsSQL(); |
256 | - $query = 'SELECT ' . $columnList |
|
256 | + $query = 'SELECT '.$columnList |
|
257 | 257 | . $lock |
258 | 258 | . $joinSql |
259 | 259 | . $where |
260 | 260 | . $orderBySql; |
261 | 261 | |
262 | - return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql; |
|
262 | + return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql; |
|
263 | 263 | } |
264 | 264 | |
265 | 265 | /** |
@@ -281,14 +281,14 @@ discard block |
||
281 | 281 | |
282 | 282 | if ($filterSql !== '') { |
283 | 283 | $conditionSql = $conditionSql |
284 | - ? $conditionSql . ' AND ' . $filterSql |
|
284 | + ? $conditionSql.' AND '.$filterSql |
|
285 | 285 | : $filterSql; |
286 | 286 | } |
287 | 287 | |
288 | 288 | $sql = 'SELECT COUNT(*) ' |
289 | - . 'FROM ' . $tableName . ' ' . $baseTableAlias |
|
289 | + . 'FROM '.$tableName.' '.$baseTableAlias |
|
290 | 290 | . $joinSql |
291 | - . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql); |
|
291 | + . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql); |
|
292 | 292 | |
293 | 293 | return $sql; |
294 | 294 | } |
@@ -309,18 +309,18 @@ discard block |
||
309 | 309 | $conditions = []; |
310 | 310 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
311 | 311 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
312 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
312 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
313 | 313 | |
314 | 314 | foreach ($identifierColumns as $idColumn) { |
315 | 315 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
316 | 316 | |
317 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
317 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | $joinSql .= implode(' AND ', $conditions); |
321 | 321 | } |
322 | 322 | |
323 | - return parent::getLockTablesSql($lockMode) . $joinSql; |
|
323 | + return parent::getLockTablesSql($lockMode).$joinSql; |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | continue; |
348 | 348 | } |
349 | 349 | |
350 | - if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
350 | + if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) { |
|
351 | 351 | continue; |
352 | 352 | } |
353 | 353 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /** @var JoinColumnMetadata $joinColumn */ |
358 | 358 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
359 | 359 | |
360 | - if (! $joinColumn->getType()) { |
|
360 | + if ( ! $joinColumn->getType()) { |
|
361 | 361 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
362 | 362 | } |
363 | 363 | |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName); |
377 | 377 | $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType); |
378 | 378 | |
379 | - $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform); |
|
379 | + $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform); |
|
380 | 380 | |
381 | 381 | // sub tables |
382 | 382 | foreach ($this->class->getSubClasses() as $subClassName) { |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | /** @var JoinColumnMetadata $joinColumn */ |
401 | 401 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
402 | 402 | |
403 | - if (! $joinColumn->getType()) { |
|
403 | + if ( ! $joinColumn->getType()) { |
|
404 | 404 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
405 | 405 | } |
406 | 406 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | $columnName = $joinColumn->getColumnName(); |
451 | 451 | $referencedColumnName = $joinColumn->getReferencedColumnName(); |
452 | 452 | |
453 | - if (! $joinColumn->getType()) { |
|
453 | + if ( ! $joinColumn->getType()) { |
|
454 | 454 | $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
455 | 455 | } |
456 | 456 | |
@@ -506,12 +506,12 @@ discard block |
||
506 | 506 | $conditions = []; |
507 | 507 | $tableName = $parentClass->table->getQuotedQualifiedName($this->platform); |
508 | 508 | $tableAlias = $this->getSQLTableAlias($parentClass->getTableName()); |
509 | - $joinSql .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
509 | + $joinSql .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
510 | 510 | |
511 | 511 | foreach ($identifierColumns as $idColumn) { |
512 | 512 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
513 | 513 | |
514 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
514 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
515 | 515 | } |
516 | 516 | |
517 | 517 | $joinSql .= implode(' AND ', $conditions); |
@@ -523,12 +523,12 @@ discard block |
||
523 | 523 | $subClass = $this->em->getClassMetadata($subClassName); |
524 | 524 | $tableName = $subClass->table->getQuotedQualifiedName($this->platform); |
525 | 525 | $tableAlias = $this->getSQLTableAlias($subClass->getTableName()); |
526 | - $joinSql .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON '; |
|
526 | + $joinSql .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON '; |
|
527 | 527 | |
528 | 528 | foreach ($identifierColumns as $idColumn) { |
529 | 529 | $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName()); |
530 | 530 | |
531 | - $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName; |
|
531 | + $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName; |
|
532 | 532 | } |
533 | 533 | |
534 | 534 | $joinSql .= implode(' AND ', $conditions); |
@@ -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 | } |