Failed Conditions
Pull Request — master (#7123)
by Michael
11:30
created
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +15 added lines, -15 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
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     {
285 285
         $query = new Query($this);
286 286
 
287
-        if (! empty($dql)) {
287
+        if ( ! empty($dql)) {
288 288
             $query->setDQL($dql);
289 289
         }
290 290
 
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
375 375
         $className = $class->getClassName();
376 376
 
377
-        if (! is_array($id)) {
377
+        if ( ! is_array($id)) {
378 378
             if ($class->isIdentifierComposite()) {
379 379
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
380 380
             }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         $sortedId = [];
396 396
 
397 397
         foreach ($class->identifier as $identifier) {
398
-            if (! isset($id[$identifier])) {
398
+            if ( ! isset($id[$identifier])) {
399 399
                 throw ORMException::missingIdentifierField($className, $identifier);
400 400
             }
401 401
 
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         // Check identity map first
413 413
         $entity = $unitOfWork->tryGetById($sortedId, $class->getRootClassName());
414 414
         if ($entity !== false) {
415
-            if (! ($entity instanceof $className)) {
415
+            if ( ! ($entity instanceof $className)) {
416 416
                 return null;
417 417
             }
418 418
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
         switch (true) {
438 438
             case $lockMode === LockMode::OPTIMISTIC:
439
-                if (! $class->isVersioned()) {
439
+                if ( ! $class->isVersioned()) {
440 440
                     throw OptimisticLockException::notVersioned($className);
441 441
                 }
442 442
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 
449 449
             case $lockMode === LockMode::PESSIMISTIC_READ:
450 450
             case $lockMode === LockMode::PESSIMISTIC_WRITE:
451
-                if (! $this->getConnection()->isTransactionActive()) {
451
+                if ( ! $this->getConnection()->isTransactionActive()) {
452 452
                     throw TransactionRequiredException::transactionRequired();
453 453
                 }
454 454
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
468 468
         $className = $class->getClassName();
469 469
 
470
-        if (! is_array($id)) {
470
+        if ( ! is_array($id)) {
471 471
             if ($class->isIdentifierComposite()) {
472 472
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
473 473
             }
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $sortedId = [];
493 493
 
494 494
         foreach ($class->identifier as $identifier) {
495
-            if (! isset($scalarId[$identifier])) {
495
+            if ( ! isset($scalarId[$identifier])) {
496 496
                 throw ORMException::missingIdentifierField($className, $identifier);
497 497
             }
498 498
 
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         $class     = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
534 534
         $className = $class->getClassName();
535 535
 
536
-        if (! is_array($id)) {
536
+        if ( ! is_array($id)) {
537 537
             if ($class->isIdentifierComposite()) {
538 538
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
539 539
             }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
         $sortedId = [];
555 555
 
556 556
         foreach ($class->identifier as $identifier) {
557
-            if (! isset($id[$identifier])) {
557
+            if ( ! isset($id[$identifier])) {
558 558
                 throw ORMException::missingIdentifierField($className, $identifier);
559 559
             }
560 560
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
      */
628 628
     public function persist($entity)
629 629
     {
630
-        if (! is_object($entity)) {
630
+        if ( ! is_object($entity)) {
631 631
             throw ORMInvalidArgumentException::invalidObject('EntityManager#persist()', $entity);
632 632
         }
633 633
 
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
      */
650 650
     public function remove($entity)
651 651
     {
652
-        if (! is_object($entity)) {
652
+        if ( ! is_object($entity)) {
653 653
             throw ORMInvalidArgumentException::invalidObject('EntityManager#remove()', $entity);
654 654
         }
655 655
 
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
      */
670 670
     public function refresh($entity)
671 671
     {
672
-        if (! is_object($entity)) {
672
+        if ( ! is_object($entity)) {
673 673
             throw ORMInvalidArgumentException::invalidObject('EntityManager#refresh()', $entity);
674 674
         }
675 675
 
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
      */
825 825
     public static function create(Connection $connection, Configuration $config, ?EventManager $eventManager = null)
826 826
     {
827
-        if (! $config->getMetadataDriverImpl()) {
827
+        if ( ! $config->getMetadataDriverImpl()) {
828 828
             throw ORMException::missingMappingDriverImpl();
829 829
         }
830 830
 
Please login to merge, or discard this patch.
tests/Doctrine/Performance/EntityManagerFactory.php 1 patch
Spacing   +5 added lines, -5 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\Performance;
6 6
 
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $config = new Configuration();
22 22
 
23
-        $config->setProxyDir(__DIR__ . '/../Tests/Proxies');
23
+        $config->setProxyDir(__DIR__.'/../Tests/Proxies');
24 24
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
25 25
         $config->setAutoGenerateProxyClasses(StaticProxyFactory::AUTOGENERATE_EVAL);
26 26
         $config->setMetadataDriverImpl(
27 27
             $config->newDefaultAnnotationDriver([
28
-                realpath(__DIR__ . '/Models/Cache'),
29
-                realpath(__DIR__ . '/Models/GeoNames'),
28
+                realpath(__DIR__.'/Models/Cache'),
29
+                realpath(__DIR__.'/Models/GeoNames'),
30 30
             ])
31 31
         );
32 32
 
33
-        $connection    = DriverManager::getConnection(
33
+        $connection = DriverManager::getConnection(
34 34
             [
35 35
                 'driverClass' => Driver::class,
36 36
                 'memory'      => true,
Please login to merge, or discard this patch.