Failed Conditions
Pull Request — master (#7885)
by Šimon
09:45
created
lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     protected function prepare()
55 55
     {
56
-        if (! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
56
+        if ( ! isset($this->hints[UnitOfWork::HINT_DEFEREAGERLOAD])) {
57 57
             $this->hints[UnitOfWork::HINT_DEFEREAGERLOAD] = true;
58 58
         }
59 59
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
             // Remember which associations are "fetch joined", so that we know where to inject
65 65
             // collection stubs or proxies and where not.
66
-            if (! isset($this->rsm->relationMap[$dqlAlias])) {
66
+            if ( ! isset($this->rsm->relationMap[$dqlAlias])) {
67 67
                 continue;
68 68
             }
69 69
 
70 70
             $parent = $this->rsm->parentAliasMap[$dqlAlias];
71 71
 
72
-            if (! isset($this->rsm->aliasMap[$parent])) {
72
+            if ( ! isset($this->rsm->aliasMap[$parent])) {
73 73
                 throw HydrationException::parentObjectOfRelationNotFound($dqlAlias, $parent);
74 74
             }
75 75
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 $class        = $this->getClassMetadata($className);
96 96
                 $inverseAssoc = $class->getProperty($association->getInversedBy());
97 97
 
98
-                if (! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
98
+                if ( ! ($inverseAssoc instanceof ToOneAssociationMetadata)) {
99 99
                     continue;
100 100
                 }
101 101
 
@@ -161,14 +161,14 @@  discard block
 block discarded – undo
161 161
         $value       = $association->getValue($entity);
162 162
         $oid         = spl_object_id($entity);
163 163
 
164
-        if (! $value instanceof PersistentCollection) {
164
+        if ( ! $value instanceof PersistentCollection) {
165 165
             $value = $association->wrap($entity, $value, $this->em);
166 166
 
167 167
             $association->setValue($entity, $value);
168 168
 
169 169
             $this->uow->setOriginalEntityProperty($oid, $fieldName, $value);
170 170
 
171
-            $this->initializedCollections[$oid . $fieldName] = $value;
171
+            $this->initializedCollections[$oid.$fieldName] = $value;
172 172
         } elseif (isset($this->hints[Query::HINT_REFRESH]) ||
173 173
             (isset($this->hints['fetched'][$parentDqlAlias][$fieldName]) && ! $value->isInitialized())
174 174
         ) {
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
             $value->setInitialized(true);
178 178
             $value->unwrap()->clear();
179 179
 
180
-            $this->initializedCollections[$oid . $fieldName] = $value;
180
+            $this->initializedCollections[$oid.$fieldName] = $value;
181 181
         } else {
182 182
             // Is already PersistentCollection, and DON'T REFRESH or FETCH-JOIN!
183
-            $this->existingCollections[$oid . $fieldName] = $value;
183
+            $this->existingCollections[$oid.$fieldName] = $value;
184 184
         }
185 185
 
186 186
         return $value;
@@ -203,13 +203,13 @@  discard block
 block discarded – undo
203 203
         if (isset($this->rsm->discriminatorColumns[$dqlAlias])) {
204 204
             $fieldName = $this->rsm->discriminatorColumns[$dqlAlias];
205 205
 
206
-            if (! isset($this->rsm->metaMappings[$fieldName])) {
206
+            if ( ! isset($this->rsm->metaMappings[$fieldName])) {
207 207
                 throw HydrationException::missingDiscriminatorMetaMappingColumn($className, $fieldName, $dqlAlias);
208 208
             }
209 209
 
210 210
             $discrColumn = $this->rsm->metaMappings[$fieldName];
211 211
 
212
-            if (! isset($data[$discrColumn])) {
212
+            if ( ! isset($data[$discrColumn])) {
213 213
                 throw HydrationException::missingDiscriminatorColumn($className, $discrColumn, $dqlAlias);
214 214
             }
215 215
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             $discrMap           = $this->metadataCache[$className]->discriminatorMap;
221 221
             $discriminatorValue = (string) $data[$discrColumn];
222 222
 
223
-            if (! isset($discrMap[$discriminatorValue])) {
223
+            if ( ! isset($discrMap[$discriminatorValue])) {
224 224
                 throw HydrationException::invalidDiscriminatorValue($discriminatorValue, array_keys($discrMap));
225 225
             }
226 226
 
@@ -296,10 +296,10 @@  discard block
 block discarded – undo
296 296
                 $parentAlias = $this->rsm->parentAliasMap[$dqlAlias];
297 297
                 // we need the $path to save into the identifier map which entities were already
298 298
                 // seen for this parent-child relationship
299
-                $path = $parentAlias . '.' . $dqlAlias;
299
+                $path = $parentAlias.'.'.$dqlAlias;
300 300
 
301 301
                 // We have a RIGHT JOIN result here. Doctrine cannot hydrate RIGHT JOIN Object-Graphs
302
-                if (! isset($nonemptyComponents[$parentAlias])) {
302
+                if ( ! isset($nonemptyComponents[$parentAlias])) {
303 303
                     // TODO: Add special case code where we hydrate the right join objects into identity map at least
304 304
                     continue;
305 305
                 }
@@ -330,15 +330,15 @@  discard block
 block discarded – undo
330 330
                 $oid = spl_object_id($parentObject);
331 331
 
332 332
                 // Check the type of the relation (many or single-valued)
333
-                if (! ($association instanceof ToOneAssociationMetadata)) {
333
+                if ( ! ($association instanceof ToOneAssociationMetadata)) {
334 334
                     // PATH A: Collection-valued association
335 335
                     $reflFieldValue = $association->getValue($parentObject);
336 336
 
337 337
                     if (isset($nonemptyComponents[$dqlAlias])) {
338
-                        $collKey = $oid . $relationField;
338
+                        $collKey = $oid.$relationField;
339 339
                         if (isset($this->initializedCollections[$collKey])) {
340 340
                             $reflFieldValue = $this->initializedCollections[$collKey];
341
-                        } elseif (! isset($this->existingCollections[$collKey])) {
341
+                        } elseif ( ! isset($this->existingCollections[$collKey])) {
342 342
                             $reflFieldValue = $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias);
343 343
                         }
344 344
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
                         $index        = $indexExists ? $this->identifierMap[$path][$id[$parentAlias]][$id[$dqlAlias]] : false;
347 347
                         $indexIsValid = $index !== false ? isset($reflFieldValue[$index]) : false;
348 348
 
349
-                        if (! $indexExists || ! $indexIsValid) {
349
+                        if ( ! $indexExists || ! $indexIsValid) {
350 350
                             if (isset($this->existingCollections[$collKey])) {
351 351
                                 $element = $this->getEntityFromIdentityMap($entityName, $data);
352 352
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
                             // Update result pointer
376 376
                             $this->resultPointers[$dqlAlias] = $reflFieldValue[$index];
377 377
                         }
378
-                    } elseif (! $reflFieldValue) {
378
+                    } elseif ( ! $reflFieldValue) {
379 379
                         $this->initRelatedCollection($parentObject, $parentClass, $relationField, $parentAlias);
380 380
                     } elseif ($reflFieldValue instanceof PersistentCollection && $reflFieldValue->isInitialized() === false) {
381 381
                         $reflFieldValue->setInitialized(true);
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
                     // PATH B: Single-valued association
385 385
                     $reflFieldValue = $association->getValue($parentObject);
386 386
 
387
-                    if (! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
387
+                    if ( ! $reflFieldValue || isset($this->hints[Query::HINT_REFRESH]) ||
388 388
                         ($reflFieldValue instanceof GhostObjectInterface && ! $reflFieldValue->isProxyInitialized())) {
389 389
                         // we only need to take action if this value is null,
390 390
                         // we refresh the entity or its an uninitialized proxy.
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
                 $entityKey                    = $this->rsm->entityMappings[$dqlAlias] ?: 0;
446 446
 
447 447
                 // if this row has a NULL value for the root result id then make it a null result.
448
-                if (! isset($nonemptyComponents[$dqlAlias])) {
448
+                if ( ! isset($nonemptyComponents[$dqlAlias])) {
449 449
                     if ($this->rsm->isMixed) {
450 450
                         $result[] = [$entityKey => null];
451 451
                     } else {
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
                 }
458 458
 
459 459
                 // check for existing result from the iterations before
460
-                if (! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) {
460
+                if ( ! isset($this->identifierMap[$dqlAlias][$id[$dqlAlias]])) {
461 461
                     $element = $this->getEntity($data, $dqlAlias);
462 462
 
463 463
                     if ($this->rsm->isMixed) {
@@ -500,13 +500,13 @@  discard block
 block discarded – undo
500 500
             }
501 501
         }
502 502
 
503
-        if (! isset($resultKey)) {
503
+        if ( ! isset($resultKey)) {
504 504
             $this->resultCounter++;
505 505
         }
506 506
 
507 507
         // Append scalar values to mixed result sets
508 508
         if (isset($rowData['scalars'])) {
509
-            if (! isset($resultKey)) {
509
+            if ( ! isset($resultKey)) {
510 510
                 $resultKey = isset($this->rsm->indexByMap['scalars'])
511 511
                     ? $row[$this->rsm->indexByMap['scalars']]
512 512
                     : $this->resultCounter - 1;
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 
520 520
         // Append new object to mixed result sets
521 521
         if (isset($rowData['newObjects'])) {
522
-            if (! isset($resultKey)) {
522
+            if ( ! isset($resultKey)) {
523 523
                 $resultKey = $this->resultCounter - 1;
524 524
             }
525 525
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
         $this->putTripAroundEurope();
120 120
 
121 121
         $dql = 'SELECT t, p, c '
122
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
123
-             . 'INNER JOIN t.pois p '
124
-             . 'INNER JOIN p.country c';
122
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
123
+                . 'INNER JOIN t.pois p '
124
+                . 'INNER JOIN p.country c';
125 125
 
126 126
         $query = $this->em->createQuery($dql);
127 127
         $tours = $query->getResult();
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         $this->putTripAroundEurope();
142 142
 
143 143
         $dql = 'SELECT t '
144
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
145
-             . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
146
-             . 'WHERE p MEMBER OF t.pois';
144
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
145
+                . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
146
+                . 'WHERE p MEMBER OF t.pois';
147 147
 
148 148
         $query = $this->em->createQuery($dql);
149 149
         $tours = $query->getResult();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     public function testBulkUpdateIssueDDC368() : void
327 327
     {
328 328
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
329
-                  ->execute();
329
+                    ->execute();
330 330
 
331 331
         $query  = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1');
332 332
         $result = $query->getResult();
@@ -344,9 +344,9 @@  discard block
 block discarded – undo
344 344
     public function testBulkUpdateNonScalarParameterDDC1341() : void
345 345
     {
346 346
         $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
347
-                  ->setParameter(0, new DateTime())
348
-                  ->setParameter(1, 'IT')
349
-                  ->execute();
347
+                    ->setParameter(0, new DateTime())
348
+                    ->setParameter(1, 'IT')
349
+                    ->execute();
350 350
 
351 351
         self::addToAssertionCount(1);
352 352
     }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $this->em->clear();
53 53
 
54
-        $query = $this->em->createQuery('select p from ' . CompanyPerson::class . ' p order by p.name desc');
54
+        $query = $this->em->createQuery('select p from '.CompanyPerson::class.' p order by p.name desc');
55 55
 
56 56
         $entities = $query->getResult();
57 57
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $this->em->clear();
72 72
 
73
-        $query = $this->em->createQuery('select p from ' . CompanyEmployee::class . ' p');
73
+        $query = $this->em->createQuery('select p from '.CompanyEmployee::class.' p');
74 74
 
75 75
         $entities = $query->getResult();
76 76
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         $this->em->clear();
95 95
 
96
-        $query = $this->em->createQuery('update ' . CompanyEmployee::class . " p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
96
+        $query = $this->em->createQuery('update '.CompanyEmployee::class." p set p.name = ?1, p.department = ?2 where p.name='Guilherme Blanco' and p.salary = ?3");
97 97
 
98 98
         $query->setParameter(1, 'NewName', 'string');
99 99
         $query->setParameter(2, 'NewDepartment');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         self::assertEquals(1, $numUpdated);
106 106
 
107
-        $query = $this->em->createQuery('delete from ' . CompanyPerson::class . ' p');
107
+        $query = $this->em->createQuery('delete from '.CompanyPerson::class.' p');
108 108
 
109 109
         $numDeleted = $query->execute();
110 110
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $this->em->flush();
180 180
         $this->em->clear();
181 181
 
182
-        $query = $this->em->createQuery('select p, s from ' . CompanyPerson::class . ' p join p.spouse s where p.name=\'Mary Smith\'');
182
+        $query = $this->em->createQuery('select p, s from '.CompanyPerson::class.' p join p.spouse s where p.name=\'Mary Smith\'');
183 183
 
184 184
         $result = $query->getResult();
185 185
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         $this->em->clear();
217 217
 
218
-        $query = $this->em->createQuery('select p, f from ' . CompanyPerson::class . ' p join p.friends f where p.name=?1');
218
+        $query = $this->em->createQuery('select p, f from '.CompanyPerson::class.' p join p.friends f where p.name=?1');
219 219
 
220 220
         $query->setParameter(1, 'Roman');
221 221
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         $this->em->flush();
286 286
         $this->em->clear();
287 287
 
288
-        $q = $this->em->createQuery('select a from ' . CompanyEvent::class . ' a where a.id = ?1');
288
+        $q = $this->em->createQuery('select a from '.CompanyEvent::class.' a where a.id = ?1');
289 289
 
290 290
         $q->setParameter(1, $event1->getId());
291 291
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
         $this->em->clear();
302 302
 
303
-        $q = $this->em->createQuery('select a from ' . CompanyOrganization::class . ' a where a.id = ?1');
303
+        $q = $this->em->createQuery('select a from '.CompanyOrganization::class.' a where a.id = ?1');
304 304
 
305 305
         $q->setParameter(1, $org->getId());
306 306
 
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
      */
326 326
     public function testBulkUpdateIssueDDC368() : void
327 327
     {
328
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.salary = 1')
328
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.salary = 1')
329 329
                   ->execute();
330 330
 
331
-        $query  = $this->em->createQuery('SELECT count(p.id) FROM ' . CompanyEmployee::class . ' p WHERE p.salary = 1');
331
+        $query  = $this->em->createQuery('SELECT count(p.id) FROM '.CompanyEmployee::class.' p WHERE p.salary = 1');
332 332
         $result = $query->getResult();
333 333
 
334 334
         self::assertGreaterThan(0, $result);
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      */
344 344
     public function testBulkUpdateNonScalarParameterDDC1341() : void
345 345
     {
346
-        $this->em->createQuery('UPDATE ' . CompanyEmployee::class . ' AS p SET p.startDate = ?0 WHERE p.department = ?1')
346
+        $this->em->createQuery('UPDATE '.CompanyEmployee::class.' AS p SET p.startDate = ?0 WHERE p.department = ?1')
347 347
                   ->setParameter(0, new DateTime())
348 348
                   ->setParameter(1, 'IT')
349 349
                   ->execute();
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $this->em->flush();
402 402
         $this->em->clear();
403 403
 
404
-        $dqlManager = $this->em->createQuery('SELECT m FROM ' . CompanyManager::class . ' m WHERE m.spouse = ?1')
404
+        $dqlManager = $this->em->createQuery('SELECT m FROM '.CompanyManager::class.' m WHERE m.spouse = ?1')
405 405
                                 ->setParameter(1, $person->getId())
406 406
                                 ->getSingleResult();
407 407
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/AdvancedDqlQueryTest.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     public function testAggregateWithHavingClause() : void
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
 block discarded – undo
42 42
     public function testUnnamedScalarResultsAreOneBased() : void
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
 block discarded – undo
55 55
     public function testOrderByResultVariableCollectionSize() : void
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
 block discarded – undo
79 79
     public function testIsNullAssociation() : void
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
         $query  = $this->em->createQuery($dql);
84 84
         $result = $query->getResult();
85 85
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function testSelectSubselect() : void
99 99
     {
100 100
         $dql    = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName ' .
101
-               'FROM Doctrine\Tests\Models\Company\CompanyManager p';
101
+                'FROM Doctrine\Tests\Models\Company\CompanyManager p';
102 102
         $query  = $this->em->createQuery($dql);
103 103
         $result = $query->getArrayResult();
104 104
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function testInSubselect() : void
114 114
     {
115 115
         $dql    = 'SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ' .
116
-               "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
116
+                "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
117 117
         $query  = $this->em->createQuery($dql);
118 118
         $result = $query->getScalarResult();
119 119
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function testGroupByMultipleFields() : void
129 129
     {
130 130
         $dql    = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' .
131
-               'GROUP BY p.department, p.name';
131
+                'GROUP BY p.department, p.name';
132 132
         $query  = $this->em->createQuery($dql);
133 133
         $result = $query->getResult();
134 134
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function testAggregateWithHavingClause() : void
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
 block discarded – undo
41 41
 
42 42
     public function testUnnamedScalarResultsAreOneBased() : void
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
 block discarded – undo
54 54
 
55 55
     public function testOrderByResultVariableCollectionSize() : void
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
 block discarded – undo
78 78
 
79 79
     public function testIsNullAssociation() : void
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
         $query  = $this->em->createQuery($dql);
84 84
         $result = $query->getResult();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     public function testSelectSubselect() : void
99 99
     {
100
-        $dql    = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName ' .
100
+        $dql    = 'SELECT p, (SELECT c.brand FROM Doctrine\Tests\Models\Company\CompanyCar c WHERE p.car = c) brandName '.
101 101
                'FROM Doctrine\Tests\Models\Company\CompanyManager p';
102 102
         $query  = $this->em->createQuery($dql);
103 103
         $result = $query->getArrayResult();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     public function testInSubselect() : void
114 114
     {
115
-        $dql    = 'SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p ' .
115
+        $dql    = 'SELECT p.name FROM Doctrine\Tests\Models\Company\CompanyPerson p '.
116 116
                "WHERE p.name IN (SELECT n.name FROM Doctrine\Tests\Models\Company\CompanyPerson n WHERE n.name = 'Roman B.')";
117 117
         $query  = $this->em->createQuery($dql);
118 118
         $result = $query->getScalarResult();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     public function testGroupByMultipleFields() : void
129 129
     {
130
-        $dql    = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p ' .
130
+        $dql    = 'SELECT p.department, p.name, count(p.id) FROM Doctrine\Tests\Models\Company\CompanyEmployee p '.
131 131
                'GROUP BY p.department, p.name';
132 132
         $query  = $this->em->createQuery($dql);
133 133
         $result = $query->getResult();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
         ];
1024 1024
 
1025 1025
         $proxyInstance = (new LazyLoadingGhostFactory(new Configuration()))
1026
-            ->createProxy(ECommerceShipping::class, static function () {
1026
+            ->createProxy(ECommerceShipping::class, static function() {
1027 1027
                 self::fail('Proxy is not supposed to be lazy-loaded');
1028 1028
             });
1029 1029
 
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
         ];
1074 1074
 
1075 1075
         $proxyInstance = (new LazyLoadingGhostFactory(new Configuration()))
1076
-            ->createProxy(ECommerceShipping::class, static function () {
1076
+            ->createProxy(ECommerceShipping::class, static function() {
1077 1077
                 self::fail('Proxy is not supposed to be lazy-loaded');
1078 1078
             });
1079 1079
 
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
             $rsm,
1330 1330
             [Query::HINT_FORCE_PARTIAL_LOAD => true]
1331 1331
         );
1332
-        $rowNum         = 0;
1332
+        $rowNum = 0;
1333 1333
 
1334 1334
         while (($row = $iterableResult->next()) !== false) {
1335 1335
             self::assertCount(1, $row);
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
             $rsm,
1356 1356
             [Query::HINT_FORCE_PARTIAL_LOAD => true]
1357 1357
         );
1358
-        $rowNum         = 0;
1358
+        $rowNum = 0;
1359 1359
 
1360 1360
         foreach ($iterableResult as $user) {
1361 1361
             self::assertInstanceOf(CmsUser::class, $user);
Please login to merge, or discard this patch.