Skip to content

Commit fa9e27d

Browse files
committed
style: Enable phpdoc_list_type fixer
1 parent 7d50bd3 commit fa9e27d

File tree

12 files changed

+25
-21
lines changed

12 files changed

+25
-21
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
'var',
7272
],
7373
],
74+
'phpdoc_list_type' => true,
7475
];
7576

7677
$options = [

.php-cs-fixer.no-header.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
__DIR__ . '/admin/starter/builds',
3030
]);
3131

32-
$overrides = [];
32+
$overrides = [
33+
'phpdoc_list_type' => true,
34+
];
3335

3436
$options = [
3537
'cacheFile' => 'build/.php-cs-fixer.no-header.cache',

.php-cs-fixer.user-guide.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'import_symbols' => false,
4040
'leading_backslash_in_global_namespace' => true,
4141
],
42+
'phpdoc_list_type' => true,
4243
];
4344

4445
$options = [

app/Config/View.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
use CodeIgniter\View\ViewDecoratorInterface;
77

88
/**
9-
* @phpstan-type ParserCallable (callable(mixed): mixed)
10-
* @phpstan-type ParserCallableString (callable(mixed): mixed)&string
9+
* @phpstan-type parser_callable (callable(mixed): mixed)
10+
* @phpstan-type parser_callable_string (callable(mixed): mixed)&string
1111
*/
1212
class View extends BaseView
1313
{
@@ -35,7 +35,7 @@ class View extends BaseView
3535
* { created_on|date(Y-m-d)|esc(attr) }
3636
*
3737
* @var array<string, string>
38-
* @phpstan-var array<string, ParserCallableString>
38+
* @phpstan-var array<string, parser_callable_string>
3939
*/
4040
public $filters = [];
4141

@@ -44,8 +44,8 @@ class View extends BaseView
4444
* by the core Parser by creating aliases that will be replaced with
4545
* any callable. Can be single or tag pair.
4646
*
47-
* @var array<string, array<string>|callable|string>
48-
* @phpstan-var array<string, array<ParserCallableString>|ParserCallableString|ParserCallable>
47+
* @var array<string, callable|list<string>|string>
48+
* @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
4949
*/
5050
public $plugins = [];
5151

@@ -56,7 +56,7 @@ class View extends BaseView
5656
*
5757
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
5858
*
59-
* @var class-string<ViewDecoratorInterface>[]
59+
* @var list<class-string<ViewDecoratorInterface>>
6060
*/
6161
public array $decorators = [];
6262
}

system/Autoloader/Autoloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Autoloader
6161
/**
6262
* Stores namespaces as key, and path as values.
6363
*
64-
* @var array<string, array<string>>
64+
* @var array<string, list<string>>
6565
*/
6666
protected $prefixes = [];
6767

system/Config/BaseService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class BaseService
170170
/**
171171
* A cache of the names of services classes found.
172172
*
173-
* @var array<string>
173+
* @var list<string>
174174
*/
175175
private static array $serviceNames = [];
176176

system/Config/View.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class View extends BaseConfig
5151
*
5252
* @psalm-suppress UndefinedDocblockClass
5353
*
54-
* @var array<string, array<string>|callable|string>
55-
* @phpstan-var array<string, array<parser_callable_string>|parser_callable_string|parser_callable>
54+
* @var array<string, callable|list<string>|string>
55+
* @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
5656
*/
5757
public $plugins = [];
5858

@@ -89,8 +89,8 @@ class View extends BaseConfig
8989
/**
9090
* Built-in View plugins.
9191
*
92-
* @var array<string, array<string>|callable|string>
93-
* @phpstan-var array<string, array<parser_callable_string>|parser_callable_string|parser_callable>
92+
* @var array<string, callable|list<string>|string>
93+
* @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
9494
*/
9595
protected $corePlugins = [
9696
'csp_script_nonce' => '\CodeIgniter\View\Plugins::cspScriptNonce',
@@ -112,7 +112,7 @@ class View extends BaseConfig
112112
*
113113
* All classes must implement CodeIgniter\View\ViewDecoratorInterface
114114
*
115-
* @var class-string<ViewDecoratorInterface>[]
115+
* @var list<class-string<ViewDecoratorInterface>>
116116
*/
117117
public array $decorators = [];
118118

system/Cookie/Exceptions/CookieException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static function forInvalidSameSiteNone()
104104
/**
105105
* Thrown when the `CookieStore` class is filled with invalid Cookie objects.
106106
*
107-
* @param array<int|string> $data
107+
* @param list<int|string> $data
108108
*
109109
* @return static
110110
*/

system/Database/BaseBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class BaseBuilder
116116
/**
117117
* QB UNION data
118118
*
119-
* @var array<string>
119+
* @var list<string>
120120
*/
121121
protected array $QBUnion = [];
122122

system/Events/Events.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Events
5252
* Stores information about the events
5353
* for display in the debug toolbar.
5454
*
55-
* @var array<array<string, float|string>>
55+
* @var list<array<string, float|string>>
5656
*/
5757
protected static $performanceLog = [];
5858

@@ -275,7 +275,7 @@ public static function simulate(bool $choice = true)
275275
/**
276276
* Getter for the performance log records.
277277
*
278-
* @return array<array<string, float|string>>
278+
* @return list<array<string, float|string>>
279279
*/
280280
public static function getPerformanceLogs()
281281
{

system/View/Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class Parser extends View
6363
/**
6464
* Stores any plugins registered at run-time.
6565
*
66-
* @var array<string, array<string>|callable|string>
67-
* @phpstan-var array<string, array<parser_callable_string>|parser_callable_string|parser_callable>
66+
* @var array<string, callable|list<string>|string>
67+
* @phpstan-var array<string, list<parser_callable_string>|parser_callable_string|parser_callable>
6868
*/
6969
protected $plugins = [];
7070

system/View/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class View implements RendererInterface
137137
* The name of the current section being rendered,
138138
* if any.
139139
*
140-
* @var array<string>
140+
* @var list<string>
141141
*/
142142
protected $sectionStack = [];
143143

0 commit comments

Comments
 (0)