diff options
author | Alexandre Alapetite <alexandre@alapetite.fr> | 2024-05-15 08:57:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 08:57:58 +0200 |
commit | 2d17c020b6695d47debda065804db4e2d2f92e55 (patch) | |
tree | 4e03d16b1f59eabe347b8a89a7f375646269e13a /lib | |
parent | f958eaef2f733553132c4880f9e2e56003476545 (diff) | |
download | freshrss-2d17c020b6695d47debda065804db4e2d2f92e55.tar.gz freshrss-2d17c020b6695d47debda065804db4e2d2f92e55.zip |
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 'lib')
-rw-r--r-- | lib/Minz/Configuration.php | 2 | ||||
-rw-r--r-- | lib/Minz/Dispatcher.php | 6 | ||||
-rw-r--r-- | lib/Minz/Pdo.php | 6 | ||||
-rw-r--r-- | lib/Minz/View.php | 3 | ||||
-rw-r--r-- | lib/http-conditional.php | 4 | ||||
-rw-r--r-- | lib/lib_rss.php | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php index 5c3a8ade0..56733e481 100644 --- a/lib/Minz/Configuration.php +++ b/lib/Minz/Configuration.php @@ -72,7 +72,7 @@ class Minz_Configuration { /** * The namespace of the current configuration. * Unused. - * @phpstan-ignore-next-line + * @phpstan-ignore property.onlyWritten */ private string $namespace = ''; diff --git a/lib/Minz/Dispatcher.php b/lib/Minz/Dispatcher.php index c8825df61..85f342dad 100644 --- a/lib/Minz/Dispatcher.php +++ b/lib/Minz/Dispatcher.php @@ -44,7 +44,7 @@ final class Minz_Dispatcher { $this->createController (Minz_Request::controllerName ()); $this->controller->init (); $this->controller->firstAction (); - // @phpstan-ignore-next-line + // @phpstan-ignore booleanNot.alwaysTrue if (!self::$needsReset) { $this->launchAction ( Minz_Request::actionName () @@ -53,7 +53,7 @@ final class Minz_Dispatcher { } $this->controller->lastAction (); - // @phpstan-ignore-next-line + // @phpstan-ignore booleanNot.alwaysTrue if (!self::$needsReset) { $this->controller->declareCspHeader(); $this->controller->view ()->build (); @@ -61,7 +61,7 @@ final class Minz_Dispatcher { } catch (Minz_Exception $e) { throw $e; } - // @phpstan-ignore-next-line + // @phpstan-ignore doWhile.alwaysFalse } while (self::$needsReset); } diff --git a/lib/Minz/Pdo.php b/lib/Minz/Pdo.php index bb07de488..33d84eb45 100644 --- a/lib/Minz/Pdo.php +++ b/lib/Minz/Pdo.php @@ -58,7 +58,7 @@ abstract class Minz_Pdo extends PDO { * @param array<int,string> $options * @return PDOStatement|false * @throws PDOException if the attribute `PDO::ATTR_ERRMODE` is set to `PDO::ERRMODE_EXCEPTION` - * @phpstan-ignore-next-line + * @phpstan-ignore method.childParameterType, throws.unusedType */ #[\Override] #[\ReturnTypeWillChange] @@ -72,7 +72,7 @@ abstract class Minz_Pdo extends PDO { * @param string $statement * @return int|false * @throws PDOException if the attribute `PDO::ATTR_ERRMODE` is set to `PDO::ERRMODE_EXCEPTION` - * @phpstan-ignore-next-line + * @phpstan-ignore throws.unusedType */ #[\Override] #[\ReturnTypeWillChange] @@ -84,7 +84,7 @@ abstract class Minz_Pdo extends PDO { /** * @return PDOStatement|false * @throws PDOException if the attribute `PDO::ATTR_ERRMODE` is set to `PDO::ERRMODE_EXCEPTION` - * @phpstan-ignore-next-line + * @phpstan-ignore throws.unusedType */ #[\Override] #[\ReturnTypeWillChange] diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 5b1518a84..717e47b15 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -346,8 +346,7 @@ class Minz_View { public function attributeParams(): void { foreach (Minz_View::$params as $key => $value) { - // TODO: Do not use variable variable (noVariableVariables) - /** @phpstan-ignore-next-line */ + // @phpstan-ignore property.dynamicName $this->$key = $value; } } diff --git a/lib/http-conditional.php b/lib/http-conditional.php index 2ed597a71..f683d4fbf 100644 --- a/lib/http-conditional.php +++ b/lib/http-conditional.php @@ -107,13 +107,13 @@ function httpConditional(int $UnixTimeStamp, int $cacheSeconds = 0, int $cachePr } $etagServer = '"' . md5($scriptName . $myQuery . '#' . $dateLastModif) . '"'; - // @phpstan-ignore-next-line + // @phpstan-ignore booleanNot.alwaysTrue if ((!$is412) && isset($_SERVER['HTTP_IF_MATCH'])) { //rfc2616-sec14.html#sec14.24 $etagsClient = stripslashes($_SERVER['HTTP_IF_MATCH']); $etagsClient = str_ireplace('-gzip', '', $etagsClient); $is412 = (($etagsClient !== '*') && (strpos($etagsClient, $etagServer) === false)); } - // @phpstan-ignore-next-line + // @phpstan-ignore booleanAnd.leftAlwaysTrue if ($is304 && isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { //rfc2616-sec14.html#sec14.25 //rfc1945.txt $nbCond++; $dateCacheClient = $_SERVER['HTTP_IF_MODIFIED_SINCE']; diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 7e4b7732e..22da0b98e 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -41,7 +41,7 @@ if (!function_exists('syslog')) { define('STDERR', fopen('php://stderr', 'w')); } function syslog(int $priority, string $message): bool { - // @phpstan-ignore-next-line + // @phpstan-ignore booleanAnd.rightAlwaysTrue if (COPY_SYSLOG_TO_STDERR && defined('STDERR') && STDERR) { return fwrite(STDERR, $message . "\n") != false; } |