PluginManager: combine conditions into something less useless

the left side was already implying that the var is a Plugin instance, but PHPStan doesn't like non-bool conditions in strict mode.
This commit is contained in:
Dylan K. Taylor 2020-02-05 20:42:40 +00:00
parent 914450c30b
commit ac4f00be81

View File

@ -332,7 +332,7 @@ class PluginManager{
if(!isset($dependencies[$name]) and !isset($softDependencies[$name])){
unset($plugins[$name]);
$loadedThisLoop++;
if($plugin = $this->loadPlugin($file, $loaders) and $plugin instanceof Plugin){
if(($plugin = $this->loadPlugin($file, $loaders)) instanceof Plugin){
$loadedPlugins[$name] = $plugin;
}else{
$this->server->getLogger()->critical($this->server->getLanguage()->translateString("pocketmine.plugin.genericLoadError", [$name]));