diff options
| author | 2023-04-17 08:30:21 +0200 | |
|---|---|---|
| committer | 2023-04-17 08:30:21 +0200 | |
| commit | f3760f138dcbaf7a2190336a0378cf1b2190c9f5 (patch) | |
| tree | 6fac8fbf9efd7aa74a8e3970ab70ccf85287b2cd /lib/Minz/View.php | |
| parent | 41fa4e746df8c2e2399ed753b4994ca85cb21358 (diff) | |
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
Diffstat (limited to 'lib/Minz/View.php')
| -rw-r--r-- | lib/Minz/View.php | 11 |
1 files changed, 5 insertions, 6 deletions
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<array{'media':string,'url':string}> */ private static $styles = []; - /** @var array<array{'url':string,'id':string,'defer':string,'async':string}> */ + /** @var array<array{'url':string,'id':string,'defer':bool,'async':bool}> */ 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 { |
