From d45dd5948f8a2d85136eddd6d5251f23cc18e838 Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 14 Nov 2023 17:53:37 +0900 Subject: [PATCH 1/2] docs: change phpstan-type names --- system/Config/View.php | 12 ++++++------ system/View/Parser.php | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/system/Config/View.php b/system/Config/View.php index 5a6a6404b69e..101b67f580d0 100644 --- a/system/Config/View.php +++ b/system/Config/View.php @@ -16,8 +16,8 @@ /** * View configuration * - * @phpstan-type ParserCallable (callable(mixed): mixed) - * @phpstan-type ParserCallableString (callable(mixed): mixed)&string + * @phpstan-type parser_callable (callable(mixed): mixed) + * @phpstan-type parser_callable_string (callable(mixed): mixed)&string */ class View extends BaseConfig { @@ -40,7 +40,7 @@ class View extends BaseConfig * @psalm-suppress UndefinedDocblockClass * * @var array - * @phpstan-var array + * @phpstan-var array */ public $filters = []; @@ -52,7 +52,7 @@ class View extends BaseConfig * @psalm-suppress UndefinedDocblockClass * * @var array|callable|string> - * @phpstan-var array|ParserCallableString|ParserCallable> + * @phpstan-var array|parser_callable_string|parser_callable> */ public $plugins = []; @@ -60,7 +60,7 @@ class View extends BaseConfig * Built-in View filters. * * @var array - * @phpstan-var array + * @phpstan-var array */ protected $coreFilters = [ 'abs' => '\abs', @@ -90,7 +90,7 @@ class View extends BaseConfig * Built-in View plugins. * * @var array|callable|string> - * @phpstan-var array|ParserCallableString|ParserCallable> + * @phpstan-var array|parser_callable_string|parser_callable> */ protected $corePlugins = [ 'csp_script_nonce' => '\CodeIgniter\View\Plugins::cspScriptNonce', diff --git a/system/View/Parser.php b/system/View/Parser.php index 120570079d2b..ff729d4837d5 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -20,8 +20,8 @@ /** * Class for parsing pseudo-vars * - * @phpstan-type ParserCallable (callable(mixed): mixed) - * @phpstan-type ParserCallableString (callable(mixed): mixed)&string + * @phpstan-type parser_callable (callable(mixed): mixed) + * @phpstan-type parser_callable_string (callable(mixed): mixed)&string * * @see \CodeIgniter\View\ParserTest */ @@ -64,7 +64,7 @@ class Parser extends View * Stores any plugins registered at run-time. * * @var array|callable|string> - * @phpstan-var array|ParserCallableString|ParserCallable> + * @phpstan-var array|parser_callable_string|parser_callable> */ protected $plugins = []; From 5dccbcc87017b3207e4935c5b786bca3b5f5c45b Mon Sep 17 00:00:00 2001 From: kenjis Date: Tue, 14 Nov 2023 19:01:21 +0900 Subject: [PATCH 2/2] chore: vendor/bin/psalm --set-baseline=psalm-baseline.xml --- psalm-baseline.xml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 379314e5093a..c4240e2b7fc8 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -10,11 +10,6 @@ public $plugins = []; - - - $val - - Memcache @@ -39,9 +34,9 @@ - ]]> - |ParserCallableString|ParserCallable>]]> - |ParserCallableString|ParserCallable>]]> + |parser_callable_string|parser_callable>]]> + |parser_callable_string|parser_callable>]]> + ]]> '\abs', 'capitalize' => '\CodeIgniter\View\Filters::capitalize', @@ -144,8 +139,8 @@ - |ParserCallableString|ParserCallable>]]> - |ParserCallableString|ParserCallable>]]> + |parser_callable_string|parser_callable>]]> + |parser_callable_string|parser_callable>]]> protected $plugins = []; protected $plugins = [];