Failed Conditions
Pull Request — master (#7046)
by Gabriel
14:57
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.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\Ticket;
6 6
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->em->flush();
50 50
         $this->em->clear();
51 51
 
52
-        $dql     = 'SELECT a, b, ba FROM ' . __NAMESPACE__ . '\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba';
52
+        $dql     = 'SELECT a, b, ba FROM '.__NAMESPACE__.'\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba';
53 53
         $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult();
54 54
 
55 55
         self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC657Test.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\Ticket;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function testEntitySingleResult()
23 23
     {
24
-        $query    = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d');
24
+        $query    = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d');
25 25
         $datetime = $query->setMaxResults(1)->getSingleResult();
26 26
 
27 27
         self::assertInstanceOf(DateTimeModel::class, $datetime);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function testScalarResult()
35 35
     {
36
-        $query  = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
36
+        $query  = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
37 37
         $result = $query->getScalarResult();
38 38
 
39 39
         self::assertCount(2, $result);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function testaTicketEntityArrayResult()
51 51
     {
52
-        $query  = $this->em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
52
+        $query  = $this->em->createQuery('SELECT d FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
53 53
         $result = $query->getArrayResult();
54 54
 
55 55
         self::assertCount(2, $result);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function testTicketSingleResult()
67 67
     {
68
-        $query    = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
68
+        $query    = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
69 69
         $datetime = $query->setMaxResults(1)->getSingleResult();
70 70
 
71 71
         self::assertInternalType('array', $datetime);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function testTicketResult()
79 79
     {
80
-        $query  = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC');
80
+        $query  = $this->em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC');
81 81
         $result = $query->getResult();
82 82
 
83 83
         self::assertCount(2, $result);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2602Test.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\Ticket;
6 6
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $entity = $event->getEntity();
136 136
 
137
-        if (! ($entity instanceof DDC2602Biography)) {
137
+        if ( ! ($entity instanceof DDC2602Biography)) {
138 138
             return;
139 139
         }
140 140
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $fieldSelection = new DDC2602FieldSelection();
156 156
 
157 157
             $fieldSelection->field      = $field;
158
-            $fieldSelection->choiceList = $field->choiceList->filter(function ($choice) use ($choiceList) {
158
+            $fieldSelection->choiceList = $field->choiceList->filter(function($choice) use ($choiceList) {
159 159
                 return in_array($choice->id, $choiceList, true);
160 160
             });
161 161
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/Issue5989Test.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\Ticket;
6 6
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $employee = new Issue5989Employee();
31 31
 
32
-        $employeeTags   =['tag2', 'tag3'];
32
+        $employeeTags   = ['tag2', 'tag3'];
33 33
         $employee->tags = $employeeTags;
34 34
         $this->em->persist($employee);
35 35
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3330Test.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\Ticket;
6 6
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
         $this->em->clear();
36 36
 
37 37
         $query = $this->em->createQuery(
38
-            'SELECT b, h' .
39
-            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b' .
40
-            ' LEFT JOIN b.halls h' .
38
+            'SELECT b, h'.
39
+            ' FROM Doctrine\Tests\ORM\Functional\Ticket\DDC3330_Building b'.
40
+            ' LEFT JOIN b.halls h'.
41 41
             ' ORDER BY b.id ASC, h.name DESC'
42 42
         )
43 43
         ->setMaxResults(3);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         for ($i = 0; $i < 10; $i++) {
58 58
             $hall       = new DDC3330_Hall();
59
-            $hall->name = 'HALL-' . $i;
59
+            $hall->name = 'HALL-'.$i;
60 60
             $building->addHall($hall);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC881Test.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\Ticket;
6 6
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
         $this->em->clear();
82 82
 
83 83
         // fetch-join that foreign-key/primary-key entity association
84
-        $dql   = 'SELECT c, p FROM ' . DDC881PhoneCall::class . ' c JOIN c.phonenumber p';
84
+        $dql   = 'SELECT c, p FROM '.DDC881PhoneCall::class.' c JOIN c.phonenumber p';
85 85
         $calls = $this->em->createQuery($dql)->getResult();
86 86
 
87 87
         self::assertCount(2, $calls);
88 88
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[0]->getPhoneNumber());
89 89
         self::assertNotInstanceOf(GhostObjectInterface::class, $calls[1]->getPhoneNumber());
90 90
 
91
-        $dql     = 'SELECT p, c FROM ' . DDC881PhoneNumber::class . ' p JOIN p.calls c';
91
+        $dql     = 'SELECT p, c FROM '.DDC881PhoneNumber::class.' p JOIN p.calls c';
92 92
         $numbers = $this->em->createQuery($dql)->getResult();
93 93
 
94 94
         self::assertCount(2, $numbers);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -135,13 +135,13 @@
 block discarded – undo
135 135
         $cmf    = new ClassMetadataFactory();
136 136
         $driver = $this->createMock(MappingDriver::class);
137 137
         $driver->expects($this->at(0))
138
-               ->method('isTransient')
139
-               ->with($this->equalTo(CmsUser::class))
140
-               ->will($this->returnValue(true));
138
+                ->method('isTransient')
139
+                ->with($this->equalTo(CmsUser::class))
140
+                ->will($this->returnValue(true));
141 141
         $driver->expects($this->at(1))
142
-               ->method('isTransient')
143
-               ->with($this->equalTo(CmsArticle::class))
144
-               ->will($this->returnValue(false));
142
+                ->method('isTransient')
143
+                ->with($this->equalTo(CmsArticle::class))
144
+                ->will($this->returnValue(false));
145 145
 
146 146
         $em = $this->createEntityManager($driver);
147 147
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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\Mapping;
6 6
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
 
112 112
     public function testHasGetMetadata_NamespaceSeparatorIsNotNormalized()
113 113
     {
114
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
114
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
115 115
 
116
-        $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']);
116
+        $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']);
117 117
 
118 118
         $entityManager = $this->createEntityManager($metadataDriver);
119 119
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
         self::assertSame(
123 123
             $mf->getMetadataFor(DoctrineGlobal_Article::class),
124
-            $mf->getMetadataFor('\\' . DoctrineGlobal_Article::class)
124
+            $mf->getMetadataFor('\\'.DoctrineGlobal_Article::class)
125 125
         );
126 126
         self::assertTrue($mf->hasMetadataFor(DoctrineGlobal_Article::class));
127
-        self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobal_Article::class));
127
+        self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobal_Article::class));
128 128
     }
129 129
 
130 130
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     public function testAddDefaultDiscriminatorMap()
153 153
     {
154 154
         $cmf    = new ClassMetadataFactory();
155
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']);
155
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']);
156 156
         $em     = $this->createEntityManager($driver);
157 157
         $cmf->setEntityManager($em);
158 158
 
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
         $driverMock = new DriverMock();
217 217
         $config     = new Configuration();
218 218
 
219
-        $config->setProxyDir(__DIR__ . '/../../Proxies');
219
+        $config->setProxyDir(__DIR__.'/../../Proxies');
220 220
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
221 221
 
222
-        if (! $conn) {
222
+        if ( ! $conn) {
223 223
             $conn = new ConnectionMock([], $driverMock, $config, new EventManager());
224 224
         }
225 225
         $eventManager = $conn->getEventManager();
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     public function testQuoteMetadata()
311 311
     {
312 312
         $cmf    = new ClassMetadataFactory();
313
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']);
313
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']);
314 314
         $em     = $this->createEntityManager($driver);
315 315
         $cmf->setEntityManager($em);
316 316
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
         $listener
400 400
             ->expects($this->any())
401 401
             ->method('onClassMetadataNotFound')
402
-            ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
402
+            ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
403 403
                 $test->assertNull($args->getFoundMetadata());
404 404
                 $test->assertSame('Foo', $args->getClassName());
405 405
                 $test->assertSame($em, $args->getObjectManager());
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
     public function testInheritsIdGeneratorMappingFromEmbeddable()
462 462
     {
463 463
         $cmf    = new ClassMetadataFactory();
464
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']);
464
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']);
465 465
         $em     = $this->createEntityManager($driver);
466 466
         $cmf->setEntityManager($em);
467 467
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
     ) : ClassMetadata {
485 485
         $this->requestedClasses[] = $className;
486 486
 
487
-        if (! isset($this->mockMetadata[$className])) {
487
+        if ( ! isset($this->mockMetadata[$className])) {
488 488
             throw new \InvalidArgumentException("No mock metadata found for class $className.");
489 489
         }
490 490
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/EntityRepositoryTest.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
 
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
     public function testCanRetrieveRepositoryFromClassNameWithLeadingBackslash()
612 612
     {
613 613
         self::assertSame(
614
-            $this->em->getRepository('\\' . CmsUser::class),
614
+            $this->em->getRepository('\\'.CmsUser::class),
615 615
             $this->em->getRepository(CmsUser::class)
616 616
         );
617 617
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php 1 patch
Spacing   +9 added lines, -9 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\Mapping;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 use Doctrine\Tests\OrmTestCase;
29 29
 use DoctrineGlobal_Article;
30 30
 
31
-require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
31
+require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
32 32
 
33 33
 class ClassMetadataTest extends OrmTestCase
34 34
 {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function testMapAssociationInGlobalNamespace()
175 175
     {
176
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
176
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
177 177
 
178 178
         $cm = new ClassMetadata(DoctrineGlobal_Article::class, $this->metadataBuildingContext);
179 179
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_article'));
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function testSetDiscriminatorMapInGlobalNamespace()
271 271
     {
272
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
272
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
273 273
 
274 274
         $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext);
275 275
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     public function testSetSubClassesInGlobalNamespace()
287 287
     {
288
-        require_once __DIR__ . '/../../Models/Global/GlobalNamespaceModel.php';
288
+        require_once __DIR__.'/../../Models/Global/GlobalNamespaceModel.php';
289 289
 
290 290
         $cm = new ClassMetadata('DoctrineGlobal_User', $this->metadataBuildingContext);
291 291
         $cm->setTable(new Mapping\TableMetadata('doctrine_global_user'));
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
     public function testEmptyFieldNameThrowsException()
800 800
     {
801 801
         $this->expectException(MappingException::class);
802
-        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '" . CMS\CmsUser::class . "'.");
802
+        $this->expectExceptionMessage("The field or association mapping misses the 'fieldName' attribute in entity '".CMS\CmsUser::class."'.");
803 803
 
804 804
         $cm = new ClassMetadata(CMS\CmsUser::class, $this->metadataBuildingContext);
805 805
         $cm->setTable(new Mapping\TableMetadata('cms_users'));
@@ -1093,7 +1093,7 @@  discard block
 block discarded – undo
1093 1093
         $cm->addLifecycleCallback('notfound', 'postLoad');
1094 1094
 
1095 1095
         $this->expectException(MappingException::class);
1096
-        $this->expectExceptionMessage("Entity '" . CMS\CmsUser::class . "' has no method 'notfound' to be registered as lifecycle callback.");
1096
+        $this->expectExceptionMessage("Entity '".CMS\CmsUser::class."' has no method 'notfound' to be registered as lifecycle callback.");
1097 1097
 
1098 1098
         $cm->validateLifecycleCallbacks(new RuntimeReflectionService());
1099 1099
     }
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
         $cm->addProperty($association);
1114 1114
 
1115 1115
         $this->expectException(MappingException::class);
1116
-        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '" . CMS\CmsUser::class . "#address'.");
1116
+        $this->expectExceptionMessage("The target-entity 'UnknownClass' cannot be found in '".CMS\CmsUser::class."#address'.");
1117 1117
 
1118 1118
         $cm->validateAssociations();
1119 1119
     }
@@ -1382,6 +1382,6 @@  discard block
 block discarded – undo
1382 1382
      */
1383 1383
     public function propertyToColumnName($propertyName, $className = null)
1384 1384
     {
1385
-        return strtolower($this->classToTableName($className)) . '_' . $propertyName;
1385
+        return strtolower($this->classToTableName($className)).'_'.$propertyName;
1386 1386
     }
1387 1387
 }
Please login to merge, or discard this patch.