diff options
author | wn_ <[email protected]> | 2023-03-05 14:08:10 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2023-03-05 14:20:19 +0000 |
commit | c4b16ca6085f30d69669009dcf75e3cbf8391cb8 (patch) | |
tree | 83ab530bcf87e81e35a7637b43778d69de4fa8ba /classes | |
parent | c48dd6a3c4f68d1a3980bfed0d4d827fada92c32 (diff) |
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.
Diffstat (limited to 'classes')
-rwxr-xr-x | classes/pluginhost.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 1159e8ed1..9e3cf1ba1 100755 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -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; |