Completed
Push — master ( a52629...cbc88e )
by Joao
04:07
created
src/Database/DBMysqlFunctions.php 4 patches
Switch Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -82,59 +82,59 @@
 block discarded – undo
82 82
         for ($i = 0; $i < $len; $i++) {
83 83
             $ch = $fmt[$i];
84 84
             switch ($ch) {
85
-                case 'Y':
86
-                case 'y':
87
-                    $s .= '%Y';
88
-                    break;
89
-                case 'Q':
90
-                case 'q':
91
-                    $s .= "'),Quarter($col)";
92
-
93
-                    if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'";
94
-                    else $s .= ",('";
95
-                    $concat = true;
96
-                    break;
97
-                case 'M':
98
-                    $s .= '%b';
99
-                    break;
100
-
101
-                case 'm':
102
-                    $s .= '%m';
103
-                    break;
104
-                case 'D':
105
-                case 'd':
106
-                    $s .= '%d';
107
-                    break;
108
-
109
-                case 'H':
110
-                    $s .= '%H';
111
-                    break;
112
-
113
-                case 'h':
114
-                    $s .= '%I';
115
-                    break;
116
-
117
-                case 'i':
118
-                    $s .= '%i';
119
-                    break;
120
-
121
-                case 's':
122
-                    $s .= '%s';
123
-                    break;
124
-
125
-                case 'a':
126
-                case 'A':
127
-                    $s .= '%p';
128
-                    break;
129
-
130
-                default:
131
-
132
-                    if ($ch == '\\') {
133
-                        $i++;
134
-                        $ch = substr($fmt, $i, 1);
135
-                    }
136
-                    $s .= $ch;
137
-                    break;
85
+            case 'Y':
86
+            case 'y':
87
+                $s .= '%Y';
88
+                break;
89
+            case 'Q':
90
+            case 'q':
91
+                $s .= "'),Quarter($col)";
92
+
93
+                if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'";
94
+                else $s .= ",('";
95
+                $concat = true;
96
+                break;
97
+            case 'M':
98
+                $s .= '%b';
99
+                break;
100
+
101
+            case 'm':
102
+                $s .= '%m';
103
+                break;
104
+            case 'D':
105
+            case 'd':
106
+                $s .= '%d';
107
+                break;
108
+
109
+            case 'H':
110
+                $s .= '%H';
111
+                break;
112
+
113
+            case 'h':
114
+                $s .= '%I';
115
+                break;
116
+
117
+            case 'i':
118
+                $s .= '%i';
119
+                break;
120
+
121
+            case 's':
122
+                $s .= '%s';
123
+                break;
124
+
125
+            case 'a':
126
+            case 'A':
127
+                $s .= '%p';
128
+                break;
129
+
130
+            default:
131
+
132
+                if ($ch == '\\') {
133
+                    $i++;
134
+                    $ch = substr($fmt, $i, 1);
135
+                }
136
+                $s .= $ch;
137
+                break;
138 138
             }
139 139
         }
140 140
         $s.="')";
Please login to merge, or discard this patch.
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,9 @@  discard block
 block discarded – undo
75 75
      */
76 76
     function sqlDate($fmt, $col = false)
77 77
     {
78
-        if (!$col) $col = $this->sysTimeStamp;
78
+        if (!$col) {
79
+            $col = $this->sysTimeStamp;
80
+        }
79 81
         $s = 'DATE_FORMAT(' . $col . ",'";
80 82
         $concat = false;
81 83
         $len = strlen($fmt);
@@ -90,8 +92,11 @@  discard block
 block discarded – undo
90 92
                 case 'q':
91 93
                     $s .= "'),Quarter($col)";
92 94
 
93
-                    if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'";
94
-                    else $s .= ",('";
95
+                    if ($len > $i + 1) {
96
+                        $s .= ",DATE_FORMAT($col,'";
97
+                    } else {
98
+                        $s .= ",('";
99
+                    }
95 100
                     $concat = true;
96 101
                     break;
97 102
                 case 'M':
@@ -138,7 +143,9 @@  discard block
 block discarded – undo
138 143
             }
139 144
         }
140 145
         $s.="')";
141
-        if ($concat) $s = "CONCAT($s)";
146
+        if ($concat) {
147
+            $s = "CONCAT($s)";
148
+        }
142 149
         return $s;
143 150
     }
144 151
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * Return if the database provider have a top or similar function
47
-     * @return unknown_type
47
+     * @return boolean
48 48
      */
49 49
     function hasTop()
50 50
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
         $sql = "concat(";
15 15
         for ($i = 0, $numArgs = func_num_args(); $i < $numArgs; $i++) {
16 16
             $var = func_get_arg($i);
17
-            $sql .= ($i == 0 ? "" : ",") . $var;
17
+            $sql .= ($i == 0 ? "" : ",").$var;
18 18
         }
19 19
         $sql .= ")";
20 20
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     function sqlDate($fmt, $col = false)
77 77
     {
78 78
         if (!$col) $col = $this->sysTimeStamp;
79
-        $s = 'DATE_FORMAT(' . $col . ",'";
79
+        $s = 'DATE_FORMAT('.$col.",'";
80 80
         $concat = false;
81 81
         $len = strlen($fmt);
82 82
         for ($i = 0; $i < $len; $i++) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     break;
138 138
             }
139 139
         }
140
-        $s.="')";
140
+        $s .= "')";
141 141
         if ($concat) $s = "CONCAT($s)";
142 142
         return $s;
143 143
     }
Please login to merge, or discard this patch.
src/Repository/JsonIterator.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
         }
28 28
 
29 29
         if ($path != "") {
30
-            if ($path[0] == "/") $path = substr($path, 1);
30
+            if ($path[0] == "/") {
31
+                $path = substr($path, 1);
32
+            }
31 33
 
32 34
             $pathAr = explode("/", $path);
33 35
 
@@ -44,7 +46,9 @@  discard block
 block discarded – undo
44 46
                 }
45 47
             }
46 48
             $this->_jsonObject = $newjsonObject;
47
-        } else $this->_jsonObject = $jsonObject;
49
+        } else {
50
+            $this->_jsonObject = $jsonObject;
51
+        }
48 52
 
49 53
         $this->_current = 0;
50 54
     }
Please login to merge, or discard this patch.
src/Repository/ArrayDataset.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
26 26
 
27 27
         $this->_array = array();
28 28
 
29
-        if (!$array) return;
29
+        if (!$array) {
30
+            return;
31
+        }
30 32
 
31 33
         if (is_array($array)) {
32 34
             foreach ($array as $key => $value) {
Please login to merge, or discard this patch.
src/Repository/TextFileIterator.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
             if (($buffer !== false) && (trim($buffer) != "")) {
34 34
                 $this->_current++;
35 35
                 $this->_currentBuffer = $buffer;
36
-            } else $this->readNextLine();
36
+            } else {
37
+                $this->readNextLine();
38
+            }
37 39
         }
38 40
     }
39 41
 
Please login to merge, or discard this patch.
src/Database/DBBaseFunctions.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * Return if the database provider have a top or similar function
47
-     * @return unknown_type
47
+     * @return boolean
48 48
      */
49 49
     function hasTop()
50 50
     {
Please login to merge, or discard this patch.
src/ConnectionManagement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,14 +181,14 @@
 block discarded – undo
181 181
         $pat = "/$patDriver($patCredentials$patHost$patDatabase|$patFile)$patExtra/i";
182 182
         $parts = array();
183 183
         if (!preg_match($pat, $this->getDbConnectionString(), $parts)) {
184
-            throw new InvalidArgumentException("Connection string " . $this->getDbConnectionString() . " is invalid! Please fix it.");
184
+            throw new InvalidArgumentException("Connection string ".$this->getDbConnectionString()." is invalid! Please fix it.");
185 185
         }
186 186
 
187 187
         // Set the Driver
188 188
         $this->setDriver($parts ['driver']);
189 189
 
190 190
         if (!isset($parts['path']) && !isset($parts['host'])) {
191
-            throw new InvalidArgumentException("Connection string " . $this->getDbConnectionString() . " is invalid! Please fix it.");
191
+            throw new InvalidArgumentException("Connection string ".$this->getDbConnectionString()." is invalid! Please fix it.");
192 192
         }
193 193
 
194 194
 
Please login to merge, or discard this patch.
src/Database/PdoObdc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     public function __construct(ConnectionManagement $connMngt)
12 12
     {
13
-        $strcnn = $connMngt->getDriver() . ":" . $connMngt->getServer();
13
+        $strcnn = $connMngt->getDriver().":".$connMngt->getServer();
14 14
 
15 15
         parent::__construct($connMngt, $strcnn, [], []);
16 16
     }
Please login to merge, or discard this patch.
src/Database/PdoOci.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public function __construct(ConnectionManagement $connMngt)
14 14
     {
15
-        $strcnn = $connMngt->getDriver() . ":dbname=" . DBOci8Driver::getTnsString($connMngt);
15
+        $strcnn = $connMngt->getDriver().":dbname=".DBOci8Driver::getTnsString($connMngt);
16 16
 
17 17
         $postOptions = [
18 18
             PDO::ATTR_EMULATE_PREPARES => true
Please login to merge, or discard this patch.
src/Database/BaseDBAccess.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         $start = 0;
87 87
         if ($debug) {
88 88
             $log = LogHandler::getInstance();
89
-            $log->debug("Class name: " . get_class($this));
90
-            $log->debug("SQL: " . $sql);
89
+            $log->debug("Class name: ".get_class($this));
90
+            $log->debug("SQL: ".$sql);
91 91
             if (!is_null($param)) {
92 92
                 $s = "";
93 93
                 foreach ($param as $key => $value) {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         if ($debug) {
112 112
             $end = microtime(true);
113
-            $log->debug("Execution time: " . ($end - $start) . " seconds ");
113
+            $log->debug("Execution time: ".($end - $start)." seconds ");
114 114
         }
115 115
 
116 116
         return $id;
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
         $start = 0;
132 132
         if ($debug) {
133 133
             $log = LogHandler::getInstance();
134
-            $log->debug("Class name: " . get_class($this));
135
-            $log->debug("SQL: " . $sql);
134
+            $log->debug("Class name: ".get_class($this));
135
+            $log->debug("SQL: ".$sql);
136 136
             if (!is_null($param)) {
137 137
                 $s = "";
138 138
                 foreach ($param as $key => $value) {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $it = $db->getIterator($sql, $param, $ttl);
149 149
         if ($debug) {
150 150
             $end = microtime(true);
151
-            $log->debug("Execution Time: " . ($end - $start) . " segundos ");
151
+            $log->debug("Execution Time: ".($end - $start)." segundos ");
152 152
         }
153 153
         return $it;
154 154
     }
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
         $start = 0;
162 162
         if ($debug) {
163 163
             $log = LogHandler::getInstance();
164
-            $log->debug("Class name: " . get_class($this));
165
-            $log->debug("SQL: " . $sql);
164
+            $log->debug("Class name: ".get_class($this));
165
+            $log->debug("SQL: ".$sql);
166 166
             if (!is_null($param)) {
167 167
                 $s = "";
168 168
                 foreach ($param as $key => $value) {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         $scalar = $this->_db->getScalar($sql, $param);
179 179
         if ($debug) {
180 180
             $end = microtime(true);
181
-            $log->debug("Execution Time: " . ($end - $start) . " segundos ");
181
+            $log->debug("Execution Time: ".($end - $start)." segundos ");
182 182
         }
183 183
         return $scalar;
184 184
     }
@@ -262,14 +262,14 @@  discard block
 block discarded – undo
262 262
                     $fields = $sr->getFieldNames();
263 263
                 }
264 264
 
265
-                $line .= '"' . implode('","', $fields) . '"' . "\n";
265
+                $line .= '"'.implode('","', $fields).'"'."\n";
266 266
             }
267 267
 
268 268
             $raw = array();
269 269
             foreach ($fields as $field) {
270 270
                 $raw[] = $sr->getField($field);
271 271
             }
272
-            $line .= '"' . implode('","', array_values($raw)) . '"' . "\n";
272
+            $line .= '"'.implode('","', array_values($raw)).'"'."\n";
273 273
 
274 274
             if ($echoToBrowser) {
275 275
                 echo $line;
Please login to merge, or discard this patch.