Completed
Pull Request — master (#7046)
by Gabriel
12:18
created
Doctrine/Tests/Models/CompositeKeyInheritance/JoinedDerivedChildClass.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\Models\CompositeKeyInheritance;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Cache/Attraction.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\Models\Cache;
6 6
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function addInfo(AttractionInfo $info)
91 91
     {
92
-        if (! $this->infos->contains($info)) {
92
+        if ( ! $this->infos->contains($info)) {
93 93
             $this->infos->add($info);
94 94
         }
95 95
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Cache/Traveler.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\Models\Cache;
6 6
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function addTravel(Travel $item)
97 97
     {
98
-        if (! $this->travels->contains($item)) {
98
+        if ( ! $this->travels->contains($item)) {
99 99
             $this->travels->add($item);
100 100
         }
101 101
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/ManyToManyPersister/ParentClass.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\Models\ManyToManyPersister;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/CMS/CmsComment.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\Models\CMS;
6 6
 
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function __toString()
41 41
     {
42
-        return __CLASS__ . '[id=' . $this->id . ']';
42
+        return __CLASS__.'[id='.$this->id.']';
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmTestCase.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;
6 6
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache());
68 68
 
69
-        Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
69
+        Annotations\AnnotationRegistry::registerFile(__DIR__.'/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
70 70
 
71 71
         return new AnnotationDriver($reader, (array) $paths);
72 72
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
106 106
         $config->setMetadataDriverImpl(
107 107
             $config->newDefaultAnnotationDriver([
108
-                realpath(__DIR__ . '/Models/Cache'),
108
+                realpath(__DIR__.'/Models/Cache'),
109 109
             ])
110 110
         );
111 111
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +21 added lines, -21 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;
6 6
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $conn = static::$sharedConn;
337 337
 
338 338
         // In case test is skipped, tearDown is called, but no setup may have run
339
-        if (! $conn) {
339
+        if ( ! $conn) {
340 340
             return;
341 341
         }
342 342
 
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         }
411 411
 
412 412
         if (isset($this->usedModelSets['directorytree'])) {
413
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file'));
413
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file'));
414 414
             // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
415 415
             $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
416 416
             $conn->executeUpdate('DELETE FROM Directory');
@@ -503,12 +503,12 @@  discard block
 block discarded – undo
503 503
                 )
504 504
             );
505 505
 
506
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups'));
507
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group'));
508
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone'));
509
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user'));
510
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address'));
511
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city'));
506
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups'));
507
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group'));
508
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone'));
509
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user'));
510
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address'));
511
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city'));
512 512
         }
513 513
 
514 514
         if (isset($this->usedModelSets['vct_onetoone'])) {
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
         $classes = [];
623 623
 
624 624
         foreach ($classNames as $className) {
625
-            if (! isset(static::$entityTablesCreated[$className])) {
625
+            if ( ! isset(static::$entityTablesCreated[$className])) {
626 626
                 static::$entityTablesCreated[$className] = true;
627 627
                 $classes[] = $this->em->getClassMetadata($className);
628 628
             }
@@ -643,25 +643,25 @@  discard block
 block discarded – undo
643 643
     {
644 644
         $this->setUpDBALTypes();
645 645
 
646
-        if (! isset(static::$sharedConn)) {
646
+        if ( ! isset(static::$sharedConn)) {
647 647
             static::$sharedConn = TestUtil::getConnection();
648 648
         }
649 649
 
650 650
         if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
651 651
             if (in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) {
652
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/');
652
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/');
653 653
             } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') {
654
-                static::$sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual');
654
+                static::$sharedConn->executeQuery('SELECT 1 /*'.get_class($this).'*/ FROM dual');
655 655
             }
656 656
         }
657 657
 
658
-        if (! $this->em) {
658
+        if ( ! $this->em) {
659 659
             $this->em = $this->getEntityManager();
660 660
             $this->schemaTool = new SchemaTool($this->em);
661 661
         }
662 662
 
663 663
         foreach ($this->usedModelSets as $setName => $bool) {
664
-            if (! isset(static::$tablesCreated[$setName])) {
664
+            if ( ! isset(static::$tablesCreated[$setName])) {
665 665
                 $this->setUpEntitySchema(static::$modelSets[$setName]);
666 666
 
667 667
                 static::$tablesCreated[$setName] = true;
@@ -736,8 +736,8 @@  discard block
 block discarded – undo
736 736
 
737 737
         $config->setMetadataDriverImpl(
738 738
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
739
-                realpath(__DIR__ . '/Models/Cache'),
740
-                realpath(__DIR__ . '/Models/GeoNames'),
739
+                realpath(__DIR__.'/Models/Cache'),
740
+                realpath(__DIR__.'/Models/GeoNames'),
741 741
             ])
742 742
         );
743 743
 
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
                     $query['params'] ?: []
796 796
                 );
797 797
 
798
-                $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . implode(', ', $params) . PHP_EOL;
798
+                $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(', ', $params).PHP_EOL;
799 799
             }
800 800
 
801 801
             $trace = $e->getTrace();
@@ -808,13 +808,13 @@  discard block
 block discarded – undo
808 808
                         break;
809 809
                     }
810 810
 
811
-                    $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL;
811
+                    $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL;
812 812
                 }
813 813
             }
814 814
 
815
-            $message = '[' . get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg;
815
+            $message = '['.get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg;
816 816
 
817
-            throw new \Exception($message, (int)$e->getCode(), $e);
817
+            throw new \Exception($message, (int) $e->getCode(), $e);
818 818
         }
819 819
 
820 820
         throw $e;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.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\Performance;
6 6
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $size         = 500;
134 134
         $startPersist = microtime(true);
135 135
 
136
-        echo PHP_EOL . $label;
136
+        echo PHP_EOL.$label;
137 137
 
138 138
         for ($i = 0; $i < $size; $i++) {
139 139
             $em->persist(new Country("Country $i"));
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $startPersist = microtime(true);
168 168
         $country      = new Country('Country');
169 169
 
170
-        echo PHP_EOL . $label;
170
+        echo PHP_EOL.$label;
171 171
 
172 172
         $em->persist($country);
173 173
         $em->flush();
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
         $em->flush();
198 198
         $em->clear();
199 199
 
200
-        printf("\n[%s] persist %s states and %s cities", number_format( microtime(true) - $startPersist, 6), count($states), count($cities));
200
+        printf("\n[%s] persist %s states and %s cities", number_format(microtime(true) - $startPersist, 6), count($states), count($cities));
201 201
 
202
-        $startFind  = microtime(true);
202
+        $startFind = microtime(true);
203 203
 
204 204
         for ($i = 0; $i < $times; $i++) {
205 205
             foreach ($states as $state) {
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         $countries    = [];
223 223
         $startPersist = microtime(true);
224 224
 
225
-        echo PHP_EOL . $label;
225
+        echo PHP_EOL.$label;
226 226
 
227 227
         for ($i = 0; $i < $size; $i++) {
228 228
             $country = new Country("Country $i");
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
         printf("\n[%s] persist %s countries", number_format(microtime(true) - $startPersist, 6), $size);
239 239
 
240
-        $startFind  = microtime(true);
240
+        $startFind = microtime(true);
241 241
 
242 242
         for ($i = 0; $i <= $times; $i++) {
243 243
             foreach ($countries as $country) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $startPersist = microtime(true);
258 258
         $rep          = $em->getRepository(Country::class);
259 259
 
260
-        echo PHP_EOL . $label;
260
+        echo PHP_EOL.$label;
261 261
 
262 262
         for ($i = 0; $i < $size; $i++) {
263 263
             $em->persist(new Country("Country $i"));
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
         printf("\n[%s] persist %s countries", number_format(microtime(true) - $startPersist, 6), $size);
270 270
 
271
-        $startFind  = microtime(true);
271
+        $startFind = microtime(true);
272 272
 
273 273
         for ($i = 0; $i <= $times; $i++) {
274 274
             $list = $rep->findAll();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Query/CustomTreeWalkersTest.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;
6 6
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         try {
43 43
             $sqlGenerated = $this->generateSql($dqlToBeTested, $treeWalkers, $outputWalker);
44 44
         } catch (\Exception $e) {
45
-            $this->fail($e->getMessage() . ' at "' . $e->getFile() . '" on line ' . $e->getLine());
45
+            $this->fail($e->getMessage().' at "'.$e->getFile().'" on line '.$e->getLine());
46 46
         }
47 47
 
48 48
         self::assertEquals($sqlToBeConfirmed, $sqlGenerated);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             $condExpr = $whereClause->conditionalExpression;
142 142
 
143 143
             // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
144
-            if (! ($condExpr instanceof Query\AST\ConditionalExpression)) {
144
+            if ( ! ($condExpr instanceof Query\AST\ConditionalExpression)) {
145 145
                 $condExpr = new Query\AST\ConditionalExpression([$condExpr]);
146 146
 
147 147
                 $whereClause->conditionalExpression = $condExpr;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 $singleTerm = $selectStatement->whereClause->conditionalExpression->conditionalTerms[0];
165 165
 
166 166
                 // Since Phase 1 AST optimizations were included, we need to re-add the ConditionalExpression
167
-                if (! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
167
+                if ( ! ($singleTerm instanceof Query\AST\ConditionalTerm)) {
168 168
                     $singleTerm = new Query\AST\ConditionalTerm([$singleTerm]);
169 169
 
170 170
                     $selectStatement->whereClause->conditionalExpression->conditionalTerms[0] = $singleTerm;
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
     {
203 203
         $rangeVariableDecl       = $identificationVariableDecl->rangeVariableDeclaration;
204 204
         $joinAssocPathExpression = new Query\AST\JoinAssociationPathExpression($rangeVariableDecl->aliasIdentificationVariable, 'address');
205
-        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable . 'a', null);
205
+        $joinAssocDeclaration    = new Query\AST\JoinAssociationDeclaration($joinAssocPathExpression, $rangeVariableDecl->aliasIdentificationVariable.'a', null);
206 206
         $join                    = new Query\AST\Join(Query\AST\Join::JOIN_TYPE_LEFT, $joinAssocDeclaration);
207
-        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable . 'a', null, false);
207
+        $selectExpression        = new Query\AST\SelectExpression($rangeVariableDecl->aliasIdentificationVariable.'a', null, false);
208 208
 
209 209
         $identificationVariableDecl->joins[]                = $join;
210 210
         $selectStatement->selectClause->selectExpressions[] = $selectExpression;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $userMetadata    = $entityManager->getClassMetadata(CmsUser::class);
214 214
         $addressMetadata = $entityManager->getClassMetadata(CmsAddress::class);
215 215
 
216
-        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable . 'a',
216
+        $this->setQueryComponent($rangeVariableDecl->aliasIdentificationVariable.'a',
217 217
             [
218 218
                 'metadata'     => $addressMetadata,
219 219
                 'parent'       => $rangeVariableDecl->aliasIdentificationVariable,
Please login to merge, or discard this patch.