Replace phpstan suggestions

This commit is contained in:
James Cole
2022-10-30 14:44:49 +01:00
parent c032ffd4f9
commit 33f370359c
45 changed files with 99 additions and 87 deletions

View File

@@ -117,7 +117,7 @@ class LoginController extends Controller
return $this->sendLoginResponse($request);
}
Log::warning('Login attempt failed.');
app('log')->warning('Login attempt failed.');
/** Copied directly from AuthenticatesUsers, but with logging added: */
// If the login attempt was unsuccessful we will increment the number of attempts

View File

@@ -70,7 +70,7 @@ class DebugController extends Controller
Log::debug('This is a test message at the DEBUG level.');
Log::info('This is a test message at the INFO level.');
Log::notice('This is a test message at the NOTICE level.');
Log::warning('This is a test message at the WARNING level.');
app('log')->warning('This is a test message at the WARNING level.');
Log::error('This is a test message at the ERROR level.');
Log::critical('This is a test message at the CRITICAL level.');
Log::alert('This is a test message at the ALERT level.');

View File

@@ -103,7 +103,7 @@ class Installer
}
if ($this->noTablesExist($message)) {
// redirect to UpdateController
Log::warning('There are no Firefly III tables present. Redirect to migrate routine.');
app('log')->warning('There are no Firefly III tables present. Redirect to migrate routine.');
return true;
}
@@ -150,7 +150,7 @@ class Installer
$configVersion = (int) config('firefly.db_version');
$dbVersion = (int) app('fireflyconfig')->getFresh('db_version', 1)->data;
if ($configVersion > $dbVersion) {
Log::warning(
app('log')->warning(
sprintf(
'The current configured version (%d) is older than the required version (%d). Redirect to migrate routine.',
$dbVersion,
@@ -177,7 +177,7 @@ class Installer
$configVersion = (string) config('firefly.version');
$dbVersion = (string) app('fireflyconfig')->getFresh('ff3_version', '1.0')->data;
if (1 === version_compare($configVersion, $dbVersion)) {
Log::warning(
app('log')->warning(
sprintf(
'The current configured Firefly III version (%s) is older than the required version (%s). Redirect to migrate routine.',
$dbVersion,