Completed
Push — master ( 9e9e56...8e1674 )
by Luís
17:52
created
lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php 1 patch
Braces   +10 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,11 @@  discard block
 block discarded – undo
67 67
             $first = true;
68 68
 
69 69
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
70
-                if ($first) $first = false; else $sql .= ' AND ';
70
+                if ($first) {
71
+                    $first = false;
72
+                } else {
73
+                    $sql .= ' AND ';
74
+                }
71 75
 
72 76
                 $sql .= $targetTableAlias . '.' . $sourceColumn
73 77
                       . ' = '
@@ -93,7 +97,11 @@  discard block
 block discarded – undo
93 97
             $first = true;
94 98
 
95 99
             foreach ($joinColumns as $joinColumn) {
96
-                if ($first) $first = false; else $sql .= ' AND ';
100
+                if ($first) {
101
+                    $first = false;
102
+                } else {
103
+                    $sql .= ' AND ';
104
+                }
97 105
 
98 106
                 $sourceColumnName = $quoteStrategy->getColumnName(
99 107
                     $class->fieldNames[$joinColumn['referencedColumnName']], $class, $platform
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/ResultSetMapping.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,9 @@
 block discarded – undo
227 227
         $found = false;
228 228
 
229 229
         foreach (array_merge($this->metaMappings, $this->fieldMappings) as $columnName => $columnFieldName) {
230
-            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) continue;
230
+            if ( ! ($columnFieldName === $fieldName && $this->columnOwnerMap[$columnName] === $alias)) {
231
+                continue;
232
+            }
231 233
 
232 234
             $this->addIndexByColumn($alias, $columnName);
233 235
             $found = true;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/SqlWalker.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -444,7 +444,9 @@  discard block
 block discarded – undo
444 444
         foreach ($dqlAliases as $dqlAlias) {
445 445
             $class = $this->queryComponents[$dqlAlias]['metadata'];
446 446
 
447
-            if ( ! $class->isInheritanceTypeSingleTable()) continue;
447
+            if ( ! $class->isInheritanceTypeSingleTable()) {
448
+                continue;
449
+            }
448 450
 
449 451
             $conn   = $this->em->getConnection();
450 452
             $values = [];
@@ -782,7 +784,9 @@  discard block
 block discarded – undo
782 784
 
783 785
                 foreach ($subClass->associationMappings as $assoc) {
784 786
                     // Skip if association is inherited
785
-                    if (isset($assoc['inherited'])) continue;
787
+                    if (isset($assoc['inherited'])) {
788
+                        continue;
789
+                    }
786 790
 
787 791
                     if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
788 792
                         $targetClass = $this->em->getClassMetadata($assoc['targetEntity']);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Tools/EntityGenerator.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1525,11 +1525,21 @@
 block discarded – undo
1525 1525
             if ($associationMapping['cascade']) {
1526 1526
                 $cascades = [];
1527 1527
 
1528
-                if ($associationMapping['isCascadePersist']) $cascades[] = '"persist"';
1529
-                if ($associationMapping['isCascadeRemove']) $cascades[] = '"remove"';
1530
-                if ($associationMapping['isCascadeDetach']) $cascades[] = '"detach"';
1531
-                if ($associationMapping['isCascadeMerge']) $cascades[] = '"merge"';
1532
-                if ($associationMapping['isCascadeRefresh']) $cascades[] = '"refresh"';
1528
+                if ($associationMapping['isCascadePersist']) {
1529
+                    $cascades[] = '"persist"';
1530
+                }
1531
+                if ($associationMapping['isCascadeRemove']) {
1532
+                    $cascades[] = '"remove"';
1533
+                }
1534
+                if ($associationMapping['isCascadeDetach']) {
1535
+                    $cascades[] = '"detach"';
1536
+                }
1537
+                if ($associationMapping['isCascadeMerge']) {
1538
+                    $cascades[] = '"merge"';
1539
+                }
1540
+                if ($associationMapping['isCascadeRefresh']) {
1541
+                    $cascades[] = '"refresh"';
1542
+                }
1533 1543
 
1534 1544
                 if (count($cascades) === 5) {
1535 1545
                     $cascades = ['"all"'];
Please login to merge, or discard this patch.
tests/Doctrine/Tests/OrmFunctionalTestCase.php 1 patch
Braces   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -787,7 +787,12 @@
 block discarded – undo
787 787
             $queries = "";
788 788
             $last25queries = array_slice(array_reverse($this->_sqlLoggerStack->queries, true), 0, 25, true);
789 789
             foreach ($last25queries as $i => $query) {
790
-                $params = array_map(function($p) { if (is_object($p)) return get_class($p); else return var_export($p, true); }, $query['params'] ?: []
790
+                $params = array_map(function($p) { if (is_object($p)) {
791
+                    return get_class($p);
792
+                } else {
793
+                    return var_export($p, true);
794
+                }
795
+                }, $query['params'] ?: []
791 796
                 );
792 797
                 $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL;
793 798
             }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/Mocks/HydratorMockStatement.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
     public function fetchColumn($columnNumber = 0)
47 47
     {
48 48
         $row = current($this->_resultSet);
49
-        if ( ! is_array($row)) return false;
49
+        if ( ! is_array($row)) {
50
+            return false;
51
+        }
50 52
         $val = array_shift($row);
51 53
         return $val !== null ? $val : false;
52 54
     }
Please login to merge, or discard this patch.