@@ -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 | } |
@@ -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 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $dql = $q->getDQL(); |
25 | 25 | |
26 | 26 | // Show difference between expected and actual queries on error |
27 | - self::assertEquals('SELECT _a FROM ' . __NAMESPACE__ . "\DDC1757A _a, " . __NAMESPACE__ . "\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d", |
|
27 | + self::assertEquals('SELECT _a FROM '.__NAMESPACE__."\DDC1757A _a, ".__NAMESPACE__."\DDC1757B _b INNER JOIN _b.c _c INNER JOIN _c.d _d", |
|
28 | 28 | $dql, |
29 | 29 | 'Wrong DQL query'); |
30 | 30 | } |
@@ -104,8 +104,8 @@ |
||
104 | 104 | $routeId = $this->createPersistedRouteWithLegs(); |
105 | 105 | |
106 | 106 | $route = $this->em->createQuery("SELECT r, l FROM Doctrine\Tests\Models\Routing\RoutingRoute r JOIN r.legs l WHERE r.id = ?1") |
107 | - ->setParameter(1, $routeId) |
|
108 | - ->getSingleResult(); |
|
107 | + ->setParameter(1, $routeId) |
|
108 | + ->getSingleResult(); |
|
109 | 109 | |
110 | 110 | self::assertCount(2, $route->legs); |
111 | 111 | self::assertEquals('Berlin', $route->legs[0]->fromLocation->getName()); |
@@ -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 | */ |
31 | 31 | public function testIssue2059() |
32 | 32 | { |
33 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
33 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
34 | 34 | $this->markTestSkipped('Platform does not support foreign keys.'); |
35 | 35 | } |
36 | 36 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | public function testLoadMetadataFromDatabase() |
54 | 54 | { |
55 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
55 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
56 | 56 | $this->markTestSkipped('Platform does not support foreign keys.'); |
57 | 57 | } |
58 | 58 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | public function testLoadMetadataWithForeignKeyFromDatabase() |
92 | 92 | { |
93 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
93 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
94 | 94 | $this->markTestSkipped('Platform does not support foreign keys.'); |
95 | 95 | } |
96 | 96 | |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | public function testDetectManyToManyTables() |
125 | 125 | { |
126 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
126 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
127 | 127 | $this->markTestSkipped('Platform does not support foreign keys.'); |
128 | 128 | } |
129 | 129 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | public function testLoadMetadataFromDatabaseDetail() |
165 | 165 | { |
166 | - if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
166 | + if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) { |
|
167 | 167 | $this->markTestSkipped('Platform does not support foreign keys.'); |
168 | 168 | } |
169 | 169 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | $table->addColumn('column_index1', 'string'); |
180 | 180 | $table->addColumn('column_index2', 'string'); |
181 | - $table->addIndex(['column_index1','column_index2'], 'index1'); |
|
181 | + $table->addIndex(['column_index1', 'column_index2'], 'index1'); |
|
182 | 182 | |
183 | 183 | $table->addColumn('column_unique_index1', 'string'); |
184 | 184 | $table->addColumn('column_unique_index2', 'string'); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | // FIXME: Condition here is fugly. |
204 | 204 | // NOTE: PostgreSQL and SQL SERVER do not support UNSIGNED integer |
205 | - if (! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and |
|
205 | + if ( ! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and |
|
206 | 206 | ! $this->em->getConnection()->getDatabasePlatform() instanceof SQLServerPlatform) { |
207 | 207 | self::assertNotNull($metadata->getProperty('columnUnsigned')); |
208 | 208 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | self::assertNotEmpty($indexes['index1']['columns']); |
246 | 246 | self::assertEquals( |
247 | - ['column_index1','column_index2'], |
|
247 | + ['column_index1', 'column_index2'], |
|
248 | 248 | $indexes['index1']['columns'] |
249 | 249 | ); |
250 | 250 |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | public function testAggregateWithHavingClause() |
28 | 28 | { |
29 | 29 | $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary ' . |
30 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
31 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
30 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
31 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
32 | 32 | |
33 | 33 | $result = $this->em->createQuery($dql)->getScalarResult(); |
34 | 34 | |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | public function testUnnamedScalarResultsAreOneBased() |
43 | 43 | { |
44 | 44 | $dql = 'SELECT p.department, AVG(p.salary) ' . |
45 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
46 | - 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
45 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
46 | + 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
|
47 | 47 | |
48 | 48 | $result = $this->em->createQuery($dql)->getScalarResult(); |
49 | 49 | |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | public function testOrderByResultVariableCollectionSize() |
56 | 56 | { |
57 | 57 | $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
58 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
59 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
60 | - 'ORDER BY friends DESC, p.name DESC'; |
|
58 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
59 | + 'WHERE p.friends IS NOT EMPTY ' . |
|
60 | + 'ORDER BY friends DESC, p.name DESC'; |
|
61 | 61 | |
62 | 62 | $result = $this->em->createQuery($dql)->getScalarResult(); |
63 | 63 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public function testIsNullAssociation() |
80 | 80 | { |
81 | 81 | $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
82 | - 'WHERE p.spouse IS NULL'; |
|
82 | + 'WHERE p.spouse IS NULL'; |
|
83 | 83 | $result = $this->em->createQuery($dql)->getResult(); |
84 | 84 | |
85 | 85 | self::assertCount(2, $result); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function testSelectSubselect() |
94 | 94 | { |
95 | 95 | $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName ' . |
96 | - 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
96 | + 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
|
97 | 97 | $result = $this->em->createQuery($dql)->getArrayResult(); |
98 | 98 | |
99 | 99 | self::assertCount(1, $result); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | public function testInSubselect() |
104 | 104 | { |
105 | 105 | $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p " . |
106 | - "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
106 | + "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
|
107 | 107 | $result = $this->em->createQuery($dql)->getScalarResult(); |
108 | 108 | |
109 | 109 | self::assertCount(1, $result); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | public function testGroupByMultipleFields() |
114 | 114 | { |
115 | 115 | $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
116 | - 'GROUP BY p.department, p.name'; |
|
116 | + 'GROUP BY p.department, p.name'; |
|
117 | 117 | $result = $this->em->createQuery($dql)->getResult(); |
118 | 118 | |
119 | 119 | 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 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | public function testAggregateWithHavingClause() |
28 | 28 | { |
29 | - $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary ' . |
|
30 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
29 | + $dql = 'SELECT p.department, AVG(p.salary) AS avgSalary '. |
|
30 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
31 | 31 | 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
32 | 32 | |
33 | 33 | $result = $this->em->createQuery($dql)->getScalarResult(); |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | |
42 | 42 | public function testUnnamedScalarResultsAreOneBased() |
43 | 43 | { |
44 | - $dql = 'SELECT p.department, AVG(p.salary) ' . |
|
45 | - 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
44 | + $dql = 'SELECT p.department, AVG(p.salary) '. |
|
45 | + 'FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
46 | 46 | 'GROUP BY p.department HAVING SUM(p.salary) > 200000 ORDER BY p.department'; |
47 | 47 | |
48 | 48 | $result = $this->em->createQuery($dql)->getScalarResult(); |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | |
55 | 55 | public function testOrderByResultVariableCollectionSize() |
56 | 56 | { |
57 | - $dql = 'SELECT p.name, size(p.friends) AS friends ' . |
|
58 | - 'FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
59 | - 'WHERE p.friends IS NOT EMPTY ' . |
|
57 | + $dql = 'SELECT p.name, size(p.friends) AS friends '. |
|
58 | + 'FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
|
59 | + 'WHERE p.friends IS NOT EMPTY '. |
|
60 | 60 | 'ORDER BY friends DESC, p.name DESC'; |
61 | 61 | |
62 | 62 | $result = $this->em->createQuery($dql)->getScalarResult(); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | public function testIsNullAssociation() |
80 | 80 | { |
81 | - $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p ' . |
|
81 | + $dql = 'SELECT p FROM Doctrine\Tests\Models\Company\CompanyPerson p '. |
|
82 | 82 | 'WHERE p.spouse IS NULL'; |
83 | 83 | $result = $this->em->createQuery($dql)->getResult(); |
84 | 84 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public function testSelectSubselect() |
94 | 94 | { |
95 | - $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName ' . |
|
95 | + $dql = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName '. |
|
96 | 96 | 'FROM Doctrine\Tests\Models\Company\CompanyManager p'; |
97 | 97 | $result = $this->em->createQuery($dql)->getArrayResult(); |
98 | 98 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | public function testInSubselect() |
104 | 104 | { |
105 | - $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p " . |
|
105 | + $dql = "SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ". |
|
106 | 106 | "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')"; |
107 | 107 | $result = $this->em->createQuery($dql)->getScalarResult(); |
108 | 108 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | public function testGroupByMultipleFields() |
114 | 114 | { |
115 | - $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' . |
|
115 | + $dql = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '. |
|
116 | 116 | 'GROUP BY p.department, p.name'; |
117 | 117 | $result = $this->em->createQuery($dql)->getResult(); |
118 | 118 |
@@ -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 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $driver = new DatabaseDriver($sm); |
57 | 57 | |
58 | 58 | foreach ($driver->getAllClassNames() as $className) { |
59 | - if (! in_array(strtolower($className), $classNames, true)) { |
|
59 | + if ( ! in_array(strtolower($className), $classNames, true)) { |
|
60 | 60 | continue; |
61 | 61 | } |
62 | 62 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | if (count($metadatas) != count($classNames)) { |
71 | - $this->fail("Have not found all classes matching the names '" . implode(', ', $classNames) . "' only tables " . implode(', ', array_keys($metadatas))); |
|
71 | + $this->fail("Have not found all classes matching the names '".implode(', ', $classNames)."' only tables ".implode(', ', array_keys($metadatas))); |
|
72 | 72 | } |
73 | 73 | return $metadatas; |
74 | 74 | } |
@@ -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 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $user->username = 'gblanco'; |
184 | 184 | $user->status = 'developer'; |
185 | 185 | |
186 | - for ($i=0; $i<3; ++$i) { |
|
186 | + for ($i = 0; $i < 3; ++$i) { |
|
187 | 187 | $phone = new CmsPhonenumber; |
188 | 188 | $phone->phonenumber = 100 + $i; |
189 | 189 | $user->addPhonenumber($phone); |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | $user->username = 'gblanco'; |
412 | 412 | $user->status = 'developer'; |
413 | 413 | |
414 | - for ($i=0; $i<3; ++$i) { |
|
414 | + for ($i = 0; $i < 3; ++$i) { |
|
415 | 415 | $phone = new CmsPhonenumber; |
416 | 416 | $phone->phonenumber = 100 + $i; |
417 | 417 | $user->addPhonenumber($phone); |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $user->username = 'gblanco'; |
452 | 452 | $user->status = 'developer'; |
453 | 453 | |
454 | - for ($i=0; $i<3; ++$i) { |
|
454 | + for ($i = 0; $i < 3; ++$i) { |
|
455 | 455 | $phone = new CmsPhonenumber; |
456 | 456 | $phone->phonenumber = 100 + $i; |
457 | 457 | $user->addPhonenumber($phone); |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | $user->username = 'gblanco'; |
493 | 493 | $user->status = 'developer'; |
494 | 494 | |
495 | - for ($i=0; $i<3; ++$i) { |
|
495 | + for ($i = 0; $i < 3; ++$i) { |
|
496 | 496 | $phone = new CmsPhonenumber; |
497 | 497 | $phone->phonenumber = 100 + $i; |
498 | 498 | $user->addPhonenumber($phone); |
@@ -678,12 +678,12 @@ discard block |
||
678 | 678 | $this->em->persist($user); |
679 | 679 | $this->em->flush(); |
680 | 680 | |
681 | - self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
681 | + self::assertEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
682 | 682 | |
683 | 683 | $address->user = null; |
684 | 684 | $this->em->flush(); |
685 | 685 | |
686 | - self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = ' . $user->id)); |
|
686 | + self::assertNotEquals(1, $this->em->getConnection()->fetchColumn('select 1 from cms_addresses where user_id = '.$user->id)); |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | /** |
@@ -877,7 +877,7 @@ discard block |
||
877 | 877 | |
878 | 878 | self::assertInstanceOf(GhostObjectInterface::class, $fetchedUser, 'It IS a proxy, ...'); |
879 | 879 | self::assertTrue($fetchedUser->isProxyInitialized(), '...but its initialized!'); |
880 | - self::assertEquals($qc+2, $this->getCurrentQueryCount()); |
|
880 | + self::assertEquals($qc + 2, $this->getCurrentQueryCount()); |
|
881 | 881 | } |
882 | 882 | |
883 | 883 | /** |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | |
939 | 939 | $this->expectException(ORMInvalidArgumentException::class); |
940 | 940 | $this->expectExceptionMessage( |
941 | - 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field ' . |
|
941 | + 'Expected value of type "Doctrine\Tests\Models\CMS\CmsAddress" for association field '. |
|
942 | 942 | '"Doctrine\Tests\Models\CMS\CmsUser#$address", got "Doctrine\Tests\Models\CMS\CmsUser" instead.' |
943 | 943 | ); |
944 | 944 |
@@ -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 | } |