@@ -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 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $this->em->flush(); |
112 | 112 | $this->em->clear(); |
113 | 113 | |
114 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
114 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
115 | 115 | $persons = $this->em->createQuery($dql)->getResult(); |
116 | 116 | |
117 | 117 | self::assertCount(3, $persons); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | self::assertEquals('United States of America', $person->address->country->name); |
125 | 125 | } |
126 | 126 | |
127 | - $dql = "SELECT p FROM " . __NAMESPACE__ . "\DDC93Person p"; |
|
127 | + $dql = "SELECT p FROM ".__NAMESPACE__."\DDC93Person p"; |
|
128 | 128 | $persons = $this->em->createQuery($dql)->getArrayResult(); |
129 | 129 | |
130 | 130 | foreach ($persons as $person) { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->em->flush(); |
150 | 150 | |
151 | 151 | // SELECT |
152 | - $selectDql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
152 | + $selectDql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country"; |
|
153 | 153 | $loadedPerson = $this->em->createQuery($selectDql) |
154 | 154 | ->setParameter('city', 'Karlsruhe') |
155 | 155 | ->setParameter('country', 'Germany') |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | ); |
165 | 165 | |
166 | 166 | // UPDATE |
167 | - $updateDql = "UPDATE " . __NAMESPACE__ . "\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
167 | + $updateDql = "UPDATE ".__NAMESPACE__."\\DDC93Person p SET p.address.street = :street, p.address.country.name = :country WHERE p.address.city = :city"; |
|
168 | 168 | $this->em->createQuery($updateDql) |
169 | 169 | ->setParameter('street', 'Boo') |
170 | 170 | ->setParameter('country', 'DE') |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | self::assertEquals('DE', $person->address->country->name); |
177 | 177 | |
178 | 178 | // DELETE |
179 | - $this->em->createQuery("DELETE " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
179 | + $this->em->createQuery("DELETE ".__NAMESPACE__."\\DDC93Person p WHERE p.address.city = :city AND p.address.country.name = :country") |
|
180 | 180 | ->setParameter('city', 'Karlsruhe') |
181 | 181 | ->setParameter('country', 'DE') |
182 | 182 | ->execute(); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->em->clear(); |
194 | 194 | |
195 | 195 | // Prove that the entity was persisted correctly. |
196 | - $dql = "SELECT p FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
196 | + $dql = "SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
197 | 197 | |
198 | 198 | $person = $this->em->createQuery($dql) |
199 | 199 | ->setParameter('name', 'Karl') |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | // Clear the EM and prove that the embeddable can be the subject of a partial query. |
208 | 208 | $this->em->clear(); |
209 | 209 | |
210 | - $dql = "SELECT PARTIAL p.{id,address.city} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
210 | + $dql = "SELECT PARTIAL p.{id,address.city} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
211 | 211 | |
212 | 212 | $person = $this->em->createQuery($dql) |
213 | 213 | ->setParameter('name', 'Karl') |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | // Clear the EM and prove that the embeddable can be the subject of a partial query regardless of attributes positions. |
224 | 224 | $this->em->clear(); |
225 | 225 | |
226 | - $dql = "SELECT PARTIAL p.{address.city, id} FROM " . __NAMESPACE__ ."\\DDC93Person p WHERE p.name = :name"; |
|
226 | + $dql = "SELECT PARTIAL p.{address.city, id} FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.name = :name"; |
|
227 | 227 | |
228 | 228 | $person = $this->em->createQuery($dql) |
229 | 229 | ->setParameter('name', 'Karl') |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $this->expectException(QueryException::class); |
243 | 243 | $this->expectExceptionMessage('no field or association named address.asdfasdf'); |
244 | 244 | |
245 | - $this->em->createQuery("SELECT p FROM " . __NAMESPACE__ . "\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
245 | + $this->em->createQuery("SELECT p FROM ".__NAMESPACE__."\\DDC93Person p WHERE p.address.asdfasdf IS NULL") |
|
246 | 246 | ->execute(); |
247 | 247 | } |
248 | 248 | |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | $this->expectException(QueryException::class); |
252 | 252 | $this->expectExceptionMessage("no mapped field named 'address.asdfasdf'"); |
253 | 253 | |
254 | - $this->em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM " . __NAMESPACE__ . "\\DDC93Person p") |
|
254 | + $this->em->createQuery("SELECT PARTIAL p.{id,address.asdfasdf} FROM ".__NAMESPACE__."\\DDC93Person p") |
|
255 | 255 | ->execute(); |
256 | 256 | } |
257 | 257 | |
@@ -313,15 +313,15 @@ discard block |
||
313 | 313 | $this->expectException(MappingException::class); |
314 | 314 | $this->expectExceptionMessage( |
315 | 315 | sprintf( |
316 | - 'Infinite nesting detected for embedded property %s::nested. ' . |
|
316 | + 'Infinite nesting detected for embedded property %s::nested. '. |
|
317 | 317 | 'You cannot embed an embeddable from the same type inside an embeddable.', |
318 | - __NAMESPACE__ . '\\' . $declaredEmbeddableClassName |
|
318 | + __NAMESPACE__.'\\'.$declaredEmbeddableClassName |
|
319 | 319 | ) |
320 | 320 | ); |
321 | 321 | |
322 | 322 | $this->schemaTool->createSchema( |
323 | 323 | [ |
324 | - $this->em->getClassMetadata(__NAMESPACE__ . '\\' . $embeddableClassName), |
|
324 | + $this->em->getClassMetadata(__NAMESPACE__.'\\'.$embeddableClassName), |
|
325 | 325 | ] |
326 | 326 | ); |
327 | 327 | } |
@@ -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 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->em->flush(); |
66 | 66 | $this->em->clear(); |
67 | 67 | |
68 | - $appointments = $this->em->createQuery("SELECT a FROM " . __NAMESPACE__ . "\DDC633Appointment a")->getResult(); |
|
68 | + $appointments = $this->em->createQuery("SELECT a FROM ".__NAMESPACE__."\DDC633Appointment a")->getResult(); |
|
69 | 69 | |
70 | 70 | foreach ($appointments as $eagerAppointment) { |
71 | 71 | self::assertInstanceOf(GhostObjectInterface::class, $eagerAppointment->patient); |
@@ -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 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | public function addPropertyChangedListener(PropertyChangedListener $listener) |
86 | 86 | { |
87 | - if (! \in_array($listener, $this->listeners, true)) { |
|
87 | + if ( ! \in_array($listener, $this->listeners, true)) { |
|
88 | 88 | $this->listeners[] = $listener; |
89 | 89 | } |
90 | 90 | } |
@@ -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 | |
@@ -79,17 +79,17 @@ discard block |
||
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 | /** |
@@ -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 |
@@ -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,14 +31,14 @@ discard block |
||
31 | 31 | $c1->declinedClientsHistory = $c2; |
32 | 32 | $c1->declinedBy = $c2; |
33 | 33 | $c2->declinedBy = $c1; |
34 | - $c2->declinedClientsHistory= $c1; |
|
34 | + $c2->declinedClientsHistory = $c1; |
|
35 | 35 | |
36 | 36 | $this->em->persist($c1); |
37 | 37 | $this->em->persist($c2); |
38 | 38 | $this->em->flush(); |
39 | 39 | $this->em->clear(); |
40 | 40 | |
41 | - $history = $this->em->createQuery('SELECT h FROM ' . __NAMESPACE__ . '\\DDC1250ClientHistory h WHERE h.id = ?1') |
|
41 | + $history = $this->em->createQuery('SELECT h FROM '.__NAMESPACE__.'\\DDC1250ClientHistory h WHERE h.id = ?1') |
|
42 | 42 | ->setParameter(1, $c2->id)->getSingleResult(); |
43 | 43 | |
44 | 44 | self::assertInstanceOf(DDC1250ClientHistory::class, $history); |
@@ -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 | |
@@ -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 |
@@ -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 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | /** |
76 | 76 | * @param \DateTime $lastModified |
77 | 77 | */ |
78 | - public function setLastModified( $lastModified ) |
|
78 | + public function setLastModified($lastModified) |
|
79 | 79 | { |
80 | 80 | $this->lastModified = $lastModified; |
81 | 81 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** |
102 | 102 | * @param mixed $id |
103 | 103 | */ |
104 | - public function setId( $id ) |
|
104 | + public function setId($id) |
|
105 | 105 | { |
106 | 106 | $this->id = $id; |
107 | 107 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $this->em->flush(); |
47 | 47 | |
48 | 48 | $asset->getAttributes() |
49 | - ->removeElement($attribute1); |
|
49 | + ->removeElement($attribute1); |
|
50 | 50 | |
51 | 51 | $idToBeRemoved = $attribute1->id; |
52 | 52 |
@@ -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 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
159 | 159 | { |
160 | - return (string)$value; |
|
160 | + return (string) $value; |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |