Completed
Push — master ( e6a79e...1760b4 )
by Marco
19:16
created
lib/Doctrine/ORM/Sequencing/TableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
                         $this->allocationSize
59 59
                     );
60 60
 
61
-                    if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel+1]) !== 1) {
61
+                    if ($conn->executeUpdate($updateSql, [1 => $currentLevel, 2 => $currentLevel + 1]) !== 1) {
62 62
                         // no affected rows, concurrency issue, throw exception
63 63
                     }
64 64
                 } else {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentObject.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if ($entityManager !== self::$entityManager) {
79 79
             throw new \RuntimeException(
80
-                'Trying to use PersistentObject with different EntityManager instances. ' .
80
+                'Trying to use PersistentObject with different EntityManager instances. '.
81 81
                 'Was PersistentObject::setEntityManager() called?'
82 82
             );
83 83
         }
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 
103 103
         $property = $this->cm->getProperty($field);
104 104
 
105
-        if (! $property) {
106
-            throw new \BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm->getClassName() . "'");
105
+        if ( ! $property) {
106
+            throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
107 107
         }
108 108
 
109 109
         switch (true) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 $targetClassName = $property->getTargetEntity();
116 116
 
117 117
                 if ($args[0] !== null && ! ($args[0] instanceof $targetClassName)) {
118
-                    throw new \InvalidArgumentException("Expected persistent object of type '" . $targetClassName . "'");
118
+                    throw new \InvalidArgumentException("Expected persistent object of type '".$targetClassName."'");
119 119
                 }
120 120
 
121 121
                 $this->{$field} = $args[0];
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
 
142 142
         $property = $this->cm->getProperty($field);
143 143
 
144
-        if (! $property) {
145
-            throw new \BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm->getClassName() . "'");
144
+        if ( ! $property) {
145
+            throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
146 146
         }
147 147
 
148 148
         return $this->{$field};
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $mappedByField    = $property->getMappedBy();
165 165
         $targetMetadata   = self::$entityManager->getClassMetadata($property->getTargetEntity());
166 166
         $targetProperty   = $targetMetadata->getProperty($mappedByField);
167
-        $setterMethodName = ($targetProperty instanceof ToManyAssociationMetadata ? 'add' : 'set') . $mappedByField;
167
+        $setterMethodName = ($targetProperty instanceof ToManyAssociationMetadata ? 'add' : 'set').$mappedByField;
168 168
 
169 169
         $targetObject->{$setterMethodName}($this);
170 170
     }
@@ -186,21 +186,21 @@  discard block
 block discarded – undo
186 186
 
187 187
         $property = $this->cm->getProperty($field);
188 188
 
189
-        if (! $property) {
190
-            throw new \BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm->getClassName() . "'");
189
+        if ( ! $property) {
190
+            throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
191 191
         }
192 192
 
193
-        if (! ($property instanceof ToManyAssociationMetadata)) {
194
-            throw new \BadMethodCallException('There is no method add' . $field . '() on ' . $this->cm->getClassName());
193
+        if ( ! ($property instanceof ToManyAssociationMetadata)) {
194
+            throw new \BadMethodCallException('There is no method add'.$field.'() on '.$this->cm->getClassName());
195 195
         }
196 196
 
197 197
         $targetClassName = $property->getTargetEntity();
198 198
 
199
-        if (! ($args[0] instanceof $targetClassName)) {
200
-            throw new \InvalidArgumentException("Expected persistent object of type '" . $targetClassName . "'");
199
+        if ( ! ($args[0] instanceof $targetClassName)) {
200
+            throw new \InvalidArgumentException("Expected persistent object of type '".$targetClassName."'");
201 201
         }
202 202
 
203
-        if (! ($this->{$field} instanceof Collection)) {
203
+        if ( ! ($this->{$field} instanceof Collection)) {
204 204
             $this->{$field} = new ArrayCollection($this->{$field} ?: []);
205 205
         }
206 206
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             return;
223 223
         }
224 224
 
225
-        if (! self::$entityManager) {
225
+        if ( ! self::$entityManager) {
226 226
             throw new \RuntimeException('No runtime entity manager set. Call PersistentObject#setEntityManager().');
227 227
         }
228 228
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                 return $this->add($field, $args);
256 256
 
257 257
             default:
258
-                throw new \BadMethodCallException('There is no method ' . $method . ' on ' . $this->cm->getClassName());
258
+                throw new \BadMethodCallException('There is no method '.$method.' on '.$this->cm->getClassName());
259 259
         }
260 260
     }
261 261
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Event/PreUpdateEventArgs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
      */
100 100
     private function assertValidField($field)
101 101
     {
102
-        if (! isset($this->entityChangeSet[$field])) {
102
+        if ( ! isset($this->entityChangeSet[$field])) {
103 103
             throw new \InvalidArgumentException(sprintf(
104 104
                 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.',
105 105
                 $field,
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/NormalizeIdentifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $normalizedAssociatedId = [];
36 36
 
37 37
         foreach ($targetClass->getDeclaredPropertiesIterator() as $name => $declaredProperty) {
38
-            if (! array_key_exists($name, $flatIdentifier)) {
38
+            if ( ! array_key_exists($name, $flatIdentifier)) {
39 39
                 continue;
40 40
             }
41 41
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/PersisterHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,14 +57,14 @@
 block discarded – undo
57 57
 
58 58
         // iterate over association mappings
59 59
         foreach ($class->getDeclaredPropertiesIterator() as $association) {
60
-            if (! ($association instanceof AssociationMetadata)) {
60
+            if ( ! ($association instanceof AssociationMetadata)) {
61 61
                 continue;
62 62
             }
63 63
 
64 64
             // resolve join columns over to-one or to-many
65 65
             $targetClass = $em->getClassMetadata($association->getTargetEntity());
66 66
 
67
-            if (! $association->isOwningSide()) {
67
+            if ( ! $association->isOwningSide()) {
68 68
                 $association = $targetClass->getProperty($association->getMappedBy());
69 69
                 $targetClass = $em->getClassMetadata($association->getTargetEntity());
70 70
             }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
      */
255 255
     private function resolveMagicCall($method, $by, array $arguments)
256 256
     {
257
-        if (! $arguments) {
258
-            throw InvalidMagicMethodCall::onMissingParameter($method . $by);
257
+        if ( ! $arguments) {
258
+            throw InvalidMagicMethodCall::onMissingParameter($method.$by);
259 259
         }
260 260
 
261 261
         $fieldName = lcfirst(Inflector::classify($by));
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             throw InvalidMagicMethodCall::becauseFieldNotFoundIn(
265 265
                 $this->entityName,
266 266
                 $fieldName,
267
-                $method . $by
267
+                $method.$by
268 268
             );
269 269
         }
270 270
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         //       association (table). Without initializing the collection.
331 331
         $removed = parent::remove($key);
332 332
 
333
-        if (! $removed) {
333
+        if ( ! $removed) {
334 334
             return $removed;
335 335
         }
336 336
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
      */
352 352
     public function removeElement($element)
353 353
     {
354
-        if (! $this->initialized &&
354
+        if ( ! $this->initialized &&
355 355
             $this->association !== null &&
356 356
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
357 357
             if ($this->collection->contains($element)) {
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         $removed = parent::removeElement($element);
367 367
 
368
-        if (! $removed) {
368
+        if ( ! $removed) {
369 369
             return $removed;
370 370
         }
371 371
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
      */
387 387
     public function containsKey($key)
388 388
     {
389
-        if (! $this->initialized &&
389
+        if ( ! $this->initialized &&
390 390
             $this->association !== null &&
391 391
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
392 392
             $this->association->getIndexedBy()) {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      */
404 404
     public function contains($element)
405 405
     {
406
-        if (! $this->initialized &&
406
+        if ( ! $this->initialized &&
407 407
             $this->association !== null &&
408 408
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
409 409
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
      */
420 420
     public function get($key)
421 421
     {
422
-        if (! $this->initialized &&
422
+        if ( ! $this->initialized &&
423 423
             $this->association !== null &&
424 424
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
425 425
             $this->association->getIndexedBy()) {
426
-            if (! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
426
+            if ( ! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
427 427
                 return $this->em->find($this->typeClass->getClassName(), $key);
428 428
             }
429 429
 
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
      */
439 439
     public function count()
440 440
     {
441
-        if (! $this->initialized &&
441
+        if ( ! $this->initialized &&
442 442
             $this->association !== null &&
443 443
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
444 444
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
      */
503 503
     public function offsetSet($offset, $value)
504 504
     {
505
-        if (! isset($offset)) {
505
+        if ( ! isset($offset)) {
506 506
             $this->add($value);
507 507
             return;
508 508
         }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
      */
597 597
     public function slice($offset, $length = null)
598 598
     {
599
-        if (! $this->initialized &&
599
+        if ( ! $this->initialized &&
600 600
             ! $this->isDirty &&
601 601
             $this->association !== null &&
602 602
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/MatchingAssociationFieldRequiresObject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public static function fromClassAndAssociation(string $class, string $associationName) : self
13 13
     {
14 14
         return new self(sprintf(
15
-            'Cannot match on %s::%s with a non-object value. Matching objects by id is ' .
15
+            'Cannot match on %s::%s with a non-object value. Matching objects by id is '.
16 16
             'not compatible with matching on an in-memory collection, which compares objects by reference.',
17 17
             $class,
18 18
             $associationName
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
46 46
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
47 47
 
48
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
48
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
49 49
 
50 50
         // Append subclass columns
51 51
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                             /** @var JoinColumnMetadata $joinColumn */
70 70
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
71 71
 
72
-                            if (! $joinColumn->getType()) {
72
+                            if ( ! $joinColumn->getType()) {
73 73
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
74 74
                             }
75 75
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $conditionSql .= ' AND ';
124 124
         }
125 125
 
126
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
126
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
127 127
     }
128 128
 
129 129
     /**
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
             $conditionSql .= ' AND ';
138 138
         }
139 139
 
140
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
140
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
141 141
     }
142 142
 
143 143
     /**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         return sprintf(
166 166
             '%s IN (%s)',
167
-            $discrColumnType->convertToDatabaseValueSQL($tableAlias . '.' . $quotedColumnName, $this->platform),
167
+            $discrColumnType->convertToDatabaseValueSQL($tableAlias.'.'.$quotedColumnName, $this->platform),
168 168
             implode(', ', $values)
169 169
         );
170 170
     }
Please login to merge, or discard this patch.