Completed
Pull Request — master (#7046)
by Gabriel
12:39
created
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.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
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $this->em->flush();
44 44
         $this->em->clear();
45 45
 
46
-        $children = $this->em->createQuery('select c,p from ' . __NAMESPACE__ . '\DDC371Child c '
46
+        $children = $this->em->createQuery('select c,p from '.__NAMESPACE__.'\DDC371Child c '
47 47
                 . 'left join c.parent p where c.id = 1 and p.id = 1')
48 48
                 ->setHint(Query::HINT_REFRESH, true)
49 49
                 ->getResult();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.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
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             $this->em->persist($group);
38 38
             $this->em->flush();
39 39
 
40
-            if (! $user->getGroups()->contains($group)) {
40
+            if ( ! $user->getGroups()->contains($group)) {
41 41
                 $user->getGroups()->add($group);
42 42
                 $group->getUsers()->add($user);
43 43
                 $this->em->flush();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH6141Test.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
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function convertToDatabaseValue($value, AbstractPlatform $platform)
80 80
     {
81
-        if (! $value instanceof GH6141People) {
81
+        if ( ! $value instanceof GH6141People) {
82 82
             $value = GH6141People::get($value);
83 83
         }
84 84
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public static function get($value)
123 123
     {
124
-        if (! self::isValid($value)) {
124
+        if ( ! self::isValid($value)) {
125 125
             throw new \InvalidArgumentException();
126 126
         }
127 127
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.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\Functional;
6 6
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function testIssue2059()
32 32
     {
33
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
33
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
34 34
             $this->markTestSkipped('Platform does not support foreign keys.');
35 35
         }
36 36
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     public function testLoadMetadataFromDatabase()
54 54
     {
55
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
55
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
56 56
             $this->markTestSkipped('Platform does not support foreign keys.');
57 57
         }
58 58
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     public function testLoadMetadataWithForeignKeyFromDatabase()
92 92
     {
93
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
93
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
94 94
             $this->markTestSkipped('Platform does not support foreign keys.');
95 95
         }
96 96
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
     public function testDetectManyToManyTables()
125 125
     {
126
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
126
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
127 127
             $this->markTestSkipped('Platform does not support foreign keys.');
128 128
         }
129 129
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function testLoadMetadataFromDatabaseDetail()
165 165
     {
166
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
166
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
167 167
             $this->markTestSkipped('Platform does not support foreign keys.');
168 168
         }
169 169
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
         $table->addColumn('column_index1', 'string');
180 180
         $table->addColumn('column_index2', 'string');
181
-        $table->addIndex(['column_index1','column_index2'], 'index1');
181
+        $table->addIndex(['column_index1', 'column_index2'], 'index1');
182 182
 
183 183
         $table->addColumn('column_unique_index1', 'string');
184 184
         $table->addColumn('column_unique_index2', 'string');
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
         // FIXME: Condition here is fugly.
204 204
         // NOTE: PostgreSQL and SQL SERVER do not support UNSIGNED integer
205
-        if (! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and
205
+        if ( ! $this->em->getConnection()->getDatabasePlatform() instanceof PostgreSqlPlatform and
206 206
              ! $this->em->getConnection()->getDatabasePlatform() instanceof SQLServerPlatform) {
207 207
             self::assertNotNull($metadata->getProperty('columnUnsigned'));
208 208
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
         self::assertNotEmpty($indexes['index1']['columns']);
246 246
         self::assertEquals(
247
-            ['column_index1','column_index2'],
247
+            ['column_index1', 'column_index2'],
248 248
             $indexes['index1']['columns']
249 249
         );
250 250
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTestCase.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
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $driver = new DatabaseDriver($sm);
57 57
 
58 58
         foreach ($driver->getAllClassNames() as $className) {
59
-            if (! in_array(strtolower($className), $classNames, true)) {
59
+            if ( ! in_array(strtolower($className), $classNames, true)) {
60 60
                 continue;
61 61
             }
62 62
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         }
69 69
 
70 70
         if (count($metadatas) != count($classNames)) {
71
-            $this->fail("Have not found all classes matching the names '" . implode(', ', $classNames) . "' only tables " . implode(', ', array_keys($metadatas)));
71
+            $this->fail("Have not found all classes matching the names '".implode(', ', $classNames)."' only tables ".implode(', ', array_keys($metadatas)));
72 72
         }
73 73
         return $metadatas;
74 74
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php 1 patch
Spacing   +7 added lines, -7 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
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         while ($worker->work()) {
30 30
             if ($worker->returnCode() != GEARMAN_SUCCESS) {
31
-                echo 'return_code: ' . $worker->returnCode() . "\n";
31
+                echo 'return_code: '.$worker->returnCode()."\n";
32 32
                 break;
33 33
             }
34 34
         }
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
     protected function processWorkload($job)
81 81
     {
82
-        echo 'Received job: ' . $job->handle() . ' for function ' . $job->functionName() . "\n";
82
+        echo 'Received job: '.$job->handle().' for function '.$job->functionName()."\n";
83 83
 
84 84
         $workload = $job->workload();
85 85
         $workload = unserialize($workload);
86 86
 
87
-        if (! isset($workload['conn']) || ! is_array($workload['conn'])) {
87
+        if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) {
88 88
             throw new \InvalidArgumentException('Missing Database parameters');
89 89
         }
90 90
 
91 91
         $this->em = $this->createEntityManager($workload['conn']);
92 92
 
93
-        if (! isset($workload['fixture'])) {
93
+        if ( ! isset($workload['fixture'])) {
94 94
             throw new \InvalidArgumentException('Missing Fixture parameters');
95 95
         }
96 96
         return $workload['fixture'];
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
     protected function createEntityManager($conn)
100 100
     {
101 101
         $config = new Configuration();
102
-        $config->setProxyDir(__DIR__ . '/../../../Proxies');
102
+        $config->setProxyDir(__DIR__.'/../../../Proxies');
103 103
         $config->setProxyNamespace('MyProject\Proxies');
104 104
         $config->setAutoGenerateProxyClasses(true);
105 105
 
106
-        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']);
106
+        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']);
107 107
         $config->setMetadataDriverImpl($annotDriver);
108 108
 
109 109
         $cache = new ArrayCache();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockTest.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\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/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/SchemaTool/CompanySchemaTest.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\SchemaTool;
6 6
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function testDropPartSchemaWithForeignKeys()
59 59
     {
60
-        if (! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
60
+        if ( ! $this->em->getConnection()->getDatabasePlatform()->supportsForeignKeyConstraints()) {
61 61
             $this->markTestSkipped('Foreign Key test');
62 62
         }
63 63
 
Please login to merge, or discard this patch.