Passed
Pull Request — master (#7075)
by
unknown
19:00
created
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +17 added lines, -17 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\ORM;
6 6
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     {
286 286
         $query = new Query($this);
287 287
 
288
-        if (! empty($dql)) {
288
+        if ( ! empty($dql)) {
289 289
             $query->setDQL($dql);
290 290
         }
291 291
 
@@ -387,18 +387,18 @@  discard block
 block discarded – undo
387 387
 
388 388
         switch ($lockMode) {
389 389
             case LockMode::OPTIMISTIC:
390
-                if (! $class->isVersioned()) {
390
+                if ( ! $class->isVersioned()) {
391 391
                     throw OptimisticLockException::notVersioned($className);
392 392
                 }
393 393
             // Intentional fallthrough
394 394
             case LockMode::PESSIMISTIC_READ:
395 395
             case LockMode::PESSIMISTIC_WRITE:
396
-                if (! $this->getConnection()->isTransactionActive()) {
396
+                if ( ! $this->getConnection()->isTransactionActive()) {
397 397
                     throw TransactionRequiredException::transactionRequired();
398 398
                 }
399 399
         }
400 400
 
401
-        if (! is_array($id)) {
401
+        if ( ! is_array($id)) {
402 402
             if ($class->isIdentifierComposite()) {
403 403
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
404 404
             }
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         $sortedId = [];
420 420
 
421 421
         foreach ($class->identifier as $identifier) {
422
-            if (! isset($id[$identifier])) {
422
+            if ( ! isset($id[$identifier])) {
423 423
                 throw ORMException::missingIdentifierField($className, $identifier);
424 424
             }
425 425
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
         // Check identity map first
437 437
         $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName());
438 438
         if ($entity !== false) {
439
-            if (! ($entity instanceof $className)) {
439
+            if ( ! ($entity instanceof $className)) {
440 440
                 return null;
441 441
             }
442 442
 
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
482 482
         $className = $class->getClassName();
483 483
 
484
-        if (! is_array($id)) {
484
+        if ( ! is_array($id)) {
485 485
             if ($class->isIdentifierComposite()) {
486 486
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
487 487
             }
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         $sortedId = [];
507 507
 
508 508
         foreach ($class->identifier as $identifier) {
509
-            if (! isset($scalarId[$identifier])) {
509
+            if ( ! isset($scalarId[$identifier])) {
510 510
                 throw ORMException::missingIdentifierField($className, $identifier);
511 511
             }
512 512
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
548 548
         $className = $class->getClassName();
549 549
 
550
-        if (! is_array($id)) {
550
+        if ( ! is_array($id)) {
551 551
             if ($class->isIdentifierComposite()) {
552 552
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
553 553
             }
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
         $sortedId = [];
569 569
 
570 570
         foreach ($class->identifier as $identifier) {
571
-            if (! isset($id[$identifier])) {
571
+            if ( ! isset($id[$identifier])) {
572 572
                 throw ORMException::missingIdentifierField($className, $identifier);
573 573
             }
574 574
 
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
      */
642 642
     public function persist($entity)
643 643
     {
644
-        if (! is_object($entity)) {
644
+        if ( ! is_object($entity)) {
645 645
             throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
646 646
         }
647 647
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
      */
664 664
     public function remove($entity)
665 665
     {
666
-        if (! is_object($entity)) {
666
+        if ( ! is_object($entity)) {
667 667
             throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
668 668
         }
669 669
 
@@ -683,7 +683,7 @@  discard block
 block discarded – undo
683 683
      */
684 684
     public function refresh($entity)
685 685
     {
686
-        if (! is_object($entity)) {
686
+        if ( ! is_object($entity)) {
687 687
             throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
688 688
         }
689 689
 
@@ -838,7 +838,7 @@  discard block
 block discarded – undo
838 838
      */
839 839
     public static function create($connection, Configuration $config, ?EventManager $eventManager = null)
840 840
     {
841
-        if (! $config->getMetadataDriverImpl()) {
841
+        if ( ! $config->getMetadataDriverImpl()) {
842 842
             throw ORMException::missingMappingDriverImpl();
843 843
         }
844 844
 
@@ -865,12 +865,12 @@  discard block
 block discarded – undo
865 865
             return DriverManager::getConnection($connection, $config, $eventManager ?: new EventManager());
866 866
         }
867 867
 
868
-        if (! $connection instanceof Connection) {
868
+        if ( ! $connection instanceof Connection) {
869 869
             throw new \InvalidArgumentException(
870 870
                 sprintf(
871 871
                     'Invalid $connection argument of type %s given%s.',
872 872
                     is_object($connection) ? get_class($connection) : gettype($connection),
873
-                    is_object($connection) ? '' : ': "' . $connection . '"'
873
+                    is_object($connection) ? '' : ': "'.$connection.'"'
874 874
                 )
875 875
             );
876 876
         }
Please login to merge, or discard this patch.