Skip to content

Commit 22e3450

Browse files
authored
Merge pull request #8742 from mcsaygili/refactor-system-View-Plugins.php
refactor: system/View/Plugins.php
2 parents ea7c719 + 7034868 commit 22e3450

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

phpstan-baseline.php

-30
Original file line numberDiff line numberDiff line change
@@ -9726,36 +9726,6 @@
97269726
'count' => 1,
97279727
'path' => __DIR__ . '/system/View/Parser.php',
97289728
];
9729-
$ignoreErrors[] = [
9730-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:ValidationErrors\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9731-
'count' => 1,
9732-
'path' => __DIR__ . '/system/View/Plugins.php',
9733-
];
9734-
$ignoreErrors[] = [
9735-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:lang\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9736-
'count' => 1,
9737-
'path' => __DIR__ . '/system/View/Plugins.php',
9738-
];
9739-
$ignoreErrors[] = [
9740-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:mailto\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9741-
'count' => 1,
9742-
'path' => __DIR__ . '/system/View/Plugins.php',
9743-
];
9744-
$ignoreErrors[] = [
9745-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:route\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9746-
'count' => 1,
9747-
'path' => __DIR__ . '/system/View/Plugins.php',
9748-
];
9749-
$ignoreErrors[] = [
9750-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:safeMailto\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9751-
'count' => 1,
9752-
'path' => __DIR__ . '/system/View/Plugins.php',
9753-
];
9754-
$ignoreErrors[] = [
9755-
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:siteURL\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
9756-
'count' => 1,
9757-
'path' => __DIR__ . '/system/View/Plugins.php',
9758-
];
97599729
$ignoreErrors[] = [
97609730
'message' => '#^Method CodeIgniter\\\\View\\\\RendererInterface\\:\\:render\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
97619731
'count' => 1,

system/View/Plugins.php

+12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public static function previousURL()
4242

4343
/**
4444
* Wrap helper function to use as view plugin.
45+
*
46+
* @param array{email?: string, title?: string, attributes?: array<string, string>|object|string} $params
4547
*/
4648
public static function mailto(array $params = []): string
4749
{
@@ -54,6 +56,8 @@ public static function mailto(array $params = []): string
5456

5557
/**
5658
* Wrap helper function to use as view plugin.
59+
*
60+
* @param array{email?: string, title?: string, attributes?: array<string, string>|object|string} $params
5761
*/
5862
public static function safeMailto(array $params = []): string
5963
{
@@ -66,6 +70,8 @@ public static function safeMailto(array $params = []): string
6670

6771
/**
6872
* Wrap helper function to use as view plugin.
73+
*
74+
* @param array<int|string, string>|list<string> $params
6975
*/
7076
public static function lang(array $params = []): string
7177
{
@@ -76,6 +82,8 @@ public static function lang(array $params = []): string
7682

7783
/**
7884
* Wrap helper function to use as view plugin.
85+
*
86+
* @param array{field?: string} $params
7987
*/
8088
public static function ValidationErrors(array $params = []): string
8189
{
@@ -90,6 +98,8 @@ public static function ValidationErrors(array $params = []): string
9098
/**
9199
* Wrap helper function to use as view plugin.
92100
*
101+
* @param list<string> $params
102+
*
93103
* @return false|string
94104
*/
95105
public static function route(array $params = [])
@@ -99,6 +109,8 @@ public static function route(array $params = [])
99109

100110
/**
101111
* Wrap helper function to use as view plugin.
112+
*
113+
* @param list<string> $params
102114
*/
103115
public static function siteURL(array $params = []): string
104116
{

0 commit comments

Comments
 (0)