diff options
| author | 2024-09-11 17:14:53 +0200 | |
|---|---|---|
| committer | 2024-09-11 17:14:53 +0200 | |
| commit | dfac9f5813df7d4c7c812c381364c8898333f559 (patch) | |
| tree | 978496d0a8d8b0d6b5dbe836c6829296133b337c /app/Services/ImportService.php | |
| parent | 31c8846791d4b5316fbc790202f79545c012f9c2 (diff) | |
PHPStan booleansInConditions (#6793)
* PHPStan booleansInConditions
* Uniformisation
Diffstat (limited to 'app/Services/ImportService.php')
| -rw-r--r-- | app/Services/ImportService.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 8060e4d51..9ec36b61c 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -91,7 +91,7 @@ class FreshRSS_Import_Service { if ($can_create_category) { $category = $this->createCategory($category_element, $dry_run); - if ($category) { + if ($category !== null) { $categories_by_names[$category->name()] = $category; $nb_categories++; } @@ -102,7 +102,7 @@ class FreshRSS_Import_Service { } } - if (!$category) { + if ($category === null) { // Category can be null if the feeds weren't in a category // outline, or if we weren't able to create the category. $category = $default_category; @@ -121,7 +121,7 @@ class FreshRSS_Import_Service { break; } - if ($this->createFeed($feed_element, $category, $dry_run)) { + if ($this->createFeed($feed_element, $category, $dry_run) !== null) { // TODO what if the feed already exists in the database? $nb_feeds++; } else { @@ -301,7 +301,7 @@ class FreshRSS_Import_Service { return $feed; } - if ($feed != null) { + if ($feed !== null) { // addFeedObject checks if feed is already in DB $id = $this->feedDAO->addFeedObject($feed); if ($id == false) { |
