@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | * |
292 | 292 | * @param string $objectId Object ID |
293 | 293 | * |
294 | - * @return void |
|
294 | + * @return boolean |
|
295 | 295 | */ |
296 | 296 | public function removeAllItemTags($objectId) |
297 | 297 | { |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | * |
405 | 405 | * @param string $tag tag |
406 | 406 | * |
407 | - * @return array the altered tag |
|
407 | + * @return string the altered tag |
|
408 | 408 | */ |
409 | 409 | private function appendItemsToTag($tag) |
410 | 410 | { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | /** |
488 | 488 | * Gets the ID from a tag name |
489 | 489 | * |
490 | - * @param $tagName tag name |
|
490 | + * @param string $tagName tag name |
|
491 | 491 | * |
492 | 492 | * @return bool|string either the id or false if it doesn't exist |
493 | 493 | */ |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | * |
615 | 615 | * @param string $objectId Object ID |
616 | 616 | * |
617 | - * @return bool|int|string type |
|
617 | + * @return string type |
|
618 | 618 | */ |
619 | 619 | public function getTypeByObjectId($objectId) |
620 | 620 | { |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * |
665 | 665 | * @param string $objectId Object ID |
666 | 666 | * |
667 | - * @return bool|number|string numeric id |
|
667 | + * @return string numeric id |
|
668 | 668 | */ |
669 | 669 | public function getNumericIdByObjectId($objectId) |
670 | 670 | { |
@@ -57,10 +57,10 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |