mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 01:25:56 +00:00
Initial go at PHPStan rule level 6.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
interface Logger_Adapter {
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, $context);
|
||||
}
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, string $context): bool;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class Logger_SQL implements Logger_Adapter {
|
||||
ORM::configure('return_result_sets', true, $conn);
|
||||
}
|
||||
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, $context) {
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, string $context): bool {
|
||||
|
||||
if (Config::get_schema_version() > 117) {
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
class Logger_Stdout implements Logger_Adapter {
|
||||
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, $context) {
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, string $context): bool {
|
||||
|
||||
switch ($errno) {
|
||||
case E_ERROR:
|
||||
@@ -25,6 +25,7 @@ class Logger_Stdout implements Logger_Adapter {
|
||||
|
||||
print "[EEE] $priority $errname ($file:$line) $errstr\n";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
class Logger_Syslog implements Logger_Adapter {
|
||||
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, $context) {
|
||||
function log_error(int $errno, string $errstr, string $file, int $line, string $context): bool {
|
||||
|
||||
switch ($errno) {
|
||||
case E_ERROR:
|
||||
@@ -25,6 +25,7 @@ class Logger_Syslog implements Logger_Adapter {
|
||||
|
||||
syslog($priority, "[tt-rss] $errname ($file:$line) $errstr");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user