aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-05-15 08:57:58 +0200
committerGravatar GitHub <noreply@github.com> 2024-05-15 08:57:58 +0200
commit2d17c020b6695d47debda065804db4e2d2f92e55 (patch)
tree4e03d16b1f59eabe347b8a89a7f375646269e13a /app
parentf958eaef2f733553132c4880f9e2e56003476545 (diff)
PHPStan 1.11 + minor update dev dependencies (#6459)
* PHPStan 1.11 + minor update dev dependencies https://github.com/phpstan/phpstan/releases/tag/1.11.0 * Comment style
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/updateController.php8
-rw-r--r--app/Models/Feed.php2
-rw-r--r--app/Models/TagDAO.php2
-rw-r--r--app/views/update/apply.phtml2
4 files changed, 8 insertions, 6 deletions
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index 3f4a46e6a..35f5c1691 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -267,7 +267,7 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
$res = !self::hasGitUpdate();
} else {
require(UPDATE_FILENAME);
- // @phpstan-ignore-next-line
+ // @phpstan-ignore function.notFound
$res = do_post_update();
}
@@ -290,12 +290,12 @@ class FreshRSS_update_Controller extends FreshRSS_ActionController {
} else {
require(UPDATE_FILENAME);
if (Minz_Request::isPost()) {
- // @phpstan-ignore-next-line
+ // @phpstan-ignore function.notFound
save_info_update();
}
- // @phpstan-ignore-next-line
+ // @phpstan-ignore function.notFound
if (!need_info_update()) {
- // @phpstan-ignore-next-line
+ // @phpstan-ignore function.notFound
$res = apply_update();
} else {
return;
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index efee3840f..5450d78c6 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -349,8 +349,8 @@ class FreshRSS_Feed extends Minz_Model {
public function load(bool $loadDetails = false, bool $noCache = false): ?SimplePie {
if ($this->url != '') {
/**
- * @phpstan-ignore-next-line
* @throws Minz_FileNotExistException
+ * @phpstan-ignore if.alwaysFalse
*/
if (CACHE_PATH == '') {
throw new Minz_FileNotExistException(
diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php
index b5611a7d6..9730ef20a 100644
--- a/app/Models/TagDAO.php
+++ b/app/Models/TagDAO.php
@@ -383,6 +383,7 @@ SQL;
}
$sql .= ' AND et.id_entry IN (' . str_repeat('?,', count($entries) - 1). '?)';
if (is_array($entries[0])) {
+ /** @var array<array<string,string>> $entries */
foreach ($entries as $entry) {
if (!empty($entry['id'])) {
$values[] = $entry['id'];
@@ -394,6 +395,7 @@ SQL;
$values[] = $entry->id();
}
} else {
+ /** @var array<numeric-string> $entries */
foreach ($entries as $entry) {
$values[] = $entry;
}
diff --git a/app/views/update/apply.phtml b/app/views/update/apply.phtml
index 291e634f8..96a271542 100644
--- a/app/views/update/apply.phtml
+++ b/app/views/update/apply.phtml
@@ -11,7 +11,7 @@
<h1><?= _t('admin.update') ?></h1>
<?php
- // @phpstan-ignore-next-line
+ // @phpstan-ignore function.notFound
ask_info_update();
?>
</main>