Skip to content

Commit 0881e8a

Browse files
authored
Merge pull request #7769 from ping-yee/230804-phpstan-filter
Dev: Remove the `Filter` ignore errors in phpstan-baseline.php
2 parents 892f404 + ce5379c commit 0881e8a

File tree

2 files changed

+11
-31
lines changed

2 files changed

+11
-31
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -976,36 +976,6 @@
976976
'count' => 1,
977977
'path' => __DIR__ . '/system/Filters/Filters.php',
978978
];
979-
$ignoreErrors[] = [
980-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:discoverFilters\\(\\) has no return type specified\\.$#',
981-
'count' => 1,
982-
'path' => __DIR__ . '/system/Filters/Filters.php',
983-
];
984-
$ignoreErrors[] = [
985-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processAliasesToClass\\(\\) has no return type specified\\.$#',
986-
'count' => 1,
987-
'path' => __DIR__ . '/system/Filters/Filters.php',
988-
];
989-
$ignoreErrors[] = [
990-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processFilters\\(\\) has no return type specified\\.$#',
991-
'count' => 1,
992-
'path' => __DIR__ . '/system/Filters/Filters.php',
993-
];
994-
$ignoreErrors[] = [
995-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processGlobals\\(\\) has no return type specified\\.$#',
996-
'count' => 1,
997-
'path' => __DIR__ . '/system/Filters/Filters.php',
998-
];
999-
$ignoreErrors[] = [
1000-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:processMethods\\(\\) has no return type specified\\.$#',
1001-
'count' => 1,
1002-
'path' => __DIR__ . '/system/Filters/Filters.php',
1003-
];
1004-
$ignoreErrors[] = [
1005-
'message' => '#^Method CodeIgniter\\\\Filters\\\\Filters\\:\\:setResponse\\(\\) has no return type specified\\.$#',
1006-
'count' => 1,
1007-
'path' => __DIR__ . '/system/Filters/Filters.php',
1008-
];
1009979
$ignoreErrors[] = [
1010980
'message' => '#^Method CodeIgniter\\\\Format\\\\XMLFormatter\\:\\:arrayToXML\\(\\) has no return type specified\\.$#',
1011981
'count' => 1,

system/Filters/Filters.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function __construct($config, RequestInterface $request, ResponseInterfac
121121
* Sample :
122122
* $filters->aliases['custom-auth'] = \Acme\Blob\Filters\BlobAuth::class;
123123
*/
124-
private function discoverFilters()
124+
private function discoverFilters(): void
125125
{
126126
$locator = Services::locator();
127127

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

145145
/**
146146
* Set the response explicitly.
147+
*
148+
* @return void
147149
*/
148150
public function setResponse(ResponseInterface $response)
149151
{
@@ -390,6 +392,8 @@ public function getArguments(?string $key = null)
390392
* Add any applicable (not excluded) global filter settings to the mix.
391393
*
392394
* @param string $uri
395+
*
396+
* @return void
393397
*/
394398
protected function processGlobals(?string $uri = null)
395399
{
@@ -430,6 +434,8 @@ protected function processGlobals(?string $uri = null)
430434

431435
/**
432436
* Add any method-specific filters to the mix.
437+
*
438+
* @return void
433439
*/
434440
protected function processMethods()
435441
{
@@ -449,6 +455,8 @@ protected function processMethods()
449455
* Add any applicable configured filters to the mix.
450456
*
451457
* @param string $uri
458+
*
459+
* @return void
452460
*/
453461
protected function processFilters(?string $uri = null)
454462
{
@@ -480,6 +488,8 @@ protected function processFilters(?string $uri = null)
480488
/**
481489
* Maps filter aliases to the equivalent filter classes
482490
*
491+
* @return void
492+
*
483493
* @throws FilterException
484494
*/
485495
protected function processAliasesToClass(string $position)

0 commit comments

Comments
 (0)