diff options
| author | 2023-04-15 01:19:22 +0200 | |
|---|---|---|
| committer | 2023-04-15 01:19:22 +0200 | |
| commit | a19b56064d74ae871abd52903778e0d5c35af896 (patch) | |
| tree | fdc0f2cadc8171c466de34d1d30adab01a738c71 /app/Models/CategoryDAO.php | |
| parent | b8662f88995df2cbae655d4efe8f414eb3872e5e (diff) | |
PHPstan level 6 for Category.php (#5298)
* PHPstan level 6 for Category.php
* Fix a few things
* Minor fixes
* A few more fixes
---------
Co-authored-by: Luc <sanchezluc+freshrss@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/CategoryDAO.php')
| -rw-r--r-- | app/Models/CategoryDAO.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index a67567f33..b103afb4e 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -258,14 +258,14 @@ SQL; } } - public function listSortedCategories($prePopulateFeeds = true, $details = false) { + public function listSortedCategories(bool $prePopulateFeeds = true, bool $details = false) { $categories = $this->listCategories($prePopulateFeeds, $details); if (!is_array($categories)) { return $categories; } - uasort($categories, static function ($a, $b) { + uasort($categories, static function (FreshRSS_Category $a, FreshRSS_Category $b) { $aPosition = $a->attributes('position'); $bPosition = $b->attributes('position'); if ($aPosition === $bPosition) { @@ -495,7 +495,7 @@ SQL; $cat->_id($dao['id']); $cat->_kind($dao['kind']); $cat->_lastUpdate($dao['lastUpdate'] ?? 0); - $cat->_error($dao['error'] ?? false); + $cat->_error($dao['error'] ?? 0); $cat->_attributes('', isset($dao['attributes']) ? $dao['attributes'] : ''); $list[$key] = $cat; } |
