@@ -106,8 +106,8 @@ |
||
| 106 | 106 | $this->em = $this->getTestEntityManager(); |
| 107 | 107 | $this->region = $this->createRegion(); |
| 108 | 108 | $this->entityPersister = $this->getMockBuilder(EntityPersister::class) |
| 109 | - ->setMethods($this->entityPersisterMockMethods) |
|
| 110 | - ->getMock(); |
|
| 109 | + ->setMethods($this->entityPersisterMockMethods) |
|
| 110 | + ->getMock(); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -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\Cache\Persister\Entity; |
| 6 | 6 | |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | ->with($this->equalTo($assoc), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2)) |
| 371 | 371 | ->will($this->returnValue([$entity])); |
| 372 | 372 | |
| 373 | - self::assertEquals([$entity], $persister->getManyToManyCollection($assoc, 'Foo', 1 ,2)); |
|
| 373 | + self::assertEquals([$entity], $persister->getManyToManyCollection($assoc, 'Foo', 1, 2)); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | public function testInvokeGetOneToManyCollection() |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | ->with($this->equalTo($assoc), $this->equalTo('Foo'), $this->equalTo(1), $this->equalTo(2)) |
| 385 | 385 | ->will($this->returnValue([$entity])); |
| 386 | 386 | |
| 387 | - self::assertEquals([$entity], $persister->getOneToManyCollection($assoc, 'Foo', 1 ,2)); |
|
| 387 | + self::assertEquals([$entity], $persister->getOneToManyCollection($assoc, 'Foo', 1, 2)); |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | public function testInvokeLoadManyToManyCollection() |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * @return \Doctrine\ORM\Cache\Region |
|
| 48 | + * @return \PHPUnit\Framework\MockObject\MockObject |
|
| 49 | 49 | */ |
| 50 | 50 | protected function createRegion() |
| 51 | 51 | { |
@@ -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\ORM\Cache\Persister\Collection; |
| 6 | 6 | |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | $this->em = $this->getTestEntityManager(); |
| 91 | 91 | $this->region = $this->createRegion(); |
| 92 | 92 | $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class) |
| 93 | - ->setMethods($this->collectionPersisterMockMethods) |
|
| 94 | - ->getMock(); |
|
| 93 | + ->setMethods($this->collectionPersisterMockMethods) |
|
| 94 | + ->getMock(); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -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\Cache\Persister\Collection; |
| 6 | 6 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | ->with($this->equalTo($collection), $this->equalTo(1), $this->equalTo(2)) |
| 199 | 199 | ->will($this->returnValue($slice)); |
| 200 | 200 | |
| 201 | - self::assertEquals($slice, $persister->slice($collection, 1 , 2)); |
|
| 201 | + self::assertEquals($slice, $persister->slice($collection, 1, 2)); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | public function testInvokeContains() |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | ->with($this->equalTo($collection), $this->equalTo($element)) |
| 216 | 216 | ->will($this->returnValue(false)); |
| 217 | 217 | |
| 218 | - self::assertFalse($persister->contains($collection,$element)); |
|
| 218 | + self::assertFalse($persister->contains($collection, $element)); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | public function testInvokeContainsKey() |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
| 98 | - * @return \Doctrine\ORM\Cache\Region |
|
| 98 | + * @return \PHPUnit\Framework\MockObject\MockObject |
|
| 99 | 99 | */ |
| 100 | 100 | protected function createRegion() |
| 101 | 101 | { |
@@ -105,6 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
| 108 | + * @param State $owner |
|
| 108 | 109 | * @return \Doctrine\ORM\PersistentCollection |
| 109 | 110 | */ |
| 110 | 111 | protected function createCollection($owner, $assoc = null, $class = null, $elements = null) |
@@ -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\Cache; |
| 6 | 6 | |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $city->getName()]); |
| 398 | 398 | $uow->registerManaged($city, ['id' => $city->getId()], ['name' => $city->getName(), 'state' => $state]); |
| 399 | 399 | |
| 400 | - $this->region->addReturn('put', true); // put root entity |
|
| 400 | + $this->region->addReturn('put', true); // put root entity |
|
| 401 | 401 | $this->region->addReturn('put', false); // association fails |
| 402 | 402 | |
| 403 | 403 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | $uow->registerManaged($city2, ['id' => $city2->getId()], ['name' => $city2->getName(), 'state' => $state]); |
| 431 | 431 | $uow->registerManaged($state, ['id' => $state->getId()], ['name' => $state->getName(), 'cities' => $state->getCities()]); |
| 432 | 432 | |
| 433 | - $this->region->addReturn('put', true); // put root entity |
|
| 433 | + $this->region->addReturn('put', true); // put root entity |
|
| 434 | 434 | $this->region->addReturn('put', false); // collection association fails |
| 435 | 435 | |
| 436 | 436 | self::assertFalse($this->queryCache->put($key, $rsm, $result)); |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | $attractions = $reflection->invoke($this->queryCache, $rsm, 'a', $bavaria); |
| 599 | 599 | |
| 600 | 600 | self::assertCount(2, $cities); |
| 601 | - self::assertCount(2, $attractions); |
|
| 601 | + self::assertCount(2, $attractions); |
|
| 602 | 602 | |
| 603 | 603 | self::assertInstanceOf(Collection::class, $cities); |
| 604 | 604 | self::assertInstanceOf(Collection::class, $attractions[0]); |
@@ -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\Cache; |
| 6 | 6 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $entity->setId(1); |
| 84 | 84 | $uow->registerManaged($entity, $key->identifier, $data); |
| 85 | 85 | |
| 86 | - $cache = $this->structure->buildCacheEntry($metadata, $key, $entity); |
|
| 86 | + $cache = $this->structure->buildCacheEntry($metadata, $key, $entity); |
|
| 87 | 87 | |
| 88 | 88 | self::assertInstanceOf(CacheEntry::class, $cache); |
| 89 | 89 | self::assertInstanceOf(EntityCacheEntry::class, $cache); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | public function testCreateQueryBuilderAliasValid() |
| 106 | 106 | { |
| 107 | 107 | $q = $this->em->createQueryBuilder() |
| 108 | - ->select('u')->from(CmsUser::class, 'u'); |
|
| 108 | + ->select('u')->from(CmsUser::class, 'u'); |
|
| 109 | 109 | $q2 = clone $q; |
| 110 | 110 | |
| 111 | 111 | self::assertEquals('SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u', $q->getQuery()->getDql()); |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use Doctrine\ORM\Mapping\ClassMetadataFactory; |
| 13 | 13 | use Doctrine\ORM\Mapping\Driver\MappingDriver; |
| 14 | 14 | use Doctrine\ORM\NativeQuery; |
| 15 | -use Doctrine\ORM\ORMException; |
|
| 16 | 15 | use Doctrine\ORM\ORMInvalidArgumentException; |
| 17 | 16 | use Doctrine\ORM\Proxy\Factory\ProxyFactory; |
| 18 | 17 | 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\Tests\ORM; |
| 6 | 6 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function testThrowsExceptionOnNonObjectValues($methodName) { |
| 168 | 168 | $this->expectException(ORMInvalidArgumentException::class); |
| 169 | - $this->expectExceptionMessage('EntityManager#' . $methodName . '() expects parameter 1 to be an entity object, NULL given.'); |
|
| 169 | + $this->expectExceptionMessage('EntityManager#'.$methodName.'() expects parameter 1 to be an entity object, NULL given.'); |
|
| 170 | 170 | |
| 171 | 171 | $this->em->$methodName(null); |
| 172 | 172 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | { |
| 211 | 211 | self::assertSame( |
| 212 | 212 | $value, |
| 213 | - $this->em->transactional(function ($em) use ($value) { |
|
| 213 | + $this->em->transactional(function($em) use ($value) { |
|
| 214 | 214 | return $value; |
| 215 | 215 | }) |
| 216 | 216 | ); |
@@ -243,8 +243,8 @@ discard block |
||
| 243 | 243 | public function testTransactionalReThrowsThrowables() |
| 244 | 244 | { |
| 245 | 245 | try { |
| 246 | - $this->em->transactional(function () { |
|
| 247 | - (function (array $value) { |
|
| 246 | + $this->em->transactional(function() { |
|
| 247 | + (function(array $value) { |
|
| 248 | 248 | // this only serves as an IIFE that throws a `TypeError` |
| 249 | 249 | })(null); |
| 250 | 250 | }); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | use Doctrine\ORM\Annotation as ORM; |
| 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\DDC3231; |
| 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\DDC6412; |
| 6 | 6 | |