@@ -5,15 +5,11 @@ |
||
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Cache; |
7 | 7 | |
8 | -use Doctrine\Common\Collections\ArrayCollection; |
|
9 | 8 | use Doctrine\ORM\Cache\Persister\CachedPersister; |
10 | 9 | use Doctrine\ORM\EntityManagerInterface; |
11 | 10 | use Doctrine\ORM\Mapping\AssociationMetadata; |
12 | 11 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
13 | 12 | use Doctrine\ORM\Query\ResultSetMapping; |
14 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
15 | -use Doctrine\ORM\PersistentCollection; |
|
16 | -use Doctrine\Common\Proxy\Proxy; |
|
17 | 13 | use Doctrine\ORM\Cache; |
18 | 14 | use Doctrine\ORM\Query; |
19 | 15 | use ProxyManager\Proxy\GhostObjectInterface; |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | |
4 | -declare(strict_types=1); |
|
4 | +declare(strict_types = 1); |
|
5 | 5 | |
6 | 6 | namespace Doctrine\ORM\Cache; |
7 | 7 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $cm = $this->em->getClassMetadata($entityName); |
103 | 103 | |
104 | - $generateKeys = function (array $entry) use ($cm): EntityCacheKey { |
|
104 | + $generateKeys = function(array $entry) use ($cm): EntityCacheKey { |
|
105 | 105 | return new EntityCacheKey($cm->getRootClassName(), $entry['identifier']); |
106 | 106 | }; |
107 | 107 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | continue; |
173 | 173 | } |
174 | 174 | |
175 | - $generateKeys = function ($id) use ($assocMetadata): EntityCacheKey { |
|
175 | + $generateKeys = function($id) use ($assocMetadata): EntityCacheKey { |
|
176 | 176 | return new EntityCacheKey($assocMetadata->getRootClassName(), $id); |
177 | 177 | }; |
178 | 178 | |
@@ -336,9 +336,9 @@ discard block |
||
336 | 336 | $assocIdentifier = $this->uow->getEntityIdentifier($assocValue); |
337 | 337 | $entityKey = new EntityCacheKey($assocMetadata->getRootClassName(), $assocIdentifier); |
338 | 338 | |
339 | - if ((! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
339 | + if (( ! $assocValue instanceof GhostObjectInterface && ($key->cacheMode & Cache::MODE_REFRESH)) || ! $assocRegion->contains($entityKey)) { |
|
340 | 340 | // Entity put fail |
341 | - if (! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
341 | + if ( ! $assocPersister->storeEntityCache($assocValue, $entityKey)) { |
|
342 | 342 | return null; |
343 | 343 | } |
344 | 344 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Internal\Hydration; |
6 | 6 | |
7 | -use Doctrine\ORM\Event\PostLoadEventDispatcher; |
|
8 | 7 | use Doctrine\ORM\Mapping\ClassMetadata; |
9 | 8 | use Doctrine\ORM\Mapping\ManyToManyAssociationMetadata; |
10 | 9 | use Doctrine\ORM\Mapping\ToManyAssociationMetadata; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Internal\Hydration; |
6 | 6 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function prepare() |
69 | 69 | { |
70 | - if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
70 | + if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) { |
|
71 | 71 | $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true; |
72 | 72 | } |
73 | 73 | |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | |
78 | 78 | // Remember which associations are "fetch joined", so that we know where to inject |
79 | 79 | // collection stubs or proxies and where not. |
80 | - if (! isset($this->rsm->relationMap[$dqlAlias])) { |
|
80 | + if ( ! isset($this->rsm->relationMap[$dqlAlias])) { |
|
81 | 81 | continue; |
82 | 82 | } |
83 | 83 | |
84 | 84 | $parent = $this->rsm->parentAliasMap[$dqlAlias]; |
85 | 85 | |
86 | - if (! isset($this->rsm->aliasMap[$parent])) { |
|
86 | + if ( ! isset($this->rsm->aliasMap[$parent])) { |
|
87 | 87 | throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent); |
88 | 88 | } |
89 | 89 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $class = $this->getClassMetadata($className); |
110 | 110 | $inverseAssoc = $class->getProperty($association->getInversedBy()); |
111 | 111 | |
112 | - if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
112 | + if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) { |
|
113 | 113 | continue; |
114 | 114 | } |
115 | 115 | |
@@ -175,14 +175,14 @@ discard block |
||
175 | 175 | $value = $association->getValue($entity); |
176 | 176 | $oid = spl_object_hash($entity); |
177 | 177 | |
178 | - if (! $value instanceof PersistentCollection) { |
|
178 | + if ( ! $value instanceof PersistentCollection) { |
|
179 | 179 | $value = $association->wrap($entity, $value, $this->em); |
180 | 180 | |
181 | 181 | $association->setValue($entity, $value); |
182 | 182 | |
183 | 183 | $this->uow->setOriginalEntityProperty($oid, $fieldName, $value); |
184 | 184 | |
185 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
185 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
186 | 186 | } else if ( |
187 | 187 | isset($this->hints[Query::HINT_REFRESH]) || |
188 | 188 | (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized()) |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | $value->setInitialized(true); |
193 | 193 | $value->unwrap()->clear(); |
194 | 194 | |
195 | - $this->initializedCollections[$oid . $fieldName] = $value; |
|
195 | + $this->initializedCollections[$oid.$fieldName] = $value; |
|
196 | 196 | } else { |
197 | 197 | // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN! |
198 | - $this->existingCollections[$oid . $fieldName] = $value; |
|
198 | + $this->existingCollections[$oid.$fieldName] = $value; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return $value; |
@@ -313,10 +313,10 @@ discard block |
||
313 | 313 | $parentAlias = $this->rsm->parentAliasMap[$dqlAlias]; |
314 | 314 | // we need the $path to save into the identifier map which entities were already |
315 | 315 | // seen for this parent-child relationship |
316 | - $path = $parentAlias . '.' . $dqlAlias; |
|
316 | + $path = $parentAlias.'.'.$dqlAlias; |
|
317 | 317 | |
318 | 318 | // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs |
319 | - if (! isset($nonemptyComponents[$parentAlias])) { |
|
319 | + if ( ! isset($nonemptyComponents[$parentAlias])) { |
|
320 | 320 | // TODO: Add special case code where we hydrate the right join objects into identity map at least |
321 | 321 | continue; |
322 | 322 | } |
@@ -347,15 +347,15 @@ discard block |
||
347 | 347 | $oid = spl_object_hash($parentObject); |
348 | 348 | |
349 | 349 | // Check the type of the relation (many or single-valued) |
350 | - if (! ($association instanceof ToOneAssociationMetadata)) { |
|
350 | + if ( ! ($association instanceof ToOneAssociationMetadata)) { |
|
351 | 351 | // PATH A: Collection-valued association |
352 | 352 | $reflFieldValue = $association->getValue($parentObject); |
353 | 353 | |
354 | 354 | if (isset($nonemptyComponents[$dqlAlias])) { |
355 | - $collKey = $oid . $relationField; |
|
355 | + $collKey = $oid.$relationField; |
|
356 | 356 | if (isset($this->initializedCollections[$collKey])) { |
357 | 357 | $reflFieldValue = $this->initializedCollections[$collKey]; |
358 | - } else if (! isset($this->existingCollections[$collKey])) { |
|
358 | + } else if ( ! isset($this->existingCollections[$collKey])) { |
|
359 | 359 | $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias); |
360 | 360 | } |
361 | 361 | |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | $index = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false; |
364 | 364 | $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false; |
365 | 365 | |
366 | - if (! $indexExists || ! $indexIsValid) { |
|
366 | + if ( ! $indexExists || ! $indexIsValid) { |
|
367 | 367 | if (isset($this->existingCollections[$collKey])) { |
368 | 368 | // Collection exists, only look for the element in the identity map. |
369 | 369 | if ($element = $this->getEntityFromIdentityMap($entityName, $data)) { |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | // PATH B: Single-valued association |
400 | 400 | $reflFieldValue = $association->getValue($parentObject); |
401 | 401 | |
402 | - if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
402 | + if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) || |
|
403 | 403 | ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) { |
404 | 404 | // we only need to take action if this value is null, |
405 | 405 | // we refresh the entity or its an uninitialized proxy. |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | $entityKey = $this->rsm->entityMappings[$dqlAlias] ?: 0; |
461 | 461 | |
462 | 462 | // if this row has a NULL value for the root result id then make it a null result. |
463 | - if ( ! isset($nonemptyComponents[$dqlAlias]) ) { |
|
463 | + if ( ! isset($nonemptyComponents[$dqlAlias])) { |
|
464 | 464 | if ($this->rsm->isMixed) { |
465 | 465 | $result[] = [$entityKey => null]; |
466 | 466 | } else { |
@@ -516,13 +516,13 @@ discard block |
||
516 | 516 | } |
517 | 517 | } |
518 | 518 | |
519 | - if ( ! isset($resultKey) ) { |
|
519 | + if ( ! isset($resultKey)) { |
|
520 | 520 | $this->resultCounter++; |
521 | 521 | } |
522 | 522 | |
523 | 523 | // Append scalar values to mixed result sets |
524 | 524 | if (isset($rowData['scalars'])) { |
525 | - if ( ! isset($resultKey) ) { |
|
525 | + if ( ! isset($resultKey)) { |
|
526 | 526 | $resultKey = (isset($this->rsm->indexByMap['scalars'])) |
527 | 527 | ? $row[$this->rsm->indexByMap['scalars']] |
528 | 528 | : $this->resultCounter - 1; |
@@ -535,7 +535,7 @@ discard block |
||
535 | 535 | |
536 | 536 | // Append new object to mixed result sets |
537 | 537 | if (isset($rowData['newObjects'])) { |
538 | - if ( ! isset($resultKey) ) { |
|
538 | + if ( ! isset($resultKey)) { |
|
539 | 539 | $resultKey = $this->resultCounter - 1; |
540 | 540 | } |
541 | 541 | |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $args = $newObject['args']; |
548 | 548 | $obj = $class->newInstanceArgs($args); |
549 | 549 | |
550 | - if ($hasNoScalars && \count($rowData['newObjects']) === 1 ) { |
|
550 | + if ($hasNoScalars && \count($rowData['newObjects']) === 1) { |
|
551 | 551 | $result[$resultKey] = $obj; |
552 | 552 | |
553 | 553 | continue; |
@@ -6,7 +6,6 @@ |
||
6 | 6 | |
7 | 7 | use Doctrine\Common\Persistence\Mapping\MappingException; |
8 | 8 | use Doctrine\ORM\Mapping\AssociationMetadata; |
9 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
10 | 9 | use Doctrine\ORM\Mapping\FieldMetadata; |
11 | 10 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
12 | 11 | use Doctrine\ORM\Query; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Query; |
6 | 6 | |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | $tokenStr = substr($dql, (int) $token['position'], $length); |
472 | 472 | |
473 | 473 | // Building informative message |
474 | - $message = 'line 0, col ' . $tokenPos . " near '" . $tokenStr . "': Error: " . $message; |
|
474 | + $message = 'line 0, col '.$tokenPos." near '".$tokenStr."': Error: ".$message; |
|
475 | 475 | |
476 | 476 | throw QueryException::semanticalError( |
477 | 477 | $message, |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | // If the namespace is not given then assumes the first FROM entity namespace |
622 | 622 | if (strpos($className, '\\') === false && ! class_exists($className) && strpos($fromClassName, '\\') !== false) { |
623 | 623 | $namespace = substr($fromClassName, 0, strrpos($fromClassName, '\\')); |
624 | - $fqcn = $namespace . '\\' . $className; |
|
624 | + $fqcn = $namespace.'\\'.$className; |
|
625 | 625 | |
626 | 626 | if (class_exists($fqcn)) { |
627 | 627 | $expression->className = $fqcn; |
@@ -670,13 +670,13 @@ discard block |
||
670 | 670 | } |
671 | 671 | |
672 | 672 | $this->semanticalError( |
673 | - "There is no mapped field named '$field' on class " . $class->getClassName() . ".", $deferredItem['token'] |
|
673 | + "There is no mapped field named '$field' on class ".$class->getClassName().".", $deferredItem['token'] |
|
674 | 674 | ); |
675 | 675 | } |
676 | 676 | |
677 | 677 | if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { |
678 | 678 | $this->semanticalError( |
679 | - "The partial field selection of class " . $class->getClassName() . " must contain the identifier.", |
|
679 | + "The partial field selection of class ".$class->getClassName()." must contain the identifier.", |
|
680 | 680 | $deferredItem['token'] |
681 | 681 | ); |
682 | 682 | } |
@@ -745,9 +745,9 @@ discard block |
||
745 | 745 | $property = $class->getProperty($field); |
746 | 746 | |
747 | 747 | // Check if field or association exists |
748 | - if (! $property) { |
|
748 | + if ( ! $property) { |
|
749 | 749 | $this->semanticalError( |
750 | - 'Class ' . $class->getClassName() . ' has no field or association named ' . $field, |
|
750 | + 'Class '.$class->getClassName().' has no field or association named '.$field, |
|
751 | 751 | $deferredItem['token'] |
752 | 752 | ); |
753 | 753 | } |
@@ -786,8 +786,8 @@ discard block |
||
786 | 786 | // Build the error message |
787 | 787 | $semanticalError = 'Invalid PathExpression. '; |
788 | 788 | $semanticalError .= \count($expectedStringTypes) === 1 |
789 | - ? 'Must be a ' . $expectedStringTypes[0] . '.' |
|
790 | - : implode(' or ', $expectedStringTypes) . ' expected.'; |
|
789 | + ? 'Must be a '.$expectedStringTypes[0].'.' |
|
790 | + : implode(' or ', $expectedStringTypes).' expected.'; |
|
791 | 791 | |
792 | 792 | $this->semanticalError($semanticalError, $deferredItem['token']); |
793 | 793 | } |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | |
957 | 957 | list($namespaceAlias, $simpleClassName) = explode(':', $this->lexer->token['value']); |
958 | 958 | |
959 | - $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName; |
|
959 | + $schemaName = $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName; |
|
960 | 960 | } |
961 | 961 | |
962 | 962 | return $schemaName; |
@@ -1041,7 +1041,7 @@ discard block |
||
1041 | 1041 | |
1042 | 1042 | if ( ! isset($this->queryComponents[$identVariable])) { |
1043 | 1043 | $this->semanticalError( |
1044 | - 'Identification Variable ' . $identVariable .' used in join path expression but was not defined before.' |
|
1044 | + 'Identification Variable '.$identVariable.' used in join path expression but was not defined before.' |
|
1045 | 1045 | ); |
1046 | 1046 | } |
1047 | 1047 | |
@@ -1054,8 +1054,8 @@ discard block |
||
1054 | 1054 | $qComp = $this->queryComponents[$identVariable]; |
1055 | 1055 | $class = $qComp['metadata']; |
1056 | 1056 | |
1057 | - if (! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) { |
|
1058 | - $this->semanticalError('Class ' . $class->getClassName() . ' has no association named ' . $field); |
|
1057 | + if ( ! (($property = $class->getProperty($field)) !== null && $property instanceof AssociationMetadata)) { |
|
1058 | + $this->semanticalError('Class '.$class->getClassName().' has no association named '.$field); |
|
1059 | 1059 | } |
1060 | 1060 | |
1061 | 1061 | return new AST\JoinAssociationPathExpression($identVariable, $field); |
@@ -2477,7 +2477,7 @@ discard block |
||
2477 | 2477 | // Peek beyond the matching closing parenthesis ')' |
2478 | 2478 | $peek = $this->peekBeyondClosingParenthesis(); |
2479 | 2479 | |
2480 | - if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
2480 | + if (in_array($peek['value'], ["=", "<", "<=", "<>", ">", ">=", "!="]) || |
|
2481 | 2481 | in_array($peek['type'], [Lexer::T_NOT, Lexer::T_BETWEEN, Lexer::T_LIKE, Lexer::T_IN, Lexer::T_IS, Lexer::T_EXISTS]) || |
2482 | 2482 | $this->isMathOperator($peek)) { |
2483 | 2483 | $condPrimary->simpleConditionalExpression = $this->SimpleConditionalExpression(); |
@@ -2582,7 +2582,7 @@ discard block |
||
2582 | 2582 | return $this->NullComparisonExpression(); |
2583 | 2583 | } |
2584 | 2584 | |
2585 | - if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2585 | + if ($token['type'] === Lexer::T_IS && $lookahead['type'] === Lexer::T_EMPTY) { |
|
2586 | 2586 | return $this->EmptyCollectionComparisonExpression(); |
2587 | 2587 | } |
2588 | 2588 |
@@ -4,11 +4,9 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools; |
6 | 6 | |
7 | -use Doctrine\Common\Persistence\Proxy; |
|
8 | 7 | use Doctrine\ORM\EntityManagerInterface; |
9 | 8 | use Doctrine\ORM\Event\OnFlushEventArgs; |
10 | 9 | use Doctrine\ORM\Mapping\AssociationMetadata; |
11 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
12 | 10 | use Doctrine\ORM\Mapping\ToOneAssociationMetadata; |
13 | 11 | use Doctrine\ORM\PersistentCollection; |
14 | 12 | use Doctrine\ORM\UnitOfWork; |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM\Tools; |
6 | 6 | |
@@ -77,20 +77,20 @@ discard block |
||
77 | 77 | fwrite($fh, "Flush Operation [".$this->context."] - Dumping identity map:\n"); |
78 | 78 | |
79 | 79 | foreach ($identityMap as $className => $map) { |
80 | - fwrite($fh, "Class: ". $className . "\n"); |
|
80 | + fwrite($fh, "Class: ".$className."\n"); |
|
81 | 81 | |
82 | 82 | foreach ($map as $entity) { |
83 | - fwrite($fh, " Entity: " . $this->getIdString($entity, $uow) . " " . spl_object_hash($entity)."\n"); |
|
83 | + fwrite($fh, " Entity: ".$this->getIdString($entity, $uow)." ".spl_object_hash($entity)."\n"); |
|
84 | 84 | fwrite($fh, " Associations:\n"); |
85 | 85 | |
86 | 86 | $cm = $em->getClassMetadata($className); |
87 | 87 | |
88 | 88 | foreach ($cm->getDeclaredPropertiesIterator() as $field => $association) { |
89 | - if (! ($association instanceof AssociationMetadata)) { |
|
89 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | |
93 | - fwrite($fh, " " . $field . " "); |
|
93 | + fwrite($fh, " ".$field." "); |
|
94 | 94 | |
95 | 95 | $value = $association->getValue($entity); |
96 | 96 | |
@@ -101,25 +101,25 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | if ($association instanceof ToOneAssociationMetadata) { |
104 | - if ($value instanceof GhostObjectInterface && !$value->isProxyInitialized()) { |
|
104 | + if ($value instanceof GhostObjectInterface && ! $value->isProxyInitialized()) { |
|
105 | 105 | fwrite($fh, "[PROXY] "); |
106 | 106 | } |
107 | 107 | |
108 | - fwrite($fh, $this->getIdString($value, $uow) . " " . spl_object_hash($value) . "\n"); |
|
108 | + fwrite($fh, $this->getIdString($value, $uow)." ".spl_object_hash($value)."\n"); |
|
109 | 109 | } else { |
110 | - $initialized = !($value instanceof PersistentCollection) || $value->isInitialized(); |
|
110 | + $initialized = ! ($value instanceof PersistentCollection) || $value->isInitialized(); |
|
111 | 111 | |
112 | 112 | if ($initialized) { |
113 | - fwrite($fh, "[INITIALIZED] " . $this->getType($value). " " . count($value) . " elements\n"); |
|
113 | + fwrite($fh, "[INITIALIZED] ".$this->getType($value)." ".count($value)." elements\n"); |
|
114 | 114 | |
115 | 115 | foreach ($value as $obj) { |
116 | - fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); |
|
116 | + fwrite($fh, " ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n"); |
|
117 | 117 | } |
118 | 118 | } else { |
119 | - fwrite($fh, "[PROXY] " . $this->getType($value) . " unknown element size\n"); |
|
119 | + fwrite($fh, "[PROXY] ".$this->getType($value)." unknown element size\n"); |
|
120 | 120 | |
121 | 121 | foreach ($value->unwrap() as $obj) { |
122 | - fwrite($fh, " " . $this->getIdString($obj, $uow) . " " . spl_object_hash($obj)."\n"); |
|
122 | + fwrite($fh, " ".$this->getIdString($obj, $uow)." ".spl_object_hash($obj)."\n"); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -1173,7 +1173,7 @@ discard block |
||
1173 | 1173 | /** |
1174 | 1174 | * Schedules an entity for being updated. |
1175 | 1175 | * |
1176 | - * @param object $entity The entity to schedule for being updated. |
|
1176 | + * @param \Doctrine\Tests\Models\Forum\ForumUser $entity The entity to schedule for being updated. |
|
1177 | 1177 | * |
1178 | 1178 | * @return void |
1179 | 1179 | * |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | /** |
1242 | 1242 | * Checks whether an entity is registered to be checked in the unit of work. |
1243 | 1243 | * |
1244 | - * @param object $entity |
|
1244 | + * @param \Doctrine\Tests\ORM\NotifyChangedEntity $entity |
|
1245 | 1245 | * |
1246 | 1246 | * @return boolean |
1247 | 1247 | */ |
@@ -2822,9 +2822,9 @@ discard block |
||
2822 | 2822 | /** |
2823 | 2823 | * Notifies this UnitOfWork of a property change in an entity. |
2824 | 2824 | * |
2825 | - * @param object $entity The entity that owns the property. |
|
2825 | + * @param \Doctrine\Tests\Models\CustomType\CustomTypeParent $entity The entity that owns the property. |
|
2826 | 2826 | * @param string $propertyName The name of the property that changed. |
2827 | - * @param mixed $oldValue The old value of the property. |
|
2827 | + * @param integer|null $oldValue The old value of the property. |
|
2828 | 2828 | * @param mixed $newValue The new value of the property. |
2829 | 2829 | * |
2830 | 2830 | * @return void |
@@ -3023,7 +3023,7 @@ discard block |
||
3023 | 3023 | /** |
3024 | 3024 | * Verifies if two given entities actually are the same based on identifier comparison |
3025 | 3025 | * |
3026 | - * @param object $entity1 |
|
3026 | + * @param GhostObjectInterface $entity1 |
|
3027 | 3027 | * @param object $entity2 |
3028 | 3028 | * |
3029 | 3029 | * @return bool |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\ORM; |
6 | 6 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | // Entity deletions come last and need to be in reverse commit order |
376 | 376 | if ($this->entityDeletions) { |
377 | 377 | foreach (array_reverse($commitOrder) as $committedEntityName) { |
378 | - if (! $this->entityDeletions) { |
|
378 | + if ( ! $this->entityDeletions) { |
|
379 | 379 | break; // just a performance optimisation |
380 | 380 | } |
381 | 381 | |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | $oid = spl_object_hash($entity); |
461 | 461 | $data = []; |
462 | 462 | |
463 | - if (!isset($this->entityChangeSets[$oid])) { |
|
463 | + if ( ! isset($this->entityChangeSets[$oid])) { |
|
464 | 464 | return $data; |
465 | 465 | } |
466 | 466 | |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | || ! $class->getProperty($name) instanceof FieldMetadata |
544 | 544 | || ! $class->getProperty($name)->hasValueGenerator() |
545 | 545 | || $class->getProperty($name)->getValueGenerator()->getType() !== GeneratorType::IDENTITY |
546 | - ) && (! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
546 | + ) && ( ! $class->isVersioned() || $name !== $class->versionProperty->getName())) { |
|
547 | 547 | $actualData[$name] = $value; |
548 | 548 | } |
549 | 549 | } |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | if ($owner === null) { // cloned |
598 | 598 | $actualValue->setOwner($entity, $property); |
599 | 599 | } else if ($owner !== $entity) { // no clone, we have to fix |
600 | - if (! $actualValue->isInitialized()) { |
|
600 | + if ( ! $actualValue->isInitialized()) { |
|
601 | 601 | $actualValue->initialize(); // we have to do this otherwise the cols share state |
602 | 602 | } |
603 | 603 | |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | // A PersistentCollection was de-referenced, so delete it. |
638 | 638 | $coid = spl_object_hash($orgValue); |
639 | 639 | |
640 | - if (!isset($this->collectionDeletions[$coid])) { |
|
640 | + if ( ! isset($this->collectionDeletions[$coid])) { |
|
641 | 641 | $this->collectionDeletions[$coid] = $orgValue; |
642 | 642 | $changeSet[$propName] = $orgValue; // Signal changeset, to-many associations will be ignored |
643 | 643 | } |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | |
660 | 660 | // Look for changes in associations of the entity |
661 | 661 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
662 | - if (! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
662 | + if ( ! ($property instanceof AssociationMetadata) || ($value = $property->getValue($entity)) === null) { |
|
663 | 663 | continue; |
664 | 664 | } |
665 | 665 | |
@@ -763,13 +763,13 @@ discard block |
||
763 | 763 | $targetClass = $this->em->getClassMetadata($targetEntity); |
764 | 764 | |
765 | 765 | foreach ($unwrappedValue as $key => $entry) { |
766 | - if (! ($entry instanceof $targetEntity)) { |
|
766 | + if ( ! ($entry instanceof $targetEntity)) { |
|
767 | 767 | throw ORMInvalidArgumentException::invalidAssociation($targetClass, $association, $entry); |
768 | 768 | } |
769 | 769 | |
770 | 770 | $state = $this->getEntityState($entry, self::STATE_NEW); |
771 | 771 | |
772 | - if (! ($entry instanceof $targetEntity)) { |
|
772 | + if ( ! ($entry instanceof $targetEntity)) { |
|
773 | 773 | throw ORMException::unexpectedAssociationValue( |
774 | 774 | $association->getSourceEntity(), |
775 | 775 | $association->getName(), |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | $persister = $this->getEntityPersister($class->getClassName()); |
829 | 829 | $generationPlan->executeImmediate($this->em, $entity); |
830 | 830 | |
831 | - if (! $generationPlan->containsDeferred()) { |
|
831 | + if ( ! $generationPlan->containsDeferred()) { |
|
832 | 832 | $id = $this->em->getIdentifierFlattener()->flattenIdentifier($class, $persister->getIdentifier($entity)); |
833 | 833 | $this->entityIdentifiers[$oid] = $id; |
834 | 834 | } |
@@ -861,7 +861,7 @@ discard block |
||
861 | 861 | { |
862 | 862 | $oid = spl_object_hash($entity); |
863 | 863 | |
864 | - if (! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
864 | + if ( ! isset($this->entityStates[$oid]) || $this->entityStates[$oid] !== self::STATE_MANAGED) { |
|
865 | 865 | throw ORMInvalidArgumentException::entityNotManaged($entity); |
866 | 866 | } |
867 | 867 | |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | break; |
884 | 884 | |
885 | 885 | case ($property instanceof FieldMetadata): |
886 | - if (! $property->isPrimaryKey() |
|
886 | + if ( ! $property->isPrimaryKey() |
|
887 | 887 | || ! $property->getValueGenerator() |
888 | 888 | || $property->getValueGenerator()->getType() !== GeneratorType::IDENTITY) { |
889 | 889 | $actualData[$name] = $property->getValue($entity); |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | // Entity with this $oid after deletion treated as NEW, even if the $oid |
1037 | 1037 | // is obtained by a new entity because the old one went out of scope. |
1038 | 1038 | //$this->entityStates[$oid] = self::STATE_NEW; |
1039 | - if (! $class->isIdentifierComposite()) { |
|
1039 | + if ( ! $class->isIdentifierComposite()) { |
|
1040 | 1040 | $property = $class->getProperty($class->getSingleIdentifierFieldName()); |
1041 | 1041 | |
1042 | 1042 | if ($property instanceof FieldMetadata && $property->hasValueGenerator()) { |
@@ -1083,7 +1083,7 @@ discard block |
||
1083 | 1083 | // Calculate dependencies for new nodes |
1084 | 1084 | while ($class = array_pop($newNodes)) { |
1085 | 1085 | foreach ($class->getDeclaredPropertiesIterator() as $property) { |
1086 | - if (! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1086 | + if ( ! ($property instanceof ToOneAssociationMetadata && $property->isOwningSide())) { |
|
1087 | 1087 | continue; |
1088 | 1088 | } |
1089 | 1089 | |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | |
1098 | 1098 | $weight = ! array_filter( |
1099 | 1099 | $property->getJoinColumns(), |
1100 | - function (JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1100 | + function(JoinColumnMetadata $joinColumn) { return $joinColumn->isNullable(); } |
|
1101 | 1101 | ); |
1102 | 1102 | |
1103 | 1103 | $calc->addDependency($targetClass->getClassName(), $class->getClassName(), $weight); |
@@ -1391,7 +1391,7 @@ discard block |
||
1391 | 1391 | $persister = $this->getEntityPersister($class->getClassName()); |
1392 | 1392 | $id = $persister->getIdentifier($entity); |
1393 | 1393 | |
1394 | - if (! $id) { |
|
1394 | + if ( ! $id) { |
|
1395 | 1395 | return self::STATE_NEW; |
1396 | 1396 | } |
1397 | 1397 | |
@@ -1626,7 +1626,7 @@ discard block |
||
1626 | 1626 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "persisted"); |
1627 | 1627 | |
1628 | 1628 | default: |
1629 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1629 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1630 | 1630 | } |
1631 | 1631 | |
1632 | 1632 | $this->cascadePersist($entity, $visited); |
@@ -1696,7 +1696,7 @@ discard block |
||
1696 | 1696 | case self::STATE_DETACHED: |
1697 | 1697 | throw ORMInvalidArgumentException::detachedEntityCannot($entity, "removed"); |
1698 | 1698 | default: |
1699 | - throw new UnexpectedValueException("Unexpected entity state: $entityState." . self::objToStr($entity)); |
|
1699 | + throw new UnexpectedValueException("Unexpected entity state: $entityState.".self::objToStr($entity)); |
|
1700 | 1700 | } |
1701 | 1701 | |
1702 | 1702 | } |
@@ -1765,7 +1765,7 @@ discard block |
||
1765 | 1765 | $class = $this->em->getClassMetadata(get_class($entity)); |
1766 | 1766 | |
1767 | 1767 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1768 | - if (! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
1768 | + if ( ! ($association instanceof AssociationMetadata && in_array('refresh', $association->getCascade()))) { |
|
1769 | 1769 | continue; |
1770 | 1770 | } |
1771 | 1771 | |
@@ -1812,7 +1812,7 @@ discard block |
||
1812 | 1812 | } |
1813 | 1813 | |
1814 | 1814 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1815 | - if (! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
1815 | + if ( ! ($association instanceof AssociationMetadata && in_array('persist', $association->getCascade()))) { |
|
1816 | 1816 | continue; |
1817 | 1817 | } |
1818 | 1818 | |
@@ -1828,7 +1828,7 @@ discard block |
||
1828 | 1828 | |
1829 | 1829 | case ($relatedEntities instanceof Collection): |
1830 | 1830 | case (is_array($relatedEntities)): |
1831 | - if (! ($association instanceof ToManyAssociationMetadata)) { |
|
1831 | + if ( ! ($association instanceof ToManyAssociationMetadata)) { |
|
1832 | 1832 | throw ORMInvalidArgumentException::invalidAssociation( |
1833 | 1833 | $this->em->getClassMetadata($targetEntity), |
1834 | 1834 | $association, |
@@ -1843,7 +1843,7 @@ discard block |
||
1843 | 1843 | break; |
1844 | 1844 | |
1845 | 1845 | case ($relatedEntities !== null): |
1846 | - if (! $relatedEntities instanceof $targetEntity) { |
|
1846 | + if ( ! $relatedEntities instanceof $targetEntity) { |
|
1847 | 1847 | throw ORMInvalidArgumentException::invalidAssociation( |
1848 | 1848 | $this->em->getClassMetadata($targetEntity), |
1849 | 1849 | $association, |
@@ -1874,7 +1874,7 @@ discard block |
||
1874 | 1874 | $class = $this->em->getClassMetadata(get_class($entity)); |
1875 | 1875 | |
1876 | 1876 | foreach ($class->getDeclaredPropertiesIterator() as $association) { |
1877 | - if (! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
1877 | + if ( ! ($association instanceof AssociationMetadata && in_array('remove', $association->getCascade()))) { |
|
1878 | 1878 | continue; |
1879 | 1879 | } |
1880 | 1880 | |
@@ -1957,7 +1957,7 @@ discard block |
||
1957 | 1957 | case LockMode::NONE === $lockMode: |
1958 | 1958 | case LockMode::PESSIMISTIC_READ === $lockMode: |
1959 | 1959 | case LockMode::PESSIMISTIC_WRITE === $lockMode: |
1960 | - if (!$this->em->getConnection()->isTransactionActive()) { |
|
1960 | + if ( ! $this->em->getConnection()->isTransactionActive()) { |
|
1961 | 1961 | throw TransactionRequiredException::transactionRequired(); |
1962 | 1962 | } |
1963 | 1963 | |
@@ -2189,7 +2189,7 @@ discard block |
||
2189 | 2189 | } |
2190 | 2190 | |
2191 | 2191 | foreach ($class->getDeclaredPropertiesIterator() as $field => $association) { |
2192 | - if (! ($association instanceof AssociationMetadata)) { |
|
2192 | + if ( ! ($association instanceof AssociationMetadata)) { |
|
2193 | 2193 | continue; |
2194 | 2194 | } |
2195 | 2195 | |
@@ -2238,7 +2238,7 @@ discard block |
||
2238 | 2238 | continue; |
2239 | 2239 | } |
2240 | 2240 | |
2241 | - if (! $association->isOwningSide()) { |
|
2241 | + if ( ! $association->isOwningSide()) { |
|
2242 | 2242 | // use the given entity association |
2243 | 2243 | if (isset($data[$field]) && is_object($data[$field]) && |
2244 | 2244 | isset($this->entityStates[spl_object_hash($data[$field])])) { |
@@ -2288,7 +2288,7 @@ discard block |
||
2288 | 2288 | $associatedId[$targetField] = $joinColumnValue; |
2289 | 2289 | } |
2290 | 2290 | |
2291 | - if (! $associatedId) { |
|
2291 | + if ( ! $associatedId) { |
|
2292 | 2292 | // Foreign key is NULL |
2293 | 2293 | $association->setValue($entity, null); |
2294 | 2294 | $this->originalEntityData[$oid][$field] = null; |
@@ -2297,7 +2297,7 @@ discard block |
||
2297 | 2297 | } |
2298 | 2298 | |
2299 | 2299 | // @todo guilhermeblanco Can we remove the need of this somehow? |
2300 | - if (!isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2300 | + if ( ! isset($hints['fetchMode'][$class->getClassName()][$field])) { |
|
2301 | 2301 | $hints['fetchMode'][$class->getClassName()][$field] = $association->getFetchMode(); |
2302 | 2302 | } |
2303 | 2303 | |
@@ -2314,7 +2314,7 @@ discard block |
||
2314 | 2314 | // If this is an uninitialized proxy, we are deferring eager loads, |
2315 | 2315 | // this association is marked as eager fetch, and its an uninitialized proxy (wtf!) |
2316 | 2316 | // then we can append this entity for eager loading! |
2317 | - if (!$targetClass->isIdentifierComposite() && |
|
2317 | + if ( ! $targetClass->isIdentifierComposite() && |
|
2318 | 2318 | $newValue instanceof GhostObjectInterface && |
2319 | 2319 | isset($hints[self::HINT_DEFEREAGERLOAD]) && |
2320 | 2320 | $hints['fetchMode'][$class->getClassName()][$field] === FetchMode::EAGER && |
@@ -2351,7 +2351,7 @@ discard block |
||
2351 | 2351 | break; |
2352 | 2352 | |
2353 | 2353 | // Deferred eager load only works for single identifier classes |
2354 | - case (isset($hints[self::HINT_DEFEREAGERLOAD]) && !$targetClass->isIdentifierComposite()): |
|
2354 | + case (isset($hints[self::HINT_DEFEREAGERLOAD]) && ! $targetClass->isIdentifierComposite()): |
|
2355 | 2355 | // TODO: Is there a faster approach? |
2356 | 2356 | $this->eagerLoadingEntities[$targetClass->getRootClassName()][$relatedIdHash] = current($normalizedAssociatedId); |
2357 | 2357 | |
@@ -2764,7 +2764,7 @@ discard block |
||
2764 | 2764 | { |
2765 | 2765 | $class = $this->em->getClassMetadata(get_class($entity)); |
2766 | 2766 | |
2767 | - if (! $class->getProperty($propertyName)) { |
|
2767 | + if ( ! $class->getProperty($propertyName)) { |
|
2768 | 2768 | return; // ignore non-persistent fields |
2769 | 2769 | } |
2770 | 2770 | |
@@ -2904,7 +2904,7 @@ discard block |
||
2904 | 2904 | */ |
2905 | 2905 | private function afterTransactionComplete() |
2906 | 2906 | { |
2907 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
2907 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
2908 | 2908 | $persister->afterTransactionComplete(); |
2909 | 2909 | }); |
2910 | 2910 | } |
@@ -2914,7 +2914,7 @@ discard block |
||
2914 | 2914 | */ |
2915 | 2915 | private function afterTransactionRolledBack() |
2916 | 2916 | { |
2917 | - $this->performCallbackOnCachedPersister(function (CachedPersister $persister) { |
|
2917 | + $this->performCallbackOnCachedPersister(function(CachedPersister $persister) { |
|
2918 | 2918 | $persister->afterTransactionRolledBack(); |
2919 | 2919 | }); |
2920 | 2920 | } |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
7 | -use Doctrine\ORM\Mapping\AssociationMapping; |
|
8 | 7 | use Doctrine\ORM\Mapping\FetchMode; |
9 | 8 | use Doctrine\Tests\Models\ECommerce\ECommerceCart; |
10 | 9 | use Doctrine\Tests\Models\ECommerce\ECommerceCustomer; |
@@ -12,7 +12,6 @@ |
||
12 | 12 | use Doctrine\Tests\Models\CMS\CmsTag; |
13 | 13 | use Doctrine\Tests\Models\CMS\CmsUser; |
14 | 14 | use Doctrine\Tests\OrmFunctionalTestCase; |
15 | -use Doctrine\Tests\Proxies\__CG__\Doctrine\Tests\Models\CMS\CmsUser as CmsUserProxy; |
|
16 | 15 | use ProxyManager\Configuration; |
17 | 16 | use ProxyManager\Proxy\GhostObjectInterface; |
18 | 17 |
@@ -86,6 +86,9 @@ discard block |
||
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $propName |
|
91 | + */ |
|
89 | 92 | protected function onPropertyChanged($propName, $oldValue, $newValue) { |
90 | 93 | foreach ($this->listeners as $listener) { |
91 | 94 | $listener->propertyChanged($this, $propName, $oldValue, $newValue); |
@@ -112,11 +115,17 @@ discard block |
||
112 | 115 | return $this->name; |
113 | 116 | } |
114 | 117 | |
118 | + /** |
|
119 | + * @param string $name |
|
120 | + */ |
|
115 | 121 | function setName($name) { |
116 | 122 | $this->onPropertyChanged('name', $this->name, $name); |
117 | 123 | $this->name = $name; |
118 | 124 | } |
119 | 125 | |
126 | + /** |
|
127 | + * @param DDC1690Child $child |
|
128 | + */ |
|
120 | 129 | function setChild($child) { |
121 | 130 | $this->child = $child; |
122 | 131 | } |
@@ -145,11 +154,17 @@ discard block |
||
145 | 154 | return $this->name; |
146 | 155 | } |
147 | 156 | |
157 | + /** |
|
158 | + * @param string $name |
|
159 | + */ |
|
148 | 160 | function setName($name) { |
149 | 161 | $this->onPropertyChanged('name', $this->name, $name); |
150 | 162 | $this->name = $name; |
151 | 163 | } |
152 | 164 | |
165 | + /** |
|
166 | + * @param DDC1690Parent $parent |
|
167 | + */ |
|
153 | 168 | function setParent($parent) { |
154 | 169 | $this->parent = $parent; |
155 | 170 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional\Ticket; |
6 | 6 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | public $listeners = []; |
82 | 82 | |
83 | 83 | public function addPropertyChangedListener(PropertyChangedListener $listener) { |
84 | - if (! \in_array($listener, $this->listeners, true)) { |
|
84 | + if ( ! \in_array($listener, $this->listeners, true)) { |
|
85 | 85 | $this->listeners[] = $listener; |
86 | 86 | } |
87 | 87 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\Tests\ORM\Functional; |
6 | 6 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $user->username = 'gblanco'; |
184 | 184 | $user->status = 'developer'; |
185 | 185 | |
186 | - for ($i=0; $i<3; ++$i) { |
|
186 | + for ($i = 0; $i < 3; ++$i) { |
|
187 | 187 | $phone = new CmsPhonenumber; |
188 | 188 | $phone->phonenumber = 100 + $i; |
189 | 189 | $user->addPhonenumber($phone); |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | $user->username = 'gblanco'; |
412 | 412 | $user->status = 'developer'; |
413 | 413 | |
414 | - for ($i=0; $i<3; ++$i) { |
|
414 | + for ($i = 0; $i < 3; ++$i) { |
|
415 | 415 | $phone = new CmsPhonenumber; |
416 | 416 | $phone->phonenumber = 100 + $i; |
417 | 417 | $user->addPhonenumber($phone); |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $user->username = 'gblanco'; |
452 | 452 | $user->status = 'developer'; |
453 | 453 | |
454 | - for ($i=0; $i<3; ++$i) { |
|
454 | + for ($i = 0; $i < 3; ++$i) { |
|
455 | 455 | $phone = new CmsPhonenumber; |
456 | 456 | $phone->phonenumber = 100 + $i; |
457 | 457 | $user->addPhonenumber($phone); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | $user->username = 'gblanco'; |
493 | 493 | $user->status = 'developer'; |
494 | 494 | |
495 | - for ($i=0; $i<3; ++$i) { |
|
495 | + for ($i = 0; $i < 3; ++$i) { |
|
496 | 496 | $phone = new CmsPhonenumber; |
497 | 497 | $phone->phonenumber = 100 + $i; |
498 | 498 | $user->addPhonenumber($phone); |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | |
876 | 876 | self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, "It IS a proxy, ..."); |
877 | 877 | self::assertTrue($fetchedUser->isProxyInitialized(), "...but its initialized!"); |
878 | - self::assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
878 | + self::assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | /** |
@@ -936,7 +936,7 @@ discard block |
||
936 | 936 | |
937 | 937 | $this->expectException(ORMInvalidArgumentException::class); |
938 | 938 | $this->expectExceptionMessage( |
939 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
939 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
940 | 940 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
941 | 941 | ); |
942 | 942 |