Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: system/View/Plugins.php #8742

Merged
Merged
30 changes: 0 additions & 30 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9751,36 +9751,6 @@
'count' => 1,
'path' => __DIR__ . '/system/View/Parser.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:ValidationErrors\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:lang\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:mailto\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:route\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:safeMailto\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\Plugins\\:\\:siteURL\\(\\) has parameter \\$params with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/View/Plugins.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\View\\\\RendererInterface\\:\\:render\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#',
'count' => 1,
Expand Down
12 changes: 12 additions & 0 deletions system/View/Plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ public static function previousURL()

/**
* Wrap helper function to use as view plugin.
*
* @param array{uri?: string, title?: string, attributes?: string} $params
mcsaygili marked this conversation as resolved.
Show resolved Hide resolved
*/
public static function mailto(array $params = []): string
{
Expand All @@ -54,6 +56,8 @@ public static function mailto(array $params = []): string

/**
* Wrap helper function to use as view plugin.
*
* @param array{email?: string, title?: string, attributes?: string} $params
mcsaygili marked this conversation as resolved.
Show resolved Hide resolved
*/
public static function safeMailto(array $params = []): string
{
Expand All @@ -66,6 +70,8 @@ public static function safeMailto(array $params = []): string

/**
* Wrap helper function to use as view plugin.
*
* @param list<int|string> $params
mcsaygili marked this conversation as resolved.
Show resolved Hide resolved
*/
public static function lang(array $params = []): string
{
Expand All @@ -76,6 +82,8 @@ public static function lang(array $params = []): string

/**
* Wrap helper function to use as view plugin.
*
* @param array{field?: string} $params
*/
public static function ValidationErrors(array $params = []): string
{
Expand All @@ -90,6 +98,8 @@ public static function ValidationErrors(array $params = []): string
/**
* Wrap helper function to use as view plugin.
*
* @param list<int|string> $params
mcsaygili marked this conversation as resolved.
Show resolved Hide resolved
*
* @return false|string
*/
public static function route(array $params = [])
Expand All @@ -99,6 +109,8 @@ public static function route(array $params = [])

/**
* Wrap helper function to use as view plugin.
*
* @param array{uri?: string, title?: string, attributes?: string} $params
mcsaygili marked this conversation as resolved.
Show resolved Hide resolved
*/
public static function siteURL(array $params = []): string
{
Expand Down
Loading