PHPstan check for level 5

Fix various issues for phpstan level 5

Start initial settings for level 6 (needs type declarations for all
vars)
This commit is contained in:
Clemens Schwaighofer
2021-10-22 11:14:00 +09:00
parent ffd1a86dcc
commit 736f822363
22 changed files with 118 additions and 78 deletions

View File

@@ -178,7 +178,7 @@ class Backend extends \CoreLibs\DB\IO
}
// check schema
if (defined('LOGIN_DB_SCHEMA') && LOGIN_DB_SCHEMA) {
if (defined('LOGIN_DB_SCHEMA') && !empty(LOGIN_DB_SCHEMA)) {
$SCHEMA = LOGIN_DB_SCHEMA;
} elseif ($this->dbGetSchema()) {
$SCHEMA = $this->dbGetSchema();
@@ -475,7 +475,7 @@ class Backend extends \CoreLibs\DB\IO
string $associate = null,
string $file = null
): void {
if (defined('GLOBAL_DB_SCHEMA') && GLOBAL_DB_SCHEMA) {
if (defined('GLOBAL_DB_SCHEMA') && !empty(GLOBAL_DB_SCHEMA)) {
$SCHEMA = GLOBAL_DB_SCHEMA;
} elseif ($this->dbGetSchema()) {
$SCHEMA = $this->dbGetSchema();