@@ -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 | } |
@@ -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\Utility; |
| 6 | 6 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | $normalizedAssociatedId = []; |
| 26 | 26 | |
| 27 | 27 | foreach ($targetClass->getDeclaredPropertiesIterator() as $name => $declaredProperty) { |
| 28 | - if (! \array_key_exists($name, $flatIdentifier)) { |
|
| 28 | + if ( ! \array_key_exists($name, $flatIdentifier)) { |
|
| 29 | 29 | continue; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -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\Proxy\Factory; |
| 7 | 7 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function generateProxyClasses(array $classMetadataList) : int |
| 73 | 73 | { |
| 74 | - $concreteClasses = \array_filter($classMetadataList, function (ClassMetadata $metadata) : bool { |
|
| 74 | + $concreteClasses = \array_filter($classMetadataList, function(ClassMetadata $metadata) : bool { |
|
| 75 | 75 | return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract()); |
| 76 | 76 | }); |
| 77 | 77 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ->proxyFactory |
| 83 | 83 | ->createProxy( |
| 84 | 84 | $className, |
| 85 | - function () { |
|
| 85 | + function() { |
|
| 86 | 86 | // empty closure, serves its purpose, for now |
| 87 | 87 | }, |
| 88 | 88 | $this->cachedSkippedProperties[$className] |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : \Closure |
| 130 | 130 | { |
| 131 | - return function ( |
|
| 131 | + return function( |
|
| 132 | 132 | GhostObjectInterface $ghostObject, |
| 133 | 133 | string $method, // we don't care |
| 134 | 134 | array $parameters, // we don't care |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $identifier = $persister->getIdentifier($ghostObject); |
| 142 | 142 | |
| 143 | 143 | // @TODO how do we use `$properties` in the persister? That would be a massive optimisation |
| 144 | - if (! $persister->loadById($identifier, $ghostObject)) { |
|
| 144 | + if ( ! $persister->loadById($identifier, $ghostObject)) { |
|
| 145 | 145 | $initializer = $originalInitializer; |
| 146 | 146 | |
| 147 | 147 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $transientFieldsFqns = []; |
| 168 | 168 | |
| 169 | 169 | foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) { |
| 170 | - if (! $property instanceof TransientMetadata) { |
|
| 170 | + if ( ! $property instanceof TransientMetadata) { |
|
| 171 | 171 | continue; |
| 172 | 172 | } |
| 173 | 173 | |
@@ -202,11 +202,11 @@ discard block |
||
| 202 | 202 | private function propertyFqcn(\ReflectionProperty $property) : string |
| 203 | 203 | { |
| 204 | 204 | if ($property->isPrivate()) { |
| 205 | - return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName(); |
|
| 205 | + return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName(); |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | if ($property->isProtected()) { |
| 209 | - return "\0*\0" . $property->getName(); |
|
| 209 | + return "\0*\0".$property->getName(); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | return $property->getName(); |
@@ -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\Utility; |
| 6 | 6 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | self::assertSame(\array_keys($expectedId), \array_keys($id)); |
| 55 | 55 | |
| 56 | 56 | foreach ($expectedId as $field => $value) { |
| 57 | - if (! \is_object($value)) { |
|
| 57 | + if ( ! \is_object($value)) { |
|
| 58 | 58 | self::assertSame($id[$field], $value); |
| 59 | 59 | |
| 60 | 60 | continue; |
@@ -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\Proxy; |
| 6 | 6 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | self::isInstanceOf(CompanyEmployee::class) |
| 206 | 206 | ) |
| 207 | 207 | ) |
| 208 | - ->willReturnCallback(function (array $id, CompanyEmployee $companyEmployee) { |
|
| 208 | + ->willReturnCallback(function(array $id, CompanyEmployee $companyEmployee) { |
|
| 209 | 209 | $companyEmployee->setSalary(1000); // A property on the CompanyEmployee |
| 210 | 210 | $companyEmployee->setName('Bob'); // A property on the parent class, CompanyPerson |
| 211 | 211 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | self::isInstanceOf(ComparableObject::class) |
| 265 | 265 | ) |
| 266 | 266 | ) |
| 267 | - ->willReturnCallback(function (array $id, ComparableObject $comparableObject) { |
|
| 267 | + ->willReturnCallback(function(array $id, ComparableObject $comparableObject) { |
|
| 268 | 268 | $comparableObject->setComparedFieldValue(\json_encode($id)); |
| 269 | 269 | |
| 270 | 270 | return $comparableObject; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\IdentityIsAssociation; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\IdentityIsAssociation; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\IdentityIsAssociation; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Doctrine\Tests\Models\IdentityIsAssociation; |
| 6 | 6 | |