From 911abfd0dd072646de6b0bd8c614fca97789bb27 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Fri, 9 Feb 2024 21:54:29 +0800 Subject: [PATCH] style: Enable `phpdoc_list_type` fixer --- .php-cs-fixer.dist.php | 4 +++- .php-cs-fixer.no-header.php | 4 +++- .php-cs-fixer.user-guide.php | 1 + app/Config/View.php | 2 +- system/Autoloader/Autoloader.php | 2 +- system/Config/BaseService.php | 2 +- system/Config/View.php | 4 ++-- system/Cookie/Exceptions/CookieException.php | 2 +- system/Database/BaseBuilder.php | 2 +- system/Events/Events.php | 4 ++-- system/View/Parser.php | 2 +- system/View/View.php | 2 +- 12 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 3653cf1349c2..020a19d93e74 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -43,7 +43,9 @@ __DIR__ . '/spark', ]); -$overrides = []; +$overrides = [ + 'phpdoc_list_type' => true, +]; $options = [ 'cacheFile' => 'build/.php-cs-fixer.cache', diff --git a/.php-cs-fixer.no-header.php b/.php-cs-fixer.no-header.php index 7c9ae1e80737..3e18f2453eb9 100644 --- a/.php-cs-fixer.no-header.php +++ b/.php-cs-fixer.no-header.php @@ -29,7 +29,9 @@ __DIR__ . '/admin/starter/builds', ]); -$overrides = []; +$overrides = [ + 'phpdoc_list_type' => true, +]; $options = [ 'cacheFile' => 'build/.php-cs-fixer.no-header.cache', diff --git a/.php-cs-fixer.user-guide.php b/.php-cs-fixer.user-guide.php index fe634f0a6f21..1c97f4ea1e90 100644 --- a/.php-cs-fixer.user-guide.php +++ b/.php-cs-fixer.user-guide.php @@ -39,6 +39,7 @@ 'import_symbols' => false, 'leading_backslash_in_global_namespace' => true, ], + 'phpdoc_list_type' => true, ]; $options = [ diff --git a/app/Config/View.php b/app/Config/View.php index cf00863fb70b..a8fb63ba5e5a 100644 --- a/app/Config/View.php +++ b/app/Config/View.php @@ -44,7 +44,7 @@ class View extends BaseView * by the core Parser by creating aliases that will be replaced with * any callable. Can be single or tag pair. * - * @var array|callable|string> + * @var array|string> * @phpstan-var array|ParserCallableString|ParserCallable> */ public $plugins = []; diff --git a/system/Autoloader/Autoloader.php b/system/Autoloader/Autoloader.php index ca886fb535bf..88115b7af715 100644 --- a/system/Autoloader/Autoloader.php +++ b/system/Autoloader/Autoloader.php @@ -61,7 +61,7 @@ class Autoloader /** * Stores namespaces as key, and path as values. * - * @var array> + * @var array> */ protected $prefixes = []; diff --git a/system/Config/BaseService.php b/system/Config/BaseService.php index 1c80c80d77c6..835145eee460 100644 --- a/system/Config/BaseService.php +++ b/system/Config/BaseService.php @@ -170,7 +170,7 @@ class BaseService /** * A cache of the names of services classes found. * - * @var array + * @var list */ private static array $serviceNames = []; diff --git a/system/Config/View.php b/system/Config/View.php index 101b67f580d0..519916a62a6b 100644 --- a/system/Config/View.php +++ b/system/Config/View.php @@ -51,7 +51,7 @@ class View extends BaseConfig * * @psalm-suppress UndefinedDocblockClass * - * @var array|callable|string> + * @var array|string> * @phpstan-var array|parser_callable_string|parser_callable> */ public $plugins = []; @@ -89,7 +89,7 @@ class View extends BaseConfig /** * Built-in View plugins. * - * @var array|callable|string> + * @var array|string> * @phpstan-var array|parser_callable_string|parser_callable> */ protected $corePlugins = [ diff --git a/system/Cookie/Exceptions/CookieException.php b/system/Cookie/Exceptions/CookieException.php index 2e69a0e0f891..515463c51434 100644 --- a/system/Cookie/Exceptions/CookieException.php +++ b/system/Cookie/Exceptions/CookieException.php @@ -104,7 +104,7 @@ public static function forInvalidSameSiteNone() /** * Thrown when the `CookieStore` class is filled with invalid Cookie objects. * - * @param array $data + * @param list $data * * @return static */ diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index bc005f48f407..20ba91fe811c 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -116,7 +116,7 @@ class BaseBuilder /** * QB UNION data * - * @var array + * @var list */ protected array $QBUnion = []; diff --git a/system/Events/Events.php b/system/Events/Events.php index b240dc29e1ca..abcf79267411 100644 --- a/system/Events/Events.php +++ b/system/Events/Events.php @@ -52,7 +52,7 @@ class Events * Stores information about the events * for display in the debug toolbar. * - * @var array> + * @var list> */ protected static $performanceLog = []; @@ -275,7 +275,7 @@ public static function simulate(bool $choice = true) /** * Getter for the performance log records. * - * @return array> + * @return list> */ public static function getPerformanceLogs() { diff --git a/system/View/Parser.php b/system/View/Parser.php index 87f0e96bdce9..e8e960991891 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -63,7 +63,7 @@ class Parser extends View /** * Stores any plugins registered at run-time. * - * @var array|callable|string> + * @var array|string> * @phpstan-var array|parser_callable_string|parser_callable> */ protected $plugins = []; diff --git a/system/View/View.php b/system/View/View.php index 8940951a42aa..f80ffa61ffcd 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -137,7 +137,7 @@ class View implements RendererInterface * The name of the current section being rendered, * if any. * - * @var array + * @var list */ protected $sectionStack = [];