Failed Conditions
Pull Request — develop (#6935)
by Michael
65:23
created
lib/Doctrine/ORM/PersistentObject.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * @param string $field
121 121
      * @param array  $args
122 122
      *
123
-     * @return object
123
+     * @return PersistentObject
124 124
      *
125 125
      * @throws \BadMethodCallException   When no persistent field exists by that name.
126 126
      * @throws \InvalidArgumentException When the wrong target object type is passed to an association.
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @param string $field
208 208
      * @param array  $args
209 209
      *
210
-     * @return object
210
+     * @return PersistentObject
211 211
      *
212 212
      * @throws \BadMethodCallException
213 213
      * @throws \InvalidArgumentException
Please login to merge, or discard this 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;
6 6
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         if ($entityManager !== self::$entityManager) {
91 91
             throw new \RuntimeException(
92
-                "Trying to use PersistentObject with different EntityManager instances. " .
92
+                "Trying to use PersistentObject with different EntityManager instances. ".
93 93
                 "Was PersistentObject::setEntityManager() called?"
94 94
             );
95 95
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         $property = $this->cm->getProperty($field);
116 116
 
117
-        if (! $property) {
117
+        if ( ! $property) {
118 118
             throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
119 119
         }
120 120
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
         $property = $this->cm->getProperty($field);
155 155
 
156
-        if (! $property) {
156
+        if ( ! $property) {
157 157
             throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
158 158
         }
159 159
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $mappedByField    = $property->getMappedBy();
180 180
         $targetMetadata   = self::$entityManager->getClassMetadata($property->getTargetEntity());
181 181
         $targetProperty   = $targetMetadata->getProperty($mappedByField);
182
-        $setterMethodName = ($targetProperty instanceof ToManyAssociationMetadata ? 'add' : 'set') . $mappedByField;
182
+        $setterMethodName = ($targetProperty instanceof ToManyAssociationMetadata ? 'add' : 'set').$mappedByField;
183 183
 
184 184
         $targetObject->$setterMethodName($this);
185 185
     }
@@ -201,21 +201,21 @@  discard block
 block discarded – undo
201 201
 
202 202
         $property = $this->cm->getProperty($field);
203 203
 
204
-        if (! $property) {
204
+        if ( ! $property) {
205 205
             throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getClassName()."'");
206 206
         }
207 207
 
208
-        if (! ($property instanceof ToManyAssociationMetadata)) {
208
+        if ( ! ($property instanceof ToManyAssociationMetadata)) {
209 209
             throw new \BadMethodCallException("There is no method add".$field."() on ".$this->cm->getClassName());
210 210
         }
211 211
 
212 212
         $targetClassName = $property->getTargetEntity();
213 213
 
214
-        if (! ($args[0] instanceof $targetClassName)) {
214
+        if ( ! ($args[0] instanceof $targetClassName)) {
215 215
             throw new \InvalidArgumentException("Expected persistent object of type '".$targetClassName."'");
216 216
         }
217 217
 
218
-        if (! ($this->$field instanceof Collection)) {
218
+        if ( ! ($this->$field instanceof Collection)) {
219 219
             $this->$field = new ArrayCollection($this->$field ?: []);
220 220
         }
221 221
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             return;
240 240
         }
241 241
 
242
-        if (!self::$entityManager) {
242
+        if ( ! self::$entityManager) {
243 243
             throw new \RuntimeException("No runtime entity manager set. Call PersistentObject#setEntityManager().");
244 244
         }
245 245
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -1409,7 +1409,6 @@
 block discarded – undo
1409 1409
      * Gets the SQL join fragment used when selecting entities from a
1410 1410
      * many-to-many association.
1411 1411
      *
1412
-     * @param ManyToManyAssociationMetadata $manyToMany
1413 1412
      *
1414 1413
      * @return string
1415 1414
      */
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
 
324 324
         // FIXME: Order with composite keys might not be correct
325 325
         $sql = 'SELECT ' . $columnName
326
-             . ' FROM '  . $tableName
327
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
326
+                . ' FROM '  . $tableName
327
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
328 328
 
329 329
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
330 330
         $versionType = $versionProperty->getType();
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
         }
458 458
 
459 459
         $sql = 'UPDATE ' . $quotedTableName
460
-             . ' SET ' . implode(', ', $set)
461
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
460
+                . ' SET ' . implode(', ', $set)
461
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
462 462
 
463 463
         $result = $this->conn->executeUpdate($sql, $params, $types);
464 464
 
@@ -1626,9 +1626,9 @@  discard block
 block discarded – undo
1626 1626
         $lock  = $this->getLockTablesSql($lockMode);
1627 1627
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1628 1628
         $sql = 'SELECT 1 '
1629
-             . $lock
1630
-             . $where
1631
-             . $lockSql;
1629
+                . $lock
1630
+                . $where
1631
+                . $lockSql;
1632 1632
 
1633 1633
         list($params, $types) = $this->expandParameters($criteria);
1634 1634
 
@@ -2107,8 +2107,8 @@  discard block
 block discarded – undo
2107 2107
         $alias = $this->getSQLTableAlias($this->class->getTableName());
2108 2108
 
2109 2109
         $sql = 'SELECT 1 '
2110
-             . $this->getLockTablesSql(null)
2111
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2110
+                . $this->getLockTablesSql(null)
2111
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2112 2112
 
2113 2113
         list($params, $types) = $this->expandParameters($criteria);
2114 2114
 
@@ -2142,9 +2142,9 @@  discard block
 block discarded – undo
2142 2142
 
2143 2143
         // if one of the join columns is nullable, return left join
2144 2144
         foreach ($association->getJoinColumns() as $joinColumn) {
2145
-             if (! $joinColumn->isNullable()) {
2146
-                 continue;
2147
-             }
2145
+                if (! $joinColumn->isNullable()) {
2146
+                    continue;
2147
+                }
2148 2148
 
2149 2149
             return 'LEFT JOIN';
2150 2150
         }
Please login to merge, or discard this patch.
Spacing   +75 added lines, -75 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
 
@@ -300,14 +300,14 @@  discard block
 block discarded – undo
300 300
         $tableName      = $versionedClass->table->getQuotedQualifiedName($this->platform);
301 301
         $columnName     = $this->platform->quoteIdentifier($versionProperty->getColumnName());
302 302
         $identifier     = array_map(
303
-            function ($columnName) { return $this->platform->quoteIdentifier($columnName); },
303
+            function($columnName) { return $this->platform->quoteIdentifier($columnName); },
304 304
             array_keys($versionedClass->getIdentifierColumns($this->em))
305 305
         );
306 306
 
307 307
         // FIXME: Order with composite keys might not be correct
308
-        $sql = 'SELECT ' . $columnName
309
-             . ' FROM '  . $tableName
310
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
308
+        $sql = 'SELECT '.$columnName
309
+             . ' FROM '.$tableName
310
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
311 311
 
312 312
         $flattenedId = $this->em->getIdentifierFlattener()->flattenIdentifier($versionedClass, $id);
313 313
         $versionType = $versionProperty->getType();
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 
394 394
             if (($value = $identifier[$field]) !== null) {
395 395
                 // @todo guilhermeblanco Make sure we do not have flat association values.
396
-                if (! is_array($value)) {
396
+                if ( ! is_array($value)) {
397 397
                     $value = [$targetClass->identifier[0] => $value];
398 398
                 }
399 399
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
407 407
                 $targetField          = $targetClass->fieldNames[$referencedColumnName];
408 408
 
409
-                if (! $joinColumn->getType()) {
409
+                if ( ! $joinColumn->getType()) {
410 410
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
411 411
                 }
412 412
 
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                         $quotedColumnName     = $this->platform->quoteIdentifier($joinColumn->getColumnName());
475 475
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
476 476
 
477
-                        if (! $joinColumn->getType()) {
477
+                        if ( ! $joinColumn->getType()) {
478 478
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
479 479
                         }
480 480
 
@@ -501,18 +501,18 @@  discard block
 block discarded – undo
501 501
                 case Type::SMALLINT:
502 502
                 case Type::INTEGER:
503 503
                 case Type::BIGINT:
504
-                    $set[] = $versionColumnName . ' = ' . $versionColumnName . ' + 1';
504
+                    $set[] = $versionColumnName.' = '.$versionColumnName.' + 1';
505 505
                     break;
506 506
 
507 507
                 case Type::DATETIME:
508
-                    $set[] = $versionColumnName . ' = CURRENT_TIMESTAMP';
508
+                    $set[] = $versionColumnName.' = CURRENT_TIMESTAMP';
509 509
                     break;
510 510
             }
511 511
         }
512 512
 
513
-        $sql = 'UPDATE ' . $quotedTableName
514
-             . ' SET ' . implode(', ', $set)
515
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
513
+        $sql = 'UPDATE '.$quotedTableName
514
+             . ' SET '.implode(', ', $set)
515
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
516 516
 
517 517
         $result = $this->conn->executeUpdate($sql, $params, $types);
518 518
 
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     protected function deleteJoinTableRecords($identifier)
532 532
     {
533 533
         foreach ($this->class->getDeclaredPropertiesIterator() as $association) {
534
-            if (! ($association instanceof ManyToManyAssociationMetadata)) {
534
+            if ( ! ($association instanceof ManyToManyAssociationMetadata)) {
535 535
                 continue;
536 536
             }
537 537
 
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
             $keys              = [];
545 545
 
546 546
             if ( ! $owningAssociation->isOwningSide()) {
547
-                $class       = $this->em->getClassMetadata($association->getTargetEntity());
547
+                $class = $this->em->getClassMetadata($association->getTargetEntity());
548 548
                 $owningAssociation = $class->getProperty($association->getMappedBy());
549 549
             }
550 550
 
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
             }
657 657
 
658 658
             // Only owning side of x-1 associations can have a FK column.
659
-            if (! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
659
+            if ( ! $property instanceof ToOneAssociationMetadata || ! $property->isOwningSide()) {
660 660
                 continue;
661 661
             }
662 662
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 /** @var JoinColumnMetadata $joinColumn */
677 677
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
678 678
 
679
-                if (! $joinColumn->getType()) {
679
+                if ( ! $joinColumn->getType()) {
680 680
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
681 681
                 }
682 682
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $propertyName = $this->class->fieldNames[$columnName];
706 706
         $property     = $this->class->getProperty($propertyName);
707 707
 
708
-        if (! $property) {
708
+        if ( ! $property) {
709 709
             return null;
710 710
         }
711 711
 
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
             /** @var JoinColumnMetadata $joinColumn */
725 725
             $referencedColumnName = $joinColumn->getReferencedColumnName();
726 726
 
727
-            if (! $joinColumn->getType()) {
727
+            if ( ! $joinColumn->getType()) {
728 728
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
729 729
             }
730 730
 
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
         $criteria       = [];
1062 1062
         $parameters     = [];
1063 1063
 
1064
-        if (! $association->isOwningSide()) {
1064
+        if ( ! $association->isOwningSide()) {
1065 1065
             $class       = $this->em->getClassMetadata($association->getTargetEntity());
1066 1066
             $owningAssoc = $class->getProperty($association->getMappedBy());
1067 1067
         }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 $value = $value[$targetClass->identifier[0]];
1090 1090
             }
1091 1091
 
1092
-            $criteria[$joinTableName . '.' . $quotedColumnName] = $value;
1092
+            $criteria[$joinTableName.'.'.$quotedColumnName] = $value;
1093 1093
             $parameters[] = [
1094 1094
                 'value' => $value,
1095 1095
                 'field' => $fieldName,
@@ -1140,11 +1140,11 @@  discard block
 block discarded – undo
1140 1140
 
1141 1141
         switch ($lockMode) {
1142 1142
             case LockMode::PESSIMISTIC_READ:
1143
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
1143
+                $lockSql = ' '.$this->platform->getReadLockSQL();
1144 1144
                 break;
1145 1145
 
1146 1146
             case LockMode::PESSIMISTIC_WRITE:
1147
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
1147
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
1148 1148
                 break;
1149 1149
         }
1150 1150
 
@@ -1155,14 +1155,14 @@  discard block
 block discarded – undo
1155 1155
 
1156 1156
         if ('' !== $filterSql) {
1157 1157
             $conditionSql = $conditionSql
1158
-                ? $conditionSql . ' AND ' . $filterSql
1158
+                ? $conditionSql.' AND '.$filterSql
1159 1159
                 : $filterSql;
1160 1160
         }
1161 1161
 
1162
-        $select = 'SELECT ' . $columnList;
1163
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1164
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1165
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1162
+        $select = 'SELECT '.$columnList;
1163
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1164
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1165
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1166 1166
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1167 1167
         $query  = $select
1168 1168
             . $lock
@@ -1170,7 +1170,7 @@  discard block
 block discarded – undo
1170 1170
             . $where
1171 1171
             . $orderBySql;
1172 1172
 
1173
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1173
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1174 1174
     }
1175 1175
 
1176 1176
     /**
@@ -1189,13 +1189,13 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
         if ('' !== $filterSql) {
1191 1191
             $conditionSql = $conditionSql
1192
-                ? $conditionSql . ' AND ' . $filterSql
1192
+                ? $conditionSql.' AND '.$filterSql
1193 1193
                 : $filterSql;
1194 1194
         }
1195 1195
 
1196 1196
         $sql = 'SELECT COUNT(*) '
1197
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1198
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1197
+            . 'FROM '.$tableName.' '.$tableAlias
1198
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1199 1199
 
1200 1200
         return $sql;
1201 1201
     }
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
      */
1213 1213
     protected final function getOrderBySQL(array $orderBy, $baseTableAlias)
1214 1214
     {
1215
-        if (! $orderBy) {
1215
+        if ( ! $orderBy) {
1216 1216
             return '';
1217 1217
         }
1218 1218
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         foreach ($orderBy as $fieldName => $orientation) {
1222 1222
             $orientation = strtoupper(trim($orientation));
1223 1223
 
1224
-            if (! in_array($orientation, ['ASC', 'DESC'])) {
1224
+            if ( ! in_array($orientation, ['ASC', 'DESC'])) {
1225 1225
                 throw ORMException::invalidOrientation($this->class->getClassName(), $fieldName);
1226 1226
             }
1227 1227
 
@@ -1231,11 +1231,11 @@  discard block
 block discarded – undo
1231 1231
                 $tableAlias = $this->getSQLTableAlias($property->getTableName());
1232 1232
                 $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1233 1233
 
1234
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1234
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1235 1235
 
1236 1236
                 continue;
1237 1237
             } elseif ($property instanceof AssociationMetadata) {
1238
-                if (! $property->isOwningSide()) {
1238
+                if ( ! $property->isOwningSide()) {
1239 1239
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $fieldName);
1240 1240
                 }
1241 1241
 
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                     /* @var JoinColumnMetadata $joinColumn */
1249 1249
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1250 1250
 
1251
-                    $orderByList[] = $tableAlias . '.' . $quotedColumnName . ' ' . $orientation;
1251
+                    $orderByList[] = $tableAlias.'.'.$quotedColumnName.' '.$orientation;
1252 1252
                 }
1253 1253
 
1254 1254
                 continue;
@@ -1257,7 +1257,7 @@  discard block
 block discarded – undo
1257 1257
             throw ORMException::unrecognizedField($fieldName);
1258 1258
         }
1259 1259
 
1260
-        return ' ORDER BY ' . implode(', ', $orderByList);
1260
+        return ' ORDER BY '.implode(', ', $orderByList);
1261 1261
     }
1262 1262
 
1263 1263
     /**
@@ -1279,7 +1279,7 @@  discard block
 block discarded – undo
1279 1279
 
1280 1280
 
1281 1281
         $this->currentPersisterContext->rsm->addEntityResult($this->class->getClassName(), 'r'); // r for root
1282
-        $this->currentPersisterContext->selectJoinSql    = '';
1282
+        $this->currentPersisterContext->selectJoinSql = '';
1283 1283
 
1284 1284
         $eagerAliasCounter = 0;
1285 1285
         $columnList        = [];
@@ -1315,7 +1315,7 @@  discard block
 block discarded – undo
1315 1315
                         break; // now this is why you shouldn't use inheritance
1316 1316
                     }
1317 1317
 
1318
-                    $assocAlias = 'e' . ($eagerAliasCounter++);
1318
+                    $assocAlias = 'e'.($eagerAliasCounter++);
1319 1319
 
1320 1320
                     $this->currentPersisterContext->rsm->addJoinedEntityResult($targetEntity, $assocAlias, 'r', $fieldName);
1321 1321
 
@@ -1340,14 +1340,14 @@  discard block
 block discarded – undo
1340 1340
                         $this->currentPersisterContext->rsm->addIndexBy($assocAlias, $property->getIndexedBy());
1341 1341
                     }
1342 1342
 
1343
-                    if (! $property->isOwningSide()) {
1343
+                    if ( ! $property->isOwningSide()) {
1344 1344
                         $owningAssociation = $eagerEntity->getProperty($property->getMappedBy());
1345 1345
                     }
1346 1346
 
1347 1347
                     $joinTableAlias = $this->getSQLTableAlias($eagerEntity->getTableName(), $assocAlias);
1348 1348
                     $joinTableName  = $eagerEntity->table->getQuotedQualifiedName($this->platform);
1349 1349
 
1350
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForAssociation($property);
1350
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForAssociation($property);
1351 1351
 
1352 1352
                     $sourceClass      = $this->em->getClassMetadata($owningAssociation->getSourceEntity());
1353 1353
                     $targetClass      = $this->em->getClassMetadata($owningAssociation->getTargetEntity());
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
                         $joinCondition[] = $filterSql;
1370 1370
                     }
1371 1371
 
1372
-                    $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1372
+                    $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1373 1373
                     $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1374 1374
 
1375 1375
                     break;
@@ -1393,7 +1393,7 @@  discard block
 block discarded – undo
1393 1393
      */
1394 1394
     protected function getSelectColumnAssociationSQL($field, AssociationMetadata $association, ClassMetadata $class, $alias = 'r')
1395 1395
     {
1396
-        if (! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1396
+        if ( ! ($association->isOwningSide() && $association instanceof ToOneAssociationMetadata)) {
1397 1397
             return '';
1398 1398
         }
1399 1399
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
             $referencedColumnName = $joinColumn->getReferencedColumnName();
1409 1409
             $resultColumnName     = $this->getSQLColumnAlias();
1410 1410
 
1411
-            if (! $joinColumn->getType()) {
1411
+            if ( ! $joinColumn->getType()) {
1412 1412
                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1413 1413
             }
1414 1414
 
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
         $owningAssociation = $association;
1441 1441
         $sourceTableAlias  = $this->getSQLTableAlias($this->class->getTableName());
1442 1442
 
1443
-        if (! $association->isOwningSide()) {
1443
+        if ( ! $association->isOwningSide()) {
1444 1444
             $targetEntity      = $this->em->getClassMetadata($association->getTargetEntity());
1445 1445
             $owningAssociation = $targetEntity->getProperty($association->getMappedBy());
1446 1446
         }
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
             );
1463 1463
         }
1464 1464
 
1465
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1465
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1466 1466
     }
1467 1467
 
1468 1468
     /**
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
                             $columnName           = $joinColumn->getColumnName();
1558 1558
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
1559 1559
 
1560
-                            if (! $joinColumn->getType()) {
1560
+                            if ( ! $joinColumn->getType()) {
1561 1561
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
1562 1562
                             }
1563 1563
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
 
1597 1597
         $this->currentPersisterContext->rsm->addFieldResult($alias, $columnAlias, $field, $class->getClassName());
1598 1598
 
1599
-        return $property->getType()->convertToPHPValueSQL($sql, $this->platform) . ' AS ' . $columnAlias;
1599
+        return $property->getType()->convertToPHPValueSQL($sql, $this->platform).' AS '.$columnAlias;
1600 1600
     }
1601 1601
 
1602 1602
     /**
@@ -1610,14 +1610,14 @@  discard block
 block discarded – undo
1610 1610
     protected function getSQLTableAlias($tableName, $assocName = '')
1611 1611
     {
1612 1612
         if ($tableName) {
1613
-            $tableName .= '#' . $assocName;
1613
+            $tableName .= '#'.$assocName;
1614 1614
         }
1615 1615
 
1616 1616
         if (isset($this->currentPersisterContext->sqlTableAliases[$tableName])) {
1617 1617
             return $this->currentPersisterContext->sqlTableAliases[$tableName];
1618 1618
         }
1619 1619
 
1620
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1620
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1621 1621
 
1622 1622
         $this->currentPersisterContext->sqlTableAliases[$tableName] = $tableAlias;
1623 1623
 
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
         }
1645 1645
 
1646 1646
         $lock  = $this->getLockTablesSql($lockMode);
1647
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1647
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1648 1648
         $sql = 'SELECT 1 '
1649 1649
              . $lock
1650 1650
              . $where
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
         $tableName = $this->class->table->getQuotedQualifiedName($this->platform);
1668 1668
 
1669 1669
         return $this->platform->appendLockHint(
1670
-            'FROM ' . $tableName . ' ' . $this->getSQLTableAlias($this->class->getTableName()),
1670
+            'FROM '.$tableName.' '.$this->getSQLTableAlias($this->class->getTableName()),
1671 1671
             $lockMode
1672 1672
         );
1673 1673
     }
@@ -1720,19 +1720,19 @@  discard block
 block discarded – undo
1720 1720
 
1721 1721
             if (null !== $comparison) {
1722 1722
                 // special case null value handling
1723
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1724
-                    $selectedColumns[] = $column . ' IS NULL';
1723
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1724
+                    $selectedColumns[] = $column.' IS NULL';
1725 1725
 
1726 1726
                     continue;
1727 1727
                 }
1728 1728
 
1729 1729
                 if ($comparison === Comparison::NEQ && null === $value) {
1730
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1730
+                    $selectedColumns[] = $column.' IS NOT NULL';
1731 1731
 
1732 1732
                     continue;
1733 1733
                 }
1734 1734
 
1735
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1735
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1736 1736
 
1737 1737
                 continue;
1738 1738
             }
@@ -1781,7 +1781,7 @@  discard block
 block discarded – undo
1781 1781
             $tableAlias = $this->getSQLTableAlias($property->getTableName());
1782 1782
             $columnName = $this->platform->quoteIdentifier($property->getColumnName());
1783 1783
 
1784
-            return [$tableAlias . '.' . $columnName];
1784
+            return [$tableAlias.'.'.$columnName];
1785 1785
         }
1786 1786
 
1787 1787
         if ($property instanceof AssociationMetadata) {
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
 
1791 1791
             // Many-To-Many requires join table check for joinColumn
1792 1792
             if ($owningAssociation instanceof ManyToManyAssociationMetadata) {
1793
-                if (! $owningAssociation->isOwningSide()) {
1793
+                if ( ! $owningAssociation->isOwningSide()) {
1794 1794
                     $owningAssociation = $association;
1795 1795
                 }
1796 1796
 
@@ -1804,15 +1804,15 @@  discard block
 block discarded – undo
1804 1804
                 foreach ($joinColumns as $joinColumn) {
1805 1805
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1806 1806
 
1807
-                    $columns[] = $joinTableName . '.' . $quotedColumnName;
1807
+                    $columns[] = $joinTableName.'.'.$quotedColumnName;
1808 1808
                 }
1809 1809
 
1810 1810
             } else {
1811
-                if (! $owningAssociation->isOwningSide()) {
1811
+                if ( ! $owningAssociation->isOwningSide()) {
1812 1812
                     throw ORMException::invalidFindByInverseAssociation($this->class->getClassName(), $field);
1813 1813
                 }
1814 1814
 
1815
-                $class      = $this->class->isInheritedProperty($field)
1815
+                $class = $this->class->isInheritedProperty($field)
1816 1816
                     ? $owningAssociation->getDeclaringClass()
1817 1817
                     : $this->class
1818 1818
                 ;
@@ -1821,7 +1821,7 @@  discard block
 block discarded – undo
1821 1821
                 foreach ($owningAssociation->getJoinColumns() as $joinColumn) {
1822 1822
                     $quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName());
1823 1823
 
1824
-                    $columns[] = $tableAlias . '.' . $quotedColumnName;
1824
+                    $columns[] = $tableAlias.'.'.$quotedColumnName;
1825 1825
                 }
1826 1826
             }
1827 1827
 
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
                 $value = $value[$targetClass->identifier[0]];
1935 1935
             }
1936 1936
 
1937
-            $criteria[$tableAlias . "." . $quotedColumnName] = $value;
1937
+            $criteria[$tableAlias.".".$quotedColumnName] = $value;
1938 1938
             $parameters[] = [
1939 1939
                 'value' => $value,
1940 1940
                 'field' => $fieldName,
@@ -2021,7 +2021,7 @@  discard block
 block discarded – undo
2021 2021
             case ($property instanceof AssociationMetadata):
2022 2022
                 $class = $this->em->getClassMetadata($property->getTargetEntity());
2023 2023
 
2024
-                if (! $property->isOwningSide()) {
2024
+                if ( ! $property->isOwningSide()) {
2025 2025
                     $property = $class->getProperty($property->getMappedBy());
2026 2026
                     $class    = $this->em->getClassMetadata($property->getTargetEntity());
2027 2027
                 }
@@ -2035,7 +2035,7 @@  discard block
 block discarded – undo
2035 2035
                     /** @var JoinColumnMetadata $joinColumn */
2036 2036
                     $referencedColumnName = $joinColumn->getReferencedColumnName();
2037 2037
 
2038
-                    if (! $joinColumn->getType()) {
2038
+                    if ( ! $joinColumn->getType()) {
2039 2039
                         $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $class, $this->em));
2040 2040
                     }
2041 2041
 
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
         }
2051 2051
 
2052 2052
         if (is_array($value)) {
2053
-            return array_map(function ($type) {
2053
+            return array_map(function($type) {
2054 2054
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
2055 2055
             }, $types);
2056 2056
         }
@@ -2129,12 +2129,12 @@  discard block
 block discarded – undo
2129 2129
 
2130 2130
         $sql = 'SELECT 1 '
2131 2131
              . $this->getLockTablesSql(null)
2132
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
2132
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
2133 2133
 
2134 2134
         list($params, $types) = $this->expandParameters($criteria);
2135 2135
 
2136 2136
         if (null !== $extraConditions) {
2137
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
2137
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
2138 2138
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
2139 2139
 
2140 2140
             $params = array_merge($params, $criteriaParams);
@@ -2142,7 +2142,7 @@  discard block
 block discarded – undo
2142 2142
         }
2143 2143
 
2144 2144
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
2145
-            $sql .= ' AND ' . $filterSql;
2145
+            $sql .= ' AND '.$filterSql;
2146 2146
         }
2147 2147
 
2148 2148
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2157,13 +2157,13 @@  discard block
 block discarded – undo
2157 2157
      */
2158 2158
     protected function getJoinSQLForAssociation(AssociationMetadata $association)
2159 2159
     {
2160
-        if (! $association->isOwningSide()) {
2160
+        if ( ! $association->isOwningSide()) {
2161 2161
             return 'LEFT JOIN';
2162 2162
         }
2163 2163
 
2164 2164
         // if one of the join columns is nullable, return left join
2165 2165
         foreach ($association->getJoinColumns() as $joinColumn) {
2166
-             if (! $joinColumn->isNullable()) {
2166
+             if ( ! $joinColumn->isNullable()) {
2167 2167
                  continue;
2168 2168
              }
2169 2169
 
@@ -2180,7 +2180,7 @@  discard block
 block discarded – undo
2180 2180
      */
2181 2181
     public function getSQLColumnAlias()
2182 2182
     {
2183
-        return $this->platform->getSQLResultCasing('c' . $this->currentPersisterContext->sqlAliasCounter++);
2183
+        return $this->platform->getSQLResultCasing('c'.$this->currentPersisterContext->sqlAliasCounter++);
2184 2184
     }
2185 2185
 
2186 2186
     /**
@@ -2197,13 +2197,13 @@  discard block
 block discarded – undo
2197 2197
 
2198 2198
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2199 2199
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2200
-                $filterClauses[] = '(' . $filterExpr . ')';
2200
+                $filterClauses[] = '('.$filterExpr.')';
2201 2201
             }
2202 2202
         }
2203 2203
 
2204 2204
         $sql = implode(' AND ', $filterClauses);
2205 2205
 
2206
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2206
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2207 2207
     }
2208 2208
 
2209 2209
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/Console/Command/MappingDescribeCommand.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @param string                 $entityName    Full or partial entity name
166 166
      * @param EntityManagerInterface $entityManager
167 167
      *
168
-     * @return \Doctrine\ORM\Mapping\ClassMetadata
168
+     * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata
169 169
      */
170 170
     private function getClassMetadata($entityName, EntityManagerInterface $entityManager)
171 171
     {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @param string $label Label for the value
249 249
      * @param mixed  $value A Value to show
250 250
      *
251
-     * @return array
251
+     * @return string[]
252 252
      */
253 253
     private function formatField($label, $value)
254 254
     {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      *
348 348
      * @param array $entityListeners
349 349
      *
350
-     * @return array
350
+     * @return string[]
351 351
      */
352 352
     private function formatEntityListeners(array $entityListeners)
353 353
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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\Console\Command;
6 6
 
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 
166 166
         $matches = array_filter(
167 167
             $this->getMappedEntities($entityManager),
168
-            function ($mappedEntity) use ($entityName) {
169
-                return preg_match('{' . preg_quote($entityName) . '}', $mappedEntity);
168
+            function($mappedEntity) use ($entityName) {
169
+                return preg_match('{'.preg_quote($entityName).'}', $mappedEntity);
170 170
             }
171 171
         );
172 172
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
             $output[] = $this->formatField(
225 225
                 sprintf('  %s', $parentClass->getParent()),
226
-                ($parentClass->isRootEntity() ? '(Root) ' : '') . $this->formatValue($attributes)
226
+                ($parentClass->isRootEntity() ? '(Root) ' : '').$this->formatValue($attributes)
227 227
             );
228 228
         }
229 229
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         }
249 249
 
250 250
         if (is_bool($value)) {
251
-            return '<comment>' . ($value ? 'True' : 'False') . '</comment>';
251
+            return '<comment>'.($value ? 'True' : 'False').'</comment>';
252 252
         }
253 253
 
254 254
         if (empty($value)) {
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         return $this->formatField(
387 387
             'Entity listeners',
388 388
             array_map(
389
-                function ($entityListener) {
389
+                function($entityListener) {
390 390
                     return get_class($entityListener);
391 391
                 },
392 392
                 $entityListeners
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -330,7 +330,7 @@
 block discarded – undo
330 330
 
331 331
             if ($property instanceof FieldMetadata) {
332 332
                 $output = array_merge($output, $this->formatColumn($property));
333
-            }  elseif ($property instanceof AssociationMetadata) {
333
+            } elseif ($property instanceof AssociationMetadata) {
334 334
                 // @todo guilhermeblanco Fix me! We are trying to iterate through an AssociationMetadata instance
335 335
                 foreach ($property as $field => $value) {
336 336
                     $output[] = $this->formatField(sprintf('    %s', $field), $this->formatValue($value));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/AdvancedAssociationTest.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     /**
236 236
      *
237
-     * @return kateglo\application\helpers\collections\ArrayCollection
237
+     * @return ArrayCollection
238 238
      */
239 239
     public function getTypes()
240 240
     {
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
     /**
339 339
      *
340
-     * @param kateglo\application\models\Lemma $lemma
340
+     * @param Lemma $lemma
341 341
      * @return void
342 342
      */
343 343
     public function addLemma(Lemma $lemma)
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
     /**
352 352
      *
353
-     * @param kateglo\application\models\Lemma $lemma
353
+     * @param Lemma $lemma
354 354
      * @return void
355 355
      */
356 356
     public function removeLEmma(Lemma $lemma)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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\Tests\ORM\Functional;
6 6
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      *
207 207
      * @return string
208 208
      */
209
-    public function getLemma(){
209
+    public function getLemma() {
210 210
         return $this->lemma;
211 211
     }
212 212
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function addType(Type $type)
217 217
     {
218
-        if (!$this->types->contains($type)) {
218
+        if ( ! $this->types->contains($type)) {
219 219
             $this->types[] = $type;
220 220
             $type->addLemma($this);
221 221
         }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function addLemma(Lemma $lemma)
344 344
     {
345
-        if (!$this->lemmas->contains($lemma)) {
345
+        if ( ! $this->lemmas->contains($lemma)) {
346 346
             $this->lemmas[] = $lemma;
347 347
             $lemma->addType($this);
348 348
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/LifecycleCallbackTest.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -396,8 +396,16 @@
 block discarded – undo
396 396
     private $name;
397 397
     public function getId() {return $this->id;}
398 398
     public function getValue() {return $this->value;}
399
+
400
+    /**
401
+     * @param string $value
402
+     */
399 403
     public function setValue($value) {$this->value = $value;}
400 404
     public function getName() {return $this->name;}
405
+
406
+    /**
407
+     * @param string $name
408
+     */
401 409
     public function setName($name) {$this->name = $name;}
402 410
     /** @ORM\PreUpdate */
403 411
     public function testCallback() {$this->value = 'Hello World';}
Please login to merge, or discard this patch.
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\Tests\ORM\Functional;
6 6
 
@@ -394,13 +394,13 @@  discard block
 block discarded – undo
394 394
     private $value;
395 395
     /** @ORM\Column(type="string") */
396 396
     private $name;
397
-    public function getId() {return $this->id;}
398
-    public function getValue() {return $this->value;}
399
-    public function setValue($value) {$this->value = $value;}
400
-    public function getName() {return $this->name;}
401
-    public function setName($name) {$this->name = $name;}
397
+    public function getId() {return $this->id; }
398
+    public function getValue() {return $this->value; }
399
+    public function setValue($value) {$this->value = $value; }
400
+    public function getName() {return $this->name; }
401
+    public function setName($name) {$this->name = $name; }
402 402
     /** @ORM\PreUpdate */
403
-    public function testCallback() {$this->value = 'Hello World';}
403
+    public function testCallback() {$this->value = 'Hello World'; }
404 404
 }
405 405
 
406 406
 /**
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/NotifyPolicyTest.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -100,6 +100,9 @@  discard block
 block discarded – undo
100 100
         $this->listeners[] = $listener;
101 101
     }
102 102
 
103
+    /**
104
+     * @param string $propName
105
+     */
103 106
     protected function onPropertyChanged($propName, $oldValue, $newValue) {
104 107
         if ($this->listeners) {
105 108
             foreach ($this->listeners as $listener) {
@@ -132,6 +135,9 @@  discard block
 block discarded – undo
132 135
         return $this->name;
133 136
     }
134 137
 
138
+    /**
139
+     * @param string $name
140
+     */
135 141
     public function setName($name) {
136 142
         $this->onPropertyChanged('name', $this->name, $name);
137 143
         $this->name = $name;
@@ -165,6 +171,9 @@  discard block
 block discarded – undo
165 171
         return $this->name;
166 172
     }
167 173
 
174
+    /**
175
+     * @param string $name
176
+     */
168 177
     public function setName($name) {
169 178
         $this->onPropertyChanged('name', $this->name, $name);
170 179
         $this->name = $name;
Please login to merge, or discard this 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\Tests\ORM\Functional;
6 6
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/PaginationTest.php 2 patches
Doc Comments   +24 added lines patch added patch discarded remove patch
@@ -120,6 +120,10 @@  discard block
 block discarded – undo
120 120
         self::assertCount(3, $paginator->getIterator());
121 121
     }
122 122
 
123
+    /**
124
+     * @param string $baseDql
125
+     * @param string $checkField
126
+     */
123 127
     private function iterateWithOrderAsc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
124 128
     {
125 129
         // Ascending
@@ -134,6 +138,10 @@  discard block
 block discarded – undo
134 138
         self::assertEquals($checkField . "0", $result[0]->$checkField);
135 139
     }
136 140
 
141
+    /**
142
+     * @param string $baseDql
143
+     * @param string $checkField
144
+     */
137 145
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
138 146
     {
139 147
         // Ascending
@@ -150,6 +158,10 @@  discard block
 block discarded – undo
150 158
         self::assertEquals($checkField . "0", $result[0]->$checkField);
151 159
     }
152 160
 
161
+    /**
162
+     * @param string $baseDql
163
+     * @param string $checkField
164
+     */
153 165
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
154 166
     {
155 167
         // Ascending
@@ -166,6 +178,10 @@  discard block
 block discarded – undo
166 178
         self::assertEquals($checkField . "3", $result[0]->$checkField);
167 179
     }
168 180
 
181
+    /**
182
+     * @param string $baseDql
183
+     * @param string $checkField
184
+     */
169 185
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
170 186
     {
171 187
         $dql = "$baseDql DESC";
@@ -179,6 +195,10 @@  discard block
 block discarded – undo
179 195
         self::assertEquals($checkField . "8", $result[0]->$checkField);
180 196
     }
181 197
 
198
+    /**
199
+     * @param string $baseDql
200
+     * @param string $checkField
201
+     */
182 202
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
183 203
     {
184 204
         $dql = "$baseDql DESC";
@@ -194,6 +214,10 @@  discard block
 block discarded – undo
194 214
         self::assertEquals($checkField . "8", $result[0]->$checkField);
195 215
     }
196 216
 
217
+    /**
218
+     * @param string $baseDql
219
+     * @param string $checkField
220
+     */
197 221
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
198 222
     {
199 223
         $dql = "$baseDql DESC";
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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\Tests\ORM\Functional;
6 6
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $iter = $paginator->getIterator();
132 132
         self::assertCount(9, $iter);
133 133
         $result = iterator_to_array($iter);
134
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
134
+        self::assertEquals($checkField."0", $result[0]->$checkField);
135 135
     }
136 136
 
137 137
     private function iterateWithOrderAscWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $iter = $paginator->getIterator();
148 148
         self::assertCount(3, $iter);
149 149
         $result = iterator_to_array($iter);
150
-        self::assertEquals($checkField . "0", $result[0]->$checkField);
150
+        self::assertEquals($checkField."0", $result[0]->$checkField);
151 151
     }
152 152
 
153 153
     private function iterateWithOrderAscWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $iter = $paginator->getIterator();
164 164
         self::assertCount(3, $iter);
165 165
         $result = iterator_to_array($iter);
166
-        self::assertEquals($checkField . "3", $result[0]->$checkField);
166
+        self::assertEquals($checkField."3", $result[0]->$checkField);
167 167
     }
168 168
 
169 169
     private function iterateWithOrderDesc($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         $iter = $paginator->getIterator();
177 177
         self::assertCount(9, $iter);
178 178
         $result = iterator_to_array($iter);
179
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
179
+        self::assertEquals($checkField."8", $result[0]->$checkField);
180 180
     }
181 181
 
182 182
     private function iterateWithOrderDescWithLimit($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $iter = $paginator->getIterator();
192 192
         self::assertCount(3, $iter);
193 193
         $result = iterator_to_array($iter);
194
-        self::assertEquals($checkField . "8", $result[0]->$checkField);
194
+        self::assertEquals($checkField."8", $result[0]->$checkField);
195 195
     }
196 196
 
197 197
     private function iterateWithOrderDescWithLimitAndOffset($useOutputWalkers, $fetchJoinCollection, $baseDql, $checkField)
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $iter = $paginator->getIterator();
207 207
         self::assertCount(3, $iter);
208 208
         $result = iterator_to_array($iter);
209
-        self::assertEquals($checkField . "5", $result[0]->$checkField);
209
+        self::assertEquals($checkField."5", $result[0]->$checkField);
210 210
     }
211 211
 
212 212
     /**
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBoth($useOutputWalkers)
480 480
     {
481 481
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
482
-        $dqlAsc = $dql . " ASC, d.name";
483
-        $dqlDesc = $dql . " DESC, d.name";
482
+        $dqlAsc = $dql." ASC, d.name";
483
+        $dqlDesc = $dql." DESC, d.name";
484 484
         $this->iterateWithOrderAsc($useOutputWalkers, true, $dqlAsc, "name");
485 485
         $this->iterateWithOrderDesc($useOutputWalkers, true, $dqlDesc, "name");
486 486
     }
@@ -488,8 +488,8 @@  discard block
 block discarded – undo
488 488
     public function testIterateWithFetchJoinOneToManyWithOrderByColumnFromBothWithLimitWithOutputWalker()
489 489
     {
490 490
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
491
-        $dqlAsc = $dql . " ASC, d.name";
492
-        $dqlDesc = $dql . " DESC, d.name";
491
+        $dqlAsc = $dql." ASC, d.name";
492
+        $dqlDesc = $dql." DESC, d.name";
493 493
         $this->iterateWithOrderAscWithLimit(true, true, $dqlAsc, "name");
494 494
         $this->iterateWithOrderDescWithLimit(true, true, $dqlDesc, "name");
495 495
     }
@@ -500,8 +500,8 @@  discard block
 block discarded – undo
500 500
         $this->expectExceptionMessage('Cannot select distinct identifiers from query with LIMIT and ORDER BY on a column from a fetch joined to-many association. Use output walkers.');
501 501
 
502 502
         $dql = 'SELECT c, d FROM Doctrine\Tests\Models\Pagination\Company c JOIN c.departments d ORDER BY c.name';
503
-        $dqlAsc = $dql . " ASC, d.name";
504
-        $dqlDesc = $dql . " DESC, d.name";
503
+        $dqlAsc = $dql." ASC, d.name";
504
+        $dqlDesc = $dql." DESC, d.name";
505 505
         $this->iterateWithOrderAscWithLimit(false, true, $dqlAsc, "name");
506 506
         $this->iterateWithOrderDescWithLimit(false, true, $dqlDesc, "name");
507 507
     }
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         $users = iterator_to_array($paginator->getIterator());
586 586
         self::assertCount(9, $users);
587 587
         foreach ($users as $i => $user) {
588
-            self::assertEquals("username" . (8 - $i), $user->username);
588
+            self::assertEquals("username".(8 - $i), $user->username);
589 589
         }
590 590
     }
591 591
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
             $company->logo->image_width = 100 + $i;
736 736
             $company->logo->image_height = 100 + $i;
737 737
             $company->logo->company = $company;
738
-            for($j=0;$j<3;$j++) {
738
+            for ($j = 0; $j < 3; $j++) {
739 739
                 $department = new Department();
740 740
                 $department->name = "name$i$j";
741 741
                 $department->company = $company;
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -91,6 +91,10 @@
 block discarded – undo
91 91
     /** @ORM\Column(type="integer") */
92 92
     public $numericValue;
93 93
 
94
+    /**
95
+     * @param string $name
96
+     * @param integer $number
97
+     */
94 98
     public function __construct($name, $number)
95 99
     {
96 100
         $this->name = $name;
Please login to merge, or discard this 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\Tests\ORM\Functional;
6 6
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
                 $this->em->getClassMetadata(ReadOnlyEntity::class),
25 25
                 ]
26 26
             );
27
-        } catch(\Exception $e) {
27
+        } catch (\Exception $e) {
28 28
         }
29 29
     }
30 30
 
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1430Test.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -184,6 +184,9 @@
 block discarded – undo
184 184
      */
185 185
     private $products;
186 186
 
187
+    /**
188
+     * @param string $status
189
+     */
187 190
     public function __construct($status)
188 191
     {
189 192
         $this->status   = $status;
Please login to merge, or discard this 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\Tests\ORM\Functional\Ticket;
6 6
 
Please login to merge, or discard this patch.