@@ -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 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $id = $this->createAddress(); |
| 39 | 39 | |
| 40 | - $addresses = $this->em->createQuery('SELECT a FROM ' . Address::class . ' a WHERE a.id = :id') |
|
| 40 | + $addresses = $this->em->createQuery('SELECT a FROM '.Address::class.' a WHERE a.id = :id') |
|
| 41 | 41 | ->setParameter('id', $id) |
| 42 | 42 | ->getResult(); |
| 43 | 43 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $id = $this->createFullAddress(); |
| 60 | 60 | |
| 61 | - $addresses = $this->em->createQuery('SELECT a FROM ' . FullAddress::class . ' a WHERE a.id = :id') |
|
| 61 | + $addresses = $this->em->createQuery('SELECT a FROM '.FullAddress::class.' a WHERE a.id = :id') |
|
| 62 | 62 | ->setParameter('id', $id) |
| 63 | 63 | ->getResult(); |
| 64 | 64 | |
@@ -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 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $entity = $this->em->find(Travel::class, $entitiId); |
| 235 | 235 | |
| 236 | 236 | self::assertEquals(0, $entity->getVisitedCities()->count()); |
| 237 | - self::assertEquals($queryCount+2, $this->getCurrentQueryCount()); |
|
| 237 | + self::assertEquals($queryCount + 2, $this->getCurrentQueryCount()); |
|
| 238 | 238 | |
| 239 | 239 | $this->em->clear(); |
| 240 | 240 | |
@@ -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 | |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | public function testOrderByResultVariableCollectionSize() |
| 57 | 57 | { |
| 58 | - $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
|
| 59 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 60 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
| 58 | + $dql = 'SELECT p.name, size(p.friends) AS friends '. |
|
| 59 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
|
| 60 | + 'WHERE p.friends IS NOT EMPTY '. |
|
| 61 | 61 | 'ORDER BY friends DESC, p.name DESC'; |
| 62 | 62 | |
| 63 | 63 | $result = $this->em->createQuery($dql)->getScalarResult(); |
@@ -28,8 +28,8 @@ discard block |
||
| 28 | 28 | public function testAggregateWithHavingClause() |
| 29 | 29 | { |
| 30 | 30 | $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary '. |
| 31 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 32 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 31 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 32 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 33 | 33 | |
| 34 | 34 | $result = $this->em->createQuery($dql)->getScalarResult(); |
| 35 | 35 | |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | public function testUnnamedScalarResultsAreOneBased() |
| 44 | 44 | { |
| 45 | 45 | $dql = 'SELECT p.department, AVG(p.salary) '. |
| 46 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 47 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 46 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
| 47 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
| 48 | 48 | |
| 49 | 49 | $result = $this->em->createQuery($dql)->getScalarResult(); |
| 50 | 50 | |
@@ -56,9 +56,9 @@ discard block |
||
| 56 | 56 | public function testOrderByResultVariableCollectionSize() |
| 57 | 57 | { |
| 58 | 58 | $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
| 59 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 60 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
| 61 | - 'ORDER BY friends DESC, p.name DESC'; |
|
| 59 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
| 60 | + 'WHERE p.friends IS NOT EMPTY ' . |
|
| 61 | + 'ORDER BY friends DESC, p.name DESC'; |
|
| 62 | 62 | |
| 63 | 63 | $result = $this->em->createQuery($dql)->getScalarResult(); |
| 64 | 64 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | public function testIsNullAssociation() |
| 81 | 81 | { |
| 82 | 82 | $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
| 83 | - 'WHERE p.spouse IS NULL'; |
|
| 83 | + 'WHERE p.spouse IS NULL'; |
|
| 84 | 84 | $result = $this->em->createQuery($dql)->getResult(); |
| 85 | 85 | |
| 86 | 86 | self::assertCount(2, $result); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | public function testSelectSubselect() |
| 95 | 95 | { |
| 96 | 96 | $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName '. |
| 97 | - 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
| 97 | + 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
| 98 | 98 | $result = $this->em->createQuery($dql)->getArrayResult(); |
| 99 | 99 | |
| 100 | 100 | self::assertCount(1, $result); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | public function testInSubselect() |
| 105 | 105 | { |
| 106 | 106 | $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ". |
| 107 | - "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
| 107 | + "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
| 108 | 108 | $result = $this->em->createQuery($dql)->getScalarResult(); |
| 109 | 109 | |
| 110 | 110 | self::assertCount(1, $result); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | public function testGroupByMultipleFields() |
| 115 | 115 | { |
| 116 | 116 | $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
| 117 | - 'GROUP BY p.department, p.name'; |
|
| 117 | + 'GROUP BY p.department, p.name'; |
|
| 118 | 118 | $result = $this->em->createQuery($dql)->getResult(); |
| 119 | 119 | |
| 120 | 120 | self::assertCount(4, $result); |
@@ -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 | |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | self::assertNull($this->cache->getEntityCacheRegion(ComplexAction::class)); |
| 217 | 217 | self::assertInstanceOf(Region::class, $this->cache->getEntityCacheRegion(Token::class)); |
| 218 | 218 | |
| 219 | - $token = new Token('token-hash'); |
|
| 219 | + $token = new Token('token-hash'); |
|
| 220 | 220 | |
| 221 | 221 | $action1 = new Action('login'); |
| 222 | 222 | $action2 = new Action('logout'); |
@@ -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 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | self::assertEquals('FOO', $this->em->getConnection()->fetchColumn("select named_lower_case_string from customtype_uppercases where id=".$entity->id.""), 'Database holds uppercase string'); |
| 73 | 73 | |
| 74 | 74 | |
| 75 | - $entity->namedLowerCaseString = 'bar'; |
|
| 75 | + $entity->namedLowerCaseString = 'bar'; |
|
| 76 | 76 | |
| 77 | 77 | $this->em->persist($entity); |
| 78 | 78 | $this->em->flush(); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | $this->em->clear(); |
| 132 | 132 | |
| 133 | - $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = " . $parentId); |
|
| 133 | + $query = $this->em->createQuery("SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ".$parentId); |
|
| 134 | 134 | |
| 135 | 135 | $result = $query->getResult(); |
| 136 | 136 | |
@@ -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 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | $fix = new CompanyFixContract(); |
| 38 | 38 | $fix->setFixPrice(2000); |
| 39 | 39 | |
| 40 | - $this->listener->preFlushCalls = []; |
|
| 40 | + $this->listener->preFlushCalls = []; |
|
| 41 | 41 | |
| 42 | 42 | $this->em->persist($fix); |
| 43 | 43 | $this->em->flush(); |
| 44 | 44 | |
| 45 | - self::assertCount(1,$this->listener->preFlushCalls); |
|
| 45 | + self::assertCount(1, $this->listener->preFlushCalls); |
|
| 46 | 46 | self::assertSame($fix, $this->listener->preFlushCalls[0][0]); |
| 47 | 47 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->preFlushCalls[0][0]); |
| 48 | 48 | self::assertInstanceOf(PreFlushEventArgs::class, $this->listener->preFlushCalls[0][1]); |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | $this->em->flush(); |
| 58 | 58 | $this->em->clear(); |
| 59 | 59 | |
| 60 | - $this->listener->postLoadCalls = []; |
|
| 60 | + $this->listener->postLoadCalls = []; |
|
| 61 | 61 | |
| 62 | 62 | $dql = "SELECT f FROM Doctrine\Tests\Models\Company\CompanyFixContract f WHERE f.id = ?1"; |
| 63 | 63 | $fix = $this->em->createQuery($dql)->setParameter(1, $fix->getId())->getSingleResult(); |
| 64 | 64 | |
| 65 | - self::assertCount(1,$this->listener->postLoadCalls); |
|
| 65 | + self::assertCount(1, $this->listener->postLoadCalls); |
|
| 66 | 66 | self::assertSame($fix, $this->listener->postLoadCalls[0][0]); |
| 67 | 67 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->postLoadCalls[0][0]); |
| 68 | 68 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postLoadCalls[0][1]); |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | $fix = new CompanyFixContract(); |
| 74 | 74 | $fix->setFixPrice(2000); |
| 75 | 75 | |
| 76 | - $this->listener->prePersistCalls = []; |
|
| 76 | + $this->listener->prePersistCalls = []; |
|
| 77 | 77 | |
| 78 | 78 | $this->em->persist($fix); |
| 79 | 79 | $this->em->flush(); |
| 80 | 80 | |
| 81 | - self::assertCount(1,$this->listener->prePersistCalls); |
|
| 81 | + self::assertCount(1, $this->listener->prePersistCalls); |
|
| 82 | 82 | self::assertSame($fix, $this->listener->prePersistCalls[0][0]); |
| 83 | 83 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->prePersistCalls[0][0]); |
| 84 | 84 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->prePersistCalls[0][1]); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $this->em->persist($fix); |
| 95 | 95 | $this->em->flush(); |
| 96 | 96 | |
| 97 | - self::assertCount(1,$this->listener->postPersistCalls); |
|
| 97 | + self::assertCount(1, $this->listener->postPersistCalls); |
|
| 98 | 98 | self::assertSame($fix, $this->listener->postPersistCalls[0][0]); |
| 99 | 99 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->postPersistCalls[0][0]); |
| 100 | 100 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postPersistCalls[0][1]); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $this->em->persist($fix); |
| 116 | 116 | $this->em->flush(); |
| 117 | 117 | |
| 118 | - self::assertCount(1,$this->listener->preUpdateCalls); |
|
| 118 | + self::assertCount(1, $this->listener->preUpdateCalls); |
|
| 119 | 119 | self::assertSame($fix, $this->listener->preUpdateCalls[0][0]); |
| 120 | 120 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->preUpdateCalls[0][0]); |
| 121 | 121 | self::assertInstanceOf(PreUpdateEventArgs::class, $this->listener->preUpdateCalls[0][1]); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $this->em->persist($fix); |
| 137 | 137 | $this->em->flush(); |
| 138 | 138 | |
| 139 | - self::assertCount(1,$this->listener->postUpdateCalls); |
|
| 139 | + self::assertCount(1, $this->listener->postUpdateCalls); |
|
| 140 | 140 | self::assertSame($fix, $this->listener->postUpdateCalls[0][0]); |
| 141 | 141 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->postUpdateCalls[0][0]); |
| 142 | 142 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postUpdateCalls[0][1]); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $this->em->remove($fix); |
| 156 | 156 | $this->em->flush(); |
| 157 | 157 | |
| 158 | - self::assertCount(1,$this->listener->preRemoveCalls); |
|
| 158 | + self::assertCount(1, $this->listener->preRemoveCalls); |
|
| 159 | 159 | self::assertSame($fix, $this->listener->preRemoveCalls[0][0]); |
| 160 | 160 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->preRemoveCalls[0][0]); |
| 161 | 161 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->preRemoveCalls[0][1]); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $this->em->remove($fix); |
| 175 | 175 | $this->em->flush(); |
| 176 | 176 | |
| 177 | - self::assertCount(1,$this->listener->postRemoveCalls); |
|
| 177 | + self::assertCount(1, $this->listener->postRemoveCalls); |
|
| 178 | 178 | self::assertSame($fix, $this->listener->postRemoveCalls[0][0]); |
| 179 | 179 | self::assertInstanceOf(CompanyFixContract::class, $this->listener->postRemoveCalls[0][0]); |
| 180 | 180 | self::assertInstanceOf(LifecycleEventArgs::class, $this->listener->postRemoveCalls[0][1]); |
@@ -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 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | { |
| 185 | 185 | $this->createFixture(); |
| 186 | 186 | |
| 187 | - $product = $this->em->find(ECommerceProduct::class, $this->product->getId()); |
|
| 187 | + $product = $this->em->find(ECommerceProduct::class, $this->product->getId()); |
|
| 188 | 188 | |
| 189 | 189 | $thirdFeature = new ECommerceFeature(); |
| 190 | 190 | $thirdFeature->setDescription('Model writing tutorial'); |
@@ -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 | |
@@ -155,10 +155,10 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | private $ownerO; |
| 157 | 157 | |
| 158 | - public function __construct(CascadeRemoveOrderEntityO $eO, $position=1) |
|
| 158 | + public function __construct(CascadeRemoveOrderEntityO $eO, $position = 1) |
|
| 159 | 159 | { |
| 160 | 160 | $this->position = $position; |
| 161 | - $this->ownerO= $eO; |
|
| 161 | + $this->ownerO = $eO; |
|
| 162 | 162 | $this->ownerO->addOneToManyG($this); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -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 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | $l1 = new Login('session1'); |
| 398 | 398 | $l2 = new Login('session2'); |
| 399 | - $token = new Token('token-hash'); |
|
| 399 | + $token = new Token('token-hash'); |
|
| 400 | 400 | $token->addLogin($l1); |
| 401 | 401 | $token->addLogin($l2); |
| 402 | 402 | |