From f3760f138dcbaf7a2190336a0378cf1b2190c9f5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 17 Apr 2023 08:30:21 +0200 Subject: Complete PHPStan Level 6 (#5305) * Complete PHPStan Level 6 Fix https://github.com/FreshRSS/FreshRSS/issues/4112 And initiate PHPStan Level 7 * PHPStan Level 6 for tests * Use phpstan/phpstan-phpunit * Update to PHPStan version 1.10 * Fix mixed bug * Fix mixed return bug * Fix paginator bug * Fix FreshRSS_UserConfiguration * A couple more Minz_Configuration bug fixes * A few trivial PHPStan Level 7 fixes * A few more simple PHPStan Level 7 * More files passing PHPStan Level 7 Add interface to replace removed class from https://github.com/FreshRSS/FreshRSS/pull/5251 * A few more PHPStan Level 7 preparations * A few last details --- lib/Minz/View.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Minz/View.php') diff --git a/lib/Minz/View.php b/lib/Minz/View.php index 3b18c1dba..70b745ea4 100644 --- a/lib/Minz/View.php +++ b/lib/Minz/View.php @@ -22,7 +22,7 @@ class Minz_View { private static $title = ''; /** @var array */ private static $styles = []; - /** @var array */ + /** @var array */ private static $scripts = []; /** @var string|array{'dark'?:string,'light'?:string,'default'?:string} */ private static $themeColors; @@ -83,7 +83,7 @@ class Minz_View { * The file is searched inside list of $base_pathnames. * * @param string $filename the name of the file to include. - * @return boolean true if the file has been included, false else. + * @return bool true if the file has been included, false else. */ private function includeFile(string $filename): bool { // We search the filename in the list of base pathnames. Only the first view @@ -158,9 +158,9 @@ class Minz_View { /** * Choose the current view layout. - * @param string|false $layout the layout name to use, false to use no layouts. + * @param string|null $layout the layout name to use, false to use no layouts. */ - public function _layout($layout): void { + public function _layout(?string $layout): void { if ($layout) { $this->layout_filename = self::LAYOUT_PATH_NAME . $layout . '.phtml'; } else { @@ -178,7 +178,7 @@ class Minz_View { if ($use) { $this->_layout(self::LAYOUT_DEFAULT); } else { - $this->_layout(false); + $this->_layout(null); } } @@ -326,7 +326,6 @@ class Minz_View { /** * Management of parameters added to the view - * @param string $key * @param mixed $value */ public static function _param(string $key, $value): void { -- cgit v1.2.3