Skip to content
Closed
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
35 changes: 35 additions & 0 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
'count' => 1,
'path' => __DIR__ . '/app/Config/Kint.php',
];
$ignoreErrors[] = [
'message' => '#^Property Config\\\\Routing\\:\\:\\$override404 has no type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/app/Config/Routing.php',
];
$ignoreErrors[] = [
'message' => '#^Method App\\\\Controllers\\\\BaseController\\:\\:initController\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -531,6 +536,11 @@
'count' => 1,
'path' => __DIR__ . '/system/Config/Publisher.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\Config\\\\Routing\\:\\:\\$override404 has no type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Config/Routing.php',
];
$ignoreErrors[] = [
'message' => '#^Property CodeIgniter\\\\Config\\\\View\\:\\:\\$filters has no type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -911,6 +921,11 @@
'count' => 1,
'path' => __DIR__ . '/system/Database/Seeder.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Debug\\\\BaseExceptionHandler\\:\\:maskSensitiveData\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Debug/BaseExceptionHandler.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Debug\\\\Exceptions\\:\\:exceptionHandler\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -1151,6 +1166,11 @@
'count' => 1,
'path' => __DIR__ . '/system/Exceptions/FrameworkException.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Exceptions\\\\FrameworkException\\:\\:forInvalidDirectory\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Exceptions/FrameworkException.php',
];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paulbalandan The return type should be static, but we cannot use it yet:

public static function forInvalidDirectory(string $path)
{
return new static(lang('Core.invalidDirectory', [$path]));
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then a PHPDoc should suffice.

$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Exceptions\\\\FrameworkException\\:\\:forInvalidFile\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -1406,6 +1426,11 @@
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Response.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\SiteURI\\:\\:applyParts\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/SiteURI.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HTTP\\\\URI\\:\\:applyParts\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -1511,6 +1536,11 @@
'count' => 1,
'path' => __DIR__ . '/system/Honeypot/Honeypot.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\HotReloader\\\\HotReloader\\:\\:run\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HotReloader/HotReloader.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\I18n\\\\Time\\:\\:setTestNow\\(\\) has no return type specified\\.$#',
'count' => 1,
Expand Down Expand Up @@ -1731,6 +1761,11 @@
'count' => 1,
'path' => __DIR__ . '/system/Router/AutoRouter.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Router\\\\AutoRouterImproved\\:\\:createSegments\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/Router/AutoRouterImproved.php',
];
$ignoreErrors[] = [
'message' => '#^Method CodeIgniter\\\\Router\\\\RouteCollection\\:\\:add\\(\\) has parameter \\$to with no signature specified for Closure\\.$#',
'count' => 1,
Expand Down