Completed
Pull Request — master (#7405)
by Michael
68:49 queued 63:08
created
tests/Doctrine/Tests/ORM/Query/LanguageRecognitionTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             $this->addToAssertionCount(1);
30 30
         } catch (QueryException $e) {
31 31
             if ($debug) {
32
-                echo $e->getTraceAsString() . PHP_EOL;
32
+                echo $e->getTraceAsString().PHP_EOL;
33 33
             }
34 34
 
35 35
             $this->fail($e->getMessage());
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
             $this->fail('No syntax errors were detected, when syntax errors were expected');
45 45
         } catch (QueryException $e) {
46 46
             if ($debug) {
47
-                echo $e->getMessage() . PHP_EOL;
48
-                echo $e->getTraceAsString() . PHP_EOL;
47
+                echo $e->getMessage().PHP_EOL;
48
+                echo $e->getTraceAsString().PHP_EOL;
49 49
             }
50 50
             $this->addToAssertionCount(1);
51 51
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             ['SELECT foo: FROM Doctrine\Tests\Models\CMS\CmsUser foo:'],
108 108
 
109 109
             /* Checks for invalid AbstractSchemaName */
110
-            ['SELECT u FROM UnknownClass u'],  // unknown
110
+            ['SELECT u FROM UnknownClass u'], // unknown
111 111
             ['SELECT u FROM \Unknown\Class u'], // unknown, leading backslash
112 112
             ['SELECT u FROM Unknown\\\\Class u'], // unknown, syntactically bogus (duplicate \\)
113 113
             ['SELECT u FROM Unknown\Class\ u'], // unknown, syntactically bogus (trailing \)
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
      */
574 574
     public function testDQLKeywordInJoinIsAllowed() : void
575 575
     {
576
-        self::assertValidDQL('SELECT u FROM ' . __NAMESPACE__ . '\DQLKeywordsModelUser u JOIN u.group g');
576
+        self::assertValidDQL('SELECT u FROM '.__NAMESPACE__.'\DQLKeywordsModelUser u JOIN u.group g');
577 577
     }
578 578
 
579 579
     /**
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
      */
582 582
     public function testDQLKeywordInConditionIsAllowed() : void
583 583
     {
584
-        self::assertValidDQL('SELECT g FROM ' . __NAMESPACE__ . '\DQLKeywordsModelGroup g WHERE g.from=0');
584
+        self::assertValidDQL('SELECT g FROM '.__NAMESPACE__.'\DQLKeywordsModelGroup g WHERE g.from=0');
585 585
     }
586 586
 
587 587
     /* The exception is currently thrown in the SQLWalker, not earlier.
@@ -686,7 +686,7 @@  discard block
 block discarded – undo
686 686
      */
687 687
     public function testNewLiteralExpression() : void
688 688
     {
689
-        self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
689
+        self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', 1, true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
690 690
     }
691 691
 
692 692
     /**
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
      */
695 695
     public function testNewLiteralWithSubselectExpression() : void
696 696
     {
697
-        self::assertValidDQL('SELECT new ' . __NAMESPACE__ . "\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
697
+        self::assertValidDQL('SELECT new '.__NAMESPACE__."\\DummyStruct(u.id, 'foo', (SELECT 1 FROM Doctrine\Tests\Models\CMS\CmsUser su), true) FROM Doctrine\Tests\Models\CMS\CmsUser u");
698 698
     }
699 699
 
700 700
     public function testStringPrimaryAcceptsAggregateExpression() : void
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/GH7286Test.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $query = $this->em->createQuery(
41 41
             'SELECT CONCAT(e.type, MIN(e.version)) pair'
42
-            . ' FROM ' . GH7286Entity::class . ' e'
42
+            . ' FROM '.GH7286Entity::class.' e'
43 43
             . ' WHERE e.type IS NOT NULL'
44 44
             . ' GROUP BY e.type'
45 45
             . ' ORDER BY e.type'
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $query = $this->em->createQuery(
65 65
             'SELECT CC(e.type, MIN(e.version)) pair'
66
-            . ' FROM ' . GH7286Entity::class . ' e'
66
+            . ' FROM '.GH7286Entity::class.' e'
67 67
             . ' WHERE e.type IS NOT NULL AND e.type != :type'
68 68
             . ' GROUP BY e.type'
69 69
         );
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/XmlMappingDriverTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 {
28 28
     protected function loadDriver()
29 29
     {
30
-        return new XmlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'xml');
30
+        return new XmlDriver(__DIR__.DIRECTORY_SEPARATOR.'xml');
31 31
     }
32 32
 
33 33
     public function testClassTableInheritanceDiscriminatorMap() : void
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function testValidateXmlSchema($xmlMappingFile) : void
172 172
     {
173
-        $xsdSchemaFile = __DIR__ . '/../../../../../doctrine-mapping.xsd';
173
+        $xsdSchemaFile = __DIR__.'/../../../../../doctrine-mapping.xsd';
174 174
         $dom           = new \DOMDocument();
175 175
 
176 176
         $dom->load($xmlMappingFile);
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 
181 181
     public static function dataValidSchema()
182 182
     {
183
-        $list    = glob(__DIR__ . '/xml/*.xml');
183
+        $list    = glob(__DIR__.'/xml/*.xml');
184 184
         $invalid = ['Doctrine.Tests.Models.DDC889.DDC889Class.dcm'];
185 185
 
186
-        $list = array_filter($list, function ($item) use ($invalid) {
186
+        $list = array_filter($list, function($item) use ($invalid) {
187 187
             return ! in_array(pathinfo($item, PATHINFO_FILENAME), $invalid, true);
188 188
         });
189 189
 
190
-        return array_map(function ($item) {
190
+        return array_map(function($item) {
191 191
             return [$item];
192 192
         }, $list);
193 193
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     {
291 291
         $query = new Query($this);
292 292
 
293
-        if (! empty($dql)) {
293
+        if ( ! empty($dql)) {
294 294
             $query->setDQL($dql);
295 295
         }
296 296
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
             $this->checkLockRequirements($lockMode, $class);
382 382
         }
383 383
 
384
-        if (! is_array($id)) {
384
+        if ( ! is_array($id)) {
385 385
             if ($class->isIdentifierComposite()) {
386 386
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
387 387
             }
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         $sortedId = [];
403 403
 
404 404
         foreach ($class->identifier as $identifier) {
405
-            if (! isset($id[$identifier])) {
405
+            if ( ! isset($id[$identifier])) {
406 406
                 throw MissingIdentifierField::fromFieldAndClass($identifier, $className);
407 407
             }
408 408
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         // Check identity map first
420 420
         $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName());
421 421
         if ($entity !== false) {
422
-            if (! ($entity instanceof $className)) {
422
+            if ( ! ($entity instanceof $className)) {
423 423
                 return null;
424 424
             }
425 425
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
465 465
         $className = $class->getClassName();
466 466
 
467
-        if (! is_array($id)) {
467
+        if ( ! is_array($id)) {
468 468
             if ($class->isIdentifierComposite()) {
469 469
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
470 470
             }
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
         $sortedId = [];
490 490
 
491 491
         foreach ($class->identifier as $identifier) {
492
-            if (! isset($scalarId[$identifier])) {
492
+            if ( ! isset($scalarId[$identifier])) {
493 493
                 throw MissingIdentifierField::fromFieldAndClass($identifier, $className);
494 494
             }
495 495
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
531 531
         $className = $class->getClassName();
532 532
 
533
-        if (! is_array($id)) {
533
+        if ( ! is_array($id)) {
534 534
             if ($class->isIdentifierComposite()) {
535 535
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
536 536
             }
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
         $sortedId = [];
552 552
 
553 553
         foreach ($class->identifier as $identifier) {
554
-            if (! isset($id[$identifier])) {
554
+            if ( ! isset($id[$identifier])) {
555 555
                 throw MissingIdentifierField::fromFieldAndClass($identifier, $className);
556 556
             }
557 557
 
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
      */
625 625
     public function persist($entity)
626 626
     {
627
-        if (! is_object($entity)) {
627
+        if ( ! is_object($entity)) {
628 628
             throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
629 629
         }
630 630
 
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
      */
647 647
     public function remove($entity)
648 648
     {
649
-        if (! is_object($entity)) {
649
+        if ( ! is_object($entity)) {
650 650
             throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
651 651
         }
652 652
 
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
      */
667 667
     public function refresh($entity)
668 668
     {
669
-        if (! is_object($entity)) {
669
+        if ( ! is_object($entity)) {
670 670
             throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
671 671
         }
672 672
 
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
      */
822 822
     public static function create($connection, Configuration $config, ?EventManager $eventManager = null)
823 823
     {
824
-        if (! $config->getMetadataDriverImpl()) {
824
+        if ( ! $config->getMetadataDriverImpl()) {
825 825
             throw MissingMappingDriverImplementation::create();
826 826
         }
827 827
 
@@ -848,12 +848,12 @@  discard block
 block discarded – undo
848 848
             return DriverManager::getConnection($connection, $config, $eventManager ?: new EventManager());
849 849
         }
850 850
 
851
-        if (! $connection instanceof Connection) {
851
+        if ( ! $connection instanceof Connection) {
852 852
             throw new \InvalidArgumentException(
853 853
                 sprintf(
854 854
                     'Invalid $connection argument of type %s given%s.',
855 855
                     is_object($connection) ? get_class($connection) : gettype($connection),
856
-                    is_object($connection) ? '' : ': "' . $connection . '"'
856
+                    is_object($connection) ? '' : ': "'.$connection.'"'
857 857
                 )
858 858
             );
859 859
         }
@@ -901,13 +901,13 @@  discard block
 block discarded – undo
901 901
     {
902 902
         switch ($lockMode) {
903 903
             case LockMode::OPTIMISTIC:
904
-                if (! $class->isVersioned()) {
904
+                if ( ! $class->isVersioned()) {
905 905
                     throw OptimisticLockException::notVersioned($class->getClassName());
906 906
                 }
907 907
                 break;
908 908
             case LockMode::PESSIMISTIC_READ:
909 909
             case LockMode::PESSIMISTIC_WRITE:
910
-                if (! $this->getConnection()->isTransactionActive()) {
910
+                if ( ! $this->getConnection()->isTransactionActive()) {
911 911
                     throw TransactionRequiredException::transactionRequired();
912 912
                 }
913 913
         }
Please login to merge, or discard this patch.