From c4b16ca6085f30d69669009dcf75e3cbf8391cb8 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 5 Mar 2023 14:08:10 +0000 Subject: 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. --- classes/pluginhost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') 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; -- cgit v1.2.3