Failed Conditions
Pull Request — develop (#6600)
by Mike
62:56
created
lib/Doctrine/ORM/Tools/Pagination/RowNumberOverFunction.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\Tools\Pagination;
7 7
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
31 31
     {
32
-        return 'ROW_NUMBER() OVER(' . trim($sqlWalker->walkOrderByClause(
32
+        return 'ROW_NUMBER() OVER('.trim($sqlWalker->walkOrderByClause(
33 33
             $this->orderByClause
34
-        )) . ')';
34
+        )).')';
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/CountOutputWalker.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\Tools\Pagination;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/Paginator.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\Tools\Pagination;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/CountWalker.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\Tools\Pagination;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/WhereInWalker.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\Tools\Pagination;
6 6
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 [$pathExpression]
98 98
             );
99 99
             $expression = new InExpression($arithmeticExpression);
100
-            $expression->literals[] = new InputParameter(":" . self::PAGINATOR_ID_ALIAS);
100
+            $expression->literals[] = new InputParameter(":".self::PAGINATOR_ID_ALIAS);
101 101
 
102 102
         } else {
103 103
             $expression = new NullComparisonExpression($pathExpression);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryWalker.php 1 patch
Spacing   +3 added lines, -3 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\Tools\Pagination;
6 6
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         if ($property instanceof AssociationMetadata) {
74 74
             throw new \RuntimeException(
75
-                "Paginating an entity with foreign key as identifier only works when using the Output Walkers. " .
75
+                "Paginating an entity with foreign key as identifier only works when using the Output Walkers. ".
76 76
                 "Call Paginator#setUseOutputWalkers(true) before iterating the paginator."
77 77
             );
78 78
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
                 $AST->selectClause->selectExpressions[] = new SelectExpression(
101 101
                     $this->createSelectExpressionItem($item->expression),
102
-                    '_dctrn_ord' . $this->aliasCounter++
102
+                    '_dctrn_ord'.$this->aliasCounter++
103 103
                 );
104 104
             }
105 105
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Pagination/LimitSubqueryOutputWalker.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\ORM\Tools\Pagination;
6 6
 
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
 
195 195
         $innerSql           = $this->getInnerSQL($AST);
196 196
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
197
-        $sqlAliasIdentifier = array_map(function ($info) { return $info['alias']; }, $sqlIdentifier);
197
+        $sqlAliasIdentifier = array_map(function($info) { return $info['alias']; }, $sqlIdentifier);
198 198
 
199 199
         if ($hasOrderBy) {
200
-            $orderGroupBy = ' GROUP BY ' . implode(', ', $sqlAliasIdentifier);
201
-            $sqlPiece     = 'MIN(' . $this->walkResultVariable('dctrn_rownum') . ') AS dctrn_minrownum';
200
+            $orderGroupBy = ' GROUP BY '.implode(', ', $sqlAliasIdentifier);
201
+            $sqlPiece     = 'MIN('.$this->walkResultVariable('dctrn_rownum').') AS dctrn_minrownum';
202 202
 
203 203
             $sqlAliasIdentifier[] = $sqlPiece;
204 204
             $sqlIdentifier[] = [
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $sql = sprintf('SELECT DISTINCT %s FROM (%s) dctrn_result', implode(', ', $sqlAliasIdentifier), $innerSql);
212 212
 
213 213
         if ($hasOrderBy) {
214
-            $sql .= $orderGroupBy . $outerOrderBy;
214
+            $sql .= $orderGroupBy.$outerOrderBy;
215 215
         }
216 216
 
217 217
         // Apply the limit and offset.
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
         $innerSql           = $this->getInnerSQL($AST);
258 258
         $sqlIdentifier      = $this->getSQLIdentifier($AST);
259
-        $sqlAliasIdentifier = array_map(function ($info) { return $info['alias']; }, $sqlIdentifier);
259
+        $sqlAliasIdentifier = array_map(function($info) { return $info['alias']; }, $sqlIdentifier);
260 260
 
261 261
         // Build the counter query
262 262
         $sql = sprintf('SELECT DISTINCT %s FROM (%s) dctrn_result', implode(', ', $sqlAliasIdentifier), $innerSql);
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
         array $sqlIdentifier,
362 362
         string $innerSql,
363 363
         string $sql,
364
-        ?OrderByClause $orderByClause
364
+        ? OrderByClause $orderByClause
365 365
     ) : string {
366 366
         // If the sql statement has an order by clause, we need to wrap it in a new select distinct statement
367
-        if (! $orderByClause) {
367
+        if ( ! $orderByClause) {
368 368
             return $sql;
369 369
         }
370 370
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
             $orderByItems[] = $orderByItemString;
407 407
             $identifier     = \substr($orderByItemString, 0, \strrpos($orderByItemString, ' '));
408 408
 
409
-            if (! \in_array($identifier, $identifiers, true)) {
409
+            if ( ! \in_array($identifier, $identifiers, true)) {
410 410
                 $identifiers[] = $identifier;
411 411
             }
412 412
         }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
      */
563 563
     public function walkPathExpression($pathExpr)
564 564
     {
565
-        if (!$this->inSubSelect && !$this->platformSupportsRowNumber() && !in_array($pathExpr, $this->orderByPathExpressions)) {
565
+        if ( ! $this->inSubSelect && ! $this->platformSupportsRowNumber() && ! in_array($pathExpr, $this->orderByPathExpressions)) {
566 566
             $this->orderByPathExpressions[] = $pathExpr;
567 567
         }
568 568
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/SchemaValidator.php 1 patch
Spacing   +13 added lines, -13 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\Tools;
6 6
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $ce = [];
82 82
 
83 83
         foreach ($class->getProperties() as $fieldName => $association) {
84
-            if (! ($association instanceof AssociationMetadata)) {
84
+            if ( ! ($association instanceof AssociationMetadata)) {
85 85
                 continue;
86 86
             }
87 87
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         foreach ($class->getSubClasses() as $subClass) {
92
-            if (!in_array($class->getClassName(), class_parents($subClass))) {
92
+            if ( ! in_array($class->getClassName(), class_parents($subClass))) {
93 93
                 $message = "According to the discriminator map class, '%s' has to be a child of '%s', but these entities are not related through inheritance.";
94 94
 
95 95
                 $ce[] = sprintf($message, $subClass, $class->getClassName());
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $fieldName       = $association->getName();
112 112
         $targetEntity    = $association->getTargetEntity();
113 113
 
114
-        if (!class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
114
+        if ( ! class_exists($targetEntity) || $metadataFactory->isTransient($targetEntity)) {
115 115
             $message = "The target entity '%s' specified on %s#%s is unknown or not an entity.";
116 116
 
117 117
             return [
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         /** @var ClassMetadata $targetMetadata */
134 134
         $targetMetadata    = $metadataFactory->getMetadataFor($targetEntity);
135
-        $containsForeignId = array_filter($targetMetadata->identifier, function ($identifier) use ($targetMetadata) {
135
+        $containsForeignId = array_filter($targetMetadata->identifier, function($identifier) use ($targetMetadata) {
136 136
             $targetProperty = $targetMetadata->getProperty($identifier);
137 137
 
138 138
             return $targetProperty instanceof AssociationMetadata;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             /** @var AssociationMetadata $targetAssociation */
149 149
             $targetAssociation = $targetMetadata->getProperty($mappedBy);
150 150
 
151
-            if (! $targetAssociation) {
151
+            if ( ! $targetAssociation) {
152 152
                 $message = "The association %s#%s refers to the owning side property %s#%s which does not exist.";
153 153
 
154 154
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $mappedBy);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             /** @var AssociationMetadata $targetAssociation */
173 173
             $targetAssociation = $targetMetadata->getProperty($inversedBy);
174 174
 
175
-            if (! $targetAssociation) {
175
+            if ( ! $targetAssociation) {
176 176
                 $message = "The association %s#%s refers to the inverse side property %s#%s which does not exist.";
177 177
 
178 178
                 $ce[] = sprintf($message, $class->getClassName(), $fieldName, $targetEntity, $inversedBy);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                 $joinTable               = $association->getJoinTable();
217 217
 
218 218
                 foreach ($joinTable->getJoinColumns() as $joinColumn) {
219
-                    if (! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) {
219
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $classIdentifierColumns)) {
220 220
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
221 221
 
222 222
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $class->getClassName());
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                 }
226 226
 
227 227
                 foreach ($joinTable->getInverseJoinColumns() as $inverseJoinColumn) {
228
-                    if (! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) {
228
+                    if ( ! in_array($inverseJoinColumn->getReferencedColumnName(), $targetIdentifierColumns)) {
229 229
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
230 230
 
231 231
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
                 if (count($targetIdentifierColumns) !== count($joinTable->getInverseJoinColumns())) {
237 237
                     $columnNames = array_map(
238
-                        function (JoinColumnMetadata $joinColumn) {
238
+                        function(JoinColumnMetadata $joinColumn) {
239 239
                             return $joinColumn->getReferencedColumnName();
240 240
                         },
241 241
                         $joinTable->getInverseJoinColumns()
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
                 if (count($classIdentifierColumns) !== count($joinTable->getJoinColumns())) {
252 252
                     $columnNames = array_map(
253
-                        function (JoinColumnMetadata $joinColumn) {
253
+                        function(JoinColumnMetadata $joinColumn) {
254 254
                             return $joinColumn->getReferencedColumnName();
255 255
                         },
256 256
                         $joinTable->getJoinColumns()
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
                 $joinColumns       = $association->getJoinColumns();
268 268
 
269 269
                 foreach ($joinColumns as $joinColumn) {
270
-                    if (!in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) {
270
+                    if ( ! in_array($joinColumn->getReferencedColumnName(), $identifierColumns)) {
271 271
                         $message = "The referenced column name '%s' has to be a primary key column on the target entity class '%s'.";
272 272
 
273 273
                         $ce[] = sprintf($message, $joinColumn->getReferencedColumnName(), $targetMetadata->getClassName());
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     continue;
299 299
                 }
300 300
 
301
-                if (! ($targetProperty instanceof AssociationMetadata)) {
301
+                if ( ! ($targetProperty instanceof AssociationMetadata)) {
302 302
                     $message = "The association %s#%s is ordered by a property '%s' that is non-existing field on the target entity '%s'.";
303 303
 
304 304
                     $ce[] = sprintf($message, $class->getClassName(), $fieldName, $orderField, $targetMetadata->getClassName());
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/MetadataFilter.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\Tools\Console;
6 6
 
Please login to merge, or discard this patch.