Completed
Pull Request — master (#1)
by Joao
03:38
created
src/Database/SqlHelper.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -160,6 +160,9 @@
 block discarded – undo
160 160
         $this->fieldDeliRight = $right;
161 161
     }
162 162
 
163
+    /**
164
+     * @param string $sql
165
+     */
163 166
     public static function createSafeSQL($sql, $list)
164 167
     {
165 168
         return str_replace(array_keys($list), array_values($list), $sql);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                     $campos .= ", ";
80 80
                     $valores .= ", ";
81 81
                 }
82
-                $campos .= $this->fieldDeliLeft . $fieldname . $this->fieldDeliRight;
82
+                $campos .= $this->fieldDeliLeft.$fieldname.$this->fieldDeliRight;
83 83
                 $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint);
84 84
             }
85 85
             $sql = "insert into $table ($campos) values ($valores)";
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function getValue($name, $valores, &$param, $decimalpoint)
105 105
     {
106
-        $paramName = "[[" . $name . "]]";
106
+        $paramName = "[[".$name."]]";
107 107
         if (!is_array($valores)) {
108 108
             $valores = array(SQLFieldType::TEXT, $valores);
109 109
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         if (strlen($sql) > 4) {
152 152
             $sql .= ' and ';
153 153
         }
154
-        $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.');
154
+        $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.');
155 155
     }
156 156
 
157 157
     public function setFieldDelimeters($left, $right)
Please login to merge, or discard this patch.
src/Repository/AnyDataset.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,6 +310,10 @@  discard block
 block discarded – undo
310 310
         return;
311 311
     }
312 312
 
313
+    /**
314
+     * @param SingleRow[] $seq
315
+     * @param string $field
316
+     */
313 317
     protected function quickSortExec($seq, $field)
314 318
     {
315 319
         if (!count($seq)) {
@@ -337,7 +341,7 @@  discard block
 block discarded – undo
337 341
 
338 342
     /**
339 343
      * @param $document
340
-     * @return array|string
344
+     * @return string
341 345
      */
342 346
     public static function fixUTF8($document)
343 347
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                     if (!is_null($attr)) {
106 106
                         $sr->addField($attr->nodeValue, $field->nodeValue);
107 107
                     } else {
108
-                        throw new \InvalidArgumentException('Malformed anydataset file ' . basename($filepath));
108
+                        throw new \InvalidArgumentException('Malformed anydataset file '.basename($filepath));
109 109
                     }
110 110
                 }
111 111
                 $sr->acceptChanges();
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         $left = $right = array();
321 321
 
322 322
         $cntSeq = count($seq);
323
-        for ($i = 1; $i < $cntSeq; $i ++) {
323
+        for ($i = 1; $i < $cntSeq; $i++) {
324 324
             if ($seq[$i]->getField($field) <= $key->getField($field)) {
325 325
                 $left[] = $seq[$i];
326 326
             } else {
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
         return array_merge(
332 332
             $this->quickSortExec($left, $field),
333
-            [ $key ],
333
+            [$key],
334 334
             $this->quickSortExec($right, $field)
335 335
         );
336 336
     }
Please login to merge, or discard this patch.
src/Repository/DBDataset.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -131,6 +131,9 @@
 block discarded – undo
131 131
         return $arrayDS->getIterator();
132 132
     }
133 133
 
134
+    /**
135
+     * @param string $sql
136
+     */
134 137
     protected function getQueryKey($sql, $array)
135 138
     {
136 139
         $key1 = md5($sql);
Please login to merge, or discard this patch.
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@  discard block
 block discarded – undo
23 23
     protected $connectionManagement;
24 24
 
25 25
     /**
26
-
27 26
      * @var DbDriverInterface
28 27
      */
29 28
     private $dbDriver = null;
@@ -223,7 +222,6 @@  discard block
 block discarded – undo
223 222
     }
224 223
 
225 224
     /**
226
-
227 225
      * @var DbFunctionsInterface
228 226
      */
229 227
     protected $dbFunction = null;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -147,12 +147,12 @@
 block discarded – undo
147 147
 
148 148
         // Define the query key
149 149
         if (is_array($arKey2) && count($arKey2) > 0) {
150
-            $key2 = ":" . md5(json_encode($arKey2));
150
+            $key2 = ":".md5(json_encode($arKey2));
151 151
         } else {
152 152
             $key2 = "";
153 153
         }
154 154
 
155
-        return  "qry:" . $key1 . $key2;
155
+        return  "qry:".$key1.$key2;
156 156
     }
157 157
 
158 158
     public function getScalar($sql, $array = null)
Please login to merge, or discard this patch.
src/Repository/IteratorFilter.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     /**
75 75
      *
76
-     * @param $array
76
+     * @param SingleRow[] $array
77 77
      * @return SingleRow[]
78 78
      */
79 79
     public function match($array)
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     /**
244 244
      *
245 245
      * @param SingleRow $singleRow
246
-     * @return string
246
+     * @return boolean
247 247
      */
248 248
     private function evalString(SingleRow $singleRow)
249 249
     {
Please login to merge, or discard this patch.
Switch Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -142,37 +142,37 @@  discard block
 block discarded – undo
142 142
 
143 143
         $result = "";
144 144
         switch ($relation) {
145
-            case Relation::EQUAL:
146
-                $result = $field . "=" . $value;
147
-                break;
145
+        case Relation::EQUAL:
146
+            $result = $field . "=" . $value;
147
+            break;
148 148
 
149
-            case Relation::GREATER_THAN:
150
-                $result = $field . ">" . $value;
151
-                break;
149
+        case Relation::GREATER_THAN:
150
+            $result = $field . ">" . $value;
151
+            break;
152 152
 
153
-            case Relation::LESS_THAN:
154
-                $result = $field . "<" . $value;
155
-                break;
153
+        case Relation::LESS_THAN:
154
+            $result = $field . "<" . $value;
155
+            break;
156 156
 
157
-            case Relation::GREATER_OR_EQUAL_THAN:
158
-                $result = $field . ">=" . $value;
159
-                break;
157
+        case Relation::GREATER_OR_EQUAL_THAN:
158
+            $result = $field . ">=" . $value;
159
+            break;
160 160
 
161
-            case Relation::LESS_OR_EQUAL_THAN:
162
-                $result = $field . "<=" . $value;
163
-                break;
161
+        case Relation::LESS_OR_EQUAL_THAN:
162
+            $result = $field . "<=" . $value;
163
+            break;
164 164
 
165
-            case Relation::NOT_EQUAL:
166
-                $result = $field . "!=" . $value;
167
-                break;
165
+        case Relation::NOT_EQUAL:
166
+            $result = $field . "!=" . $value;
167
+            break;
168 168
 
169
-            case Relation::STARTS_WITH:
170
-                $result = " starts-with($field, $value) ";
171
-                break;
169
+        case Relation::STARTS_WITH:
170
+            $result = " starts-with($field, $value) ";
171
+            break;
172 172
 
173
-            case Relation::CONTAINS:
174
-                $result = " contains($field, $value) ";
175
-                break;
173
+        case Relation::CONTAINS:
174
+            $result = " contains($field, $value) ";
175
+            break;
176 176
 
177 177
         }
178 178
         return $result;
@@ -201,40 +201,40 @@  discard block
 block discarded – undo
201 201
         $field = " $name ";
202 202
         $valueparam = " [[" . $paramName . "]] ";
203 203
         switch ($relation) {
204
-            case Relation::EQUAL: {
205
-                    $result = $field . "=" . $valueparam;
206
-                    break;
207
-                }
208
-            case Relation::GREATER_THAN: {
209
-                    $result = $field . ">" . $valueparam;
210
-                    break;
211
-                }
212
-            case Relation::LESS_THAN: {
213
-                    $result = $field . "<" . $valueparam;
214
-                    break;
215
-                }
216
-            case Relation::GREATER_OR_EQUAL_THAN: {
217
-                    $result = $field . ">=" . $valueparam;
218
-                    break;
219
-                }
220
-            case Relation::LESS_OR_EQUAL_THAN: {
221
-                    $result = $field . "<=" . $valueparam;
222
-                    break;
223
-                }
224
-            case Relation::NOT_EQUAL: {
225
-                    $result = $field . "!=" . $valueparam;
226
-                    break;
227
-                }
228
-            case Relation::STARTS_WITH: {
229
-                    $param[$paramName] = $value . "%";
230
-                    $result = $field . " like " . $valueparam;
231
-                    break;
232
-                }
233
-            case Relation::CONTAINS: {
234
-                    $param[$paramName] = "%" . $value . "%";
235
-                    $result = $field . " like " . $valueparam;
236
-                    break;
237
-                }
204
+        case Relation::EQUAL: {
205
+                $result = $field . "=" . $valueparam;
206
+                break;
207
+            }
208
+        case Relation::GREATER_THAN: {
209
+                $result = $field . ">" . $valueparam;
210
+                break;
211
+            }
212
+        case Relation::LESS_THAN: {
213
+                $result = $field . "<" . $valueparam;
214
+                break;
215
+            }
216
+        case Relation::GREATER_OR_EQUAL_THAN: {
217
+                $result = $field . ">=" . $valueparam;
218
+                break;
219
+            }
220
+        case Relation::LESS_OR_EQUAL_THAN: {
221
+                $result = $field . "<=" . $valueparam;
222
+                break;
223
+            }
224
+        case Relation::NOT_EQUAL: {
225
+                $result = $field . "!=" . $valueparam;
226
+                break;
227
+            }
228
+        case Relation::STARTS_WITH: {
229
+                $param[$paramName] = $value . "%";
230
+                $result = $field . " like " . $valueparam;
231
+                break;
232
+            }
233
+        case Relation::CONTAINS: {
234
+                $param[$paramName] = "%" . $value . "%";
235
+                $result = $field . " like " . $valueparam;
236
+                break;
237
+            }
238 238
         }
239 239
 
240 240
         return $result;
@@ -269,38 +269,38 @@  discard block
 block discarded – undo
269 269
 
270 270
             foreach ($field as $valueparam) {
271 271
                 switch ($relation) {
272
-                    case Relation::EQUAL: {
273
-                            $result[$pos] &= ($valueparam == $value);
274
-                            break;
275
-                        }
276
-                    case Relation::GREATER_THAN: {
277
-                            $result[$pos] &= ($valueparam > $value);
278
-                            break;
279
-                        }
280
-                    case Relation::LESS_THAN: {
281
-                            $result[$pos] &= ($valueparam < $value);
282
-                            break;
283
-                        }
284
-                    case Relation::GREATER_OR_EQUAL_THAN: {
285
-                            $result[$pos] &= ($valueparam >= $value);
286
-                            break;
287
-                        }
288
-                    case Relation::LESS_OR_EQUAL_THAN: {
289
-                            $result[$pos] &= ($valueparam <= $value);
290
-                            break;
291
-                        }
292
-                    case Relation::NOT_EQUAL: {
293
-                            $result[$pos] &= ($valueparam != $value);
294
-                            break;
295
-                        }
296
-                    case Relation::STARTS_WITH: {
297
-                            $result[$pos] &= (strpos($valueparam, $value) === 0);
298
-                            break;
299
-                        }
300
-                    case Relation::CONTAINS: {
301
-                            $result[$pos] &= (strpos($valueparam, $value) !== false);
302
-                            break;
303
-                        }
272
+                case Relation::EQUAL: {
273
+                        $result[$pos] &= ($valueparam == $value);
274
+                        break;
275
+                    }
276
+                case Relation::GREATER_THAN: {
277
+                        $result[$pos] &= ($valueparam > $value);
278
+                        break;
279
+                    }
280
+                case Relation::LESS_THAN: {
281
+                        $result[$pos] &= ($valueparam < $value);
282
+                        break;
283
+                    }
284
+                case Relation::GREATER_OR_EQUAL_THAN: {
285
+                        $result[$pos] &= ($valueparam >= $value);
286
+                        break;
287
+                    }
288
+                case Relation::LESS_OR_EQUAL_THAN: {
289
+                        $result[$pos] &= ($valueparam <= $value);
290
+                        break;
291
+                    }
292
+                case Relation::NOT_EQUAL: {
293
+                        $result[$pos] &= ($valueparam != $value);
294
+                        break;
295
+                    }
296
+                case Relation::STARTS_WITH: {
297
+                        $result[$pos] &= (strpos($valueparam, $value) === 0);
298
+                        break;
299
+                    }
300
+                case Relation::CONTAINS: {
301
+                        $result[$pos] &= (strpos($valueparam, $value) !== false);
302
+                        break;
303
+                    }
304 304
                 }
305 305
             }
306 306
         }
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($xpathFilter == "") {
38 38
             return "/anydataset/row";
39 39
         } else {
40
-            return "/anydataset/row[" . $xpathFilter . "]";
40
+            return "/anydataset/row[".$xpathFilter."]";
41 41
         }
42 42
     }
43 43
 
@@ -137,33 +137,33 @@  discard block
 block discarded – undo
137 137
     private function getStrXpathRelation($name, $relation, $value)
138 138
     {
139 139
         $str = is_numeric($value) ? "" : "'";
140
-        $field = "field[@name='" . $name . "'] ";
140
+        $field = "field[@name='".$name."'] ";
141 141
         $value = " $str$value$str ";
142 142
 
143 143
         $result = "";
144 144
         switch ($relation) {
145 145
             case Relation::EQUAL:
146
-                $result = $field . "=" . $value;
146
+                $result = $field."=".$value;
147 147
                 break;
148 148
 
149 149
             case Relation::GREATER_THAN:
150
-                $result = $field . ">" . $value;
150
+                $result = $field.">".$value;
151 151
                 break;
152 152
 
153 153
             case Relation::LESS_THAN:
154
-                $result = $field . "<" . $value;
154
+                $result = $field."<".$value;
155 155
                 break;
156 156
 
157 157
             case Relation::GREATER_OR_EQUAL_THAN:
158
-                $result = $field . ">=" . $value;
158
+                $result = $field.">=".$value;
159 159
                 break;
160 160
 
161 161
             case Relation::LESS_OR_EQUAL_THAN:
162
-                $result = $field . "<=" . $value;
162
+                $result = $field."<=".$value;
163 163
                 break;
164 164
 
165 165
             case Relation::NOT_EQUAL:
166
-                $result = $field . "!=" . $value;
166
+                $result = $field."!=".$value;
167 167
                 break;
168 168
 
169 169
             case Relation::STARTS_WITH:
@@ -192,47 +192,47 @@  discard block
 block discarded – undo
192 192
         $paramName = $name;
193 193
         $i = 0;
194 194
         while (array_key_exists($paramName, $param)) {
195
-            $paramName = $name . ($i++);
195
+            $paramName = $name.($i++);
196 196
         }
197 197
 
198 198
         $param[$paramName] = $value;
199 199
 
200 200
         $result = "";
201 201
         $field = " $name ";
202
-        $valueparam = " [[" . $paramName . "]] ";
202
+        $valueparam = " [[".$paramName."]] ";
203 203
         switch ($relation) {
204 204
             case Relation::EQUAL: {
205
-                    $result = $field . "=" . $valueparam;
205
+                    $result = $field."=".$valueparam;
206 206
                     break;
207 207
                 }
208 208
             case Relation::GREATER_THAN: {
209
-                    $result = $field . ">" . $valueparam;
209
+                    $result = $field.">".$valueparam;
210 210
                     break;
211 211
                 }
212 212
             case Relation::LESS_THAN: {
213
-                    $result = $field . "<" . $valueparam;
213
+                    $result = $field."<".$valueparam;
214 214
                     break;
215 215
                 }
216 216
             case Relation::GREATER_OR_EQUAL_THAN: {
217
-                    $result = $field . ">=" . $valueparam;
217
+                    $result = $field.">=".$valueparam;
218 218
                     break;
219 219
                 }
220 220
             case Relation::LESS_OR_EQUAL_THAN: {
221
-                    $result = $field . "<=" . $valueparam;
221
+                    $result = $field."<=".$valueparam;
222 222
                     break;
223 223
                 }
224 224
             case Relation::NOT_EQUAL: {
225
-                    $result = $field . "!=" . $valueparam;
225
+                    $result = $field."!=".$valueparam;
226 226
                     break;
227 227
                 }
228 228
             case Relation::STARTS_WITH: {
229
-                    $param[$paramName] = $value . "%";
230
-                    $result = $field . " like " . $valueparam;
229
+                    $param[$paramName] = $value."%";
230
+                    $result = $field." like ".$valueparam;
231 231
                     break;
232 232
                 }
233 233
             case Relation::CONTAINS: {
234
-                    $param[$paramName] = "%" . $value . "%";
235
-                    $result = $field . " like " . $valueparam;
234
+                    $param[$paramName] = "%".$value."%";
235
+                    $result = $field." like ".$valueparam;
236 236
                     break;
237 237
                 }
238 238
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -265,7 +265,9 @@
 block discarded – undo
265 265
 
266 266
             $field = $singleRow->getField($name);
267 267
 
268
-            if (!is_array($field)) $field = array($field);
268
+            if (!is_array($field)) {
269
+                $field = array($field);
270
+            }
269 271
 
270 272
             foreach ($field as $valueparam) {
271 273
                 switch ($relation) {
Please login to merge, or discard this patch.
src/Database/DbPdoDriver.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 
28 28
         if (is_null($strcnn)) {
29 29
             if ($this->connectionManagement->getFilePath() != "") {
30
-                $strcnn = $this->connectionManagement->getDriver() . ":" . $this->connectionManagement->getFilePath();
30
+                $strcnn = $this->connectionManagement->getDriver().":".$this->connectionManagement->getFilePath();
31 31
             } else {
32
-                $strcnn = $this->connectionManagement->getDriver() . ":dbname=" .
32
+                $strcnn = $this->connectionManagement->getDriver().":dbname=".
33 33
                     $this->connectionManagement->getDatabase();
34 34
                 if ($this->connectionManagement->getExtraParam("unixsocket") != "") {
35
-                    $strcnn .= ";unix_socket=" . $this->connectionManagement->getExtraParam("unixsocket");
35
+                    $strcnn .= ";unix_socket=".$this->connectionManagement->getExtraParam("unixsocket");
36 36
                 } else {
37
-                    $strcnn .= ";host=" . $this->connectionManagement->getServer();
37
+                    $strcnn .= ";host=".$this->connectionManagement->getServer();
38 38
                     if ($this->connectionManagement->getPort() != "") {
39
-                        $strcnn .= ";port=" . $this->connectionManagement->getPort();
39
+                        $strcnn .= ";port=".$this->connectionManagement->getPort();
40 40
                     }
41 41
                 }
42 42
             }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $strcnn,
48 48
             $this->connectionManagement->getUsername(),
49 49
             $this->connectionManagement->getPassword(),
50
-            (array) $preOptions
50
+            (array)$preOptions
51 51
         );
52 52
         $this->connectionManagement->setDriver($this->instance->getAttribute(PDO::ATTR_DRIVER_NAME));
53 53
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $this->instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
56 56
         $this->instance->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
57 57
 
58
-        foreach ((array) $postOptions as $key => $value) {
58
+        foreach ((array)$postOptions as $key => $value) {
59 59
             $this->instance->setAttribute($key, $value);
60 60
         }
61 61
     }
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
             throw new NotAvailableException("Extension 'PDO' is not loaded");
67 67
         }
68 68
 
69
-        if (!extension_loaded('pdo_' . strtolower($connMngt->getDriver()))) {
70
-            throw new NotAvailableException("Extension 'pdo_" . strtolower($connMngt->getDriver()) . "' is not loaded");
69
+        if (!extension_loaded('pdo_'.strtolower($connMngt->getDriver()))) {
70
+            throw new NotAvailableException("Extension 'pdo_".strtolower($connMngt->getDriver())."' is not loaded");
71 71
         }
72 72
 
73
-        $class = '\ByJG\AnyDataset\Database\Pdo' . ucfirst($connMngt->getDriver());
73
+        $class = '\ByJG\AnyDataset\Database\Pdo'.ucfirst($connMngt->getDriver());
74 74
 
75 75
         if (!class_exists($class, true)) {
76 76
             return new DbPdoDriver($connMngt, null, null, null);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             list($sql, $array) = SqlBind::parseSQL($this->connectionManagement, $sql, $array);
97 97
             $stmt = $this->instance->prepare($sql);
98 98
             foreach ($array as $key => $value) {
99
-                $stmt->bindValue(":" . SqlBind::keyAdj($key), $value);
99
+                $stmt->bindValue(":".SqlBind::keyAdj($key), $value);
100 100
             }
101 101
         } else {
102 102
             $stmt = $this->instance->prepare($sql);
Please login to merge, or discard this patch.
src/Database/BaseDBAccess.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,6 @@
 block discarded – undo
207 207
     }
208 208
 
209 209
     /**
210
-
211 210
      * @param IteratorInterface $iterator
212 211
      * @param string $name
213 212
      * @param array $fields
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
         $start = 0;
59 59
         if ($debug) {
60 60
             $log = LogHandler::getInstance();
61
-            $log->debug("Class name: " . get_class($this));
62
-            $log->debug("SQL: " . $sql);
61
+            $log->debug("Class name: ".get_class($this));
62
+            $log->debug("SQL: ".$sql);
63 63
             if (!is_null($param)) {
64 64
                 $strForLog = "";
65 65
                 foreach ($param as $key => $value) {
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         if ($debug) {
84 84
             $end = microtime(true);
85
-            $log->debug("Execution time: " . ($end - $start) . " seconds ");
85
+            $log->debug("Execution time: ".($end - $start)." seconds ");
86 86
         }
87 87
 
88 88
         return $insertedId;
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
         $start = 0;
104 104
         if ($debug) {
105 105
             $log = LogHandler::getInstance();
106
-            $log->debug("Class name: " . get_class($this));
107
-            $log->debug("SQL: " . $sql);
106
+            $log->debug("Class name: ".get_class($this));
107
+            $log->debug("SQL: ".$sql);
108 108
             if (!is_null($param)) {
109 109
                 $strForLog = "";
110 110
                 foreach ($param as $key => $value) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $iterator = $this->getDBDataset()->getIterator($sql, $param, $ttl);
121 121
         if ($debug) {
122 122
             $end = microtime(true);
123
-            $log->debug("Execution Time: " . ($end - $start) . " segundos ");
123
+            $log->debug("Execution Time: ".($end - $start)." segundos ");
124 124
         }
125 125
         return $iterator;
126 126
     }
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
         $start = 0;
133 133
         if ($debug) {
134 134
             $log = LogHandler::getInstance();
135
-            $log->debug("Class name: " . get_class($this));
136
-            $log->debug("SQL: " . $sql);
135
+            $log->debug("Class name: ".get_class($this));
136
+            $log->debug("SQL: ".$sql);
137 137
             if (!is_null($param)) {
138 138
                 $strForLog = "";
139 139
                 foreach ($param as $key => $value) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $scalar = $this->getDBDataset()->getScalar($sql, $param);
150 150
         if ($debug) {
151 151
             $end = microtime(true);
152
-            $log->debug("Execution Time: " . ($end - $start) . " segundos ");
152
+            $log->debug("Execution Time: ".($end - $start)." segundos ");
153 153
         }
154 154
         return $scalar;
155 155
     }
@@ -233,14 +233,14 @@  discard block
 block discarded – undo
233 233
                     $fields = $singleRow->getFieldNames();
234 234
                 }
235 235
 
236
-                $line .= '"' . implode('","', $fields) . '"' . "\n";
236
+                $line .= '"'.implode('","', $fields).'"'."\n";
237 237
             }
238 238
 
239 239
             $raw = array();
240 240
             foreach ($fields as $field) {
241 241
                 $raw[] = $singleRow->getField($field);
242 242
             }
243
-            $line .= '"' . implode('","', array_values($raw)) . '"' . "\n";
243
+            $line .= '"'.implode('","', array_values($raw)).'"'."\n";
244 244
 
245 245
             if ($echoToBrowser) {
246 246
                 echo $line;
Please login to merge, or discard this patch.
src/Database/SqlBind.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $arg = str_replace("_", SqlBind::keyAdj($key), $paramSubstName);
50 50
 
51 51
             $count = 0;
52
-            $sql = preg_replace("/(\[\[$key\]\]|:" . $key . "[\s\W]|:$key\$)/", $arg . ' ', $sql, -1, $count);
52
+            $sql = preg_replace("/(\[\[$key\]\]|:".$key."[\s\W]|:$key\$)/", $arg.' ', $sql, -1, $count);
53 53
             if ($count === 0) {
54 54
                 unset($params[$key]);
55 55
             }
Please login to merge, or discard this patch.
src/Database/Expressions/DbBaseFunctions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             if (isset($pattern[$value])) {
88 88
                 $formatted = $pattern[$value];
89 89
             } else {
90
-                $formatted = $delimitString . $value . $delimitString;
90
+                $formatted = $delimitString.$value.$delimitString;
91 91
             }
92 92
             $prepareString[$key] = $formatted;
93 93
         }
Please login to merge, or discard this patch.
src/Database/Expressions/DbDblibFunctions.php 2 patches
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
 
66 66
     /**
67 67
      * Format date column in sql string given an input format that understands Y M D
68
-
69
-*
68
+     *
70 69
 *@param string $format
71 70
      * @param bool|string $column
72 71
      * @return string
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
         return preg_replace(
42 42
             '~(\s[Tt][Oo][Pp])\s.*?\d+\s~',
43
-            '$1 ' . $qty . ' ',
43
+            '$1 '.$qty.' ',
44 44
             $sql
45 45
         );
46 46
     }
Please login to merge, or discard this patch.