Failed Conditions
Pull Request — master (#7046)
by Gabriel
14:57
created
Tests/ORM/Cache/Persister/Collection/AbstractCollectionPersisterTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@
 block discarded – undo
86 86
         $this->em                  = $this->getTestEntityManager();
87 87
         $this->region              = $this->createRegion();
88 88
         $this->collectionPersister = $this->getMockBuilder(CollectionPersister::class)
89
-                                           ->setMethods($this->collectionPersisterMockMethods)
90
-                                           ->getMock();
89
+                                            ->setMethods($this->collectionPersisterMockMethods)
90
+                                            ->getMock();
91 91
     }
92 92
 
93 93
     /**
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Cache/Persister/Entity/AbstractEntityPersisterTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,8 @@
 block discarded – undo
103 103
         $this->em              = $this->getTestEntityManager();
104 104
         $this->region          = $this->createRegion();
105 105
         $this->entityPersister = $this->getMockBuilder(EntityPersister::class)
106
-                                       ->setMethods($this->entityPersisterMockMethods)
107
-                                       ->getMock();
106
+                                        ->setMethods($this->entityPersisterMockMethods)
107
+                                        ->getMock();
108 108
     }
109 109
 
110 110
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
48 48
 
49 49
         self::assertEquals('foo', $entity->lowerCaseString, 'Entity holds lowercase string');
50
-        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
50
+        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select lowerCaseString from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
51 51
     }
52 52
 
53 53
     /**
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
70 70
         self::assertEquals('foo', $entity->namedLowerCaseString, 'Entity holds lowercase string');
71
-        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
71
+        self::assertEquals('FOO', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
72 72
 
73 73
         $entity->namedLowerCaseString = 'bar';
74 74
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $entity = $this->em->find('\Doctrine\Tests\Models\CustomType\CustomTypeUpperCase', $id);
83 83
         self::assertEquals('bar', $entity->namedLowerCaseString, 'Entity holds lowercase string');
84
-        self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id=' . $entity->id . ''), 'Database holds uppercase string');
84
+        self::assertEquals('BAR', $this->em->getConnection()->fetchColumn('select named_lower_case_string from customtype_uppercases where id='.$entity->id.''), 'Database holds uppercase string');
85 85
     }
86 86
 
87 87
     public function testTypeValueSqlWithAssociations()
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $entity = $this->em->find(CustomTypeParent::class, $parentId);
109 109
 
110 110
         self::assertTrue($entity->customInteger < 0, 'Fetched customInteger negative');
111
-        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id=' . $entity->id . ''), 'Database has stored customInteger positive');
111
+        self::assertEquals(1, $this->em->getConnection()->fetchColumn('select customInteger from customtype_parents where id='.$entity->id.''), 'Database has stored customInteger positive');
112 112
 
113 113
         self::assertNotNull($parent->child, 'Child attached');
114 114
         self::assertCount(2, $entity->getMyFriends(), '2 friends attached');
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $this->em->clear();
129 129
 
130
-        $query = $this->em->createQuery('SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = ' . $parentId);
130
+        $query = $this->em->createQuery('SELECT p, p.customInteger, c from Doctrine\Tests\Models\CustomType\CustomTypeParent p JOIN p.child c where p.id = '.$parentId);
131 131
 
132 132
         $result = $query->getResult();
133 133
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
     public function addType(Type $type)
210 210
     {
211
-        if (! $this->types->contains($type)) {
211
+        if ( ! $this->types->contains($type)) {
212 212
             $this->types[] = $type;
213 213
             $type->addLemma($this);
214 214
         }
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
      */
320 320
     public function addLemma(Lemma $lemma)
321 321
     {
322
-        if (! $this->lemmas->contains($lemma)) {
322
+        if ( ! $this->lemmas->contains($lemma)) {
323 323
             $this->lemmas[] = $lemma;
324 324
             $lemma->addType($this);
325 325
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ManyToManyBasicAssociationTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
         $user->username = 'gblanco';
294 294
         $user->status   = 'developer';
295 295
 
296
-        for ($i=0; $i < $groupCount; ++$i) {
296
+        for ($i = 0; $i < $groupCount; ++$i) {
297 297
             $group       = new CmsGroup;
298
-            $group->name = 'Developers_' . $i;
298
+            $group->name = 'Developers_'.$i;
299 299
             $user->addGroup($group);
300 300
         }
301 301
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
             $user
425 425
                 ->getGroups()
426 426
                 ->matching($criteria)
427
-                ->map(function (CmsGroup $group) {
427
+                ->map(function(CmsGroup $group) {
428 428
                     return $group->getName();
429 429
                 })
430 430
                 ->toArray()
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
             $user
469 469
                 ->getTags()
470 470
                 ->matching($criteria)
471
-                ->map(function (CmsTag $tag) {
471
+                ->map(function(CmsTag $tag) {
472 472
                     return $tag->getName();
473 473
                 })
474 474
                 ->toArray()
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Doctrine/Tests/ORM/Functional/OneToManyUnidirectionalAssociationTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $this->em->clear();
49 49
 
50 50
         $routes = $this->em->createQuery(
51
-            'SELECT r, l, f, t FROM Doctrine\Tests\Models\Routing\RoutingRoute r ' .
51
+            'SELECT r, l, f, t FROM Doctrine\Tests\Models\Routing\RoutingRoute r '.
52 52
             'JOIN r.legs l JOIN l.fromLocation f JOIN l.toLocation t'
53 53
         )->getSingleResult();
54 54
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SecondLevelCacheManyToManyTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $entity   = $this->em->find(Travel::class, $entitiId);
235 235
 
236 236
         self::assertEquals(0, $entity->getVisitedCities()->count());
237
-        self::assertEquals($queryCount+2, $this->getCurrentQueryCount());
237
+        self::assertEquals($queryCount + 2, $this->getCurrentQueryCount());
238 238
 
239 239
         $this->em->clear();
240 240
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
         $eventManager->addEventListener([Events::postLoad], $listener);
235 235
 
236 236
         $this->em->find(CmsUser::class, $this->userId);
237
-        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
238
-        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
237
+        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
238
+        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
239 239
     }
240 240
 
241 241
     private function loadFixture()
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     {
312 312
         $object = $event->getObject();
313 313
         $class  = StaticClassNameConverter::getClass($object);
314
-        if (! isset($this->firedByClasses[$class])) {
314
+        if ( ! isset($this->firedByClasses[$class])) {
315 315
             $this->firedByClasses[$class] = 1;
316 316
         } else {
317 317
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.