Passed
Pull Request — master (#7825)
by
unknown
11:38
created
lib/Doctrine/ORM/Persisters/Entity/JoinedSubclassPersister.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             }
109 109
 
110 110
             foreach ($data as $columnName => $value) {
111
-                if (! is_array($id) || ! isset($id[$columnName])) {
111
+                if ( ! is_array($id) || ! isset($id[$columnName])) {
112 112
                     $type = $this->columns[$columnName]->getType();
113 113
 
114 114
                     $stmt->bindValue($paramIndex++, $value, $type);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $updateData = $this->prepareUpdateData($entity);
134 134
 
135
-        if (! $updateData) {
135
+        if ( ! $updateData) {
136 136
             return;
137 137
         }
138 138
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             $versionedClass = $this->class->versionProperty->getDeclaringClass();
151 151
             $versionedTable = $versionedClass->getTableName();
152 152
 
153
-            if (! isset($updateData[$versionedTable])) {
153
+            if ( ! isset($updateData[$versionedTable])) {
154 154
                 $tableName = $versionedClass->table->getQuotedQualifiedName($this->platform);
155 155
 
156 156
                 $this->updateTable($entity, $tableName, [], true);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
         if ($filterSql) {
233 233
             $conditionSql .= $conditionSql
234
-                ? ' AND ' . $filterSql
234
+                ? ' AND '.$filterSql
235 235
                 : $filterSql;
236 236
         }
237 237
 
@@ -239,26 +239,26 @@  discard block
 block discarded – undo
239 239
 
240 240
         switch ($lockMode) {
241 241
             case LockMode::PESSIMISTIC_READ:
242
-                $lockSql = ' ' . $this->platform->getReadLockSQL();
242
+                $lockSql = ' '.$this->platform->getReadLockSQL();
243 243
                 break;
244 244
 
245 245
             case LockMode::PESSIMISTIC_WRITE:
246
-                $lockSql = ' ' . $this->platform->getWriteLockSQL();
246
+                $lockSql = ' '.$this->platform->getWriteLockSQL();
247 247
                 break;
248 248
         }
249 249
 
250 250
         $tableName  = $this->class->table->getQuotedQualifiedName($this->platform);
251
-        $from       = ' FROM ' . $tableName . ' ' . $baseTableAlias;
252
-        $where      = $conditionSql !== '' ? ' WHERE ' . $conditionSql : '';
251
+        $from       = ' FROM '.$tableName.' '.$baseTableAlias;
252
+        $where      = $conditionSql !== '' ? ' WHERE '.$conditionSql : '';
253 253
         $lock       = $this->platform->appendLockHint($from, $lockMode);
254 254
         $columnList = $this->getSelectColumnsSQL();
255
-        $query      = 'SELECT ' . $columnList
255
+        $query      = 'SELECT '.$columnList
256 256
                     . $lock
257 257
                     . $joinSql
258 258
                     . $where
259 259
                     . $orderBySql;
260 260
 
261
-        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0) . $lockSql;
261
+        return $this->platform->modifyLimitQuery($query, $limit, $offset ?? 0).$lockSql;
262 262
     }
263 263
 
264 264
     /**
@@ -280,14 +280,14 @@  discard block
 block discarded – undo
280 280
 
281 281
         if ($filterSql !== '') {
282 282
             $conditionSql = $conditionSql
283
-                ? $conditionSql . ' AND ' . $filterSql
283
+                ? $conditionSql.' AND '.$filterSql
284 284
                 : $filterSql;
285 285
         }
286 286
 
287 287
         return 'SELECT COUNT(*) '
288
-            . 'FROM ' . $tableName . ' ' . $baseTableAlias
288
+            . 'FROM '.$tableName.' '.$baseTableAlias
289 289
             . $joinSql
290
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
290
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
291 291
     }
292 292
 
293 293
     /**
@@ -306,18 +306,18 @@  discard block
 block discarded – undo
306 306
             $conditions = [];
307 307
             $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
308 308
             $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
309
-            $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
309
+            $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
310 310
 
311 311
             foreach ($identifierColumns as $idColumn) {
312 312
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
313 313
 
314
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
314
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
315 315
             }
316 316
 
317 317
             $joinSql .= implode(' AND ', $conditions);
318 318
         }
319 319
 
320
-        return parent::getLockTablesSql($lockMode) . $joinSql;
320
+        return parent::getLockTablesSql($lockMode).$joinSql;
321 321
     }
322 322
 
323 323
     /**
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                 continue;
345 345
             }
346 346
 
347
-            if (! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
347
+            if ( ! ($property instanceof ToOneAssociationMetadata) || ! $property->isOwningSide()) {
348 348
                 continue;
349 349
             }
350 350
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                 /** @var JoinColumnMetadata $joinColumn */
355 355
                 $referencedColumnName = $joinColumn->getReferencedColumnName();
356 356
 
357
-                if (! $joinColumn->getType()) {
357
+                if ( ! $joinColumn->getType()) {
358 358
                     $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
359 359
                 }
360 360
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $this->currentPersisterContext->rsm->setDiscriminatorColumn('r', $resultColumnName);
374 374
         $this->currentPersisterContext->rsm->addMetaResult('r', $resultColumnName, $discrColumnName, false, $discrColumnType);
375 375
 
376
-        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias . '.' . $quotedColumnName, $this->platform);
376
+        $columnList[] = $discrColumnType->convertToDatabaseValueSQL($discrTableAlias.'.'.$quotedColumnName, $this->platform);
377 377
 
378 378
         // sub tables
379 379
         foreach ($this->class->getSubClasses() as $subClassName) {
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                             /** @var JoinColumnMetadata $joinColumn */
398 398
                             $referencedColumnName = $joinColumn->getReferencedColumnName();
399 399
 
400
-                            if (! $joinColumn->getType()) {
400
+                            if ( ! $joinColumn->getType()) {
401 401
                                 $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
402 402
                             }
403 403
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
                         $columnName           = $joinColumn->getColumnName();
448 448
                         $referencedColumnName = $joinColumn->getReferencedColumnName();
449 449
 
450
-                        if (! $joinColumn->getType()) {
450
+                        if ( ! $joinColumn->getType()) {
451 451
                             $joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em));
452 452
                         }
453 453
 
@@ -500,16 +500,16 @@  discard block
 block discarded – undo
500 500
         $parentClass = $this->class;
501 501
 
502 502
         while (($parentClass = $parentClass->getParent()) !== null) {
503
-            if (! $parentClass->isMappedSuperclass) {
503
+            if ( ! $parentClass->isMappedSuperclass) {
504 504
                 $conditions = [];
505 505
                 $tableName  = $parentClass->table->getQuotedQualifiedName($this->platform);
506 506
                 $tableAlias = $this->getSQLTableAlias($parentClass->getTableName());
507
-                $joinSql   .= ' INNER JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
507
+                $joinSql   .= ' INNER JOIN '.$tableName.' '.$tableAlias.' ON ';
508 508
 
509 509
                 foreach ($identifierColumns as $idColumn) {
510 510
                     $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
511 511
 
512
-                    $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
512
+                    $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
513 513
                 }
514 514
 
515 515
                 $joinSql .= implode(' AND ', $conditions);
@@ -522,12 +522,12 @@  discard block
 block discarded – undo
522 522
             $subClass   = $this->em->getClassMetadata($subClassName);
523 523
             $tableName  = $subClass->table->getQuotedQualifiedName($this->platform);
524 524
             $tableAlias = $this->getSQLTableAlias($subClass->getTableName());
525
-            $joinSql   .= ' LEFT JOIN ' . $tableName . ' ' . $tableAlias . ' ON ';
525
+            $joinSql   .= ' LEFT JOIN '.$tableName.' '.$tableAlias.' ON ';
526 526
 
527 527
             foreach ($identifierColumns as $idColumn) {
528 528
                 $quotedColumnName = $this->platform->quoteIdentifier($idColumn->getColumnName());
529 529
 
530
-                $conditions[] = $baseTableAlias . '.' . $quotedColumnName . ' = ' . $tableAlias . '.' . $quotedColumnName;
530
+                $conditions[] = $baseTableAlias.'.'.$quotedColumnName.' = '.$tableAlias.'.'.$quotedColumnName;
531 531
             }
532 532
 
533 533
             $joinSql .= implode(' AND ', $conditions);
Please login to merge, or discard this patch.