Completed
Pull Request — master (#7902)
by
unknown
63:54
created
tests/Doctrine/Tests/ORM/Utility/NormalizeIdentifierTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         self::assertSame(\array_keys($expectedId), \array_keys($id));
63 63
 
64 64
         foreach ($expectedId as $field => $value) {
65
-            if (! \is_object($value)) {
65
+            if ( ! \is_object($value)) {
66 66
                 self::assertSame($id[$field], $value);
67 67
 
68 68
                 continue;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Utility/StaticClassNameConverterTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $className      = \array_pop($namespaceParts);
45 45
         $namespace      = \implode('\\', $namespaceParts);
46 46
 
47
-        eval('namespace ' . $namespace . ' { class ' . $className . ' {} }');
47
+        eval('namespace '.$namespace.' { class '.$className.' {} }');
48 48
 
49 49
         self::assertSame($expectedClassName, StaticClassNameConverter::getClass(new $givenClassName()));
50 50
     }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Cache/FileLockRegionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     protected function createRegion()
61 61
     {
62
-        $this->directory = \sys_get_temp_dir() . '/doctrine_lock_' . \uniqid();
62
+        $this->directory = \sys_get_temp_dir().'/doctrine_lock_'.\uniqid();
63 63
 
64 64
         $region = new DefaultRegion('concurren_region_test', $this->cache);
65 65
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $reflectionDirectory->setAccessible(true);
263 263
         $reflectionDirectory->setValue($region, \str_repeat('a', 10000));
264 264
 
265
-        \set_error_handler(static function () {
265
+        \set_error_handler(static function() {
266 266
         }, E_WARNING);
267 267
         self::assertTrue($region->evictAll());
268 268
         \restore_error_handler();
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     {
276 276
         $path = $path ?: $this->directory;
277 277
 
278
-        if (! \is_dir($path)) {
278
+        if ( ! \is_dir($path)) {
279 279
             return;
280 280
         }
281 281
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Performance/SecondLevelCacheTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $size         = 500;
140 140
         $startPersist = \microtime(true);
141 141
 
142
-        echo PHP_EOL . $label;
142
+        echo PHP_EOL.$label;
143 143
 
144 144
         for ($i = 0; $i < $size; $i++) {
145 145
             $em->persist(new Country(\sprintf('Country %d', $i)));
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
         $startPersist = \microtime(true);
174 174
         $country      = new Country('Country');
175 175
 
176
-        echo PHP_EOL . $label;
176
+        echo PHP_EOL.$label;
177 177
 
178 178
         $em->persist($country);
179 179
         $em->flush();
180 180
 
181 181
         for ($i = 0; $i < $size / 2; $i++) {
182
-            $state = new State('State ' . $i, $country);
182
+            $state = new State('State '.$i, $country);
183 183
 
184 184
             $em->persist($state);
185 185
 
@@ -228,10 +228,10 @@  discard block
 block discarded – undo
228 228
         $countries    = [];
229 229
         $startPersist = \microtime(true);
230 230
 
231
-        echo PHP_EOL . $label;
231
+        echo PHP_EOL.$label;
232 232
 
233 233
         for ($i = 0; $i < $size; $i++) {
234
-            $country = new Country('Country ' . $i);
234
+            $country = new Country('Country '.$i);
235 235
 
236 236
             $em->persist($country);
237 237
 
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
         $startPersist = \microtime(true);
264 264
         $rep          = $em->getRepository(Country::class);
265 265
 
266
-        echo PHP_EOL . $label;
266
+        echo PHP_EOL.$label;
267 267
 
268 268
         for ($i = 0; $i < $size; $i++) {
269
-            $em->persist(new Country('Country ' . $i));
269
+            $em->persist(new Country('Country '.$i));
270 270
         }
271 271
 
272 272
         $em->flush();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $reader = new Annotations\CachedReader(new Annotations\AnnotationReader(), new ArrayCache());
65 65
 
66
-        Annotations\AnnotationRegistry::registerFile(__DIR__ . '/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
66
+        Annotations\AnnotationRegistry::registerFile(__DIR__.'/../../../lib/Doctrine/ORM/Annotation/DoctrineAnnotations.php');
67 67
 
68 68
         return new AnnotationDriver($reader, (array) $paths);
69 69
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
100 100
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
101 101
         $config->setMetadataDriverImpl(
102
-            $config->newDefaultAnnotationDriver([\realpath(__DIR__ . '/Models/Cache')])
102
+            $config->newDefaultAnnotationDriver([\realpath(__DIR__.'/Models/Cache')])
103 103
         );
104 104
 
105 105
         if ($this->isSecondLevelCacheEnabled) {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $conn = static::$sharedConn;
347 347
 
348 348
         // In case test is skipped, tearDown is called, but no setup may have run
349
-        if (! $conn) {
349
+        if ( ! $conn) {
350 350
             return;
351 351
         }
352 352
 
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         }
421 421
 
422 422
         if (isset($this->usedModelSets['directorytree'])) {
423
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('file'));
423
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('file'));
424 424
             // MySQL doesn't know deferred deletions therefore only executing the second query gives errors.
425 425
             $conn->executeUpdate('DELETE FROM Directory WHERE parentDirectory_id IS NOT NULL');
426 426
             $conn->executeUpdate('DELETE FROM Directory');
@@ -513,12 +513,12 @@  discard block
 block discarded – undo
513 513
                 )
514 514
             );
515 515
 
516
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-users-groups'));
517
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-group'));
518
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-phone'));
519
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-user'));
520
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-address'));
521
-            $conn->executeUpdate('DELETE FROM ' . $platform->quoteIdentifier('quote-city'));
516
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-users-groups'));
517
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-group'));
518
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-phone'));
519
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-user'));
520
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-address'));
521
+            $conn->executeUpdate('DELETE FROM '.$platform->quoteIdentifier('quote-city'));
522 522
         }
523 523
 
524 524
         if (isset($this->usedModelSets['vct_onetoone'])) {
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         $classes = [];
631 631
 
632 632
         foreach ($classNames as $className) {
633
-            if (! isset(static::$entityTablesCreated[$className])) {
633
+            if ( ! isset(static::$entityTablesCreated[$className])) {
634 634
                 static::$entityTablesCreated[$className] = true;
635 635
                 $classes[]                               = $this->em->getClassMetadata($className);
636 636
             }
@@ -649,25 +649,25 @@  discard block
 block discarded – undo
649 649
     {
650 650
         $this->setUpDBALTypes();
651 651
 
652
-        if (! isset(static::$sharedConn)) {
652
+        if ( ! isset(static::$sharedConn)) {
653 653
             static::$sharedConn = TestUtil::getConnection();
654 654
         }
655 655
 
656 656
         if (isset($GLOBALS['DOCTRINE_MARK_SQL_LOGS'])) {
657 657
             if (\in_array(static::$sharedConn->getDatabasePlatform()->getName(), ['mysql', 'postgresql'], true)) {
658
-                static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/');
658
+                static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/');
659 659
             } elseif (static::$sharedConn->getDatabasePlatform()->getName() === 'oracle') {
660
-                static::$sharedConn->executeQuery('SELECT 1 /*' . static::class . '*/ FROM dual');
660
+                static::$sharedConn->executeQuery('SELECT 1 /*'.static::class.'*/ FROM dual');
661 661
             }
662 662
         }
663 663
 
664
-        if (! $this->em) {
664
+        if ( ! $this->em) {
665 665
             $this->em         = $this->getEntityManager();
666 666
             $this->schemaTool = new SchemaTool($this->em);
667 667
         }
668 668
 
669 669
         foreach ($this->usedModelSets as $setName => $bool) {
670
-            if (! isset(static::$tablesCreated[$setName])) {
670
+            if ( ! isset(static::$tablesCreated[$setName])) {
671 671
                 $this->setUpEntitySchema(static::$modelSets[$setName]);
672 672
 
673 673
                 static::$tablesCreated[$setName] = true;
@@ -742,8 +742,8 @@  discard block
 block discarded – undo
742 742
 
743 743
         $config->setMetadataDriverImpl(
744 744
             $mappingDriver ?? $config->newDefaultAnnotationDriver([
745
-                \realpath(__DIR__ . '/Models/Cache'),
746
-                \realpath(__DIR__ . '/Models/GeoNames'),
745
+                \realpath(__DIR__.'/Models/Cache'),
746
+                \realpath(__DIR__.'/Models/GeoNames'),
747 747
             ])
748 748
         );
749 749
 
@@ -791,13 +791,13 @@  discard block
 block discarded – undo
791 791
 
792 792
             foreach ($last25queries as $i => $query) {
793 793
                 $params = \array_map(
794
-                    static function ($p) {
794
+                    static function($p) {
795 795
                         return \is_object($p) ? \get_class($p) : \var_export($p, true);
796 796
                     },
797 797
                     $query['params'] ?: []
798 798
                 );
799 799
 
800
-                $queries .= $i . ". SQL: '" . $query['sql'] . "' Params: " . \implode(', ', $params) . PHP_EOL;
800
+                $queries .= $i.". SQL: '".$query['sql']."' Params: ".\implode(', ', $params).PHP_EOL;
801 801
             }
802 802
 
803 803
             $trace    = $e->getTrace();
@@ -810,11 +810,11 @@  discard block
 block discarded – undo
810 810
                         break;
811 811
                     }
812 812
 
813
-                    $traceMsg .= $part['file'] . ':' . $part['line'] . PHP_EOL;
813
+                    $traceMsg .= $part['file'].':'.$part['line'].PHP_EOL;
814 814
                 }
815 815
             }
816 816
 
817
-            $message = '[' . \get_class($e) . '] ' . $e->getMessage() . PHP_EOL . PHP_EOL . 'With queries:' . PHP_EOL . $queries . PHP_EOL . 'Trace:' . PHP_EOL . $traceMsg;
817
+            $message = '['.\get_class($e).'] '.$e->getMessage().PHP_EOL.PHP_EOL.'With queries:'.PHP_EOL.$queries.PHP_EOL.'Trace:'.PHP_EOL.$traceMsg;
818 818
 
819 819
             throw new Exception($message, (int) $e->getCode(), $e);
820 820
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmPerformanceTestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function setMaxRunningTime($maxRunningTime)
43 43
     {
44
-        if (! (\is_int($maxRunningTime) && $maxRunningTime >= 0)) {
44
+        if ( ! (\is_int($maxRunningTime) && $maxRunningTime >= 0)) {
45 45
             throw new InvalidArgumentException();
46 46
         }
47 47
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/HydratorMockStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     public function fetchColumn($columnNumber = 0)
45 45
     {
46 46
         $row = \current($this->resultSet);
47
-        if (! \is_array($row)) {
47
+        if ( ! \is_array($row)) {
48 48
             return false;
49 49
         }
50 50
         $val = \array_shift($row);
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/ConnectionMock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     public function quote($input, $type = null)
117 117
     {
118 118
         if (\is_string($input)) {
119
-            return "'" . $input . "'";
119
+            return "'".$input."'";
120 120
         }
121 121
 
122 122
         return $input;
Please login to merge, or discard this patch.