Completed
Pull Request — master (#7075)
by
unknown
37:19
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,17 +387,17 @@  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
             case LockMode::PESSIMISTIC_READ:
394 394
             case LockMode::PESSIMISTIC_WRITE:
395
-                if (! $this->getConnection()->isTransactionActive()) {
395
+                if ( ! $this->getConnection()->isTransactionActive()) {
396 396
                     throw TransactionRequiredException::transactionRequired();
397 397
                 }
398 398
         }
399 399
 
400
-        if (! is_array($id)) {
400
+        if ( ! is_array($id)) {
401 401
             if ($class->isIdentifierComposite()) {
402 402
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
403 403
             }
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         $sortedId = [];
419 419
 
420 420
         foreach ($class->identifier as $identifier) {
421
-            if (! isset($id[$identifier])) {
421
+            if ( ! isset($id[$identifier])) {
422 422
                 throw ORMException::missingIdentifierField($className, $identifier);
423 423
             }
424 424
 
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
         // Check identity map first
436 436
         $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName());
437 437
         if ($entity !== false) {
438
-            if (! ($entity instanceof $className)) {
438
+            if ( ! ($entity instanceof $className)) {
439 439
                 return null;
440 440
             }
441 441
 
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
481 481
         $className = $class->getClassName();
482 482
 
483
-        if (! is_array($id)) {
483
+        if ( ! is_array($id)) {
484 484
             if ($class->isIdentifierComposite()) {
485 485
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
486 486
             }
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         $sortedId = [];
506 506
 
507 507
         foreach ($class->identifier as $identifier) {
508
-            if (! isset($scalarId[$identifier])) {
508
+            if ( ! isset($scalarId[$identifier])) {
509 509
                 throw ORMException::missingIdentifierField($className, $identifier);
510 510
             }
511 511
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
547 547
         $className = $class->getClassName();
548 548
 
549
-        if (! is_array($id)) {
549
+        if ( ! is_array($id)) {
550 550
             if ($class->isIdentifierComposite()) {
551 551
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
552 552
             }
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         $sortedId = [];
568 568
 
569 569
         foreach ($class->identifier as $identifier) {
570
-            if (! isset($id[$identifier])) {
570
+            if ( ! isset($id[$identifier])) {
571 571
                 throw ORMException::missingIdentifierField($className, $identifier);
572 572
             }
573 573
 
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
      */
641 641
     public function persist($entity)
642 642
     {
643
-        if (! is_object($entity)) {
643
+        if ( ! is_object($entity)) {
644 644
             throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
645 645
         }
646 646
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
      */
663 663
     public function remove($entity)
664 664
     {
665
-        if (! is_object($entity)) {
665
+        if ( ! is_object($entity)) {
666 666
             throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
667 667
         }
668 668
 
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
      */
683 683
     public function refresh($entity)
684 684
     {
685
-        if (! is_object($entity)) {
685
+        if ( ! is_object($entity)) {
686 686
             throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
687 687
         }
688 688
 
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
      */
838 838
     public static function create($connection, Configuration $config, ?EventManager $eventManager = null)
839 839
     {
840
-        if (! $config->getMetadataDriverImpl()) {
840
+        if ( ! $config->getMetadataDriverImpl()) {
841 841
             throw ORMException::missingMappingDriverImpl();
842 842
         }
843 843
 
@@ -864,12 +864,12 @@  discard block
 block discarded – undo
864 864
             return DriverManager::getConnection($connection, $config, $eventManager ?: new EventManager());
865 865
         }
866 866
 
867
-        if (! $connection instanceof Connection) {
867
+        if ( ! $connection instanceof Connection) {
868 868
             throw new \InvalidArgumentException(
869 869
                 sprintf(
870 870
                     'Invalid $connection argument of type %s given%s.',
871 871
                     is_object($connection) ? get_class($connection) : gettype($connection),
872
-                    is_object($connection) ? '' : ': "' . $connection . '"'
872
+                    is_object($connection) ? '' : ': "'.$connection.'"'
873 873
                 )
874 874
             );
875 875
         }
Please login to merge, or discard this patch.