Address PHPStan 'right side always true' in 'PluginHost::lookup_command()'.

Since 'PluginHost::add_command()' is currently the only way to add to this private array, and it always sets an array, this is reasonably safe.
This commit is contained in:
wn_ 2023-03-05 14:08:10 +00:00
parent c48dd6a3c4
commit c4b16ca608
1 changed files with 1 additions and 1 deletions

View File

@ -588,7 +588,7 @@ class PluginHost {
function lookup_command(string $command) {
$command = "-" . strtolower($command);
if (array_key_exists($command, $this->commands) && is_array($this->commands[$command])) {
if (array_key_exists($command, $this->commands)) {
return $this->commands[$command]["class"];
} else {
return false;