Skip to content

Commit 0226cc2

Browse files
committed
docs: update array types in @var
1 parent c0a495b commit 0226cc2

File tree

9 files changed

+27
-5
lines changed

9 files changed

+27
-5
lines changed

app/Config/ContentSecurityPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ContentSecurityPolicy extends BaseConfig
122122
* The frame-src directive restricts the URLs which may
123123
* be loaded into nested browsing contexts.
124124
*
125-
* @var array|string|null
125+
* @var list<string>|string|null
126126
*/
127127
public $frameSrc;
128128

app/Config/Database.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class Database extends Config
2323

2424
/**
2525
* The default database connection.
26+
*
27+
* @var array<string, mixed>
2628
*/
2729
public array $default = [
2830
'DSN' => '',
@@ -48,6 +50,8 @@ class Database extends Config
4850
/**
4951
* This database connection is used when
5052
* running PHPUnit database tests.
53+
*
54+
* @var array<string, mixed>
5155
*/
5256
public array $tests = [
5357
'DSN' => '',

app/Config/Exceptions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class Exceptions extends BaseConfig
3030
* --------------------------------------------------------------------------
3131
* Any status codes here will NOT be logged if logging is turned on.
3232
* By default, only 404 (Page Not Found) exceptions are ignored.
33+
*
34+
* @var list<int>
3335
*/
3436
public array $ignoreCodes = [404];
3537

@@ -51,6 +53,8 @@ class Exceptions extends BaseConfig
5153
* Any data that you would like to hide from the debug trace.
5254
* In order to specify 2 levels, use "/" to separate.
5355
* ex. ['server', 'setup/password', 'secret_token']
56+
*
57+
* @var list<string>
5458
*/
5559
public array $sensitiveDataInTrace = [];
5660

app/Config/Filters.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class Filters extends BaseConfig
5555
* If you use this, you should disable auto-routing because auto-routing
5656
* permits any HTTP method to access a controller. Accessing the controller
5757
* with a method you don't expect could bypass the filter.
58+
*
59+
* @var array<string, list<string>>
5860
*/
5961
public array $methods = [];
6062

@@ -64,6 +66,8 @@ class Filters extends BaseConfig
6466
*
6567
* Example:
6668
* 'isLoggedIn' => ['before' => ['account/*', 'profiles/*']]
69+
*
70+
* @var array<string, array<string, list<string>>>
6771
*/
6872
public array $filters = [];
6973
}

app/Config/Logger.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Logger extends BaseConfig
3636
* For a live site you'll usually enable Critical or higher (3) to be logged otherwise
3737
* your log files will fill up very fast.
3838
*
39-
* @var array|int
39+
* @var int|list<int>
4040
*/
4141
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
4242

@@ -72,6 +72,8 @@ class Logger extends BaseConfig
7272
*
7373
* Handlers are executed in the order defined in this array, starting with
7474
* the handler on top and continuing down.
75+
*
76+
* @var array<string, array<string, int|list<string>|string>>
7577
*/
7678
public array $handlers = [
7779
/*

app/Config/Mimes.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class Mimes
2222
{
2323
/**
2424
* Map of extensions to mime types.
25+
*
26+
* @var array<string, list<string>|string>
2527
*/
2628
public static array $mimes = [
2729
'hqx' => [

app/Config/Routing.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class Routing extends BaseRouting
2424
* found taking precedence.
2525
*
2626
* Default: APPPATH . 'Config/Routes.php'
27+
*
28+
* @var list<string>
2729
*/
2830
public array $routeFiles = [
2931
APPPATH . 'Config/Routes.php',
@@ -106,7 +108,7 @@ class Routing extends BaseRouting
106108
* 'blog' => 'Acme\Blog\Controllers',
107109
* ]
108110
*
109-
* @var array [ uri_segment => namespace ]
111+
* @var array<string, string> [ uri_segment => namespace ]
110112
*/
111113
public array $moduleRoutes = [];
112114
}

app/Config/Toolbar.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Toolbar extends BaseConfig
3131
* List of toolbar collectors that will be called when Debug Toolbar
3232
* fires up and collects data from.
3333
*
34-
* @var list<string>
34+
* @var list<class-string>
3535
*/
3636
public array $collectors = [
3737
Timers::class,
@@ -99,6 +99,8 @@ class Toolbar extends BaseConfig
9999
* We restrict the values to keep performance as high as possible.
100100
*
101101
* NOTE: The ROOTPATH will be prepended to all values.
102+
*
103+
* @var list<string>
102104
*/
103105
public array $watchedDirectories = [
104106
'app',
@@ -111,6 +113,8 @@ class Toolbar extends BaseConfig
111113
*
112114
* Contains an array of file extensions that will be watched for changes and
113115
* used to determine if the hot-reload feature should reload the page or not.
116+
*
117+
* @var list<string>
114118
*/
115119
public array $watchedExtensions = [
116120
'php', 'css', 'js', 'html', 'svg', 'json', 'env',

app/Controllers/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class BaseController extends Controller
3333
* class instantiation. These helpers will be available
3434
* to all other controllers that extend BaseController.
3535
*
36-
* @var array
36+
* @var list<string>
3737
*/
3838
protected $helpers = [];
3939

0 commit comments

Comments
 (0)