Completed
Branch master (a2888f)
by Joao
08:30 queued 04:22
created
src/Database/DBMysqlFunctions.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
      */
67 67
     function sqlDate($fmt, $col = false)
68 68
     {
69
-        if (!$col) $col = 'now()';
69
+        if (!$col) {
70
+            $col = 'now()';
71
+        }
70 72
         $s = 'DATE_FORMAT(' . $col . ",'";
71 73
         $concat = false;
72 74
         $len = strlen($fmt);
@@ -81,8 +83,11 @@  discard block
 block discarded – undo
81 83
                 case 'q':
82 84
                     $s .= "'),Quarter($col)";
83 85
 
84
-                    if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'";
85
-                    else $s .= ",('";
86
+                    if ($len > $i + 1) {
87
+                        $s .= ",DATE_FORMAT($col,'";
88
+                    } else {
89
+                        $s .= ",('";
90
+                    }
86 91
                     $concat = true;
87 92
                     break;
88 93
                 case 'M':
@@ -129,7 +134,9 @@  discard block
 block discarded – undo
129 134
             }
130 135
         }
131 136
         $s.="')";
132
-        if ($concat) $s = "CONCAT($s)";
137
+        if ($concat) {
138
+            $s = "CONCAT($s)";
139
+        }
133 140
         return $s;
134 141
     }
135 142
 
Please login to merge, or discard this patch.
src/Database/DBPgsqlFunctions.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@
 block discarded – undo
64 64
      */
65 65
     function sqlDate($fmt, $col = false)
66 66
     {
67
-        if (!$col) $col = 'current_timestamp';
67
+        if (!$col) {
68
+            $col = 'current_timestamp';
69
+        }
68 70
         $s = 'TO_CHAR(' . $col . ",'";
69 71
 
70 72
         $len = strlen($fmt);
Please login to merge, or discard this patch.