Completed
Push — develop ( 2c1b94...0d5900 )
by Narcotic
15s
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
   /**
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
       return false;
292 292
     }
293 293
 
294
-    $q = "UPDATE `" . $thisTable . "` SET rating=? WHERE id=?";
294
+    $q = "UPDATE `".$thisTable."` SET rating=? WHERE id=?";
295 295
 
296 296
     $res = $this->db->prepare($q);
297 297
     $ret = $res->execute(array(
@@ -332,10 +332,10 @@  discard block
 block discarded – undo
332 332
     }
333 333
 
334 334
     if (!is_null($objectId)) {
335
-      $query = 'SELECT * FROM `' . $tableName . '` WHERE id=?';
335
+      $query = 'SELECT * FROM `'.$tableName.'` WHERE id=?';
336 336
       $params = [$objectId];
337 337
     } else {
338
-      $query = 'SELECT * FROM ' . $tableName;
338
+      $query = 'SELECT * FROM '.$tableName;
339 339
       $params = [];
340 340
     }
341 341
 
@@ -570,13 +570,13 @@  discard block
 block discarded – undo
570 570
     if ($field != null && $field != null) {
571 571
       $q = "
572 572
             SELECT id, 'video' as type FROM VideoTable
573
-            WHERE `" . $field . "`  LIKE ?
573
+            WHERE `" . $field."`  LIKE ?
574 574
             UNION ALL
575 575
             SELECT id, 'photo' FROM PhotoTable
576
-            WHERE `" . $field . "` LIKE ?";
576
+            WHERE `" . $field."` LIKE ?";
577 577
 
578 578
       $res = $this->db->prepare($q);
579
-      $res->execute(['%' . $value . '%', '%' . $value . '%']);
579
+      $res->execute(['%'.$value.'%', '%'.$value.'%']);
580 580
     } else {
581 581
       $q = "
582 582
             SELECT id, 'video' as type FROM VideoTable
Please login to merge, or discard this patch.