@@ -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 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | |
| 26 | 26 | $platform = $this->em->getConnection()->getDatabasePlatform(); |
| 27 | 27 | |
| 28 | - if (! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) { |
|
| 28 | + if ( ! $platform->supportsSchemas() && ! $platform->canEmulateSchemas()) { |
|
| 29 | 29 | $this->markTestSkipped('This test is only useful for databases that support schemas or can emulate them.'); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | // Checks sequence name validity |
| 63 | 63 | self::assertEquals( |
| 64 | - str_replace('"', '', $fullTableName) . '_' . $property->getColumnName() . '_seq', |
|
| 64 | + str_replace('"', '', $fullTableName).'_'.$property->getColumnName().'_seq', |
|
| 65 | 65 | $idSequenceName |
| 66 | 66 | ); |
| 67 | 67 | } |
@@ -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 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | $metadata = $this->em->getClassMetadata(DDC3634Entity::class); |
| 24 | 24 | |
| 25 | - if (! $metadata->getValueGenerationPlan()->containsDeferred()) { |
|
| 25 | + if ( ! $metadata->getValueGenerationPlan()->containsDeferred()) { |
|
| 26 | 26 | $this->markTestSkipped('Need a post-insert ID generator in order to make this test work correctly'); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | public function testSavesVeryLargeIntegerAutoGeneratedValue() |
| 41 | 41 | { |
| 42 | - $veryLargeId = PHP_INT_MAX . PHP_INT_MAX; |
|
| 42 | + $veryLargeId = PHP_INT_MAX.PHP_INT_MAX; |
|
| 43 | 43 | |
| 44 | 44 | $entityManager = EntityManager::create( |
| 45 | 45 | new DDC3634LastInsertIdMockingConnection($veryLargeId, $this->em->getConnection()), |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $qb = $this->em->createQueryBuilder(); |
| 28 | 28 | $qb->select('p', 'r') |
| 29 | - ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 30 | - ->leftJoin('p.roles', 'r'); |
|
| 29 | + ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 30 | + ->leftJoin('p.roles', 'r'); |
|
| 31 | 31 | |
| 32 | 32 | self::assertSQLEquals( |
| 33 | 33 | 'SELECT t0."privilegeID" AS c0, t0."name" AS c1, t1."roleID" AS c2, t1."name" AS c3, t1."shortName" AS c4 FROM "Privileges" t0 LEFT JOIN "RolePrivileges" t2 ON t0."privilegeID" = t2."privilegeID" LEFT JOIN "Roles" t1 ON t1."roleID" = t2."roleID"', |
@@ -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 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | $qb = $this->em->createQueryBuilder(); |
| 28 | 28 | $qb->select('p', 'r') |
| 29 | - ->from(__NAMESPACE__ . '\DDC698Privilege', 'p') |
|
| 29 | + ->from(__NAMESPACE__.'\DDC698Privilege', 'p') |
|
| 30 | 30 | ->leftJoin('p.roles', 'r'); |
| 31 | 31 | |
| 32 | 32 | self::assertSQLEquals( |
@@ -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 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $this->em->flush(); |
| 35 | 35 | $this->em->clear(); |
| 36 | 36 | |
| 37 | - $q = $this->em->createQuery('select u,i from ' . __NAMESPACE__ . '\\DDC512Customer u left join u.item i'); |
|
| 37 | + $q = $this->em->createQuery('select u,i from '.__NAMESPACE__.'\\DDC512Customer u left join u.item i'); |
|
| 38 | 38 | $result = $q->getResult(); |
| 39 | 39 | |
| 40 | 40 | self::assertCount(2, $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\Ticket; |
| 6 | 6 | |
@@ -81,14 +81,14 @@ discard block |
||
| 81 | 81 | $this->em->clear(); |
| 82 | 82 | |
| 83 | 83 | // fetch-join that foreign-key/primary-key entity association |
| 84 | - $dql = 'SELECT c, p FROM ' . DDC881PhoneCall::class . ' c JOIN c.phonenumber p'; |
|
| 84 | + $dql = 'SELECT c, p FROM '.DDC881PhoneCall::class.' c JOIN c.phonenumber p'; |
|
| 85 | 85 | $calls = $this->em->createQuery($dql)->getResult(); |
| 86 | 86 | |
| 87 | 87 | self::assertCount(2, $calls); |
| 88 | 88 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber()); |
| 89 | 89 | self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber()); |
| 90 | 90 | |
| 91 | - $dql = 'SELECT p, c FROM ' . DDC881PhoneNumber::class . ' p JOIN p.calls c'; |
|
| 91 | + $dql = 'SELECT p, c FROM '.DDC881PhoneNumber::class.' p JOIN p.calls c'; |
|
| 92 | 92 | $numbers = $this->em->createQuery($dql)->getResult(); |
| 93 | 93 | |
| 94 | 94 | self::assertCount(2, $numbers); |
@@ -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 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | parent::setUp(); |
| 21 | 21 | |
| 22 | - if (! Type::hasType('ddc2984_domain_user_id')) { |
|
| 22 | + if ( ! Type::hasType('ddc2984_domain_user_id')) { |
|
| 23 | 23 | Type::addType( |
| 24 | 24 | 'ddc2984_domain_user_id', |
| 25 | 25 | DDC2984UserIdCustomDbalType::class |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $this->em->persist($user); |
| 46 | 46 | $this->em->flush(); |
| 47 | 47 | |
| 48 | - $repository = $this->em->getRepository(__NAMESPACE__ . "\DDC2984User"); |
|
| 48 | + $repository = $this->em->getRepository(__NAMESPACE__."\DDC2984User"); |
|
| 49 | 49 | |
| 50 | 50 | $sameUser = $repository->find(new DDC2984DomainUserId('unique_id_within_a_vo')); |
| 51 | 51 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | return $value; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - if (! $value instanceof DDC2984DomainUserId) { |
|
| 196 | + if ( ! $value instanceof DDC2984DomainUserId) { |
|
| 197 | 197 | throw ConversionException::conversionFailed($value, $this->getName()); |
| 198 | 198 | } |
| 199 | 199 | |
@@ -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 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $related = $this |
| 50 | 50 | ->em |
| 51 | - ->createQuery('SELECT b FROM ' . __NAMESPACE__ . '\DDC2214Bar b WHERE b.id IN(:ids)') |
|
| 51 | + ->createQuery('SELECT b FROM '.__NAMESPACE__.'\DDC2214Bar b WHERE b.id IN(:ids)') |
|
| 52 | 52 | ->setParameter('ids', [$bar]) |
| 53 | 53 | ->getResult(); |
| 54 | 54 | |
@@ -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 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $entity = $event->getEntity(); |
| 136 | 136 | |
| 137 | - if (! ($entity instanceof DDC2602Biography)) { |
|
| 137 | + if ( ! ($entity instanceof DDC2602Biography)) { |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -152,10 +152,10 @@ discard block |
||
| 152 | 152 | foreach ($content as $selection) { |
| 153 | 153 | $field = $result[$selection->field]; |
| 154 | 154 | $choiceList = $selection->choiceList; |
| 155 | - $fieldSelection = new DDC2602FieldSelection(); |
|
| 155 | + $fieldSelection = new DDC2602FieldSelection(); |
|
| 156 | 156 | |
| 157 | 157 | $fieldSelection->field = $field; |
| 158 | - $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) { |
|
| 158 | + $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) { |
|
| 159 | 159 | return in_array($choice->id, $choiceList, true); |
| 160 | 160 | }); |
| 161 | 161 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | public function testIndexByJoin() |
| 75 | 75 | { |
| 76 | 76 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' . |
| 77 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 77 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 78 | 78 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 79 | 79 | |
| 80 | 80 | self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books. |
@@ -98,14 +98,14 @@ discard block |
||
| 98 | 98 | public function testIndexByToOneJoinSilentlyIgnored() |
| 99 | 99 | { |
| 100 | 100 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
| 101 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 101 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 102 | 102 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 103 | 103 | |
| 104 | 104 | self::assertInstanceOf(DDC618Book::class, $result[0]); |
| 105 | 105 | self::assertInstanceOf(DDC618Author::class, $result[0]->author); |
| 106 | 106 | |
| 107 | 107 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
| 108 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 108 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 109 | 109 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
| 110 | 110 | |
| 111 | 111 | self::assertEquals('Alice', $result[0]['author']['name']); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function testCombineIndexBy() |
| 118 | 118 | { |
| 119 | 119 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' . |
| 120 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 120 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 121 | 121 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 122 | 122 | |
| 123 | 123 | self::assertArrayHasKey(11, $result); // Alice |
@@ -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 | |
@@ -73,23 +73,23 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function testIndexByJoin() |
| 75 | 75 | { |
| 76 | - $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A ' . |
|
| 76 | + $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '. |
|
| 77 | 77 | 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
| 78 | 78 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 79 | 79 | |
| 80 | 80 | self::assertCount(3, $result[0]->books); // Alice, Joe doesn't appear because he has no books. |
| 81 | 81 | self::assertEquals('Alice', $result[0]->name); |
| 82 | - self::assertTrue( isset($result[0]->books['In Wonderland'] ), 'Indexing by title should have books by title.'); |
|
| 83 | - self::assertTrue( isset($result[0]->books['Reloaded'] ), 'Indexing by title should have books by title.'); |
|
| 84 | - self::assertTrue( isset($result[0]->books['Test'] ), 'Indexing by title should have books by title.'); |
|
| 82 | + self::assertTrue(isset($result[0]->books['In Wonderland']), 'Indexing by title should have books by title.'); |
|
| 83 | + self::assertTrue(isset($result[0]->books['Reloaded']), 'Indexing by title should have books by title.'); |
|
| 84 | + self::assertTrue(isset($result[0]->books['Test']), 'Indexing by title should have books by title.'); |
|
| 85 | 85 | |
| 86 | 86 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
| 87 | 87 | |
| 88 | 88 | self::assertCount(3, $result[0]['books']); // Alice, Joe doesn't appear because he has no books. |
| 89 | 89 | self::assertEquals('Alice', $result[0]['name']); |
| 90 | - self::assertTrue( isset($result[0]['books']['In Wonderland'] ), 'Indexing by title should have books by title.'); |
|
| 91 | - self::assertTrue( isset($result[0]['books']['Reloaded'] ), 'Indexing by title should have books by title.'); |
|
| 92 | - self::assertTrue( isset($result[0]['books']['Test'] ), 'Indexing by title should have books by title.'); |
|
| 90 | + self::assertTrue(isset($result[0]['books']['In Wonderland']), 'Indexing by title should have books by title.'); |
|
| 91 | + self::assertTrue(isset($result[0]['books']['Reloaded']), 'Indexing by title should have books by title.'); |
|
| 92 | + self::assertTrue(isset($result[0]['books']['Test']), 'Indexing by title should have books by title.'); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function testIndexByToOneJoinSilentlyIgnored() |
| 99 | 99 | { |
| 100 | - $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
|
| 100 | + $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
|
| 101 | 101 | 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
| 102 | 102 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 103 | 103 | |
| 104 | 104 | self::assertInstanceOf(DDC618Book::class, $result[0]); |
| 105 | 105 | self::assertInstanceOf(DDC618Author::class, $result[0]->author); |
| 106 | 106 | |
| 107 | - $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B ' . |
|
| 107 | + $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
|
| 108 | 108 | 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
| 109 | 109 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
| 110 | 110 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | public function testCombineIndexBy() |
| 118 | 118 | { |
| 119 | - $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id ' . |
|
| 119 | + $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '. |
|
| 120 | 120 | 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
| 121 | 121 | $result = $this->em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 122 | 122 | |
@@ -124,9 +124,9 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | self::assertCount(3, $result[11]->books); // Alice, Joe doesn't appear because he has no books. |
| 126 | 126 | self::assertEquals('Alice', $result[11]->name); |
| 127 | - self::assertTrue( isset($result[11]->books['In Wonderland'] ), 'Indexing by title should have books by title.'); |
|
| 128 | - self::assertTrue( isset($result[11]->books['Reloaded'] ), 'Indexing by title should have books by title.'); |
|
| 129 | - self::assertTrue( isset($result[11]->books['Test'] ), 'Indexing by title should have books by title.'); |
|
| 127 | + self::assertTrue(isset($result[11]->books['In Wonderland']), 'Indexing by title should have books by title.'); |
|
| 128 | + self::assertTrue(isset($result[11]->books['Reloaded']), 'Indexing by title should have books by title.'); |
|
| 129 | + self::assertTrue(isset($result[11]->books['Test']), 'Indexing by title should have books by title.'); |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | |