@@ -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 | { |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | public function __construct($dbPath) |
| 51 | 51 | { |
| 52 | 52 | if (!file_exists($dbPath) || !is_readable($dbPath)) { |
| 53 | - throw new \Exception("Database with path '" . $dbPath ."' doesn't exist or isn't readable!"); |
|
| 53 | + throw new \Exception("Database with path '".$dbPath."' doesn't exist or isn't readable!"); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - $this->_conn = new \PDO('sqlite:' . $dbPath); |
|
| 56 | + $this->_conn = new \PDO('sqlite:'.$dbPath); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | return false; |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - $q = "UPDATE `" . $thisTable . "` SET rating=? WHERE id=?"; |
|
| 277 | + $q = "UPDATE `".$thisTable."` SET rating=? WHERE id=?"; |
|
| 278 | 278 | |
| 279 | 279 | $res = $this->_conn->prepare($q); |
| 280 | 280 | $ret = $res->execute(array( |
@@ -315,10 +315,10 @@ discard block |
||
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | if (!is_null($objectId)) { |
| 318 | - $query = 'SELECT * FROM `' . $tableName . '` WHERE id=?'; |
|
| 318 | + $query = 'SELECT * FROM `'.$tableName.'` WHERE id=?'; |
|
| 319 | 319 | $params = [$objectId]; |
| 320 | 320 | } else { |
| 321 | - $query = 'SELECT * FROM ' . $tableName; |
|
| 321 | + $query = 'SELECT * FROM '.$tableName; |
|
| 322 | 322 | $params = []; |
| 323 | 323 | } |
| 324 | 324 | |
@@ -553,13 +553,13 @@ discard block |
||
| 553 | 553 | if ($field != null && $field != null) { |
| 554 | 554 | $q = " |
| 555 | 555 | SELECT id, 'video' as type FROM VideoTable |
| 556 | - WHERE `" . $field . "` LIKE ? |
|
| 556 | + WHERE `" . $field."` LIKE ? |
|
| 557 | 557 | UNION ALL |
| 558 | 558 | SELECT id, 'photo' FROM PhotoTable |
| 559 | - WHERE `" . $field . "` LIKE ?"; |
|
| 559 | + WHERE `" . $field."` LIKE ?"; |
|
| 560 | 560 | |
| 561 | 561 | $res = $this->_conn->prepare($q); |
| 562 | - $res->execute(['%' . $value . '%', '%' . $value . '%']); |
|
| 562 | + $res->execute(['%'.$value.'%', '%'.$value.'%']); |
|
| 563 | 563 | } else { |
| 564 | 564 | $q = " |
| 565 | 565 | SELECT id, 'video' as type FROM VideoTable |