Fixes from phan/phpstan tests
This commit is contained in:
@@ -42,7 +42,6 @@ $log = new CoreLibs\Debug\Logging([
|
||||
'echo_all' => $ECHO_ALL ?? false,
|
||||
'print_all' => $PRINT_ALL ?? false,
|
||||
]);
|
||||
$basic = new CoreLibs\Basic($log);
|
||||
|
||||
print "<!DOCTYPE html>";
|
||||
print "<html><head><title>TEST CLASS: SYSTEM</title><head>";
|
||||
|
||||
@@ -818,6 +818,7 @@ class Login
|
||||
}
|
||||
// set the default edit access
|
||||
$this->acl['default_edit_access'] = $_SESSION['UNIT_DEFAULT'] ?? null;
|
||||
$this->acl['min'] = [];
|
||||
// integrate the type acl list, but only for the keyword -> level
|
||||
foreach ($this->default_acl_list as $level => $data) {
|
||||
$this->acl['min'][$data['type']] = $level;
|
||||
@@ -846,6 +847,8 @@ class Login
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
// phan claims $this->acl['min'] can be null, but above should skip
|
||||
/** @phan-suppress-next-line PhanTypeArraySuspiciousNullable */
|
||||
if ($this->acl[$source] >= $this->acl['min'][$min_access]) {
|
||||
return true;
|
||||
}
|
||||
@@ -1492,7 +1495,7 @@ EOM;
|
||||
/**
|
||||
* Return ACL array as is
|
||||
*
|
||||
* @return array
|
||||
* @return array<mixed>
|
||||
*/
|
||||
public function loginGetAcl(): array
|
||||
{
|
||||
|
||||
@@ -604,7 +604,7 @@ class PgSQL implements \CoreLibs\DB\SQL\SqlInterface\SqlFunctions
|
||||
return '';
|
||||
}
|
||||
// extract element
|
||||
$return_string = pg_version($this->dbh)[$parameter] ?? '';
|
||||
$return_string = (string)(pg_version($this->dbh)[$parameter] ?? '');
|
||||
// for version, strip if requested
|
||||
if (
|
||||
in_array($parameter, ['server']) &&
|
||||
|
||||
Reference in New Issue
Block a user