Skip to content

Commit be62e2e

Browse files
committed
Dev: remove the useless comment and add some type for the properties.
1 parent 47f0f15 commit be62e2e

3 files changed

Lines changed: 39 additions & 5 deletions

File tree

phpstan-baseline.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<?php declare(strict_types = 1);
22

33
$ignoreErrors = [];
4+
$ignoreErrors[] = [
5+
'message' => '#^PHPDoc type array of property Config\\\\View\\:\\:\\$filters is not covariant with PHPDoc type array\\<string, callable\\-string\\> of overridden property CodeIgniter\\\\Config\\\\View\\:\\:\\$filters\\.$#',
6+
'count' => 1,
7+
'path' => __DIR__ . '/app/Config/View.php',
8+
];
9+
$ignoreErrors[] = [
10+
'message' => '#^PHPDoc type array of property Config\\\\View\\:\\:\\$plugins is not covariant with PHPDoc type array\\<string, callable\\-string\\> of overridden property CodeIgniter\\\\Config\\\\View\\:\\:\\$plugins\\.$#',
11+
'count' => 1,
12+
'path' => __DIR__ . '/app/Config/View.php',
13+
];
414
$ignoreErrors[] = [
515
'message' => '#^Parameter \\#1 \\$callback of function spl_autoload_register expects \\(callable\\(string\\)\\: void\\)\\|null, array\\{\\$this\\(CodeIgniter\\\\Autoloader\\\\Autoloader\\), \'loadClass\'\\} given\\.$#',
616
'count' => 1,
@@ -316,6 +326,26 @@
316326
'count' => 1,
317327
'path' => __DIR__ . '/system/ComposerScripts.php',
318328
];
329+
$ignoreErrors[] = [
330+
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$coreFilters type has no signature specified for callable\\.$#',
331+
'count' => 1,
332+
'path' => __DIR__ . '/system/Config/View.php',
333+
];
334+
$ignoreErrors[] = [
335+
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$corePlugins type has no signature specified for callable\\.$#',
336+
'count' => 1,
337+
'path' => __DIR__ . '/system/Config/View.php',
338+
];
339+
$ignoreErrors[] = [
340+
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$filters type has no signature specified for callable\\.$#',
341+
'count' => 1,
342+
'path' => __DIR__ . '/system/Config/View.php',
343+
];
344+
$ignoreErrors[] = [
345+
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$plugins type has no signature specified for callable\\.$#',
346+
'count' => 1,
347+
'path' => __DIR__ . '/system/Config/View.php',
348+
];
319349
$ignoreErrors[] = [
320350
'message' => '#^Method CodeIgniter\\\\Controller\\:\\:cachePage\\(\\) has no return type specified\\.$#',
321351
'count' => 1,

system/Config/ForeignCharacters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class ForeignCharacters
1818
{
1919
/**
20-
* Without further ado, the list of foreign characters.
20+
* The list of foreign characters.
2121
*
2222
* @var array<string, string>
2323
*/

system/Config/View.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class View extends BaseConfig
3434
* To prevent potential abuse, all filters MUST be defined here
3535
* in order for them to be available for use within the Parser.
3636
*
37-
* @var array<string>
37+
* @var array<string, string>
38+
* @phpstan-var array<string, callable-string>
3839
*/
3940
public $filters = [];
4041

@@ -43,14 +44,16 @@ class View extends BaseConfig
4344
* by the core Parser by creating aliases that will be replaced with
4445
* any callable. Can be single or tag pair.
4546
*
46-
* @var array<string>
47+
* @var array<string, string>
48+
* @phpstan-var array<string, callable-string>
4749
*/
4850
public $plugins = [];
4951

5052
/**
5153
* Built-in View filters.
5254
*
53-
* @var array
55+
* @var array<string, string>
56+
* @phpstan-var array<string, callable-string>
5457
*/
5558
protected $coreFilters = [
5659
'abs' => '\abs',
@@ -79,7 +82,8 @@ class View extends BaseConfig
7982
/**
8083
* Built-in View plugins.
8184
*
82-
* @var array
85+
* @var array<string, string>
86+
* @phpstan-var array<string, callable-string>
8387
*/
8488
protected $corePlugins = [
8589
'csp_script_nonce' => '\CodeIgniter\View\Plugins::cspScriptNonce',

0 commit comments

Comments
 (0)