@@ -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 | public function testIssue() |
24 | 24 | { |
25 | - $q = $this->em->createQuery('select u, c.data from ' . __NAMESPACE__ . '\\DDC493Distributor u JOIN u.contact c'); |
|
25 | + $q = $this->em->createQuery('select u, c.data from '.__NAMESPACE__.'\\DDC493Distributor u JOIN u.contact c'); |
|
26 | 26 | |
27 | 27 | self::assertSQLEquals( |
28 | 28 | 'SELECT t0."id" AS c0, t1."data" AS c1, t0."discr" AS c2, t0."contact" AS c3 FROM "DDC493Distributor" t2 INNER JOIN "DDC493Customer" t0 ON t2."id" = t0."id" INNER JOIN "DDC493Contact" t1 ON t0."contact" = t1."id"', |
@@ -150,9 +150,9 @@ discard block |
||
150 | 150 | |
151 | 151 | $dql = "DELETE Doctrine\Tests\Models\DDC117\DDC117Reference r WHERE r.source = ?1 AND r.target = ?2"; |
152 | 152 | $this->em->createQuery($dql) |
153 | - ->setParameter(1, $this->article1->id()) |
|
154 | - ->setParameter(2, $this->article2->id()) |
|
155 | - ->execute(); |
|
153 | + ->setParameter(1, $this->article1->id()) |
|
154 | + ->setParameter(2, $this->article2->id()) |
|
155 | + ->execute(); |
|
156 | 156 | |
157 | 157 | self::assertNull($this->em->find(DDC117Reference::class, $idCriteria)); |
158 | 158 | } |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | |
203 | 203 | $dql = 'SELECT t, a FROM Doctrine\Tests\Models\DDC117\DDC117Translation t JOIN t.article a WHERE t.article = ?1 AND t.language = ?2'; |
204 | 204 | $dqlTrans = $this->em->createQuery($dql) |
205 | - ->setParameter(1, $this->article1->id()) |
|
206 | - ->setParameter(2, 'en') |
|
207 | - ->getSingleResult(); |
|
205 | + ->setParameter(1, $this->article1->id()) |
|
206 | + ->setParameter(2, 'en') |
|
207 | + ->getSingleResult(); |
|
208 | 208 | |
209 | 209 | self::assertInstanceOf(DDC117Translation::class, $this->translation); |
210 | 210 | } |
@@ -369,11 +369,11 @@ discard block |
||
369 | 369 | $this->em->clear(); |
370 | 370 | |
371 | 371 | $dql = "SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t " . |
372 | - 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
|
372 | + 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
|
373 | 373 | $trans = $this->em->createQuery($dql) |
374 | - ->setParameter(1, $this->translation->getArticleId()) |
|
375 | - ->setParameter(2, $this->translation->getLanguage()) |
|
376 | - ->getSingleResult(); |
|
374 | + ->setParameter(1, $this->translation->getArticleId()) |
|
375 | + ->setParameter(2, $this->translation->getLanguage()) |
|
376 | + ->getSingleResult(); |
|
377 | 377 | |
378 | 378 | self::assertInstanceOf(DDC117Translation::class, $trans); |
379 | 379 | self::assertContainsOnly(DDC117Editor::class, $trans->reviewedByEditors); |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | $this->em->clear(); |
68 | 68 | |
69 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE r.source = ?1'; |
|
69 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE r.source = ?1'; |
|
70 | 70 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 1)->getSingleResult(); |
71 | 71 | |
72 | 72 | self::assertInstanceOf(DDC117Reference::class, $mapRef); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $this->em->clear(); |
78 | 78 | |
79 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
79 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
80 | 80 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
81 | 81 | |
82 | 82 | self::assertInstanceOf(DDC117Reference::class, $dqlRef); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | self::assertInstanceOf(DDC117Article::class, $dqlRef->source()); |
85 | 85 | self::assertSame($dqlRef, $this->em->find(DDC117Reference::class, $idCriteria)); |
86 | 86 | |
87 | - $dql = 'SELECT r, s FROM ' . DDC117Reference::class . ' r JOIN r.source s WHERE s.title = ?1'; |
|
87 | + $dql = 'SELECT r, s FROM '.DDC117Reference::class.' r JOIN r.source s WHERE s.title = ?1'; |
|
88 | 88 | $dqlRef = $this->em->createQuery($dql)->setParameter(1, 'Foo')->getSingleResult(); |
89 | 89 | |
90 | 90 | $this->em->contains($dqlRef); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function testOneToOneCascadePersist() |
270 | 270 | { |
271 | - if (! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) { |
|
271 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->prefersSequences()) { |
|
272 | 272 | $this->markTestSkipped('Test only works with databases that prefer sequences as ID strategy.'); |
273 | 273 | } |
274 | 274 | |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | $this->em->clear(); |
370 | 370 | |
371 | - $dql = "SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t " . |
|
371 | + $dql = "SELECT t, e FROM Doctrine\Tests\Models\DDC117\DDC117Translation t ". |
|
372 | 372 | 'JOIN t.reviewedByEditors e WHERE t.article = ?1 AND t.language = ?2'; |
373 | 373 | $trans = $this->em->createQuery($dql) |
374 | 374 | ->setParameter(1, $this->translation->getArticleId()) |
@@ -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 | public function testIssue() |
24 | 24 | { |
25 | - $q = $this->em->createQuery('select u from ' . __NAMESPACE__ . '\\DDC513OfferItem u left join u.price p'); |
|
25 | + $q = $this->em->createQuery('select u from '.__NAMESPACE__.'\\DDC513OfferItem u left join u.price p'); |
|
26 | 26 | |
27 | 27 | self::assertSQLEquals( |
28 | 28 | 'SELECT t0."id" AS c0, t0."discr" AS c1, t0."price" AS c2 FROM "DDC513OfferItem" t1 INNER JOIN "DDC513Item" t0 ON t1."id" = t0."id" LEFT JOIN "DDC513Price" t2 ON t0."price" = t2."id"', |
@@ -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 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->em->flush(); |
44 | 44 | $this->em->clear(); |
45 | 45 | |
46 | - $children = $this->em->createQuery('select c,p from ' . __NAMESPACE__ . '\DDC371Child c ' |
|
46 | + $children = $this->em->createQuery('select c,p from '.__NAMESPACE__.'\DDC371Child c ' |
|
47 | 47 | . 'left join c.parent p where c.id = 1 and p.id = 1') |
48 | 48 | ->setHint(Query::HINT_REFRESH, true) |
49 | 49 | ->getResult(); |
@@ -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 | $this->em->persist($group); |
38 | 38 | $this->em->flush(); |
39 | 39 | |
40 | - if (! $user->getGroups()->contains($group)) { |
|
40 | + if ( ! $user->getGroups()->contains($group)) { |
|
41 | 41 | $user->getGroups()->add($group); |
42 | 42 | $group->getUsers()->add($user); |
43 | 43 | $this->em->flush(); |
@@ -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 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
80 | 80 | { |
81 | - if (! $value instanceof GH6141People) { |
|
81 | + if ( ! $value instanceof GH6141People) { |
|
82 | 82 | $value = GH6141People::get($value); |
83 | 83 | } |
84 | 84 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public static function get($value) |
123 | 123 | { |
124 | - if (! self::isValid($value)) { |
|
124 | + if ( ! self::isValid($value)) { |
|
125 | 125 | throw new \InvalidArgumentException(); |
126 | 126 | } |
127 | 127 |
@@ -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 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->em->flush(); |
50 | 50 | $this->em->clear(); |
51 | 51 | |
52 | - $dql = 'SELECT a, b, ba FROM ' . __NAMESPACE__ . "\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba"; |
|
52 | + $dql = 'SELECT a, b, ba FROM '.__NAMESPACE__."\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba"; |
|
53 | 53 | $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult(); |
54 | 54 | |
55 | 55 | self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom); |
@@ -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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $entity = new DDC1526Menu; |
29 | 29 | |
30 | 30 | if (isset ($parents[($i % 3)])) { |
31 | - $entity->parent = $parents[($i%3)]; |
|
31 | + $entity->parent = $parents[($i % 3)]; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | $this->em->persist($entity); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $this->em->clear(); |
39 | 39 | |
40 | 40 | $dql = 'SELECT m, c |
41 | - FROM ' . __NAMESPACE__ . "\DDC1526Menu m |
|
41 | + FROM ' . __NAMESPACE__."\DDC1526Menu m |
|
42 | 42 | LEFT JOIN m.children c"; |
43 | 43 | $menus = $this->em->createQuery($dql)->getResult(); |
44 | 44 |
@@ -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 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | public function testDql() |
30 | 30 | { |
31 | - $dql = 'SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id'; |
|
31 | + $dql = 'SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id'; |
|
32 | 32 | $query = $this->em->createQuery($dql); |
33 | 33 | $result = $query->getResult(); |
34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | self::assertArrayHasKey(2, $result); |
38 | 38 | self::assertArrayHasKey(3, $result); |
39 | 39 | |
40 | - $dql = 'SELECT u, p FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id'; |
|
40 | + $dql = 'SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id'; |
|
41 | 41 | $query = $this->em->createQuery($dql); |
42 | 42 | $result = $query->getResult(); |
43 | 43 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | self::assertArrayHasKey(1, $result); |
80 | 80 | self::assertArrayHasKey(2, $result); |
81 | 81 | self::assertArrayHasKey(3, $result); |
82 | - self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.id', $dql); |
|
82 | + self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.id', $dql); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | public function testIndexByUnique() |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | self::assertArrayHasKey('[email protected]', $result); |
95 | 95 | self::assertArrayHasKey('[email protected]', $result); |
96 | 96 | self::assertArrayHasKey('[email protected]', $result); |
97 | - self::assertEquals('SELECT u FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email', $dql); |
|
97 | + self::assertEquals('SELECT u FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email', $dql); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | public function testIndexWithJoin() |
@@ -128,14 +128,14 @@ discard block |
||
128 | 128 | self::assertArrayHasKey(8, $result['[email protected]']->phones->toArray()); |
129 | 129 | self::assertArrayHasKey(9, $result['[email protected]']->phones->toArray()); |
130 | 130 | |
131 | - self::assertEquals('SELECT u, p FROM ' . __NAMESPACE__ . '\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql); |
|
131 | + self::assertEquals('SELECT u, p FROM '.__NAMESPACE__.'\DDC1335User u INDEX BY u.email INNER JOIN u.phones p INDEX BY p.id', $dql); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | private function loadFixture() |
135 | 135 | { |
136 | - $p1 = ['11 xxxx-xxxx','11 yyyy-yyyy','11 zzzz-zzzz']; |
|
137 | - $p2 = ['22 xxxx-xxxx','22 yyyy-yyyy','22 zzzz-zzzz']; |
|
138 | - $p3 = ['33 xxxx-xxxx','33 yyyy-yyyy','33 zzzz-zzzz']; |
|
136 | + $p1 = ['11 xxxx-xxxx', '11 yyyy-yyyy', '11 zzzz-zzzz']; |
|
137 | + $p2 = ['22 xxxx-xxxx', '22 yyyy-yyyy', '22 zzzz-zzzz']; |
|
138 | + $p3 = ['33 xxxx-xxxx', '33 yyyy-yyyy', '33 zzzz-zzzz']; |
|
139 | 139 | |
140 | 140 | $u1 = new DDC1335User('[email protected]', 'Foo', $p1); |
141 | 141 | $u2 = new DDC1335User('[email protected]', 'Bar', $p2); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | public function __construct($user, $number) |
214 | 214 | { |
215 | - $this->user = $user; |
|
216 | - $this->numericalValue = $number; |
|
215 | + $this->user = $user; |
|
216 | + $this->numericalValue = $number; |
|
217 | 217 | } |
218 | 218 | } |