Passed
Pull Request — master (#7885)
by Šimon
05:58
created
tests/Doctrine/Tests/ORM/Functional/PostLoadEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -231,8 +231,8 @@  discard block
 block discarded – undo
231 231
         $eventManager->addEventListener([Events::postLoad], $listener);
232 232
 
233 233
         $this->em->find(CmsUser::class, $this->userId);
234
-        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class . ' should be handled once!');
235
-        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class . ' should be handled once!');
234
+        self::assertSame(1, $listener->countHandledEvents(CmsUser::class), CmsUser::class.' should be handled once!');
235
+        self::assertSame(1, $listener->countHandledEvents(CmsEmail::class), CmsEmail::class.' should be handled once!');
236 236
     }
237 237
 
238 238
     private function loadFixture()
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     {
309 309
         $object = $event->getObject();
310 310
         $class  = StaticClassNameConverter::getClass($object);
311
-        if (! isset($this->firedByClasses[$class])) {
311
+        if ( ! isset($this->firedByClasses[$class])) {
312 312
             $this->firedByClasses[$class] = 1;
313 313
         } else {
314 314
             $this->firedByClasses[$class]++;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeValueSqlTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -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() : void
@@ -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/Locking/GearmanLockTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     protected function setUp() : void
25 25
     {
26
-        if (! class_exists('GearmanClient', false)) {
26
+        if ( ! class_exists('GearmanClient', false)) {
27 27
             $this->markTestSkipped('pecl/gearman is required for this test to run.');
28 28
         }
29 29
 
@@ -140,13 +140,13 @@  discard block
 block discarded – undo
140 140
 
141 141
         self::assertTrue(
142 142
             $this->maxRunTime > $forTime,
143
-            'Because of locking this tests should have run at least ' . $forTime . ' seconds, ' .
144
-            'but only did for ' . $this->maxRunTime . ' seconds.'
143
+            'Because of locking this tests should have run at least '.$forTime.' seconds, '.
144
+            'but only did for '.$this->maxRunTime.' seconds.'
145 145
         );
146 146
         self::assertTrue(
147 147
             $this->maxRunTime < $notLongerThan,
148
-            'The longest task should not run longer than ' . $notLongerThan . ' seconds, ' .
149
-            'but did for ' . $this->maxRunTime . ' seconds.'
148
+            'The longest task should not run longer than '.$notLongerThan.' seconds, '.
149
+            'but did for '.$this->maxRunTime.' seconds.'
150 150
         );
151 151
     }
152 152
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/OptimisticTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $test = new OptimisticStandard();
121 121
 
122 122
         for ($i = 0; $i < 5; $i++) {
123
-            $test->name = 'test' . $i;
123
+            $test->name = 'test'.$i;
124 124
 
125 125
             $this->em->persist($test);
126 126
             $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/Ticket/DDC493Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function testIssue() : void
25 25
     {
26
-        $q = $this->em->createQuery('select u, c.data from ' . __NAMESPACE__ . '\\DDC493Distributor u JOIN u.contact c');
26
+        $q = $this->em->createQuery('select u, c.data from '.__NAMESPACE__.'\\DDC493Distributor u JOIN u.contact c');
27 27
 
28 28
         self::assertSQLEquals(
29 29
             'SELECT t0."id" AS c0, t1."data" AS c1, t0."discr" AS c2, t0."contact" AS c3 FROM "DDC493Distributor" t2 INNER JOIN "DDC493Customer" t0 ON t2."id" = t0."id" INNER JOIN "DDC493Contact" t1 ON t0."contact" = t1."id"',
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2224Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     public function testIssue() : Query
26 26
     {
27
-        $dql   = 'SELECT e FROM ' . __NAMESPACE__ . '\DDC2224Entity e WHERE e.field = :field';
27
+        $dql   = 'SELECT e FROM '.__NAMESPACE__.'\DDC2224Entity e WHERE e.field = :field';
28 28
         $query = $this->em->createQuery($dql);
29 29
         $query->setQueryCacheDriver(new ArrayCache());
30 30
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $this->em->flush();
58 58
         $this->em->clear();
59 59
 
60
-        $dql     = 'SELECT a, b, ba, c FROM ' . __NAMESPACE__ . '\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
60
+        $dql     = 'SELECT a, b, ba, c FROM '.__NAMESPACE__.'\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c ORDER BY a.title';
61 61
         $results = $this->em->createQuery($dql)->getResult();
62 62
 
63 63
         self::assertEquals($a1->id, $results[0]->id);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1452Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         $this->em->flush();
52 52
         $this->em->clear();
53 53
 
54
-        $dql     = 'SELECT a, b, ba FROM ' . __NAMESPACE__ . '\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba';
54
+        $dql     = 'SELECT a, b, ba FROM '.__NAMESPACE__.'\DDC1452EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba';
55 55
         $results = $this->em->createQuery($dql)->setMaxResults(1)->getResult();
56 56
 
57 57
         self::assertSame($results[0], $results[0]->entitiesB[0]->entityAFrom);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function testIssue() : void
25 25
     {
26
-        $q = $this->em->createQuery('select u from ' . __NAMESPACE__ . '\\DDC513OfferItem u left join u.price p');
26
+        $q = $this->em->createQuery('select u from '.__NAMESPACE__.'\\DDC513OfferItem u left join u.price p');
27 27
 
28 28
         self::assertSQLEquals(
29 29
             'SELECT t0."id" AS c0, t0."discr" AS c1, t0."price" AS c2 FROM "DDC513OfferItem" t1 INNER JOIN "DDC513Item" t0 ON t1."id" = t0."id" LEFT JOIN "DDC513Price" t2 ON t0."price" = t2."id"',
Please login to merge, or discard this patch.