mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-14 22:01:59 +00:00
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:
parent
914450c30b
commit
ac4f00be81
@ -332,7 +332,7 @@ class PluginManager{
|
|||||||
if(!isset($dependencies[$name]) and !isset($softDependencies[$name])){
|
if(!isset($dependencies[$name]) and !isset($softDependencies[$name])){
|
||||||
unset($plugins[$name]);
|
unset($plugins[$name]);
|
||||||
$loadedThisLoop++;
|
$loadedThisLoop++;
|
||||||
if($plugin = $this->loadPlugin($file, $loaders) and $plugin instanceof Plugin){
|
if(($plugin = $this->loadPlugin($file, $loaders)) instanceof Plugin){
|
||||||
$loadedPlugins[$name] = $plugin;
|
$loadedPlugins[$name] = $plugin;
|
||||||
}else{
|
}else{
|
||||||
$this->server->getLogger()->critical($this->server->getLanguage()->translateString("pocketmine.plugin.genericLoadError", [$name]));
|
$this->server->getLogger()->critical($this->server->getLanguage()->translateString("pocketmine.plugin.genericLoadError", [$name]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user