@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null) |
41 | 41 | { |
42 | - return $propertyName . '_' . $embeddedColumnName; |
|
42 | + return $propertyName.'_'.$embeddedColumnName; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function joinColumnName($propertyName, $className = null) |
57 | 57 | { |
58 | - return $propertyName . '_' . $this->referenceColumnName(); |
|
58 | + return $propertyName.'_'.$this->referenceColumnName(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
65 | 65 | { |
66 | - return strtolower($this->classToTableName($sourceEntity) . '_' . |
|
66 | + return strtolower($this->classToTableName($sourceEntity).'_'. |
|
67 | 67 | $this->classToTableName($targetEntity)); |
68 | 68 | } |
69 | 69 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
74 | 74 | { |
75 | - return strtolower($this->classToTableName($entityName) . '_' . |
|
75 | + return strtolower($this->classToTableName($entityName).'_'. |
|
76 | 76 | ($referencedColumnName ?: $this->referenceColumnName())); |
77 | 77 | } |
78 | 78 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | public function executeDeferred(EntityManagerInterface $entityManager, object $entity) : void |
40 | 40 | { |
41 | 41 | foreach ($this->executors as $executor) { |
42 | - if (! $executor->isDeferred()) { |
|
42 | + if ( ! $executor->isDeferred()) { |
|
43 | 43 | continue; |
44 | 44 | } |
45 | 45 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | public function executeImmediate(EntityManagerInterface $entityManager, object $entity) : void |
26 | 26 | { |
27 | - if (! $this->executor->isDeferred()) { |
|
27 | + if ( ! $this->executor->isDeferred()) { |
|
28 | 28 | $this->dispatchExecutor($entity, $entityManager); |
29 | 29 | } |
30 | 30 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $this->allocationSize |
59 | 59 | ); |
60 | 60 | |
61 | - if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) { |
|
61 | + if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) { |
|
62 | 62 | // no affected rows, concurrency issue, throw exception |
63 | 63 | } |
64 | 64 | } else { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | $normalizedAssociatedId = []; |
36 | 36 | |
37 | 37 | foreach ($targetClass->getDeclaredPropertiesIterator() as $name => $declaredProperty) { |
38 | - if (! array_key_exists($name, $flatIdentifier)) { |
|
38 | + if ( ! array_key_exists($name, $flatIdentifier)) { |
|
39 | 39 | continue; |
40 | 40 | } |
41 | 41 |
@@ -57,14 +57,14 @@ |
||
57 | 57 | |
58 | 58 | // iterate over association mappings |
59 | 59 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
60 | - if (! ($association instanceof AssociationMetadata)) { |
|
60 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
61 | 61 | continue; |
62 | 62 | } |
63 | 63 | |
64 | 64 | // resolve join columns over to-one or to-many |
65 | 65 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
66 | 66 | |
67 | - if (! $association->isOwningSide()) { |
|
67 | + if ( ! $association->isOwningSide()) { |
|
68 | 68 | $association = $targetClass->getProperty($association->getMappedBy()); |
69 | 69 | $targetClass = $em->getClassMetadata($association->getTargetEntity()); |
70 | 70 | } |
@@ -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 |