Skip to content

Commit 9f7e031

Browse files
committed
Fix: Remove the system-Log ignore errors.
1 parent 5c6298d commit 9f7e031

3 files changed

Lines changed: 8 additions & 15 deletions

File tree

phpstan-baseline.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,21 +1146,6 @@
11461146
'count' => 4,
11471147
'path' => __DIR__ . '/system/Images/Handlers/ImageMagickHandler.php',
11481148
];
1149-
$ignoreErrors[] = [
1150-
'message' => '#^Method CodeIgniter\\\\Log\\\\Exceptions\\\\LogException\\:\\:forInvalidLogLevel\\(\\) has no return type specified\\.$#',
1151-
'count' => 1,
1152-
'path' => __DIR__ . '/system/Log/Exceptions/LogException.php',
1153-
];
1154-
$ignoreErrors[] = [
1155-
'message' => '#^Method CodeIgniter\\\\Log\\\\Exceptions\\\\LogException\\:\\:forInvalidMessageType\\(\\) has no return type specified\\.$#',
1156-
'count' => 1,
1157-
'path' => __DIR__ . '/system/Log/Exceptions/LogException.php',
1158-
];
1159-
$ignoreErrors[] = [
1160-
'message' => '#^Method CodeIgniter\\\\Log\\\\Handlers\\\\ChromeLoggerHandler\\:\\:sendLogs\\(\\) has no return type specified\\.$#',
1161-
'count' => 1,
1162-
'path' => __DIR__ . '/system/Log/Handlers/ChromeLoggerHandler.php',
1163-
];
11641149
$ignoreErrors[] = [
11651150
'message' => '#^Method CodeIgniter\\\\Model\\:\\:chunk\\(\\) has parameter \\$userFunc with no signature specified for Closure\\.$#',
11661151
'count' => 1,

system/Log/Exceptions/LogException.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@
1515

1616
class LogException extends FrameworkException
1717
{
18+
/**
19+
* @return LogException
20+
*/
1821
public static function forInvalidLogLevel(string $level)
1922
{
2023
return new static(lang('Log.invalidLogLevel', [$level]));
2124
}
2225

26+
/**
27+
* @return LogException
28+
*/
2329
public static function forInvalidMessageType(string $messageType)
2430
{
2531
return new static(lang('Log.invalidMessageType', [$messageType]));

system/Log/Handlers/ChromeLoggerHandler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ protected function format($object)
150150
* Attaches the header and the content to the passed in request object.
151151
*
152152
* @param ResponseInterface $response
153+
*
154+
* @return void
153155
*/
154156
public function sendLogs(?ResponseInterface &$response = null)
155157
{

0 commit comments

Comments
 (0)