aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserQuery.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-02 14:38:32 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-02 14:38:32 +0200
commitbd9fa803f1f0c23face77fa1bc550d1198ce5ad6 (patch)
treeedba662e84e70a6b0f23c8379d4ef174f714e999 /app/Models/UserQuery.php
parent4de1d5efea128e6cc70c71bad9be28d01e851f81 (diff)
PHPStan Level 7 complete DAOs (#5354)
* PHPStan Level 7 complete DAOs * Finalise PHPStan Level 7 for CategoryDAO * PHPStan Level 7 for Context and Search * Apply suggestions from code review Co-authored-by: Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com>
Diffstat (limited to 'app/Models/UserQuery.php')
-rw-r--r--app/Models/UserQuery.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index f2301ff26..a4cb469fe 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -128,7 +128,7 @@ class FreshRSS_UserQuery {
throw new FreshRSS_DAO_Exception('Category DAO is not loaded in UserQuery');
}
$category = $this->category_dao->searchById($id);
- if ($category) {
+ if ($category !== null) {
$this->get_name = $category->name();
} else {
$this->deprecated = true;
@@ -146,7 +146,7 @@ class FreshRSS_UserQuery {
throw new FreshRSS_DAO_Exception('Feed DAO is not loaded in UserQuery');
}
$feed = $this->feed_dao->searchById($id);
- if ($feed) {
+ if ($feed !== null) {
$this->get_name = $feed->name();
} else {
$this->deprecated = true;
@@ -164,7 +164,7 @@ class FreshRSS_UserQuery {
throw new FreshRSS_DAO_Exception('Tag DAO is not loaded in UserQuery');
}
$tag = $this->tag_dao->searchById($id);
- if ($tag) {
+ if ($tag !== null) {
$this->get_name = $tag->name();
} else {
$this->deprecated = true;