Skip to content

Commit

Permalink
Merge pull request #8742 from mcsaygili/refactor-system-View-Plugins.php
Browse files Browse the repository at this point in the history
refactor: system/View/Plugins.php
  • Loading branch information
kenjis authored Apr 12, 2024
2 parents ea7c719 + 7034868 commit 22e3450
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
30 changes: 0 additions & 30 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9726,36 +9726,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{email?: string, title?: string, attributes?: array<string, string>|object|string} $params
*/
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?: array<string, string>|object|string} $params
*/
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 array<int|string, string>|list<string> $params
*/
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<string> $params
*
* @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 list<string> $params
*/
public static function siteURL(array $params = []): string
{
Expand Down

0 comments on commit 22e3450

Please sign in to comment.