Test Setup Failed
Push — develop ( 082d66...6f26e1 )
by Guilherme
63:04
created
lib/Doctrine/ORM/Mapping/ClassMetadataBuildingContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  * <http://www.doctrine-project.org>.
19 19
  */
20 20
 
21
-declare(strict_types=1);
21
+declare(strict_types = 1);
22 22
 
23 23
 namespace Doctrine\ORM\Mapping;
24 24
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __construct(
61 61
         AbstractClassMetadataFactory $classMetadataFactory,
62
-        ?NamingStrategy $namingStrategy = null
62
+        ? NamingStrategy $namingStrategy = null
63 63
     )
64 64
     {
65 65
         $this->classMetadataFactory = $classMetadataFactory;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/AbstractClassMetadataFactory.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\ORM\Mapping;
6 6
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function getAllMetadata()
96 96
     {
97
-        if (! $this->initialized) {
97
+        if ( ! $this->initialized) {
98 98
             $this->initialize();
99 99
         }
100 100
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         try {
201 201
             if ($this->cacheDriver) {
202
-                $cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt);
202
+                $cached = $this->cacheDriver->fetch($realClassName.$this->cacheSalt);
203 203
 
204 204
                 if ($cached instanceof ClassMetadata) {
205 205
                     $this->loadedMetadata[$realClassName] = $cached;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                 } else {
209 209
                     foreach ($this->loadMetadata($realClassName, $metadataBuildingContext) as $loadedClassName) {
210 210
                         $this->cacheDriver->save(
211
-                            $loadedClassName . $this->cacheSalt,
211
+                            $loadedClassName.$this->cacheSalt,
212 212
                             $this->loadedMetadata[$loadedClassName],
213 213
                             null
214 214
                         );
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 $this->loadMetadata($realClassName, $metadataBuildingContext);
219 219
             }
220 220
         } catch (MappingException $loadingException) {
221
-            if (! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) {
221
+            if ( ! $fallbackMetadataResponse = $this->onNotFoundMetadata($realClassName, $metadataBuildingContext)) {
222 222
                 throw $loadingException;
223 223
             }
224 224
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ManyToManyAssociationMetadata.php 1 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\ORM\Mapping;
6 6
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * @return JoinTableMetadata|null
30 30
      */
31
-    public function getJoinTable() : ?JoinTableMetadata
31
+    public function getJoinTable() : ? JoinTableMetadata
32 32
     {
33 33
         return $this->joinTable;
34 34
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/LocalColumnMetadata.php 1 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\Mapping;
7 7
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * @return int|null
40 40
      */
41
-    public function getLength() : ?int
41
+    public function getLength() : ? int
42 42
     {
43 43
         return $this->length;
44 44
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * @return int|null
56 56
      */
57
-    public function getScale() : ?int
57
+    public function getScale() : ? int
58 58
     {
59 59
         return $this->scale;
60 60
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     /**
71 71
      * @return int|null
72 72
      */
73
-    public function getPrecision() : ?int
73
+    public function getPrecision() : ? int
74 74
     {
75 75
         return $this->precision;
76 76
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     /**
95 95
      * @return ValueGeneratorMetadata|null
96 96
      */
97
-    public function getValueGenerator() : ?ValueGeneratorMetadata
97
+    public function getValueGenerator() : ? ValueGeneratorMetadata
98 98
     {
99 99
         return $this->valueGenerator;
100 100
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     /**
103 103
      * @param ValueGeneratorMetadata|null $valueGenerator
104 104
      */
105
-    public function setValueGenerator(?ValueGeneratorMetadata $valueGenerator) : void
105
+    public function setValueGenerator(? ValueGeneratorMetadata $valueGenerator) : void
106 106
     {
107 107
         $this->valueGenerator = $valueGenerator;
108 108
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/TableMetadata.php 1 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\Mapping;
7 7
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @return string|null
29 29
      */
30
-    public function getSchema() : ?string
30
+    public function getSchema() : ? string
31 31
     {
32 32
         return $this->schema;
33 33
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * @return string|null
53 53
      */
54
-    public function getName() : ?string
54
+    public function getName() : ? string
55 55
     {
56 56
         return $this->name;
57 57
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getQuotedQualifiedName(AbstractPlatform $platform) : string
65 65
     {
66
-        if (!$this->schema) {
66
+        if ( ! $this->schema) {
67 67
             return $platform->quoteIdentifier($this->name);
68 68
         }
69 69
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function addIndex(array $index) : void
152 152
     {
153
-        if (! isset($index['name'])) {
153
+        if ( ! isset($index['name'])) {
154 154
             $this->indexes[] = $index;
155 155
 
156 156
             return;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function addUniqueConstraint(array $constraint) : void
194 194
     {
195
-        if (! isset($constraint['name'])) {
195
+        if ( ! isset($constraint['name'])) {
196 196
             $this->uniqueConstraints[] = $constraint;
197 197
 
198 198
             return;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/JoinColumnMetadata.php 1 patch
Spacing   +3 added lines, -3 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\Mapping;
7 7
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * @return string|null
32 32
      */
33
-    public function getReferencedColumnName() : ?string
33
+    public function getReferencedColumnName() : ? string
34 34
     {
35 35
         return $this->referencedColumnName;
36 36
     }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * @return string|null
48 48
      */
49
-    public function getAliasedName() : ?string
49
+    public function getAliasedName() : ? string
50 50
     {
51 51
         return $this->aliasedName;
52 52
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php 1 patch
Spacing   +9 added lines, -9 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\Mapping;
6 6
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     protected function onNotFoundMetadata($className, ClassMetadataBuildingContext $metadataBuildingContext)
93 93
     {
94
-        if (! $this->evm->hasListeners(Events::onClassMetadataNotFound)) {
94
+        if ( ! $this->evm->hasListeners(Events::onClassMetadataNotFound)) {
95 95
             return;
96 96
         }
97 97
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                 continue;
256 256
             }
257 257
 
258
-            if (! ($property instanceof ToOneAssociationMetadata)) {
258
+            if ( ! ($property instanceof ToOneAssociationMetadata)) {
259 259
                 continue;
260 260
             }
261 261
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     protected function validateRuntimeMetadata(ClassMetadata $class, ClassMetadata $parent = null)
287 287
     {
288
-        if (! $class->getReflectionClass()) {
288
+        if ( ! $class->getReflectionClass()) {
289 289
             // only validate if there is a reflection class instance
290 290
             return;
291 291
         }
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 
641 641
     private function completeFieldIdentifierGeneratorMapping(FieldMetadata $field)
642 642
     {
643
-        if (!$field->hasValueGenerator()) {
643
+        if ( ! $field->hasValueGenerator()) {
644 644
             return;
645 645
         }
646 646
 
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
                 break;
708 708
 
709 709
             default:
710
-                throw new ORMException("Unknown generator type: " . $generator->getType());
710
+                throw new ORMException("Unknown generator type: ".$generator->getType());
711 711
         }
712 712
     }
713 713
 
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
      */
733 733
     protected function getFqcnFromAlias($namespaceAlias, $simpleClassName)
734 734
     {
735
-        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias) . '\\' . $simpleClassName;
735
+        return $this->em->getConfiguration()->getEntityNamespace($namespaceAlias).'\\'.$simpleClassName;
736 736
     }
737 737
 
738 738
     /**
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
      */
757 757
     private function getTargetPlatform()
758 758
     {
759
-        if (!$this->targetPlatform) {
759
+        if ( ! $this->targetPlatform) {
760 760
             $this->targetPlatform = $this->em->getConnection()->getDatabasePlatform();
761 761
         }
762 762
 
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
         $generatedProperties = [];
770 770
 
771 771
         foreach ($class->getDeclaredPropertiesIterator() as $property) {
772
-            if (! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) {
772
+            if ( ! ($property instanceof LocalColumnMetadata && $property->hasValueGenerator())) {
773 773
                 continue;
774 774
             }
775 775
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/EntityClassMetadata.php 1 patch
Spacing   +8 added lines, -8 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\Mapping;
7 7
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     /**
148 148
      * @return null|string
149 149
      */
150
-    public function getCustomRepositoryClassName() : ?string
150
+    public function getCustomRepositoryClassName() : ? string
151 151
     {
152 152
         return $this->customRepositoryClassName;
153 153
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     /**
156 156
      * @param null|string customRepositoryClassName
157 157
      */
158
-    public function setCustomRepositoryClassName(?string $customRepositoryClassName) : void
158
+    public function setCustomRepositoryClassName(? string $customRepositoryClassName) : void
159 159
     {
160 160
         $this->customRepositoryClassName = $customRepositoryClassName;
161 161
     }
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     /**
164 164
      * @return Property|null
165 165
      */
166
-    public function getDeclaredVersion() : ?Property
166
+    public function getDeclaredVersion() : ? Property
167 167
     {
168 168
         return $this->declaredVersion;
169 169
     }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     /**
180 180
      * @return Property|null
181 181
      */
182
-    public function getVersion() : ?Property
182
+    public function getVersion() : ? Property
183 183
     {
184 184
         /** @var ComponentMetadata|null $parent */
185 185
         $parent  = $this->parent;
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      */
297 297
     public function getNamedQuery($queryName) : string
298 298
     {
299
-        if (! isset($this->namedQueries[$queryName])) {
299
+        if ( ! isset($this->namedQueries[$queryName])) {
300 300
             throw MappingException::queryNotFound($this->entityName, $queryName);
301 301
         }
302 302
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      */
327 327
     public function getNamedNativeQuery($queryName) : array
328 328
     {
329
-        if (! isset($this->namedNativeQueries[$queryName])) {
329
+        if ( ! isset($this->namedNativeQueries[$queryName])) {
330 330
             throw MappingException::queryNotFound($this->entityName, $queryName);
331 331
         }
332 332
 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
      */
357 357
     public function getSqlResultSetMapping($name) : array
358 358
     {
359
-        if (! isset($this->sqlResultSetMappings[$name])) {
359
+        if ( ! isset($this->sqlResultSetMappings[$name])) {
360 360
             throw MappingException::resultMappingNotFound($this->entityName, $name);
361 361
         }
362 362
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/OneToManyPersister.php 1 patch
Spacing   +14 added lines, -14 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\Persisters\Collection;
6 6
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         // the entire collection with a new would trigger this operation.
31 31
         $association = $collection->getMapping();
32 32
 
33
-        if (! $association->isOrphanRemoval()) {
33
+        if ( ! $association->isOrphanRemoval()) {
34 34
             // Handling non-orphan removal should never happen, as @OneToMany
35 35
             // can only be inverse side. For owning side one to many, it is
36 36
             // required to have a join table, which would classify as a ManyToManyPersister.
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $association = $collection->getMapping();
64 64
 
65
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
65
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
66 66
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
67 67
         }
68 68
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     {
112 112
         $association = $collection->getMapping();
113 113
 
114
-        if (! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
114
+        if ( ! ($association instanceof ToManyAssociationMetadata && $association->getIndexedBy())) {
115 115
             throw new \BadMethodCallException("Selecting a collection by index is only supported on indexed collections.");
116 116
         }
117 117
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         // only works with single id identifier entities. Will throw an
121 121
         // exception in Entity Persisters if that is not the case for the
122 122
         // 'mappedBy' field.
123
-        $criteria  = [
123
+        $criteria = [
124 124
             $association->getMappedBy()  => $collection->getOwner(),
125 125
             $association->getIndexedBy() => $key,
126 126
         ];
@@ -157,12 +157,12 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $association = $collection->getMapping();
159 159
 
160
-        if (! $association->isOrphanRemoval()) {
160
+        if ( ! $association->isOrphanRemoval()) {
161 161
             // no-op: this is not the owning side, therefore no operations should be applied
162 162
             return false;
163 163
         }
164 164
 
165
-        if (! $this->isValidEntityState($element)) {
165
+        if ( ! $this->isValidEntityState($element)) {
166 166
             return false;
167 167
         }
168 168
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         }
203 203
 
204 204
         $tableName = $targetClass->table->getQuotedQualifiedName($this->platform);
205
-        $statement = 'DELETE FROM ' . $tableName . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
205
+        $statement = 'DELETE FROM '.$tableName.' WHERE '.implode(' = ? AND ', $columns).' = ?';
206 206
 
207 207
         return $this->conn->executeUpdate($statement, $parameters);
208 208
     }
@@ -241,17 +241,17 @@  discard block
 block discarded – undo
241 241
             ];
242 242
         }
243 243
 
244
-        $statement = $this->platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable
245
-            . ' (' . $this->platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
244
+        $statement = $this->platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable
245
+            . ' ('.$this->platform->getColumnDeclarationListSQL($columnDefinitions).')';
246 246
 
247 247
         $this->conn->executeUpdate($statement);
248 248
 
249 249
         // 2) Build insert table records into temporary table
250
-        $dql   = ' SELECT t0.' . implode(', t0.', $rootClass->getIdentifierFieldNames())
251
-               . ' FROM ' . $targetClass->getClassName() . ' t0 WHERE t0.' . $association->getMappedBy() . ' = :owner';
250
+        $dql   = ' SELECT t0.'.implode(', t0.', $rootClass->getIdentifierFieldNames())
251
+               . ' FROM '.$targetClass->getClassName().' t0 WHERE t0.'.$association->getMappedBy().' = :owner';
252 252
         $query = $this->em->createQuery($dql)->setParameter('owner', $collection->getOwner());
253 253
 
254
-        $statement  = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ') ' . $query->getSQL();
254
+        $statement  = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.') '.$query->getSQL();
255 255
         $parameters = array_values($sourcePersister->getIdentifier($collection->getOwner()));
256 256
         $numDeleted = $this->conn->executeUpdate($statement, $parameters);
257 257
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         // 4) Delete records on each table in the hierarchy
267 267
         $hierarchyClasses = array_merge(
268 268
             array_map(
269
-                function ($className) { return $this->em->getClassMetadata($className); },
269
+                function($className) { return $this->em->getClassMetadata($className); },
270 270
                 array_reverse($targetClass->getSubClasses())
271 271
             ),
272 272
             [$targetClass],
Please login to merge, or discard this patch.