Test Failed
Pull Request — develop (#6724)
by Marco
65:33
created
lib/Doctrine/ORM/Proxy/Factory/StaticProxyFactory.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Doctrine\ORM\EntityManagerInterface;
9 9
 use Doctrine\ORM\EntityNotFoundException;
10 10
 use Doctrine\ORM\Mapping\ClassMetadata;
11
-use Doctrine\ORM\Mapping\Property;
12 11
 use Doctrine\ORM\Mapping\ToManyAssociationMetadata;
13 12
 use Doctrine\ORM\Mapping\TransientMetadata;
14 13
 use Doctrine\ORM\Persisters\Entity\EntityPersister;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 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\Proxy\Factory;
7 7
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function generateProxyClasses(array $classes) : int
78 78
     {
79
-        $concreteClasses = \array_filter($classes, function (ClassMetadata $metadata) : bool {
79
+        $concreteClasses = \array_filter($classes, function(ClassMetadata $metadata) : bool {
80 80
             return ! ($metadata->isMappedSuperclass || $metadata->getReflectionClass()->isAbstract());
81 81
         });
82 82
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 ->proxyFactory
86 86
                 ->createProxy(
87 87
                     $metadata->getClassName(),
88
-                    function () {
88
+                    function() {
89 89
                         // empty closure, serves its purpose, for now
90 90
                     },
91 91
                     $this->skippedFieldsFqns($metadata)
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
     private function makeInitializer(ClassMetadata $metadata, EntityPersister $persister) : \Closure
143 143
     {
144
-        return function (
144
+        return function(
145 145
             GhostObjectInterface $ghostObject,
146 146
             string $method, // we don't care
147 147
             array $parameters, // we don't care
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $identifier = $persister->getIdentifier($ghostObject);
155 155
 
156 156
             // @TODO how do we use `$properties` in the persister? That would be a massive optimisation
157
-            if (! $persister->loadById($identifier, $ghostObject)) {
157
+            if ( ! $persister->loadById($identifier, $ghostObject)) {
158 158
                 $initializer = $originalInitializer;
159 159
 
160 160
                 throw EntityNotFoundException::fromClassNameAndIdentifier(
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $transientFieldsFqns = [];
182 182
 
183 183
         foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) {
184
-            if (! $property instanceof TransientMetadata) {
184
+            if ( ! $property instanceof TransientMetadata) {
185 185
                 continue;
186 186
             }
187 187
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $transientFieldsFqns = [];
202 202
 
203 203
         foreach ($metadata->getDeclaredPropertiesIterator() as $name => $property) {
204
-            if (! $property instanceof ToManyAssociationMetadata) {
204
+            if ( ! $property instanceof ToManyAssociationMetadata) {
205 205
                 continue;
206 206
             }
207 207
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         $toMany = [];
225 225
 
226 226
         foreach ($metadata->getDeclaredPropertiesIterator() as $property) {
227
-            if (! $property instanceof ToManyAssociationMetadata) {
227
+            if ( ! $property instanceof ToManyAssociationMetadata) {
228 228
                 continue;
229 229
             }
230 230
 
@@ -254,11 +254,11 @@  discard block
 block discarded – undo
254 254
     private function propertyFqcn(\ReflectionProperty $property) : string
255 255
     {
256 256
         if ($property->isPrivate()) {
257
-            return "\0" . $property->getDeclaringClass()->getName() . "\0" . $property->getName();
257
+            return "\0".$property->getDeclaringClass()->getName()."\0".$property->getName();
258 258
         }
259 259
 
260 260
         if ($property->isProtected()) {
261
-            return "\0*\0" . $property->getName();
261
+            return "\0*\0".$property->getName();
262 262
         }
263 263
 
264 264
         return $property->getName();
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/EntityManagerMock.php 1 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\Mocks;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php 1 patch
Spacing   +10 added lines, -10 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\Mapping;
6 6
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         require_once __DIR__."/../../Models/Global/GlobalNamespaceModel.php";
116 116
 
117
-        $metadataDriver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Global/']);
117
+        $metadataDriver = $this->createAnnotationDriver([__DIR__.'/../../Models/Global/']);
118 118
 
119 119
         $entityManager = $this->createEntityManager($metadataDriver);
120 120
 
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
 
123 123
         self::assertSame(
124 124
             $mf->getMetadataFor(DoctrineGlobal_Article::class),
125
-            $mf->getMetadataFor('\\' . DoctrineGlobal_Article::class)
125
+            $mf->getMetadataFor('\\'.DoctrineGlobal_Article::class)
126 126
         );
127 127
         self::assertTrue($mf->hasMetadataFor(DoctrineGlobal_Article::class));
128
-        self::assertTrue($mf->hasMetadataFor('\\' . DoctrineGlobal_Article::class));
128
+        self::assertTrue($mf->hasMetadataFor('\\'.DoctrineGlobal_Article::class));
129 129
     }
130 130
 
131 131
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     public function testAddDefaultDiscriminatorMap()
177 177
     {
178 178
         $cmf = new ClassMetadataFactory();
179
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/JoinedInheritanceType/']);
179
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/JoinedInheritanceType/']);
180 180
         $em = $this->createEntityManager($driver);
181 181
         $cmf->setEntityManager($em);
182 182
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     {
217 217
         // DDC-3551
218 218
         $conn = $this->createMock(Connection::class);
219
-        $mockDriver    = new MetadataDriverMock();
219
+        $mockDriver = new MetadataDriverMock();
220 220
         $conn->expects($this->any())
221 221
             ->method('getEventManager')
222 222
             ->willReturn(new EventManager());
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         $config->setAutoGenerateProxyClasses(ProxyFactory::AUTOGENERATE_EVAL);
244 244
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
245 245
 
246
-        if (!$conn) {
246
+        if ( ! $conn) {
247 247
             $conn = new ConnectionMock([], $driverMock, $config, new EventManager());
248 248
         }
249 249
         $eventManager = $conn->getEventManager();
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     public function testQuoteMetadata()
335 335
     {
336 336
         $cmf    = new ClassMetadataFactory();
337
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/Quote/']);
337
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/Quote/']);
338 338
         $em     = $this->createEntityManager($driver);
339 339
         $cmf->setEntityManager($em);
340 340
 
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
         $listener
424 424
             ->expects($this->any())
425 425
             ->method('onClassMetadataNotFound')
426
-            ->will($this->returnCallback(function (OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
426
+            ->will($this->returnCallback(function(OnClassMetadataNotFoundEventArgs $args) use ($metadata, $em, $test) {
427 427
                 $test->assertNull($args->getFoundMetadata());
428 428
                 $test->assertSame('Foo', $args->getClassName());
429 429
                 $test->assertSame($em, $args->getObjectManager());
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
     public function testInheritsIdGeneratorMappingFromEmbeddable()
486 486
     {
487 487
         $cmf = new ClassMetadataFactory();
488
-        $driver = $this->createAnnotationDriver([__DIR__ . '/../../Models/DDC4006/']);
488
+        $driver = $this->createAnnotationDriver([__DIR__.'/../../Models/DDC4006/']);
489 489
         $em = $this->createEntityManager($driver);
490 490
         $cmf->setEntityManager($em);
491 491
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php 1 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\Functional\Locking;
6 6
 
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
         $worker->addFunction("dqlWithLock", [$lockAgent, "dqlWithLock"]);
28 28
         $worker->addFunction('lock', [$lockAgent, 'lock']);
29 29
 
30
-        while($worker->work()) {
30
+        while ($worker->work()) {
31 31
             if ($worker->returnCode() != GEARMAN_SUCCESS) {
32
-                echo "return_code: " . $worker->returnCode() . "\n";
32
+                echo "return_code: ".$worker->returnCode()."\n";
33 33
                 break;
34 34
             }
35 35
         }
@@ -80,18 +80,18 @@  discard block
 block discarded – undo
80 80
 
81 81
     protected function processWorkload($job)
82 82
     {
83
-        echo "Received job: " . $job->handle() . " for function " . $job->functionName() . "\n";
83
+        echo "Received job: ".$job->handle()." for function ".$job->functionName()."\n";
84 84
 
85 85
         $workload = $job->workload();
86 86
         $workload = unserialize($workload);
87 87
 
88
-        if (!isset($workload['conn']) || !is_array($workload['conn'])) {
88
+        if ( ! isset($workload['conn']) || ! is_array($workload['conn'])) {
89 89
             throw new \InvalidArgumentException("Missing Database parameters");
90 90
         }
91 91
 
92 92
         $this->em = $this->createEntityManager($workload['conn']);
93 93
 
94
-        if (!isset($workload['fixture'])) {
94
+        if ( ! isset($workload['fixture'])) {
95 95
             throw new \InvalidArgumentException("Missing Fixture parameters");
96 96
         }
97 97
         return $workload['fixture'];
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $config->setProxyNamespace('MyProject\Proxies');
105 105
         $config->setAutoGenerateProxyClasses(true);
106 106
 
107
-        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__ . '/../../../Models/']);
107
+        $annotDriver = $config->newDefaultAnnotationDriver([__DIR__.'/../../../Models/']);
108 108
         $config->setMetadataDriverImpl($annotDriver);
109 109
 
110 110
         $cache = new ArrayCache();
Please login to merge, or discard this patch.