Failed Conditions
Push — develop ( 9800ca...d1cf9a )
by Marco
272:19 queued 264:21
created
tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.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\Locking;
6 6
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $test = new OptimisticStandard();
119 119
 
120 120
         for ($i = 0; $i < 5; $i++) {
121
-            $test->name = 'test' . $i;
121
+            $test->name = 'test'.$i;
122 122
 
123 123
             $this->em->persist($test);
124 124
             $this->em->flush();
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         $caughtException = null;
253 253
 
254 254
         try {
255
-            $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp()-3600));
255
+            $expectedVersionExpired = DateTime::createFromFormat('U', (string) ($test->version->getTimestamp() - 3600));
256 256
 
257 257
             $this->em->lock($test, LockMode::OPTIMISTIC, $expectedVersionExpired);
258 258
         } catch (OptimisticLockException $e) {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.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\Locking;
6 6
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     protected function setUp()
21 21
     {
22
-        if (!class_exists('GearmanClient', false)) {
22
+        if ( ! class_exists('GearmanClient', false)) {
23 23
             $this->markTestSkipped('pecl/gearman is required for this test to run.');
24 24
         }
25 25
 
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
         $this->gearman->runTasks();
136 136
 
137 137
         self::assertTrue($this->maxRunTime > $forTime,
138
-            "Because of locking this tests should have run at least " . $forTime . " seconds, ".
139
-            "but only did for " . $this->maxRunTime . " seconds.");
138
+            "Because of locking this tests should have run at least ".$forTime." seconds, ".
139
+            "but only did for ".$this->maxRunTime." seconds.");
140 140
         self::assertTrue($this->maxRunTime < $notLongerThan,
141
-            "The longest task should not run longer than " . $notLongerThan . " seconds, ".
142
-            "but did for " . $this->maxRunTime . " seconds."
141
+            "The longest task should not run longer than ".$notLongerThan." seconds, ".
142
+            "but did for ".$this->maxRunTime." seconds."
143 143
         );
144 144
     }
145 145
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
         $this->expectExceptionMessage('The optimistic lock on an entity failed.');
213 213
 
214 214
         $this->em->createQuery($dql)
215
-                  ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC)
216
-                  ->getSQL();
215
+                    ->setHint(Query::HINT_LOCK_MODE, LockMode::OPTIMISTIC)
216
+                    ->getSQL();
217 217
     }
218 218
 }
Please login to merge, or discard this 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\Locking;
6 6
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $article = new CmsArticle();
90 90
 
91 91
         $this->expectException(\InvalidArgumentException::class);
92
-        $this->expectExceptionMessage('Entity ' . CmsArticle::class);
92
+        $this->expectExceptionMessage('Entity '.CmsArticle::class);
93 93
 
94 94
         $this->em->lock($article, LockMode::OPTIMISTIC, $article->version + 1);
95 95
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $writeLockSql = $this->em->getConnection()->getDatabasePlatform()->getWriteLockSQL();
140 140
 
141
-        if (! $writeLockSql) {
141
+        if ( ! $writeLockSql) {
142 142
             $this->markTestSkipped('Database Driver has no Write Lock support.');
143 143
         }
144 144
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $readLockSql = $this->em->getConnection()->getDatabasePlatform()->getReadLockSQL();
175 175
 
176
-        if (! $readLockSql) {
176
+        if ( ! $readLockSql) {
177 177
             $this->markTestSkipped('Database Driver has no Write Lock support.');
178 178
         }
179 179
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function testLockOptimisticNonVersionedThrowsExceptionInDQL()
208 208
     {
209
-        $dql = "SELECT u FROM " . CmsUser::class . " u WHERE u.username = 'gblanco'";
209
+        $dql = "SELECT u FROM ".CmsUser::class." u WHERE u.username = 'gblanco'";
210 210
 
211 211
         $this->expectException(OptimisticLockException::class);
212 212
         $this->expectExceptionMessage('The optimistic lock on an entity failed.');
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NativeQueryTest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -224,13 +224,13 @@
 block discarded – undo
224 224
 
225 225
         $q = $this->em->createNativeQuery('SELECT id, name, status, phonenumber FROM cms_users INNER JOIN cms_phonenumbers ON id = user_id WHERE username = ?', $rsm);
226 226
         $q2 = $q->setSQL('foo')
227
-          ->setResultSetMapping($rsm)
228
-          ->expireResultCache(true)
229
-          ->setHint('foo', 'bar')
230
-          ->setParameter(1, 'foo')
231
-          ->setParameters($parameters)
232
-          ->setResultCacheDriver(null)
233
-          ->setResultCacheLifetime(3500);
227
+            ->setResultSetMapping($rsm)
228
+            ->expireResultCache(true)
229
+            ->setHint('foo', 'bar')
230
+            ->setParameter(1, 'foo')
231
+            ->setParameters($parameters)
232
+            ->setResultCacheDriver(null)
233
+            ->setResultCacheLifetime(3500);
234 234
 
235 235
         self::assertSame($q, $q2);
236 236
     }
Please login to merge, or discard this 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
 
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
 
437 437
         self::assertCount(1, $result);
438 438
         self::assertInstanceOf(CmsAddress::class, $result[0]);
439
-        self::assertEquals($addr->id,  $result[0]->id);
440
-        self::assertEquals($addr->city,  $result[0]->city);
439
+        self::assertEquals($addr->id, $result[0]->id);
440
+        self::assertEquals($addr->city, $result[0]->city);
441 441
         self::assertEquals($addr->country, $result[0]->country);
442 442
     }
443 443
 
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
         $email = new CmsEmail();
456 456
 
457
-        $email->email   = '[email protected]';
457
+        $email->email = '[email protected]';
458 458
 
459 459
         $user->setEmail($email);
460 460
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
         $repository = $this->em->getRepository(CmsUser::class);
606 606
         $result     = $repository
607 607
             ->createNativeNamedQuery('fetchUserPhonenumberCount')
608
-            ->setParameter(1, ['test','FabioBatSilva'])->getResult();
608
+            ->setParameter(1, ['test', 'FabioBatSilva'])->getResult();
609 609
 
610 610
         self::assertCount(2, $result);
611 611
         self::assertInternalType('array', $result[0]);
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 
833 833
         $rsm->addRootEntityFromClassMetadata(CmsUser::class, 'u');
834 834
 
835
-        self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string)$rsm);
835
+        self::assertSQLEquals('u.id AS id0, u.status AS status1, u.username AS username2, u.name AS name3, u.email_id AS email_id4', (string) $rsm);
836 836
     }
837 837
 
838 838
     /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ExtraLazyCollectionTest.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
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->useModelSet('ddc2504');
44 44
         parent::setUp();
45 45
 
46
-        $class       = $this->em->getClassMetadata(CmsUser::class);
46
+        $class = $this->em->getClassMetadata(CmsUser::class);
47 47
 
48 48
         $class->getProperty('groups')->setFetchMode(FetchMode::EXTRA_LAZY);
49 49
         $class->getProperty('articles')->setFetchMode(FetchMode::EXTRA_LAZY);
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 
305 305
         $queryCount = $this->getCurrentQueryCount();
306 306
         self::assertFalse($user->articles->contains($article));
307
-        self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed.");
307
+        self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of persisted entity should cause one query to be executed.");
308 308
         self::assertFalse($user->articles->isInitialized(), "Post-Condition: Collection is not initialized.");
309 309
 
310 310
         // Test One to Many existence with state managed
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 
472 472
         $queryCount = $this->getCurrentQueryCount();
473 473
         self::assertTrue($group->users->contains($user));
474
-        self::assertEquals($queryCount+1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed.");
474
+        self::assertEquals($queryCount + 1, $this->getCurrentQueryCount(), "Checking for contains of managed entity should cause one query to be executed.");
475 475
         self::assertFalse($user->groups->isInitialized(), "Post-Condition: Collection is not initialized.");
476 476
 
477 477
         $newUser = new CmsUser();
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
         $user     = new User();
1252 1252
         $userList = new UserList();
1253 1253
 
1254
-        $user->name     = 'ocramius';
1254
+        $user->name = 'ocramius';
1255 1255
         $userList->listName = 'PHP Developers to follow closely';
1256 1256
 
1257 1257
         $user->addUserList($userList);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -167,12 +167,12 @@
 block discarded – undo
167 167
         $this->em->clear();
168 168
 
169 169
         $dateTimeDb = $this->em->createQueryBuilder()
170
-             ->select('d')
171
-             ->from(DateTimeModel::class, 'd')
172
-             ->where('d.datetime = ?1')
173
-             ->setParameter(1, $date, DBALType::DATETIME)
174
-             ->getQuery()
175
-             ->getSingleResult();
170
+                ->select('d')
171
+                ->from(DateTimeModel::class, 'd')
172
+                ->where('d.datetime = ?1')
173
+                ->setParameter(1, $date, DBALType::DATETIME)
174
+                ->getQuery()
175
+                ->getSingleResult();
176 176
 
177 177
         self::assertInstanceOf(\DateTime::class, $dateTimeDb->datetime);
178 178
         self::assertSame('2009-10-02 20:10:52', $dateTimeDb->datetime->format('Y-m-d H:i:s'));
Please login to merge, or discard this 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
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->em->flush();
32 32
         $this->em->clear();
33 33
 
34
-        $dql = 'SELECT d FROM ' . DecimalModel::class . ' d';
34
+        $dql = 'SELECT d FROM '.DecimalModel::class.' d';
35 35
         $decimal = $this->em->createQuery($dql)->getSingleResult();
36 36
 
37 37
         self::assertSame('0.15', $decimal->decimal);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $this->em->flush();
52 52
         $this->em->clear();
53 53
 
54
-        $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = true';
54
+        $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = true';
55 55
         $bool = $this->em->createQuery($dql)->getSingleResult();
56 56
 
57 57
         self::assertTrue($bool->booleanField);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->em->flush();
62 62
         $this->em->clear();
63 63
 
64
-        $dql = 'SELECT b FROM ' . BooleanModel::class . ' b WHERE b.booleanField = false';
64
+        $dql = 'SELECT b FROM '.BooleanModel::class.' b WHERE b.booleanField = false';
65 65
         $bool = $this->em->createQuery($dql)->getSingleResult();
66 66
 
67 67
         self::assertFalse($bool->booleanField);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $this->em->flush();
78 78
         $this->em->clear();
79 79
 
80
-        $dql = 'SELECT s FROM ' . SerializationModel::class . ' s';
80
+        $dql = 'SELECT s FROM '.SerializationModel::class.' s';
81 81
         $serialize = $this->em->createQuery($dql)->getSingleResult();
82 82
 
83 83
         self::assertSame(["foo" => "bar", "bar" => "baz"], $serialize->array);
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $this->em->flush();
93 93
         $this->em->clear();
94 94
 
95
-        $dql = 'SELECT s FROM ' . SerializationModel::class . ' s';
95
+        $dql = 'SELECT s FROM '.SerializationModel::class.' s';
96 96
         $serialize = $this->em->createQuery($dql)->getSingleResult();
97 97
 
98 98
         self::assertInstanceOf('stdClass', $serialize->object);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/CompositePrimaryKeyTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
         $this->putTripAroundEurope();
113 113
 
114 114
         $dql = 'SELECT t, p, c '
115
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
116
-             . 'INNER JOIN t.pois p '
117
-             . 'INNER JOIN p.country c'
115
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
116
+                . 'INNER JOIN t.pois p '
117
+                . 'INNER JOIN p.country c'
118 118
         ;
119 119
 
120 120
         $tours = $this->em->createQuery($dql)->getResult();
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
         $this->putTripAroundEurope();
135 135
 
136 136
         $dql = 'SELECT t '
137
-             . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
-             . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
-             . 'WHERE p MEMBER OF t.pois'
137
+                . 'FROM Doctrine\Tests\Models\Navigation\NavTour t '
138
+                . ', Doctrine\Tests\Models\Navigation\NavPointOfInterest p '
139
+                . 'WHERE p MEMBER OF t.pois'
140 140
         ;
141 141
 
142 142
         $query = $this->em->createQuery($dql);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC168Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3042Test.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
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             $this
32 32
                 ->em
33 33
                 ->createQuery(
34
-                    'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1'
34
+                    'SELECT f, b FROM '.__NAMESPACE__.'\DDC3042Foo f JOIN '.__NAMESPACE__.'\DDC3042Bar b WITH 1 = 1'
35 35
                 )
36 36
                 ->getSQL()
37 37
         );
Please login to merge, or discard this patch.