Failed Conditions
Pull Request — master (#7242)
by Gabriel
08:46
created
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.
lib/Doctrine/ORM/Persisters/Entity/AbstractEntityInheritancePersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,6 +56,6 @@
 block discarded – undo
56 56
             $columnType
57 57
         );
58 58
 
59
-        return $columnType->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
59
+        return $columnType->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,13 +73,13 @@
 block discarded – undo
73 73
 
74 74
         switch ($expr->getType()) {
75 75
             case CompositeExpression::TYPE_AND:
76
-                return '(' . implode(' AND ', $expressionList) . ')';
76
+                return '('.implode(' AND ', $expressionList).')';
77 77
 
78 78
             case CompositeExpression::TYPE_OR:
79
-                return '(' . implode(' OR ', $expressionList) . ')';
79
+                return '('.implode(' OR ', $expressionList).')';
80 80
 
81 81
             default:
82
-                throw new \RuntimeException('Unknown composite ' . $expr->getType());
82
+                throw new \RuntimeException('Unknown composite '.$expr->getType());
83 83
         }
84 84
     }
85 85
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlValueVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,13 +79,13 @@
 block discarded – undo
79 79
 
80 80
         switch ($comparison->getOperator()) {
81 81
             case Comparison::CONTAINS:
82
-                return '%' . $value . '%';
82
+                return '%'.$value.'%';
83 83
 
84 84
             case Comparison::STARTS_WITH:
85
-                return $value . '%';
85
+                return $value.'%';
86 86
 
87 87
             case Comparison::ENDS_WITH:
88
-                return '%' . $value;
88
+                return '%'.$value;
89 89
 
90 90
             default:
91 91
                 return $value;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Exception/InvalidOrientation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,6 @@
 block discarded – undo
10 10
 {
11 11
     public static function fromClassNameAndField(string $className, string $field) : self
12 12
     {
13
-        return new self('Invalid order by orientation specified for ' . $className . '#' . $field);
13
+        return new self('Invalid order by orientation specified for '.$className.'#'.$field);
14 14
     }
15 15
 }
Please login to merge, or discard this patch.
Performance/Hydration/MixedQueryFetchJoinArrayHydrationPerformanceBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
                 'u__status'      => 'developer',
64 64
                 'u__username'    => 'jwage',
65 65
                 'u__name'        => 'Jonathan',
66
-                'sclr0'          => 'JWAGE' . $i,
66
+                'sclr0'          => 'JWAGE'.$i,
67 67
                 'p__phonenumber' => '91',
68 68
             ];
69 69
         }
Please login to merge, or discard this patch.
ORM/Cache/Persister/Collection/ReadWriteCachedCollectionPersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $isInitialized = $collection->isInitialized();
62 62
         $isDirty       = $collection->isDirty();
63 63
 
64
-        if (! $isInitialized && ! $isDirty) {
64
+        if ( ! $isInitialized && ! $isDirty) {
65 65
             return;
66 66
         }
67 67
 
Please login to merge, or discard this patch.
tests/Doctrine/Performance/Hydration/SimpleInsertPerformanceBench.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         for ($i = 1; $i <= 10000; ++$i) {
40 40
             $user           = new CMS\CmsUser();
41 41
             $user->status   = 'user';
42
-            $user->username = 'user' . $i;
43
-            $user->name     = 'Mr.Smith-' . $i;
42
+            $user->username = 'user'.$i;
43
+            $user->name     = 'Mr.Smith-'.$i;
44 44
 
45 45
             $this->users[$i] = $user;
46 46
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         // Yes, this is a lot of overhead, but I have no better solution other than
54 54
         // completely mocking out the DB, which would be silly (query impact is
55 55
         // necessarily part of our benchmarks)
56
-        $this->entityManager->getConnection()->executeQuery('DELETE FROM ' . $this->tableName)->execute();
56
+        $this->entityManager->getConnection()->executeQuery('DELETE FROM '.$this->tableName)->execute();
57 57
 
58 58
         foreach ($this->users as $key => $user) {
59 59
             $this->entityManager->persist($user);
Please login to merge, or discard this patch.