Completed
Pull Request — master (#7430)
by Gabriel
69:43 queued 07:29
created
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.