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

docs: fix PHPDoc types for Filters #8654

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -5766,36 +5766,6 @@
'count' => 3,
'path' => __DIR__ . '/system/Files/File.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\CSRF\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/CSRF.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\CSRF\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/CSRF.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\DebugToolbar\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/DebugToolbar.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\DebugToolbar\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/DebugToolbar.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\FilterInterface\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/FilterInterface.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\FilterInterface\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/FilterInterface.php',
];
$ignoreErrors[] = [
'message' => '#^Argument \\#1 \\$name \\(\'Config\\\\\\\\Modules\'\\) passed to function config does not extend CodeIgniter\\\\\\\\Config\\\\\\\\BaseConfig\\.$#',
'count' => 1,
Expand Down Expand Up @@ -5861,26 +5831,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Honeypot\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Honeypot.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Honeypot\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Honeypot.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\InvalidChars\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/InvalidChars.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\InvalidChars\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/InvalidChars.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\InvalidChars\\:\\:checkControl\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#',
'count' => 1,
Expand All @@ -5901,16 +5851,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Filters/InvalidChars.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\SecureHeaders\\:\\:after\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/SecureHeaders.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\SecureHeaders\\:\\:before\\(\\) has parameter \\$arguments with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/SecureHeaders.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Format\\\\FormatterInterface\\:\\:format\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#',
'count' => 1,
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/CSRF.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class CSRF implements FilterInterface
* sent back to the client, allowing for error pages,
* redirects, etc.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return RedirectResponse|void
*
Expand Down Expand Up @@ -66,7 +66,7 @@ public function before(RequestInterface $request, $arguments = null)
/**
* We don't have anything to do here.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/DebugToolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DebugToolbar implements FilterInterface
/**
* We don't need to do anything here.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*/
public function before(RequestInterface $request, $arguments = null)
{
Expand All @@ -35,7 +35,7 @@ public function before(RequestInterface $request, $arguments = null)
* If the debug flag is set (CI_DEBUG) then collect performance
* and debug information and display it in a toolbar.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*/
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
{
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface FilterInterface
* sent back to the client, allowing for error pages,
* redirects, etc.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return RequestInterface|ResponseInterface|string|void
*/
Expand All @@ -41,7 +41,7 @@ public function before(RequestInterface $request, $arguments = null);
* to stop execution of other after filters, short of
* throwing an Exception or Error.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return ResponseInterface|void
*/
Expand Down
2 changes: 1 addition & 1 deletion system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Filters
/**
* Any arguments to be passed to filtersClass.
*
* @var array<class-string, array<string, list<string>>|null> [classname => arguments]
* @var array<class-string, list<string>|null> [classname => arguments]
*/
protected $argumentsClass = [];

Expand Down
4 changes: 2 additions & 2 deletions system/Filters/Honeypot.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Honeypot implements FilterInterface
* Checks if Honeypot field is empty, if not then the
* requester is a bot
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @throws HoneypotException
*/
Expand All @@ -46,7 +46,7 @@ public function before(RequestInterface $request, $arguments = null)
/**
* Attach a honeypot to the current response.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*/
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
{
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/InvalidChars.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class InvalidChars implements FilterInterface
/**
* Check invalid characters.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return void
*/
Expand All @@ -72,7 +72,7 @@ public function before(RequestInterface $request, $arguments = null)
/**
* We don't have anything to do here.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions system/Filters/SecureHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SecureHeaders implements FilterInterface
/**
* We don't have anything to do here.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return void
*/
Expand All @@ -60,7 +60,7 @@ public function before(RequestInterface $request, $arguments = null)
/**
* Add security headers.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return void
*/
Expand Down
8 changes: 4 additions & 4 deletions user_guide_src/source/libraries/throttler/002.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Throttle implements FilterInterface
* This is a demo implementation of using the Throttler class
* to implement rate limiting for your application.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return mixed
* @return ResponseInterface|void
*/
public function before(RequestInterface $request, $arguments = null)
{
Expand All @@ -31,9 +31,9 @@ public function before(RequestInterface $request, $arguments = null)
/**
* We don't have anything to do here.
*
* @param array|null $arguments
* @param list<string>|null $arguments
*
* @return mixed
* @return void
*/
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
{
Expand Down
Loading