Skip to content

Commit

Permalink
Merge pull request #7769 from ping-yee/230804-phpstan-filter
Browse files Browse the repository at this point in the history
Dev: Remove the `Filter` ignore errors in phpstan-baseline.php
  • Loading branch information
kenjis authored Aug 4, 2023
2 parents 892f404 + ce5379c commit 0881e8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 31 deletions.
30 changes: 0 additions & 30 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -976,36 +976,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

0 comments on commit 0881e8a

Please sign in to comment.