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:
parent
c48dd6a3c4
commit
c4b16ca608
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue