Skip to content

Dev: Remove the Filter ignore errors in phpstan-baseline.php #7769

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

Merged
merged 1 commit into from
Aug 4, 2023
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
30 changes: 0 additions & 30 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -1051,36 +1051,6 @@
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:discoverFilters\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processAliasesToClass\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processFilters\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processGlobals\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processMethods\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:setResponse\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Filters/Filters.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Format\\\\XMLFormatter\\:\\:arrayToXML\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down
12 changes: 11 additions & 1 deletion system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function __construct($config, RequestInterface $request, ResponseInterfac
* Sample :
* $filters->aliases['custom-auth'] = \Acme\Blob\Filters\BlobAuth::class;
*/
private function discoverFilters()
private function discoverFilters(): void
{
$locator = Services::locator();

Expand All @@ -144,6 +144,8 @@ private function discoverFilters()

/**
* Set the response explicitly.
*
* @return void
*/
public function setResponse(ResponseInterface $response)
{
Expand Down Expand Up @@ -390,6 +392,8 @@ public function getArguments(?string $key = null)
* Add any applicable (not excluded) global filter settings to the mix.
*
* @param string $uri
*
* @return void
*/
protected function processGlobals(?string $uri = null)
{
Expand Down Expand Up @@ -430,6 +434,8 @@ protected function processGlobals(?string $uri = null)

/**
* Add any method-specific filters to the mix.
*
* @return void
*/
protected function processMethods()
{
Expand All @@ -449,6 +455,8 @@ protected function processMethods()
* Add any applicable configured filters to the mix.
*
* @param string $uri
*
* @return void
*/
protected function processFilters(?string $uri = null)
{
Expand Down Expand Up @@ -480,6 +488,8 @@ protected function processFilters(?string $uri = null)
/**
* Maps filter aliases to the equivalent filter classes
*
* @return void
*
* @throws FilterException
*/
protected function processAliasesToClass(string $position)
Expand Down