@@ -224,13 +224,13 @@ |
||
224 | 224 | |
225 | 225 | $q = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm); |
226 | 226 | $q2 = $q->setSQL('foo') |
227 | - ->setResultSetMapping($rsm) |
|
228 | - ->expireResultCache(true) |
|
229 | - ->setHint('foo', 'bar') |
|
230 | - ->setParameter(1, 'foo') |
|
231 | - ->setParameters($parameters) |
|
232 | - ->setResultCacheDriver(null) |
|
233 | - ->setResultCacheLifetime(3500); |
|
227 | + ->setResultSetMapping($rsm) |
|
228 | + ->expireResultCache(true) |
|
229 | + ->setHint('foo', 'bar') |
|
230 | + ->setParameter(1, 'foo') |
|
231 | + ->setParameters($parameters) |
|
232 | + ->setResultCacheDriver(null) |
|
233 | + ->setResultCacheLifetime(3500); |
|
234 | 234 | |
235 | 235 | self::assertSame($q, $q2); |
236 | 236 | } |
@@ -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 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | |
453 | 453 | $email = new CmsEmail(); |
454 | 454 | |
455 | - $email->email = '[email protected]'; |
|
455 | + $email->email = '[email protected]'; |
|
456 | 456 | |
457 | 457 | $user->setEmail($email); |
458 | 458 | |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | $repository = $this->em->getRepository(CmsUser::class); |
604 | 604 | $result = $repository |
605 | 605 | ->createNativeNamedQuery('fetchUserPhonenumberCount') |
606 | - ->setParameter(1, ['test','FabioBatSilva'])->getResult(); |
|
606 | + ->setParameter(1, ['test', 'FabioBatSilva'])->getResult(); |
|
607 | 607 | |
608 | 608 | self::assertCount(2, $result); |
609 | 609 | self::assertInternalType('array', $result[0]); |
@@ -829,7 +829,7 @@ discard block |
||
829 | 829 | |
830 | 830 | $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u'); |
831 | 831 | |
832 | - self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm); |
|
832 | + self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm); |
|
833 | 833 | } |
834 | 834 | |
835 | 835 | /** |
@@ -167,12 +167,12 @@ |
||
167 | 167 | $this->em->clear(); |
168 | 168 | |
169 | 169 | $dateTimeDb = $this->em->createQueryBuilder() |
170 | - ->select('d') |
|
171 | - ->from(DateTimeModel::class, 'd') |
|
172 | - ->where('d.datetime = ?1') |
|
173 | - ->setParameter(1, $date, DBALType::DATETIME) |
|
174 | - ->getQuery() |
|
175 | - ->getSingleResult(); |
|
170 | + ->select('d') |
|
171 | + ->from(DateTimeModel::class, 'd') |
|
172 | + ->where('d.datetime = ?1') |
|
173 | + ->setParameter(1, $date, DBALType::DATETIME) |
|
174 | + ->getQuery() |
|
175 | + ->getSingleResult(); |
|
176 | 176 | |
177 | 177 | self::assertInstanceOf(\DateTime::class, $dateTimeDb->datetime); |
178 | 178 | self::assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s')); |
@@ -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 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->em->flush(); |
31 | 31 | $this->em->clear(); |
32 | 32 | |
33 | - $dql = 'SELECT d FROM ' . DecimalModel::class . ' d'; |
|
33 | + $dql = 'SELECT d FROM '.DecimalModel::class.' d'; |
|
34 | 34 | $decimal = $this->em->createQuery($dql)->getSingleResult(); |
35 | 35 | |
36 | 36 | self::assertSame('0.15', $decimal->decimal); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $this->em->flush(); |
51 | 51 | $this->em->clear(); |
52 | 52 | |
53 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = true'; |
|
53 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = true'; |
|
54 | 54 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
55 | 55 | |
56 | 56 | self::assertTrue($bool->booleanField); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->em->flush(); |
61 | 61 | $this->em->clear(); |
62 | 62 | |
63 | - $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = false'; |
|
63 | + $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = false'; |
|
64 | 64 | $bool = $this->em->createQuery($dql)->getSingleResult(); |
65 | 65 | |
66 | 66 | self::assertFalse($bool->booleanField); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->em->flush(); |
77 | 77 | $this->em->clear(); |
78 | 78 | |
79 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
79 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
80 | 80 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
81 | 81 | |
82 | 82 | self::assertSame(['foo' => 'bar', 'bar' => 'baz'], $serialize->array); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $this->em->flush(); |
92 | 92 | $this->em->clear(); |
93 | 93 | |
94 | - $dql = 'SELECT s FROM ' . SerializationModel::class . ' s'; |
|
94 | + $dql = 'SELECT s FROM '.SerializationModel::class.' s'; |
|
95 | 95 | $serialize = $this->em->createQuery($dql)->getSingleResult(); |
96 | 96 | |
97 | 97 | self::assertInstanceOf('stdClass', $serialize->object); |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | $this->putTripAroundEurope(); |
113 | 113 | |
114 | 114 | $dql = 'SELECT t, p, c ' |
115 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
116 | - . 'INNER JOIN t.pois p ' |
|
117 | - . 'INNER JOIN p.country c' |
|
115 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
116 | + . 'INNER JOIN t.pois p ' |
|
117 | + . 'INNER JOIN p.country c' |
|
118 | 118 | ; |
119 | 119 | |
120 | 120 | $tours = $this->em->createQuery($dql)->getResult(); |
@@ -134,9 +134,9 @@ discard block |
||
134 | 134 | $this->putTripAroundEurope(); |
135 | 135 | |
136 | 136 | $dql = 'SELECT t ' |
137 | - . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | - . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | - . 'WHERE p MEMBER OF t.pois' |
|
137 | + . 'FROM Doctrine\Tests\Models\Navigation\NavTour t ' |
|
138 | + . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p ' |
|
139 | + . 'WHERE p MEMBER OF t.pois' |
|
140 | 140 | ; |
141 | 141 | |
142 | 142 | $query = $this->em->createQuery($dql); |
@@ -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\Functional; |
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\ORM\Functional\Ticket; |
6 | 6 |
@@ -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 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this |
32 | 32 | ->em |
33 | 33 | ->createQuery( |
34 | - 'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1' |
|
34 | + 'SELECT f, b FROM '.__NAMESPACE__.'\DDC3042Foo f JOIN '.__NAMESPACE__.'\DDC3042Bar b WITH 1 = 1' |
|
35 | 35 | ) |
36 | 36 | ->getSQL() |
37 | 37 | ); |
@@ -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 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | $user1 = $this->em->getReference(DDC1400User::class, $user1->id); |
55 | 55 | |
56 | - $this->em->createQuery('SELECT a, s FROM ' . DDC1400Article::class . ' a JOIN a.userStates s WITH s.user = :activeUser') |
|
56 | + $this->em->createQuery('SELECT a, s FROM '.DDC1400Article::class.' a JOIN a.userStates s WITH s.user = :activeUser') |
|
57 | 57 | ->setParameter('activeUser', $user1) |
58 | 58 | ->getResult(); |
59 | 59 |
@@ -54,8 +54,8 @@ |
||
54 | 54 | $user1 = $this->em->getReference(DDC1400User::class, $user1->id); |
55 | 55 | |
56 | 56 | $this->em->createQuery('SELECT a, s FROM ' . DDC1400Article::class . ' a JOIN a.userStates s WITH s.user = :activeUser') |
57 | - ->setParameter('activeUser', $user1) |
|
58 | - ->getResult(); |
|
57 | + ->setParameter('activeUser', $user1) |
|
58 | + ->getResult(); |
|
59 | 59 | |
60 | 60 | $queryCount = $this->getCurrentQueryCount(); |
61 | 61 |
@@ -37,19 +37,19 @@ discard block |
||
37 | 37 | |
38 | 38 | $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author"; |
39 | 39 | $this->em->createQuery($dql) |
40 | - ->setParameter('author', $user) |
|
41 | - ->getResult(); |
|
40 | + ->setParameter('author', $user) |
|
41 | + ->getResult(); |
|
42 | 42 | |
43 | 43 | $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.user = :author AND a.user = :author"; |
44 | 44 | $this->em->createQuery($dql) |
45 | - ->setParameter('author', $user) |
|
46 | - ->getResult(); |
|
45 | + ->setParameter('author', $user) |
|
46 | + ->getResult(); |
|
47 | 47 | |
48 | 48 | $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author"; |
49 | 49 | $farticle = $this->em->createQuery($dql) |
50 | - ->setParameter('author', $user) |
|
51 | - ->setParameter('topic', 'This is John Galt speaking!') |
|
52 | - ->getSingleResult(); |
|
50 | + ->setParameter('author', $user) |
|
51 | + ->setParameter('topic', 'This is John Galt speaking!') |
|
52 | + ->getSingleResult(); |
|
53 | 53 | |
54 | 54 | self::assertSame($article, $farticle); |
55 | 55 | } |
@@ -72,10 +72,10 @@ discard block |
||
72 | 72 | |
73 | 73 | $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3"; |
74 | 74 | $farticle = $this->em->createQuery($dql) |
75 | - ->setParameter(1, 'This is John Galt speaking!') |
|
76 | - ->setParameter(2, $user) |
|
77 | - ->setParameter(3, $user) |
|
78 | - ->getSingleResult(); |
|
75 | + ->setParameter(1, 'This is John Galt speaking!') |
|
76 | + ->setParameter(2, $user) |
|
77 | + ->setParameter(3, $user) |
|
78 | + ->getSingleResult(); |
|
79 | 79 | |
80 | 80 | self::assertSame($article, $farticle); |
81 | 81 | } |
@@ -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\Functional\Ticket; |
6 | 6 |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | private function createQuery() |
52 | 52 | { |
53 | 53 | return $this->em->createQueryBuilder() |
54 | - ->select('car') |
|
55 | - ->from(GH2947Car::class, 'car') |
|
56 | - ->getQuery() |
|
57 | - ->useResultCache(true, 3600, 'foo-cache-id'); |
|
54 | + ->select('car') |
|
55 | + ->from(GH2947Car::class, 'car') |
|
56 | + ->getQuery() |
|
57 | + ->useResultCache(true, 3600, 'foo-cache-id'); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | private function createData() |
@@ -67,13 +67,13 @@ discard block |
||
67 | 67 | private function updateData() |
68 | 68 | { |
69 | 69 | $this->em->createQueryBuilder() |
70 | - ->update(GH2947Car::class, 'car') |
|
71 | - ->set('car.brand', ':newBrand') |
|
72 | - ->where('car.brand = :oldBrand') |
|
73 | - ->setParameter('newBrand', 'Dacia') |
|
74 | - ->setParameter('oldBrand', 'BMW') |
|
75 | - ->getQuery() |
|
76 | - ->execute(); |
|
70 | + ->update(GH2947Car::class, 'car') |
|
71 | + ->set('car.brand', ':newBrand') |
|
72 | + ->where('car.brand = :oldBrand') |
|
73 | + ->setParameter('newBrand', 'Dacia') |
|
74 | + ->setParameter('oldBrand', 'BMW') |
|
75 | + ->getQuery() |
|
76 | + ->execute(); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -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\Functional\Ticket; |
6 | 6 |
@@ -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 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $sqlLogger = $this->em->getConnection()->getConfiguration()->getSQLLogger(); |
40 | 40 | $repository = $this->em->getRepository(DDC1595InheritedEntity1::class); |
41 | 41 | |
42 | - $entity1 = $repository->find($e1->id); |
|
42 | + $entity1 = $repository->find($e1->id); |
|
43 | 43 | |
44 | 44 | // DDC-1596 |
45 | 45 | self::assertSQLEquals( |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | $this->em->clear(); |
58 | 58 | |
59 | - $entity1 = $repository->find($e1->id); |
|
59 | + $entity1 = $repository->find($e1->id); |
|
60 | 60 | |
61 | 61 | $entity1->getEntities()->count(); |
62 | 62 |