Passed
Push — 2.x ( a3488e...da3964 )
by Terry
02:03
created
src/Firewall/Driver/SqlDriverProvider.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         return $this->{$method}($ip);
97 97
     }
98 98
 
99
-   /**
99
+    /**
100 100
      * {@inheritDoc}
101 101
      */
102 102
     protected function doFetchAll(string $type = 'filter'): array
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
     protected function doDelete(string $ip, string $type = 'filter'): bool
198 198
     {
199 199
         switch ($type) {
200
-            case 'rule'      : return $this->remove($this->tableRuleList,   ['log_ip' => $ip]);
200
+            case 'rule'      : return $this->remove($this->tableRuleList, ['log_ip' => $ip]);
201 201
             case 'filter': return $this->remove($this->tableFilterLogs, ['log_ip' => $ip]);
202
-            case 'session'   : return $this->remove($this->tableSessions,   ['id'     => $ip]);
202
+            case 'session'   : return $this->remove($this->tableSessions, ['id'     => $ip]);
203 203
         }
204 204
 
205 205
         return false;
@@ -225,14 +225,14 @@  discard block
 block discarded – undo
225 225
     private function update(string $table, array $data, array $where)
226 226
     {
227 227
         $placeholder = [];
228
-        foreach($data as $k => $v) {
228
+        foreach ($data as $k => $v) {
229 229
             $placeholder[] = "$k = :$k";
230 230
         }
231 231
 
232 232
         $dataPlaceholder = implode(', ', $placeholder);
233 233
 
234 234
         $placeholder = [];
235
-        foreach($where as $k => $v) {
235
+        foreach ($where as $k => $v) {
236 236
             $placeholder[] = "$k = :$k";
237 237
         }
238 238
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 
245 245
             $bind = array_merge($data, $where);
246 246
     
247
-            foreach($bind as $k => $v) {
247
+            foreach ($bind as $k => $v) {
248 248
 
249 249
                 // @codeCoverageIgnoreStart
250 250
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
         // @codeCoverageIgnoreStart
274 274
         
275
-        } catch(Exception $e) {
275
+        } catch (Exception $e) {
276 276
             throw $e->getMessage();
277 277
         }
278 278
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     {
293 293
         $placeholderField = [];
294 294
         $placeholderValue = [];
295
-        foreach($data as $k => $v) {
295
+        foreach ($data as $k => $v) {
296 296
             $placeholderField[] = "`$k`";
297 297
             $placeholderValue[] = ":$k";
298 298
         }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             $sql = 'INSERT INTO ' . $table . ' (' . $dataPlaceholderField . ') VALUES (' . $dataPlaceholderValue . ')';
305 305
             $query = $this->db->prepare($sql);
306 306
 
307
-            foreach($data as $k => $v) {
307
+            foreach ($data as $k => $v) {
308 308
 
309 309
                 // @codeCoverageIgnoreStart
310 310
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
         // @codeCoverageIgnoreStart
334 334
 
335
-        } catch(Exception $e) {
335
+        } catch (Exception $e) {
336 336
             return false;
337 337
         }
338 338
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
     {
352 352
 
353 353
         $placeholder = [];
354
-        foreach($where as $k => $v) {
354
+        foreach ($where as $k => $v) {
355 355
             $placeholder[] = "`$k` = :$k";
356 356
         }
357 357
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
             $sql = 'DELETE FROM ' . $table . ' WHERE ' . $dataPlaceholder;
363 363
             $query = $this->db->prepare($sql);
364 364
 
365
-            foreach($where as $k => $v) {
365
+            foreach ($where as $k => $v) {
366 366
 
367 367
                 // @codeCoverageIgnoreStart
368 368
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
         // @codeCoverageIgnoreStart
387 387
 
388
-        } catch(Exception $e) {
388
+        } catch (Exception $e) {
389 389
             return false;
390 390
         }
391 391
 
Please login to merge, or discard this patch.