aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/categoryController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/categoryController.php')
-rw-r--r--app/Controllers/categoryController.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index 335c0c970..e9bf59654 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -11,7 +11,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* underlying framework.
*
*/
- public function firstAction() {
+ public function firstAction(): void {
if (!FreshRSS_Auth::hasAccess()) {
Minz_Error::error(403);
}
@@ -26,7 +26,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* Request parameter is:
* - new-category
*/
- public function createAction() {
+ public function createAction() :void {
$catDAO = FreshRSS_Factory::createCategoryDao();
$tagDAO = FreshRSS_Factory::createTagDao();
@@ -84,7 +84,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* - id
* - name
*/
- public function updateAction() {
+ public function updateAction(): void {
$catDAO = FreshRSS_Factory::createCategoryDao();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
@@ -124,7 +124,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* Request parameter is:
* - id (of a category)
*/
- public function deleteAction() {
+ public function deleteAction(): void {
$feedDAO = FreshRSS_Factory::createFeedDao();
$catDAO = FreshRSS_Factory::createCategoryDao();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
@@ -168,7 +168,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* - id (of a category)
* - muted (truthy to remove only muted feeds, or falsy otherwise)
*/
- public function emptyAction() {
+ public function emptyAction(): void {
$feedDAO = FreshRSS_Factory::createFeedDao();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
@@ -182,7 +182,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
$muted = Minz_Request::param('muted', null);
if ($muted !== null) {
- $muted = boolval($muted);
+ $muted = (bool)$muted;
}
// List feeds to remove then related user queries.
@@ -211,7 +211,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
* Request parameter is:
* - id (of a category)
*/
- public function refreshOpmlAction() {
+ public function refreshOpmlAction(): void {
$catDAO = FreshRSS_Factory::createCategoryDao();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
@@ -224,7 +224,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
}
$category = $catDAO->searchById($id);
- if ($category == null) {
+ if ($category === null) {
Minz_Request::bad(_t('feedback.sub.category.not_exist'), $url_redirect);
}
@@ -247,7 +247,7 @@ class FreshRSS_category_Controller extends FreshRSS_ActionController {
}
/** @return array<string,int> */
- public static function refreshDynamicOpmls() {
+ public static function refreshDynamicOpmls(): array {
$successes = 0;
$errors = 0;
$catDAO = FreshRSS_Factory::createCategoryDao();