Failed Conditions
Pull Request — develop (#6743)
by Grégoire
62:30
created
lib/Doctrine/ORM/Persisters/Collection/CollectionPersister.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\ORM\Persisters\Collection;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/PersisterException.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\Persisters;
6 6
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     static public function matchingAssocationFieldRequiresObject($class, $associationName)
18 18
     {
19 19
         return new self(sprintf(
20
-            "Cannot match on %s::%s with a non-object value. Matching objects by id is " .
20
+            "Cannot match on %s::%s with a non-object value. Matching objects by id is ".
21 21
             "not compatible with matching on an in-memory collection, which compares objects by reference.",
22 22
             $class, $associationName
23 23
         ));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/EntityPersister.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\ORM\Persisters\Entity;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php 2 patches
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\Persisters\Entity;
6 6
 
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
             $columnType
60 60
         );
61 61
 
62
-        return $columnType->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
62
+        return $columnType->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace Doctrine\ORM\Persisters\Entity;
6 6
 
7
-use Doctrine\ORM\Mapping\ClassMetadata;
8
-use Doctrine\DBAL\Types\Type;
9 7
 use Doctrine\ORM\Mapping\JoinColumnMetadata;
10 8
 
11 9
 /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.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\Persisters;
6 6
 
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
             $expressionList[] = $this->dispatch($child);
83 83
         }
84 84
 
85
-        switch($expr->getType()) {
85
+        switch ($expr->getType()) {
86 86
             case CompositeExpression::TYPE_AND:
87
-                return '(' . implode(' AND ', $expressionList) . ')';
87
+                return '('.implode(' AND ', $expressionList).')';
88 88
 
89 89
             case CompositeExpression::TYPE_OR:
90
-                return '(' . implode(' OR ', $expressionList) . ')';
90
+                return '('.implode(' OR ', $expressionList).')';
91 91
 
92 92
             default:
93
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
93
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
94 94
         }
95 95
     }
96 96
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Utility/IdentifierFlattener.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\Utility;
6 6
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 //     ? $this->unitOfWork->getEntityIdentifier($id[$field])
75 75
                 //     : $targetClassPersister->getIdentifier($id[$field])
76 76
                 // ;
77
-                $identifiers          = $targetClassPersister->getIdentifier($id[$field]);
77
+                $identifiers = $targetClassPersister->getIdentifier($id[$field]);
78 78
 
79 79
                 $associatedId = $this->flattenIdentifier($targetClassMetadata, $identifiers);
80 80
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/PersistentCollection.php 2 patches
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\ORM;
6 6
 
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      */
397 397
     public function containsKey($key)
398 398
     {
399
-        if (! $this->initialized &&
399
+        if ( ! $this->initialized &&
400 400
             $this->association !== null &&
401 401
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
402 402
             $this->association->getIndexedBy()) {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public function contains($element)
415 415
     {
416
-        if (! $this->initialized &&
416
+        if ( ! $this->initialized &&
417 417
             $this->association !== null &&
418 418
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
419 419
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
      */
430 430
     public function get($key)
431 431
     {
432
-        if (! $this->initialized &&
432
+        if ( ! $this->initialized &&
433 433
             $this->association !== null &&
434 434
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY &&
435 435
             $this->association->getIndexedBy()) {
436
-            if (!$this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
436
+            if ( ! $this->typeClass->isIdentifierComposite() && $this->typeClass->isIdentifier($this->association->getIndexedBy())) {
437 437
                 return $this->em->find($this->typeClass->getClassName(), $key);
438 438
             }
439 439
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public function count()
450 450
     {
451
-        if (! $this->initialized &&
451
+        if ( ! $this->initialized &&
452 452
             $this->association !== null &&
453 453
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
454 454
             $persister = $this->em->getUnitOfWork()->getCollectionPersister($this->association);
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     public function slice($offset, $length = null)
604 604
     {
605
-        if (! $this->initialized &&
605
+        if ( ! $this->initialized &&
606 606
             ! $this->isDirty &&
607 607
             $this->association !== null &&
608 608
             $this->association->getFetchMode() === FetchMode::EXTRA_LAZY) {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * INTERNAL:
170 170
      * Sets a keyed element in the collection during hydration.
171 171
      *
172
-     * @param mixed $key     The key to set.
172
+     * @param integer $key     The key to set.
173 173
      * @param mixed $element The element to set.
174 174
      *
175 175
      * @return void
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
      * Internal note: Tried to implement Serializable first but that did not work well
584 584
      *                with circular references. This solution seems simpler and works well.
585 585
      *
586
-     * @return array
586
+     * @return string[]
587 587
      */
588 588
     public function __sleep()
589 589
     {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Printer.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\Query;
6 6
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function startProduction($name)
52 52
     {
53
-        $this->println('(' . $name);
53
+        $this->println('('.$name);
54 54
         $this->indent++;
55 55
     }
56 56
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/FilterCollection.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\Query;
6 6
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * A filter object is in CLEAN state when it has no changed parameters.
20 20
      */
21
-    const FILTERS_STATE_CLEAN  = 1;
21
+    const FILTERS_STATE_CLEAN = 1;
22 22
 
23 23
     /**
24 24
      * A filter object is in DIRTY state when it has changed parameters.
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function enable($name)
90 90
     {
91 91
         if ( ! $this->has($name)) {
92
-            throw new \InvalidArgumentException("Filter '" . $name . "' does not exist.");
92
+            throw new \InvalidArgumentException("Filter '".$name."' does not exist.");
93 93
         }
94 94
 
95 95
         if ( ! $this->isEnabled($name)) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     public function getFilter($name)
142 142
     {
143 143
         if ( ! $this->isEnabled($name)) {
144
-            throw new \InvalidArgumentException("Filter '" . $name . "' is not enabled.");
144
+            throw new \InvalidArgumentException("Filter '".$name."' is not enabled.");
145 145
         }
146 146
 
147 147
         return $this->enabledFilters[$name];
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $filterHash = '';
195 195
 
196 196
         foreach ($this->enabledFilters as $name => $filter) {
197
-            $filterHash .= $name . $filter;
197
+            $filterHash .= $name.$filter;
198 198
         }
199 199
 
200 200
         return $filterHash;
Please login to merge, or discard this patch.