Phan and phpstan fixes

Note that ACL\Login FIXME will be fixed later do not change any current
functionality
This commit is contained in:
Clemens Schwaighofer
2022-03-16 09:01:33 +09:00
parent 38903020fb
commit 105e0d69a1
7 changed files with 29 additions and 16 deletions

View File

@@ -617,7 +617,7 @@ class PgSQL implements Interface\SqlFunctions
/**
* Returns all parameters that are possible from the db_version
* @return array Parameter key names from pg_version
* @return array<mixed> Parameter key names from pg_version
*/
public function __dbVersionInfoParameterList(): array
{
@@ -718,18 +718,19 @@ class PgSQL implements Interface\SqlFunctions
}
/**
* Returns any server setting, if no connection or empty parameter returns
* empty string
* @param string $parameter Parameter to query
* @return string Settings value as string
* Returns any server setting
* if no connection or empty parameter or other error returns false
* else returns a string
* @param string $parameter Parameter to query
* @return string|bool Settings value as string
*/
public function __dbParameter(string $parameter): string
public function __dbParameter(string $parameter)
{
if ($this->dbh === false || is_bool($this->dbh)) {
return '';
return false;
}
if (empty($parameter)) {
return '';
return false;
}
return pg_parameter_status($this->dbh, $parameter);
}