@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -declare(strict_types=1); |
|
| 4 | +declare(strict_types = 1); |
|
| 5 | 5 | |
| 6 | 6 | namespace Doctrine\ORM\Utility; |
| 7 | 7 | |
@@ -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 | |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | $data = array_merge($data, $persister->getIdentifier($entity)); // why update has no identifier values ? |
| 59 | 59 | |
| 60 | 60 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $association) { |
| 61 | - if (! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 61 | + if ( ! isset($data[$name]) || $association instanceof FieldMetadata) { |
|
| 62 | 62 | continue; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - if (! $association instanceof ToOneAssociationMetadata) { |
|
| 65 | + if ( ! $association instanceof ToOneAssociationMetadata) { |
|
| 66 | 66 | unset($data[$name]); |
| 67 | 67 | |
| 68 | 68 | continue; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $targetClassMetadata = $this->em->getClassMetadata($targetEntity); |
| 73 | 73 | $targetPersister = $this->uow->getEntityPersister($targetEntity); |
| 74 | 74 | |
| 75 | - if (! $association->getCache()) { |
|
| 75 | + if ( ! $association->getCache()) { |
|
| 76 | 76 | $owningAssociation = ! $association->isOwningSide() |
| 77 | 77 | ? $targetClassMetadata->getProperty($association->getMappedBy()) |
| 78 | 78 | : $association; |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | continue; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - if (! $association->isPrimaryKey()) { |
|
| 123 | + if ( ! $association->isPrimaryKey()) { |
|
| 124 | 124 | $targetClass = StaticClassNameConverter::getClass($data[$name]); |
| 125 | 125 | $targetId = $this->uow->getEntityIdentifier($data[$name]); |
| 126 | 126 | $data[$name] = new AssociationCacheEntry($targetClass, $targetId); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide()) |
| 171 | 171 | ); |
| 172 | 172 | |
| 173 | - if (! $isEagerLoad) { |
|
| 173 | + if ( ! $isEagerLoad) { |
|
| 174 | 174 | $data[$name] = $this->em->getReference($assocClass, $assocId); |
| 175 | 175 | |
| 176 | 176 | continue; |
@@ -1,11 +1,11 @@ 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 | |
| 7 | 7 | use Doctrine\Common\Collections\Collection; |
| 8 | -use Doctrine\Common\Collections\ArrayCollection;; |
|
| 8 | +use Doctrine\Common\Collections\ArrayCollection; ; |
|
| 9 | 9 | use Doctrine\ORM\Query\Parameter; |
| 10 | 10 | use Doctrine\ORM\Cache\QueryCacheKey; |
| 11 | 11 | use Doctrine\DBAL\Cache\QueryCacheProfile; |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | public function getParameter($key) |
| 306 | 306 | { |
| 307 | 307 | $filteredParameters = $this->parameters->filter( |
| 308 | - function ($parameter) use ($key) |
|
| 308 | + function($parameter) use ($key) |
|
| 309 | 309 | { |
| 310 | 310 | // Must not be identical because of string to integer conversion |
| 311 | 311 | return ($key == $parameter->getName()); |
@@ -354,14 +354,14 @@ discard block |
||
| 354 | 354 | public function setParameter($key, $value, $type = null) |
| 355 | 355 | { |
| 356 | 356 | $filteredParameters = $this->parameters->filter( |
| 357 | - function ($parameter) use ($key) |
|
| 357 | + function($parameter) use ($key) |
|
| 358 | 358 | { |
| 359 | 359 | // Must not be identical because of string to integer conversion |
| 360 | 360 | return ($key == $parameter->getName()); |
| 361 | 361 | } |
| 362 | 362 | ); |
| 363 | 363 | |
| 364 | - if (! $filteredParameters->isEmpty()) { |
|
| 364 | + if ( ! $filteredParameters->isEmpty()) { |
|
| 365 | 365 | $parameter = $filteredParameters->first(); |
| 366 | 366 | $parameter->setValue($value, $type); |
| 367 | 367 | |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | */ |
| 451 | 451 | private function translateNamespaces(Query\ResultSetMapping $rsm) |
| 452 | 452 | { |
| 453 | - $translate = function ($alias) { |
|
| 453 | + $translate = function($alias) { |
|
| 454 | 454 | return $this->em->getClassMetadata($alias)->getClassName(); |
| 455 | 455 | }; |
| 456 | 456 | |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | */ |
| 513 | 513 | public function setResultCacheProfile(QueryCacheProfile $profile = null) |
| 514 | 514 | { |
| 515 | - if (! $profile->getResultCacheDriver()) { |
|
| 515 | + if ( ! $profile->getResultCacheDriver()) { |
|
| 516 | 516 | $resultCacheDriver = $this->em->getConfiguration()->getResultCacheImpl(); |
| 517 | 517 | $profile = $profile->setResultCacheDriver($resultCacheDriver); |
| 518 | 518 | } |
@@ -980,7 +980,7 @@ discard block |
||
| 980 | 980 | $this->getTimestampKey() |
| 981 | 981 | ); |
| 982 | 982 | |
| 983 | - $result = $queryCache->get($queryKey, $rsm, $this->hints); |
|
| 983 | + $result = $queryCache->get($queryKey, $rsm, $this->hints); |
|
| 984 | 984 | |
| 985 | 985 | if ($result !== null) { |
| 986 | 986 | if ($this->cacheLogger) { |
@@ -1114,6 +1114,6 @@ discard block |
||
| 1114 | 1114 | |
| 1115 | 1115 | ksort($hints); |
| 1116 | 1116 | |
| 1117 | - return sha1($query . '-' . serialize($params) . '-' . serialize($hints)); |
|
| 1117 | + return sha1($query.'-'.serialize($params).'-'.serialize($hints)); |
|
| 1118 | 1118 | } |
| 1119 | 1119 | } |