Failed Conditions
Pull Request — develop (#6600)
by Mike
62:56
created
tests/Doctrine/Tests/ORM/Tools/SchemaValidatorTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
30 30
     public function testCmsModelSet(string $path)
31 31
     {
32 32
         $this->em->getConfiguration()
33
-                 ->getMetadataDriverImpl()
34
-                 ->addPaths([$path]);
33
+                    ->getMetadataDriverImpl()
34
+                    ->addPaths([$path]);
35 35
 
36 36
         self::assertEmpty($this->validator->validateMapping());
37 37
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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\Tests\ORM\Tools;
6 6
 
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
     public function modelSetProvider(): array
43 43
     {
44 44
         return [
45
-            'cms'        => [__DIR__ . '/../../Models/CMS'],
46
-            'company'    => [__DIR__ . '/../../Models/Company'],
47
-            'ecommerce'  => [__DIR__ . '/../../Models/ECommerce'],
48
-            'forum'      => [__DIR__ . '/../../Models/Forum'],
49
-            'navigation' => [__DIR__ . '/../../Models/Navigation'],
50
-            'routing'    => [__DIR__ . '/../../Models/Routing'],
45
+            'cms'        => [__DIR__.'/../../Models/CMS'],
46
+            'company'    => [__DIR__.'/../../Models/Company'],
47
+            'ecommerce'  => [__DIR__.'/../../Models/ECommerce'],
48
+            'forum'      => [__DIR__.'/../../Models/Forum'],
49
+            'navigation' => [__DIR__.'/../../Models/Navigation'],
50
+            'routing'    => [__DIR__.'/../../Models/Routing'],
51 51
         ];
52 52
     }
53 53
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryWalkerTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
     /**
73 73
      * Arbitrary Join
74 74
      */
75
-     public function testLimitSubqueryWithArbitraryJoin()
75
+        public function testLimitSubqueryWithArbitraryJoin()
76 76
     {
77 77
         $dql        = 'SELECT p, c FROM Doctrine\Tests\ORM\Tools\Pagination\MyBlogPost p JOIN Doctrine\Tests\ORM\Tools\Pagination\Category c WITH p.category = c';
78 78
         $query      = $this->entityManager->createQuery($dql);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Tools\Pagination;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
         $this->entityManager->getConnection()->setDatabasePlatform(new PostgreSqlPlatform);
85 85
 
86 86
         $query = $this->entityManager->createQuery(
87
-           'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
87
+            'SELECT u, g, COUNT(g.id) AS hidden g_quantity FROM Doctrine\Tests\ORM\Tools\Pagination\User u JOIN u.groups g ORDER BY g_quantity, u.id DESC'
88 88
         );
89 89
         $limitQuery = clone $query;
90 90
         $limitQuery->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, LimitSubqueryOutputWalker::class);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Tools\Pagination;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
     {
131 131
         $this->expectException(MappingException::class);
132 132
         $this->expectExceptionMessage(
133
-              'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map'
133
+                'Entity \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' has to be part of the discriminator map'
134 134
             . ' of \'Doctrine\Tests\ORM\Mapping\HierarchyBase\' to be properly mapped in the inheritance hierarchy.'
135 135
             . ' Alternatively you can make \'Doctrine\Tests\ORM\Mapping\HierarchyBEntity\' an abstract class to'
136 136
             . ' avoid this exception from occurring.'
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\ORM\Mapping;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Models/Forum/ForumUser.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@
 block discarded – undo
24 24
     public $avatar;
25 25
 
26 26
     public function getId() {
27
-    	return $this->id;
27
+        return $this->id;
28 28
     }
29 29
 
30 30
     public function getUsername() {
31
-    	return $this->username;
31
+        return $this->username;
32 32
     }
33 33
 
34 34
     public function getAvatar() {
35
-    	return $this->avatar;
35
+        return $this->avatar;
36 36
     }
37 37
 
38 38
     public function setAvatar(ForumAvatar $avatar) {
39
-    	$this->avatar = $avatar;
39
+        $this->avatar = $avatar;
40 40
     }
41 41
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\Tests\Models\Forum;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmPerformanceTestCase.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
 
26 26
         if ($this->maxRunningTime != 0 && $time > $this->maxRunningTime) {
27 27
             $this->fail(
28
-              sprintf(
28
+                sprintf(
29 29
                 'expected running time: <= %s but was: %s',
30 30
 
31 31
                 $this->maxRunningTime,
32 32
                 $time
33
-              )
33
+                )
34 34
             );
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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\Tests;
6 6
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function setMaxRunningTime($maxRunningTime)
50 50
     {
51
-        if (! (is_int($maxRunningTime) && $maxRunningTime >= 0)) {
51
+        if ( ! (is_int($maxRunningTime) && $maxRunningTime >= 0)) {
52 52
             throw new \InvalidArgumentException;
53 53
         }
54 54
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/DefaultEntityHydrator.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@
 block discarded – undo
23 23
 namespace Doctrine\ORM\Cache;
24 24
 
25 25
 use Doctrine\Common\Util\ClassUtils;
26
-
27 26
 use Doctrine\ORM\Mapping\FetchMode;
28 27
 use Doctrine\ORM\Mapping\FieldMetadata;
29 28
 use Doctrine\ORM\Mapping\OneToOneAssociationMetadata;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Cache;
7 7
 
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
         $data = array_merge($data, $persister->getIdentifier($entity)); // why update has no identifier values ?
60 60
 
61 61
         foreach ($metadata->getProperties() as $name => $association) {
62
-            if (! isset($data[$name]) || $association instanceof FieldMetadata) {
62
+            if ( ! isset($data[$name]) || $association instanceof FieldMetadata) {
63 63
                 continue;
64 64
             }
65 65
 
66
-            if (! $association instanceof ToOneAssociationMetadata) {
66
+            if ( ! $association instanceof ToOneAssociationMetadata) {
67 67
                 unset($data[$name]);
68 68
 
69 69
                 continue;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $targetClassMetadata = $this->em->getClassMetadata($targetEntity);
74 74
             $targetPersister     = $this->uow->getEntityPersister($targetEntity);
75 75
 
76
-            if (! $association->getCache()) {
76
+            if ( ! $association->getCache()) {
77 77
                 $owningAssociation   = ! $association->isOwningSide()
78 78
                     ? $targetClassMetadata->getProperty($association->getMappedBy())
79 79
                     : $association;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 continue;
122 122
             }
123 123
 
124
-            if (! $association->isPrimaryKey()) {
124
+            if ( ! $association->isPrimaryKey()) {
125 125
                 $targetClass = ClassUtils::getClass($data[$name]);
126 126
                 $targetId    = $this->uow->getEntityIdentifier($data[$name]);
127 127
                 $data[$name] = new AssociationCacheEntry($targetClass, $targetId);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                 ($association instanceof OneToOneAssociationMetadata && ! $association->isOwningSide())
172 172
             );
173 173
 
174
-            if (! $isEagerLoad) {
174
+            if ( ! $isEagerLoad) {
175 175
                 $data[$name] = $this->em->getReference($assocClass, $assocId);
176 176
 
177 177
                 continue;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Cache/Region/DefaultMultiGetRegion.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -45,6 +45,7 @@
 block discarded – undo
45 45
      * {@inheritDoc}
46 46
      *
47 47
      * @param MultiGetCache $cache
48
+     * @param string $name
48 49
      */
49 50
     public function __construct($name, MultiGetCache $cache, $lifetime = 0)
50 51
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Cache\Region;
7 7
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -600,7 +600,7 @@
 block discarded – undo
600 600
      * Clears the EntityManager. All entities that are currently managed
601 601
      * by this EntityManager become detached.
602 602
      *
603
-     * @param null $entityName Unused. @todo Remove from ObjectManager.
603
+     * @param string|null $entityName Unused. @todo Remove from ObjectManager.
604 604
      *
605 605
      * @return void
606 606
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
382 382
         $className = $class->getClassName();
383 383
 
384
-        if (! is_array($id)) {
384
+        if ( ! is_array($id)) {
385 385
             if ($class->isIdentifierComposite()) {
386 386
                 throw ORMInvalidArgumentException::invalidCompositeIdentifier();
387 387
             }
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
      */
801 801
     public function isOpen()
802 802
     {
803
-        return (!$this->closed);
803
+        return ( ! $this->closed);
804 804
     }
805 805
 
806 806
     /**
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
                 sprintf(
912 912
                     'Invalid $connection argument of type %s given%s.',
913 913
                     is_object($connection) ? get_class($connection) : gettype($connection),
914
-                    is_object($connection) ? '' : ': "' . $connection . '"'
914
+                    is_object($connection) ? '' : ': "'.$connection.'"'
915 915
                 )
916 916
             );
917 917
         }
Please login to merge, or discard this patch.