diff --git a/index.php b/index.php index 1f0d2ae8..41353646 100644 --- a/index.php +++ b/index.php @@ -1,7 +1,7 @@ */ diff --git a/src/api/blog.php b/src/api/blog.php index ee2e229a..15acb2f9 100644 --- a/src/api/blog.php +++ b/src/api/blog.php @@ -2,6 +2,8 @@ /** * Blog + * + * @category API */ namespace wishthis; diff --git a/src/api/statistics.php b/src/api/statistics.php index 56a2ca26..c1d1ef54 100644 --- a/src/api/statistics.php +++ b/src/api/statistics.php @@ -3,7 +3,7 @@ /** * Various statistics * - * @author Jay Trees + * @category API */ namespace wishthis; @@ -37,8 +37,10 @@ switch ($_SERVER['REQUEST_METHOD']) { } } else { $count = $database - ->query('SELECT COUNT(`id`) AS "count" - FROM `' . $_GET['table'] . '`;') + ->query( + 'SELECT COUNT(`id`) AS "count" + FROM `' . $_GET['table'] . '`;' + ) ->fetch(); $response['data'] = $count; diff --git a/src/api/url.php b/src/api/url.php index dd1d34be..3938583a 100644 --- a/src/api/url.php +++ b/src/api/url.php @@ -1,9 +1,9 @@ + * @category API */ namespace wishthis; diff --git a/src/api/wishes.php b/src/api/wishes.php index f7963936..22f45988 100644 --- a/src/api/wishes.php +++ b/src/api/wishes.php @@ -1,9 +1,9 @@ + * @category API */ namespace wishthis; @@ -175,20 +175,22 @@ switch ($_SERVER['REQUEST_METHOD']) { $status = time(); } - $database->query('UPDATE `wishes` - SET `status` = "' . $status . '" - WHERE `id` = ' . $_PUT['wish_id'] . ' - ;'); + $database->query( + 'UPDATE `wishes` + SET `status` = "' . $status . '" + WHERE `id` = ' . $_PUT['wish_id'] . ';' + ); $response['success'] = true; } elseif (isset($_PUT['wish_url_current'], $_PUT['wish_url_proposed'])) { /** * Update Wish URL */ - $database->query('UPDATE `wishes` - SET `url` = "' . $_PUT['wish_url_proposed'] . '" - WHERE `url` = "' . $_PUT['wish_url_current'] . '" - ;'); + $database->query( + 'UPDATE `wishes` + SET `url` = "' . $_PUT['wish_url_proposed'] . '" + WHERE `url` = "' . $_PUT['wish_url_current'] . '";' + ); $response['success'] = true; } @@ -198,9 +200,10 @@ switch ($_SERVER['REQUEST_METHOD']) { parse_str(file_get_contents("php://input"), $_DELETE); if (isset($_DELETE['wish_id'])) { - $database->query('DELETE FROM `wishes` - WHERE `id` = ' . $_DELETE['wish_id'] . ' - ;'); + $database->query( + 'DELETE FROM `wishes` + WHERE `id` = ' . $_DELETE['wish_id'] . ';' + ); } $response['success'] = true;