Completed
Pull Request — master (#5667)
by Jeroen De
15:27
created
lib/Doctrine/ORM/Id/UuidGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     public function generate(EntityManager $em, $entity)
36 36
     {
37 37
         $conn = $em->getConnection();
38
-        $sql = 'SELECT ' . $conn->getDatabasePlatform()->getGuidExpression();
38
+        $sql = 'SELECT '.$conn->getDatabasePlatform()->getGuidExpression();
39 39
 
40 40
         return $conn->query($sql)->fetchColumn(0);
41 41
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Id/TableGenerator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                         $this->_tableName, $this->_sequenceName, $this->_allocationSize
93 93
                     );
94 94
 
95
-                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel+1)) !== 1) {
95
+                    if ($conn->executeUpdate($updateSql, array(1 => $currentLevel, 2 => $currentLevel + 1)) !== 1) {
96 96
                         // no affected rows, concurrency issue, throw exception
97 97
                     }
98 98
                 } else {
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,15 +95,15 @@
 block discarded – undo
95 95
             $expressionList[] = $this->dispatch($child);
96 96
         }
97 97
 
98
-        switch($expr->getType()) {
98
+        switch ($expr->getType()) {
99 99
             case CompositeExpression::TYPE_AND:
100
-                return '(' . implode(' AND ', $expressionList) . ')';
100
+                return '('.implode(' AND ', $expressionList).')';
101 101
 
102 102
             case CompositeExpression::TYPE_OR:
103
-                return '(' . implode(' OR ', $expressionList) . ')';
103
+                return '('.implode(' OR ', $expressionList).')';
104 104
 
105 105
             default:
106
-                throw new \RuntimeException("Unknown composite " . $expr->getType());
106
+                throw new \RuntimeException("Unknown composite ".$expr->getType());
107 107
         }
108 108
     }
109 109
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/PersisterException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     static public function matchingAssocationFieldRequiresObject($class, $associationName)
30 30
     {
31 31
         return new self(sprintf(
32
-            "Cannot match on %s::%s with a non-object value. Matching objects by id is " .
32
+            "Cannot match on %s::%s with a non-object value. Matching objects by id is ".
33 33
             "not compatible with matching on an in-memory collection, which compares objects by reference.",
34 34
             $class, $associationName
35 35
         ));
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Collection/ManyToManyPersister.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         foreach ($joinColumns as $joinColumn) {
133 133
             $columnName     = $this->quoteStrategy->getJoinColumnName($joinColumn, $sourceClass, $this->platform);
134 134
             $referencedName = $joinColumn['referencedColumnName'];
135
-            $conditions[]   = 't.' . $columnName . ' = ?';
135
+            $conditions[]   = 't.'.$columnName.' = ?';
136 136
             $params[]       = $id[$sourceClass->getFieldForColumn($referencedName)];
137 137
             $types[]        = PersisterHelper::getTypeOfColumn($referencedName, $sourceClass, $this->em);
138 138
         }
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
         }*/
162 162
 
163 163
         $sql = 'SELECT COUNT(*)'
164
-            . ' FROM ' . $joinTableName . ' t'
164
+            . ' FROM '.$joinTableName.' t'
165 165
             . $joinTargetEntitySQL
166
-            . ' WHERE ' . implode(' AND ', $conditions);
166
+            . ' WHERE '.implode(' AND ', $conditions);
167 167
 
168 168
         return $this->conn->fetchColumn($sql, $params, 0, $types);
169 169
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictionsWithKey($collection, $key, true);
193 193
 
194
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
194
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
195 195
 
196 196
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
197 197
     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, true);
209 209
 
210
-        $sql = 'SELECT 1 FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
210
+        $sql = 'SELECT 1 FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
211 211
 
212 212
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
213 213
     }
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
         list($quotedJoinTable, $whereClauses, $params, $types) = $this->getJoinTableRestrictions($collection, $element, false);
225 225
 
226
-        $sql = 'DELETE FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses);
226
+        $sql = 'DELETE FROM '.$quotedJoinTable.' WHERE '.implode(' AND ', $whereClauses);
227 227
 
228 228
         return (bool) $this->conn->executeUpdate($sql, $params, $types);
229 229
     }
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
         $rsm = new Query\ResultSetMappingBuilder($this->em);
261 261
         $rsm->addRootEntityFromClassMetadata($mapping['targetEntity'], 'te');
262 262
 
263
-        $sql = 'SELECT ' . $rsm->generateSelectClause()
264
-            . ' FROM ' . $tableName . ' te'
265
-            . ' JOIN ' . $joinTable  . ' t ON'
263
+        $sql = 'SELECT '.$rsm->generateSelectClause()
264
+            . ' FROM '.$tableName.' te'
265
+            . ' JOIN '.$joinTable.' t ON'
266 266
             . implode(' AND ', $onConditions)
267
-            . ' WHERE ' . implode(' AND ', $whereClauses);
267
+            . ' WHERE '.implode(' AND ', $whereClauses);
268 268
 
269 269
         $stmt = $this->conn->executeQuery($sql, $params);
270 270
 
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
 
302 302
         // A join is needed if there is filtering on the target entity
303 303
         $tableName = $this->quoteStrategy->getTableName($rootClass, $this->platform);
304
-        $joinSql   = ' JOIN ' . $tableName . ' te'
305
-            . ' ON' . implode(' AND ', $this->getOnConditionSQL($mapping));
304
+        $joinSql   = ' JOIN '.$tableName.' te'
305
+            . ' ON'.implode(' AND ', $this->getOnConditionSQL($mapping));
306 306
 
307 307
         return array($joinSql, $filterSql);
308 308
     }
@@ -321,12 +321,12 @@  discard block
 block discarded – undo
321 321
 
322 322
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
323 323
             if ($filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
324
-                $filterClauses[] = '(' . $filterExpr . ')';
324
+                $filterClauses[] = '('.$filterExpr.')';
325 325
             }
326 326
         }
327 327
 
328 328
         return $filterClauses
329
-            ? '(' . implode(' AND ', $filterClauses) . ')'
329
+            ? '('.implode(' AND ', $filterClauses).')'
330 330
             : '';
331 331
     }
332 332
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             $joinColumnName = $this->quoteStrategy->getJoinColumnName($joinColumn, $targetClass, $this->platform);
355 355
             $refColumnName  = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $targetClass, $this->platform);
356 356
 
357
-            $conditions[] = ' t.' . $joinColumnName . ' = ' . 'te.' . $refColumnName;
357
+            $conditions[] = ' t.'.$joinColumnName.' = '.'te.'.$refColumnName;
358 358
         }
359 359
 
360 360
         return $conditions;
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
             $columns[] = $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
377 377
         }
378 378
 
379
-        return 'DELETE FROM ' . $joinTable
380
-            . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?';
379
+        return 'DELETE FROM '.$joinTable
380
+            . ' WHERE '.implode(' = ? AND ', $columns).' = ?';
381 381
     }
382 382
 
383 383
     /**
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
         }
437 437
 
438 438
         return array(
439
-            'DELETE FROM ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
440
-            . ' WHERE ' . implode(' = ? AND ', $columns) . ' = ?',
439
+            'DELETE FROM '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
440
+            . ' WHERE '.implode(' = ? AND ', $columns).' = ?',
441 441
             $types,
442 442
         );
443 443
     }
@@ -485,10 +485,10 @@  discard block
 block discarded – undo
485 485
         }
486 486
 
487 487
         return array(
488
-            'INSERT INTO ' . $this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
489
-            . ' (' . implode(', ', $columns) . ')'
488
+            'INSERT INTO '.$this->quoteStrategy->getJoinTableName($mapping, $class, $this->platform)
489
+            . ' ('.implode(', ', $columns).')'
490 490
             . ' VALUES'
491
-            . ' (' . implode(', ', array_fill(0, count($columns), '?')) . ')',
491
+            . ' ('.implode(', ', array_fill(0, count($columns), '?')).')',
492 492
             $types,
493 493
         );
494 494
     }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
         $sourceClass   = $this->em->getClassMetadata($mapping['sourceEntity']);
574 574
         $targetClass   = $this->em->getClassMetadata($mapping['targetEntity']);
575 575
 
576
-        if (! $mapping['isOwningSide']) {
576
+        if ( ! $mapping['isOwningSide']) {
577 577
             $associationSourceClass = $this->em->getClassMetadata($mapping['targetEntity']);
578 578
             $mapping                = $associationSourceClass->associationMappings[$mapping['mappedBy']];
579 579
             $joinColumns            = $mapping['joinTable']['joinColumns'];
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
             $targetRelationMode     = 'relationToTargetKeyColumns';
587 587
         }
588 588
 
589
-        $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform). ' t';
589
+        $quotedJoinTable = $this->quoteStrategy->getJoinTableName($mapping, $associationSourceClass, $this->platform).' t';
590 590
         $whereClauses    = array();
591 591
         $params          = array();
592 592
         $types           = array();
@@ -597,14 +597,14 @@  discard block
 block discarded – undo
597 597
             $joinConditions = array();
598 598
 
599 599
             foreach ($joinColumns as $joinTableColumn) {
600
-                $joinConditions[] = 't.' . $joinTableColumn['name'] . ' = tr.' . $joinTableColumn['referencedColumnName'];
600
+                $joinConditions[] = 't.'.$joinTableColumn['name'].' = tr.'.$joinTableColumn['referencedColumnName'];
601 601
             }
602 602
 
603 603
             $tableName        = $this->quoteStrategy->getTableName($targetClass, $this->platform);
604
-            $quotedJoinTable .= ' JOIN ' . $tableName . ' tr ON ' . implode(' AND ', $joinConditions);
604
+            $quotedJoinTable .= ' JOIN '.$tableName.' tr ON '.implode(' AND ', $joinConditions);
605 605
             $columnName       = $targetClass->getColumnName($indexBy);
606 606
 
607
-            $whereClauses[] = 'tr.' . $columnName . ' = ?';
607
+            $whereClauses[] = 'tr.'.$columnName.' = ?';
608 608
             $params[]       = $key;
609 609
             $types[]        = PersisterHelper::getTypeOfColumn($columnName, $targetClass, $this->em);
610 610
         }
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
613 613
             if (isset($mapping[$sourceRelationMode][$joinTableColumn])) {
614 614
                 $column         = $mapping[$sourceRelationMode][$joinTableColumn];
615
-                $whereClauses[] = 't.' . $joinTableColumn . ' = ?';
615
+                $whereClauses[] = 't.'.$joinTableColumn.' = ?';
616 616
                 $params[]       = $sourceClass->containsForeignIdentifier
617 617
                     ? $id[$sourceClass->getFieldForColumn($column)]
618 618
                     : $id[$sourceClass->fieldNames[$column]];
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
             } elseif ( ! $joinNeeded) {
621 621
                 $column = $mapping[$targetRelationMode][$joinTableColumn];
622 622
 
623
-                $whereClauses[] = 't.' . $joinTableColumn . ' = ?';
623
+                $whereClauses[] = 't.'.$joinTableColumn.' = ?';
624 624
                 $params[]       = $key;
625 625
                 $types[]        = PersisterHelper::getTypeOfColumn($column, $targetClass, $this->em);
626 626
             }
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
631 631
 
632 632
             if ($filterSql) {
633
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
633
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
634 634
                 $whereClauses[] = $filterSql;
635 635
             }
636 636
         }
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
         $types           = array();
675 675
 
676 676
         foreach ($mapping['joinTableColumns'] as $joinTableColumn) {
677
-            $whereClauses[] = ($addFilters ? 't.' : '') . $joinTableColumn . ' = ?';
677
+            $whereClauses[] = ($addFilters ? 't.' : '').$joinTableColumn.' = ?';
678 678
 
679 679
             if (isset($mapping['relationToTargetKeyColumns'][$joinTableColumn])) {
680 680
                 $targetColumn = $mapping['relationToTargetKeyColumns'][$joinTableColumn];
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
             list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($filterMapping);
697 697
 
698 698
             if ($filterSql) {
699
-                $quotedJoinTable .= ' ' . $joinTargetEntitySQL;
699
+                $quotedJoinTable .= ' '.$joinTargetEntitySQL;
700 700
                 $whereClauses[] = $filterSql;
701 701
             }
702 702
         }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlValueVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     /**
40 40
      * @var array
41 41
      */
42
-    private $types  = array();
42
+    private $types = array();
43 43
 
44 44
     /**
45 45
      * Converts a comparison expression into the target query language output.
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
 
340 340
         // FIXME: Order with composite keys might not be correct
341 341
         $sql = 'SELECT ' . $columnName
342
-             . ' FROM '  . $tableName
343
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
342
+                . ' FROM '  . $tableName
343
+                . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
344 344
 
345 345
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
346 346
 
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
         }
475 475
 
476 476
         $sql = 'UPDATE ' . $quotedTableName
477
-             . ' SET ' . implode(', ', $set)
478
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
477
+                . ' SET ' . implode(', ', $set)
478
+                . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
479 479
 
480 480
         $result = $this->conn->executeUpdate($sql, $params, $types);
481 481
 
@@ -1528,9 +1528,9 @@  discard block
 block discarded – undo
1528 1528
         $lock  = $this->getLockTablesSql($lockMode);
1529 1529
         $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1530 1530
         $sql = 'SELECT 1 '
1531
-             . $lock
1532
-             . $where
1533
-             . $lockSql;
1531
+                . $lock
1532
+                . $where
1533
+                . $lockSql;
1534 1534
 
1535 1535
         list($params, $types) = $this->expandParameters($criteria);
1536 1536
 
@@ -1981,8 +1981,8 @@  discard block
 block discarded – undo
1981 1981
         $alias = $this->getSQLTableAlias($this->class->name);
1982 1982
 
1983 1983
         $sql = 'SELECT 1 '
1984
-             . $this->getLockTablesSql(null)
1985
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1984
+                . $this->getLockTablesSql(null)
1985
+                . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1986 1986
 
1987 1987
         list($params, $types) = $this->expandParameters($criteria);
1988 1988
 
@@ -2012,9 +2012,9 @@  discard block
 block discarded – undo
2012 2012
     {
2013 2013
         // if one of the join columns is nullable, return left join
2014 2014
         foreach ($joinColumns as $joinColumn) {
2015
-             if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2016
-                 return 'LEFT JOIN';
2017
-             }
2015
+                if ( ! isset($joinColumn['nullable']) || $joinColumn['nullable']) {
2016
+                    return 'LEFT JOIN';
2017
+                }
2018 2018
         }
2019 2019
 
2020 2020
         return 'INNER JOIN';
Please login to merge, or discard this patch.
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
         $columnName   = $this->quoteStrategy->getColumnName($versionField, $versionedClass, $this->platform);
339 339
 
340 340
         // FIXME: Order with composite keys might not be correct
341
-        $sql = 'SELECT ' . $columnName
342
-             . ' FROM '  . $tableName
343
-             . ' WHERE ' . implode(' = ? AND ', $identifier) . ' = ?';
341
+        $sql = 'SELECT '.$columnName
342
+             . ' FROM '.$tableName
343
+             . ' WHERE '.implode(' = ? AND ', $identifier).' = ?';
344 344
 
345 345
         $flatId = $this->identifierFlattener->flattenIdentifier($versionedClass, $id);
346 346
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
             }
417 417
 
418 418
             $params[]   = $value;
419
-            $set[]      = $column . ' = ' . $placeholder;
419
+            $set[]      = $column.' = '.$placeholder;
420 420
             $types[]    = $this->columnTypes[$columnName];
421 421
         }
422 422
 
@@ -464,18 +464,18 @@  discard block
 block discarded – undo
464 464
                 case Type::SMALLINT:
465 465
                 case Type::INTEGER:
466 466
                 case Type::BIGINT:
467
-                    $set[] = $versionColumn . ' = ' . $versionColumn . ' + 1';
467
+                    $set[] = $versionColumn.' = '.$versionColumn.' + 1';
468 468
                     break;
469 469
 
470 470
                 case Type::DATETIME:
471
-                    $set[] = $versionColumn . ' = CURRENT_TIMESTAMP';
471
+                    $set[] = $versionColumn.' = CURRENT_TIMESTAMP';
472 472
                     break;
473 473
             }
474 474
         }
475 475
 
476
-        $sql = 'UPDATE ' . $quotedTableName
477
-             . ' SET ' . implode(', ', $set)
478
-             . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?';
476
+        $sql = 'UPDATE '.$quotedTableName
477
+             . ' SET '.implode(', ', $set)
478
+             . ' WHERE '.implode(' = ? AND ', $where).' = ?';
479 479
 
480 480
         $result = $this->conn->executeUpdate($sql, $params, $types);
481 481
 
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 
519 519
 
520 520
             if ($selfReferential) {
521
-                $otherColumns = (! $mapping['isOwningSide'])
521
+                $otherColumns = ( ! $mapping['isOwningSide'])
522 522
                     ? $association['joinTable']['joinColumns']
523 523
                     : $association['joinTable']['inverseJoinColumns'];
524 524
             }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         $tableName  = $this->quoteStrategy->getTableName($class, $this->platform);
557 557
         $idColumns  = $this->quoteStrategy->getIdentifierColumnNames($class, $this->platform);
558 558
         $id         = array_combine($idColumns, $identifier);
559
-        $types      = array_map(function ($identifier) use ($class, $self) {
559
+        $types      = array_map(function($identifier) use ($class, $self) {
560 560
             if (isset($class->fieldMappings[$identifier])) {
561 561
                 return $class->fieldMappings[$identifier]['type'];
562 562
             }
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
 
784 784
             // unset the old value and set the new sql aliased value here. By definition
785 785
             // unset($identifier[$targetKeyColumn] works here with how UnitOfWork::createEntity() calls this method.
786
-            $identifier[$this->getSQLTableAlias($targetClass->name) . "." . $targetKeyColumn] =
786
+            $identifier[$this->getSQLTableAlias($targetClass->name).".".$targetKeyColumn] =
787 787
                 $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity);
788 788
 
789 789
             unset($identifier[$targetKeyColumn]);
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
                     );
1018 1018
             }
1019 1019
 
1020
-            $criteria[$quotedJoinTable . '.' . $quotedKeyColumn] = $value;
1020
+            $criteria[$quotedJoinTable.'.'.$quotedKeyColumn] = $value;
1021 1021
             $parameters[] = array(
1022 1022
                 'value' => $value,
1023 1023
                 'field' => $field,
@@ -1060,11 +1060,11 @@  discard block
 block discarded – undo
1060 1060
 
1061 1061
         switch ($lockMode) {
1062 1062
             case LockMode::PESSIMISTIC_READ:
1063
-                $lockSql = ' ' . $this->platform->getReadLockSql();
1063
+                $lockSql = ' '.$this->platform->getReadLockSql();
1064 1064
                 break;
1065 1065
 
1066 1066
             case LockMode::PESSIMISTIC_WRITE:
1067
-                $lockSql = ' ' . $this->platform->getWriteLockSql();
1067
+                $lockSql = ' '.$this->platform->getWriteLockSql();
1068 1068
                 break;
1069 1069
         }
1070 1070
 
@@ -1075,14 +1075,14 @@  discard block
 block discarded – undo
1075 1075
 
1076 1076
         if ('' !== $filterSql) {
1077 1077
             $conditionSql = $conditionSql
1078
-                ? $conditionSql . ' AND ' . $filterSql
1078
+                ? $conditionSql.' AND '.$filterSql
1079 1079
                 : $filterSql;
1080 1080
         }
1081 1081
 
1082
-        $select = 'SELECT ' . $columnList;
1083
-        $from   = ' FROM ' . $tableName . ' '. $tableAlias;
1084
-        $join   = $this->currentPersisterContext->selectJoinSql . $joinSql;
1085
-        $where  = ($conditionSql ? ' WHERE ' . $conditionSql : '');
1082
+        $select = 'SELECT '.$columnList;
1083
+        $from   = ' FROM '.$tableName.' '.$tableAlias;
1084
+        $join   = $this->currentPersisterContext->selectJoinSql.$joinSql;
1085
+        $where  = ($conditionSql ? ' WHERE '.$conditionSql : '');
1086 1086
         $lock   = $this->platform->appendLockHint($from, $lockMode);
1087 1087
         $query  = $select
1088 1088
             . $lock
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
             . $where
1091 1091
             . $orderBySql;
1092 1092
 
1093
-        return $this->platform->modifyLimitQuery($query, $limit, $offset) . $lockSql;
1093
+        return $this->platform->modifyLimitQuery($query, $limit, $offset).$lockSql;
1094 1094
     }
1095 1095
 
1096 1096
     /**
@@ -1109,13 +1109,13 @@  discard block
 block discarded – undo
1109 1109
 
1110 1110
         if ('' !== $filterSql) {
1111 1111
             $conditionSql = $conditionSql
1112
-                ? $conditionSql . ' AND ' . $filterSql
1112
+                ? $conditionSql.' AND '.$filterSql
1113 1113
                 : $filterSql;
1114 1114
         }
1115 1115
 
1116 1116
         $sql = 'SELECT COUNT(*) '
1117
-            . 'FROM ' . $tableName . ' ' . $tableAlias
1118
-            . (empty($conditionSql) ? '' : ' WHERE ' . $conditionSql);
1117
+            . 'FROM '.$tableName.' '.$tableAlias
1118
+            . (empty($conditionSql) ? '' : ' WHERE '.$conditionSql);
1119 1119
 
1120 1120
         return $sql;
1121 1121
     }
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
                     : $baseTableAlias;
1149 1149
 
1150 1150
                 $columnName    = $this->quoteStrategy->getColumnName($fieldName, $this->class, $this->platform);
1151
-                $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1151
+                $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1152 1152
 
1153 1153
                 continue;
1154 1154
             }
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
                 foreach ($this->class->associationMappings[$fieldName]['joinColumns'] as $joinColumn) {
1167 1167
                     $columnName    = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1168
-                    $orderByList[] = $tableAlias . '.' . $columnName . ' ' . $orientation;
1168
+                    $orderByList[] = $tableAlias.'.'.$columnName.' '.$orientation;
1169 1169
                 }
1170 1170
 
1171 1171
                 continue;
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
             throw ORMException::unrecognizedField($fieldName);
1175 1175
         }
1176 1176
 
1177
-        return ' ORDER BY ' . implode(', ', $orderByList);
1177
+        return ' ORDER BY '.implode(', ', $orderByList);
1178 1178
     }
1179 1179
 
1180 1180
     /**
@@ -1202,8 +1202,8 @@  discard block
 block discarded – undo
1202 1202
             $columnList[] = $this->getSelectColumnSQL($field, $this->class);
1203 1203
         }
1204 1204
 
1205
-        $this->currentPersisterContext->selectJoinSql    = '';
1206
-        $eagerAliasCounter      = 0;
1205
+        $this->currentPersisterContext->selectJoinSql = '';
1206
+        $eagerAliasCounter = 0;
1207 1207
 
1208 1208
         foreach ($this->class->associationMappings as $assocField => $assoc) {
1209 1209
             $assocColumnSQL = $this->getSelectColumnAssociationSQL($assocField, $assoc, $this->class);
@@ -1229,7 +1229,7 @@  discard block
 block discarded – undo
1229 1229
                 continue; // now this is why you shouldn't use inheritance
1230 1230
             }
1231 1231
 
1232
-            $assocAlias = 'e' . ($eagerAliasCounter++);
1232
+            $assocAlias = 'e'.($eagerAliasCounter++);
1233 1233
             $this->currentPersisterContext->rsm->addJoinedEntityResult($assoc['targetEntity'], $assocAlias, 'r', $assocField);
1234 1234
 
1235 1235
             foreach ($eagerEntity->fieldNames as $field) {
@@ -1262,14 +1262,14 @@  discard block
 block discarded – undo
1262 1262
             $joinTableName  = $this->quoteStrategy->getTableName($eagerEntity, $this->platform);
1263 1263
 
1264 1264
             if ($assoc['isOwningSide']) {
1265
-                $tableAlias           = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1266
-                $this->currentPersisterContext->selectJoinSql .= ' ' . $this->getJoinSQLForJoinColumns($association['joinColumns']);
1265
+                $tableAlias = $this->getSQLTableAlias($association['targetEntity'], $assocAlias);
1266
+                $this->currentPersisterContext->selectJoinSql .= ' '.$this->getJoinSQLForJoinColumns($association['joinColumns']);
1267 1267
 
1268 1268
                 foreach ($association['joinColumns'] as $joinColumn) {
1269 1269
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1270 1270
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1271 1271
                     $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'])
1272
-                                        . '.' . $sourceCol . ' = ' . $tableAlias . '.' . $targetCol;
1272
+                                        . '.'.$sourceCol.' = '.$tableAlias.'.'.$targetCol;
1273 1273
                 }
1274 1274
 
1275 1275
                 // Add filter SQL
@@ -1285,12 +1285,12 @@  discard block
 block discarded – undo
1285 1285
                     $sourceCol       = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1286 1286
                     $targetCol       = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1287 1287
 
1288
-                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias) . '.' . $sourceCol . ' = '
1289
-                        . $this->getSQLTableAlias($association['targetEntity']) . '.' . $targetCol;
1288
+                    $joinCondition[] = $this->getSQLTableAlias($association['sourceEntity'], $assocAlias).'.'.$sourceCol.' = '
1289
+                        . $this->getSQLTableAlias($association['targetEntity']).'.'.$targetCol;
1290 1290
                 }
1291 1291
             }
1292 1292
 
1293
-            $this->currentPersisterContext->selectJoinSql .= ' ' . $joinTableName . ' ' . $joinTableAlias . ' ON ';
1293
+            $this->currentPersisterContext->selectJoinSql .= ' '.$joinTableName.' '.$joinTableAlias.' ON ';
1294 1294
             $this->currentPersisterContext->selectJoinSql .= implode(' AND ', $joinCondition);
1295 1295
         }
1296 1296
 
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
      */
1312 1312
     protected function getSelectColumnAssociationSQL($field, $assoc, ClassMetadata $class, $alias = 'r')
1313 1313
     {
1314
-        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) ) {
1314
+        if ( ! ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE)) {
1315 1315
             return '';
1316 1316
         }
1317 1317
 
@@ -1360,10 +1360,10 @@  discard block
 block discarded – undo
1360 1360
         foreach ($joinColumns as $joinColumn) {
1361 1361
             $quotedSourceColumn = $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1362 1362
             $quotedTargetColumn = $this->quoteStrategy->getReferencedJoinColumnName($joinColumn, $this->class, $this->platform);
1363
-            $conditions[]       = $sourceTableAlias . '.' . $quotedTargetColumn . ' = ' . $joinTableName . '.' . $quotedSourceColumn;
1363
+            $conditions[]       = $sourceTableAlias.'.'.$quotedTargetColumn.' = '.$joinTableName.'.'.$quotedSourceColumn;
1364 1364
         }
1365 1365
 
1366
-        return ' INNER JOIN ' . $joinTableName . ' ON ' . implode(' AND ', $conditions);
1366
+        return ' INNER JOIN '.$joinTableName.' ON '.implode(' AND ', $conditions);
1367 1367
     }
1368 1368
 
1369 1369
     /**
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
      */
1464 1464
     protected function getSelectColumnSQL($field, ClassMetadata $class, $alias = 'r')
1465 1465
     {
1466
-        $root         = $alias == 'r' ? '' : $alias ;
1466
+        $root         = $alias == 'r' ? '' : $alias;
1467 1467
         $tableAlias   = $this->getSQLTableAlias($class->name, $root);
1468 1468
         $fieldMapping = $class->fieldMappings[$field];
1469 1469
         $sql          = sprintf('%s.%s', $tableAlias, $this->quoteStrategy->getColumnName($field, $class, $this->platform));
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
             $sql  = $type->convertToPHPValueSQL($sql, $this->platform);
1477 1477
         }
1478 1478
 
1479
-        return $sql . ' AS ' . $columnAlias;
1479
+        return $sql.' AS '.$columnAlias;
1480 1480
     }
1481 1481
 
1482 1482
     /**
@@ -1492,14 +1492,14 @@  discard block
 block discarded – undo
1492 1492
     protected function getSQLTableAlias($className, $assocName = '')
1493 1493
     {
1494 1494
         if ($assocName) {
1495
-            $className .= '#' . $assocName;
1495
+            $className .= '#'.$assocName;
1496 1496
         }
1497 1497
 
1498 1498
         if (isset($this->currentPersisterContext->sqlTableAliases[$className])) {
1499 1499
             return $this->currentPersisterContext->sqlTableAliases[$className];
1500 1500
         }
1501 1501
 
1502
-        $tableAlias = 't' . $this->currentPersisterContext->sqlAliasCounter++;
1502
+        $tableAlias = 't'.$this->currentPersisterContext->sqlAliasCounter++;
1503 1503
 
1504 1504
         $this->currentPersisterContext->sqlTableAliases[$className] = $tableAlias;
1505 1505
 
@@ -1526,7 +1526,7 @@  discard block
 block discarded – undo
1526 1526
         }
1527 1527
 
1528 1528
         $lock  = $this->getLockTablesSql($lockMode);
1529
-        $where = ($conditionSql ? ' WHERE ' . $conditionSql : '') . ' ';
1529
+        $where = ($conditionSql ? ' WHERE '.$conditionSql : '').' ';
1530 1530
         $sql = 'SELECT 1 '
1531 1531
              . $lock
1532 1532
              . $where
@@ -1548,7 +1548,7 @@  discard block
 block discarded – undo
1548 1548
     {
1549 1549
         return $this->platform->appendLockHint(
1550 1550
             'FROM '
1551
-            . $this->quoteStrategy->getTableName($this->class, $this->platform) . ' '
1551
+            . $this->quoteStrategy->getTableName($this->class, $this->platform).' '
1552 1552
             . $this->getSQLTableAlias($this->class->name),
1553 1553
             $lockMode
1554 1554
         );
@@ -1600,19 +1600,19 @@  discard block
 block discarded – undo
1600 1600
 
1601 1601
             if (null !== $comparison) {
1602 1602
                 // special case null value handling
1603
-                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null ===$value) {
1604
-                    $selectedColumns[] = $column . ' IS NULL';
1603
+                if (($comparison === Comparison::EQ || $comparison === Comparison::IS) && null === $value) {
1604
+                    $selectedColumns[] = $column.' IS NULL';
1605 1605
 
1606 1606
                     continue;
1607 1607
                 }
1608 1608
 
1609 1609
                 if ($comparison === Comparison::NEQ && null === $value) {
1610
-                    $selectedColumns[] = $column . ' IS NOT NULL';
1610
+                    $selectedColumns[] = $column.' IS NOT NULL';
1611 1611
 
1612 1612
                     continue;
1613 1613
                 }
1614 1614
 
1615
-                $selectedColumns[] = $column . ' ' . sprintf(self::$comparisonMap[$comparison], $placeholder);
1615
+                $selectedColumns[] = $column.' '.sprintf(self::$comparisonMap[$comparison], $placeholder);
1616 1616
 
1617 1617
                 continue;
1618 1618
             }
@@ -1660,7 +1660,7 @@  discard block
 block discarded – undo
1660 1660
                 ? $this->class->fieldMappings[$field]['inherited']
1661 1661
                 : $this->class->name;
1662 1662
 
1663
-            return array($this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getColumnName($field, $this->class, $this->platform));
1663
+            return array($this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getColumnName($field, $this->class, $this->platform));
1664 1664
         }
1665 1665
 
1666 1666
         if (isset($this->class->associationMappings[$field])) {
@@ -1681,7 +1681,7 @@  discard block
 block discarded – undo
1681 1681
 
1682 1682
 
1683 1683
                 foreach ($joinColumns as $joinColumn) {
1684
-                    $columns[] = $joinTableName . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1684
+                    $columns[] = $joinTableName.'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $class, $this->platform);
1685 1685
                 }
1686 1686
 
1687 1687
             } else {
@@ -1689,12 +1689,12 @@  discard block
 block discarded – undo
1689 1689
                     throw ORMException::invalidFindByInverseAssociation($this->class->name, $field);
1690 1690
                 }
1691 1691
 
1692
-                $className  = (isset($association['inherited']))
1692
+                $className = (isset($association['inherited']))
1693 1693
                     ? $association['inherited']
1694 1694
                     : $this->class->name;
1695 1695
 
1696 1696
                 foreach ($association['joinColumns'] as $joinColumn) {
1697
-                    $columns[] = $this->getSQLTableAlias($className) . '.' . $this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1697
+                    $columns[] = $this->getSQLTableAlias($className).'.'.$this->quoteStrategy->getJoinColumnName($joinColumn, $this->class, $this->platform);
1698 1698
                 }
1699 1699
             }
1700 1700
             return $columns;
@@ -1786,7 +1786,7 @@  discard block
 block discarded – undo
1786 1786
                     $value = $value[$this->em->getClassMetadata($sourceClass->associationMappings[$field]['targetEntity'])->identifier[0]];
1787 1787
                 }
1788 1788
 
1789
-                $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1789
+                $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1790 1790
                 $parameters[]                                   = array(
1791 1791
                     'value' => $value,
1792 1792
                     'field' => $field,
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
             $field = $sourceClass->fieldNames[$sourceKeyColumn];
1800 1800
             $value = $sourceClass->reflFields[$field]->getValue($sourceEntity);
1801 1801
 
1802
-            $criteria[$tableAlias . "." . $targetKeyColumn] = $value;
1802
+            $criteria[$tableAlias.".".$targetKeyColumn] = $value;
1803 1803
             $parameters[] = array(
1804 1804
                 'value' => $value,
1805 1805
                 'field' => $field,
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
                 $assoc = $class->associationMappings[$field];
1887 1887
                 $class = $this->em->getClassMetadata($assoc['targetEntity']);
1888 1888
 
1889
-                if (! $assoc['isOwningSide']) {
1889
+                if ( ! $assoc['isOwningSide']) {
1890 1890
                     $assoc = $class->associationMappings[$assoc['mappedBy']];
1891 1891
                     $class = $this->em->getClassMetadata($assoc['targetEntity']);
1892 1892
                 }
@@ -1895,7 +1895,7 @@  discard block
 block discarded – undo
1895 1895
                     ? $assoc['relationToTargetKeyColumns']
1896 1896
                     : $assoc['sourceToTargetKeyColumns'];
1897 1897
 
1898
-                foreach ($columns as $column){
1898
+                foreach ($columns as $column) {
1899 1899
                     $types[] = PersisterHelper::getTypeOfColumn($column, $class, $this->em);
1900 1900
                 }
1901 1901
                 break;
@@ -1906,7 +1906,7 @@  discard block
 block discarded – undo
1906 1906
         }
1907 1907
 
1908 1908
         if (is_array($value)) {
1909
-            return array_map(function ($type) {
1909
+            return array_map(function($type) {
1910 1910
                 $type = Type::getType($type);
1911 1911
 
1912 1912
                 return $type->getBindingType() + Connection::ARRAY_PARAM_OFFSET;
@@ -1982,12 +1982,12 @@  discard block
 block discarded – undo
1982 1982
 
1983 1983
         $sql = 'SELECT 1 '
1984 1984
              . $this->getLockTablesSql(null)
1985
-             . ' WHERE ' . $this->getSelectConditionSQL($criteria);
1985
+             . ' WHERE '.$this->getSelectConditionSQL($criteria);
1986 1986
 
1987 1987
         list($params, $types) = $this->expandParameters($criteria);
1988 1988
 
1989 1989
         if (null !== $extraConditions) {
1990
-            $sql                                 .= ' AND ' . $this->getSelectConditionCriteriaSQL($extraConditions);
1990
+            $sql                                 .= ' AND '.$this->getSelectConditionCriteriaSQL($extraConditions);
1991 1991
             list($criteriaParams, $criteriaTypes) = $this->expandCriteriaParameters($extraConditions);
1992 1992
 
1993 1993
             $params = array_merge($params, $criteriaParams);
@@ -1995,7 +1995,7 @@  discard block
 block discarded – undo
1995 1995
         }
1996 1996
 
1997 1997
         if ($filterSql = $this->generateFilterConditionSQL($this->class, $alias)) {
1998
-            $sql .= ' AND ' . $filterSql;
1998
+            $sql .= ' AND '.$filterSql;
1999 1999
         }
2000 2000
 
2001 2001
         return (bool) $this->conn->fetchColumn($sql, $params, 0, $types);
@@ -2042,13 +2042,13 @@  discard block
 block discarded – undo
2042 2042
 
2043 2043
         foreach ($this->em->getFilters()->getEnabledFilters() as $filter) {
2044 2044
             if ('' !== $filterExpr = $filter->addFilterConstraint($targetEntity, $targetTableAlias)) {
2045
-                $filterClauses[] = '(' . $filterExpr . ')';
2045
+                $filterClauses[] = '('.$filterExpr.')';
2046 2046
             }
2047 2047
         }
2048 2048
 
2049 2049
         $sql = implode(' AND ', $filterClauses);
2050 2050
 
2051
-        return $sql ? "(" . $sql . ")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2051
+        return $sql ? "(".$sql.")" : ""; // Wrap again to avoid "X or Y and FilterConditionSQL"
2052 2052
     }
2053 2053
 
2054 2054
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/EntityPersister.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,17 +47,17 @@
 block discarded – undo
47 47
      * Get all queued inserts.
48 48
      *
49 49
      * @return array
50
-    */
50
+     */
51 51
     public function getInserts();
52 52
 
53
-     /**
54
-     * @TODO - It should not be here.
55
-     * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister.
56
-     *
57
-     * Gets the INSERT SQL used by the persister to persist a new entity.
58
-     *
59
-     * @return string
60
-     */
53
+        /**
54
+         * @TODO - It should not be here.
55
+         * But its necessary since JoinedSubclassPersister#executeInserts invoke the root persister.
56
+         *
57
+         * Gets the INSERT SQL used by the persister to persist a new entity.
58
+         *
59
+         * @return string
60
+         */
61 61
     public function getInsertSQL();
62 62
 
63 63
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/Entity/SingleTablePersister.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $rootClass  = $this->em->getClassMetadata($this->class->rootEntityName);
58 58
         $tableAlias = $this->getSQLTableAlias($rootClass->name);
59 59
 
60
-         // Append discriminator column
60
+            // Append discriminator column
61 61
         $discrColumn     = $this->class->discriminatorColumn['name'];
62 62
         $discrColumnType = $this->class->discriminatorColumn['type'];
63 63
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $discrColumn     = $this->class->discriminatorColumn['name'];
62 62
         $discrColumnType = $this->class->discriminatorColumn['type'];
63 63
 
64
-        $columnList[]   = $tableAlias . '.' . $discrColumn;
64
+        $columnList[] = $tableAlias.'.'.$discrColumn;
65 65
 
66 66
         $resultColumnName = $this->platform->getSQLResultCasing($discrColumn);
67 67
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $conditionSql .= ' AND ';
143 143
         }
144 144
 
145
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
145
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
146 146
     }
147 147
 
148 148
     /**
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $conditionSql .= ' AND ';
157 157
         }
158 158
 
159
-        return $conditionSql . $this->getSelectConditionDiscriminatorValueSQL();
159
+        return $conditionSql.$this->getSelectConditionDiscriminatorValueSQL();
160 160
     }
161 161
 
162 162
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $discColumn = $this->class->discriminatorColumn['name'];
181 181
         $tableAlias = $this->getSQLTableAlias($this->class->name);
182 182
 
183
-        return $tableAlias . '.' . $discColumn . ' IN (' . $values . ')';
183
+        return $tableAlias.'.'.$discColumn.' IN ('.$values.')';
184 184
     }
185 185
 
186 186
     /**
Please login to merge, or discard this patch.