Completed
Push — master ( 545323...351d5c )
by Narcotic
07:01 queued 04:59
created
src/Api.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
     public function __construct($dbPath)
58 58
     {
59 59
         if (!file_exists($dbPath) || !is_readable($dbPath)) {
60
-            throw new \Exception("Database with path '" . $dbPath ."' doesn't exist or isn't readable!");
60
+            throw new \Exception("Database with path '".$dbPath."' doesn't exist or isn't readable!");
61 61
         }
62 62
 
63
-        $this->db = new \PDO('sqlite:' . $dbPath);
63
+        $this->db = new \PDO('sqlite:'.$dbPath);
64 64
     }
65 65
 
66 66
     /**
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             return false;
282 282
         }
283 283
 
284
-        $q = "UPDATE `" . $thisTable . "` SET rating=? WHERE id=?";
284
+        $q = "UPDATE `".$thisTable."` SET rating=? WHERE id=?";
285 285
 
286 286
         $res = $this->db->prepare($q);
287 287
         $ret = $res->execute(array(
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
         }
323 323
 
324 324
         if (!is_null($objectId)) {
325
-            $query = 'SELECT * FROM `' . $tableName . '` WHERE id=?';
325
+            $query = 'SELECT * FROM `'.$tableName.'` WHERE id=?';
326 326
             $params = [$objectId];
327 327
         } else {
328
-            $query = 'SELECT * FROM ' . $tableName;
328
+            $query = 'SELECT * FROM '.$tableName;
329 329
             $params = [];
330 330
         }
331 331
 
@@ -560,13 +560,13 @@  discard block
 block discarded – undo
560 560
         if ($field != null && $field != null) {
561 561
             $q = "
562 562
             SELECT id, 'video' as type FROM VideoTable
563
-            WHERE `" . $field . "`  LIKE ?
563
+            WHERE `" . $field."`  LIKE ?
564 564
             UNION ALL
565 565
             SELECT id, 'photo' FROM PhotoTable
566
-            WHERE `" . $field . "` LIKE ?";
566
+            WHERE `" . $field."` LIKE ?";
567 567
 
568 568
             $res = $this->db->prepare($q);
569
-            $res->execute(['%' . $value . '%', '%' . $value . '%']);
569
+            $res->execute(['%'.$value.'%', '%'.$value.'%']);
570 570
         } else {
571 571
             $q = "
572 572
             SELECT id, 'video' as type FROM VideoTable
Please login to merge, or discard this patch.