mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Mass removal of useless @param/@return PHPDoc annotations, pass 1
This commit is contained in:
@ -29,9 +29,6 @@ use pocketmine\event\Listener;
|
||||
interface EventExecutor{
|
||||
|
||||
/**
|
||||
* @param Listener $listener
|
||||
* @param Event $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute(Listener $listener, Event $event);
|
||||
|
@ -46,8 +46,6 @@ class PharPluginLoader implements PluginLoader{
|
||||
|
||||
/**
|
||||
* Loads the plugin contained in $file
|
||||
*
|
||||
* @param string $file
|
||||
*/
|
||||
public function loadPlugin(string $file) : void{
|
||||
$this->loader->addPath("$file/src");
|
||||
@ -55,10 +53,6 @@ class PharPluginLoader implements PluginLoader{
|
||||
|
||||
/**
|
||||
* Gets the PluginDescription from the file
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return null|PluginDescription
|
||||
*/
|
||||
public function getPluginDescription(string $file) : ?PluginDescription{
|
||||
$phar = new \Phar($file);
|
||||
|
@ -53,9 +53,6 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function onEnable();
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled() : bool;
|
||||
|
||||
/**
|
||||
@ -64,8 +61,6 @@ interface Plugin extends CommandExecutor{
|
||||
* @internal This is intended for core use only and should not be used by plugins
|
||||
* @see PluginManager::enablePlugin()
|
||||
* @see PluginManager::disablePlugin()
|
||||
*
|
||||
* @param bool $enabled
|
||||
*/
|
||||
public function setEnabled(bool $enabled = true) : void;
|
||||
|
||||
@ -77,40 +72,25 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function onDisable();
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isDisabled() : bool;
|
||||
|
||||
/**
|
||||
* Gets the plugin's data folder to save files and configuration.
|
||||
* This directory name has a trailing slash.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDataFolder() : string;
|
||||
|
||||
/**
|
||||
* @return PluginDescription
|
||||
*/
|
||||
public function getDescription() : PluginDescription;
|
||||
|
||||
/**
|
||||
* Gets an embedded resource in the plugin file.
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return null|resource Resource data, or null
|
||||
*/
|
||||
public function getResource(string $filename);
|
||||
|
||||
/**
|
||||
* Saves an embedded resource to its relative location in the data folder
|
||||
*
|
||||
* @param string $filename
|
||||
* @param bool $replace
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveResource(string $filename, bool $replace = false) : bool;
|
||||
|
||||
@ -121,9 +101,6 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function getResources() : array;
|
||||
|
||||
/**
|
||||
* @return Config
|
||||
*/
|
||||
public function getConfig() : Config;
|
||||
|
||||
/**
|
||||
@ -131,9 +108,6 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function saveConfig();
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function saveDefaultConfig() : bool;
|
||||
|
||||
/**
|
||||
@ -141,19 +115,10 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function reloadConfig();
|
||||
|
||||
/**
|
||||
* @return Server
|
||||
*/
|
||||
public function getServer() : Server;
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName() : string;
|
||||
|
||||
/**
|
||||
* @return PluginLogger
|
||||
*/
|
||||
public function getLogger() : PluginLogger;
|
||||
|
||||
/**
|
||||
@ -161,9 +126,6 @@ interface Plugin extends CommandExecutor{
|
||||
*/
|
||||
public function getPluginLoader();
|
||||
|
||||
/**
|
||||
* @return TaskScheduler
|
||||
*/
|
||||
public function getScheduler() : TaskScheduler;
|
||||
|
||||
}
|
||||
|
@ -97,9 +97,6 @@ abstract class PluginBase implements Plugin{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
final public function isEnabled() : bool{
|
||||
return $this->isEnabled;
|
||||
}
|
||||
@ -110,8 +107,6 @@ abstract class PluginBase implements Plugin{
|
||||
* @internal This is intended for core use only and should not be used by plugins
|
||||
* @see PluginManager::enablePlugin()
|
||||
* @see PluginManager::disablePlugin()
|
||||
*
|
||||
* @param bool $enabled
|
||||
*/
|
||||
final public function setEnabled(bool $enabled = true) : void{
|
||||
if($this->isEnabled !== $enabled){
|
||||
@ -124,9 +119,6 @@ abstract class PluginBase implements Plugin{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
final public function isDisabled() : bool{
|
||||
return !$this->isEnabled;
|
||||
}
|
||||
@ -139,16 +131,11 @@ abstract class PluginBase implements Plugin{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return PluginLogger
|
||||
*/
|
||||
public function getLogger() : PluginLogger{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return Command|PluginIdentifiableCommand|null
|
||||
*/
|
||||
public function getCommand(string $name){
|
||||
@ -165,20 +152,12 @@ abstract class PluginBase implements Plugin{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandSender $sender
|
||||
* @param Command $command
|
||||
* @param string $label
|
||||
* @param string[] $args
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
protected function isPhar() : bool{
|
||||
return strpos($this->file, "phar://") === 0;
|
||||
}
|
||||
@ -187,8 +166,6 @@ abstract class PluginBase implements Plugin{
|
||||
* Gets an embedded resource on the plugin file.
|
||||
* WARNING: You must close the resource given using fclose()
|
||||
*
|
||||
* @param string $filename
|
||||
*
|
||||
* @return null|resource Resource data, or null
|
||||
*/
|
||||
public function getResource(string $filename){
|
||||
@ -200,12 +177,6 @@ abstract class PluginBase implements Plugin{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
* @param bool $replace
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveResource(string $filename, bool $replace = false) : bool{
|
||||
if(trim($filename) === ""){
|
||||
return false;
|
||||
@ -249,9 +220,6 @@ abstract class PluginBase implements Plugin{
|
||||
return $resources;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Config
|
||||
*/
|
||||
public function getConfig() : Config{
|
||||
if($this->config === null){
|
||||
$this->reloadConfig();
|
||||
@ -278,30 +246,18 @@ abstract class PluginBase implements Plugin{
|
||||
$this->config = new Config($this->configFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Server
|
||||
*/
|
||||
final public function getServer() : Server{
|
||||
return $this->server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
final public function getName() : string{
|
||||
return $this->description->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
final public function getFullName() : string{
|
||||
return $this->description->getFullName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getFile() : string{
|
||||
return $this->file;
|
||||
}
|
||||
@ -313,9 +269,6 @@ abstract class PluginBase implements Plugin{
|
||||
return $this->loader;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TaskScheduler
|
||||
*/
|
||||
public function getScheduler() : TaskScheduler{
|
||||
return $this->scheduler;
|
||||
}
|
||||
|
@ -88,8 +88,6 @@ class PluginDescription{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $plugin
|
||||
*
|
||||
* @throws PluginException
|
||||
*/
|
||||
private function loadMap(array $plugin) : void{
|
||||
@ -161,16 +159,10 @@ class PluginDescription{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFullName() : string{
|
||||
return $this->name . " v" . $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getCompatibleApis() : array{
|
||||
return $this->api;
|
||||
}
|
||||
@ -189,16 +181,10 @@ class PluginDescription{
|
||||
return $this->authors;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPrefix() : string{
|
||||
return $this->prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getCommands() : array{
|
||||
return $this->commands;
|
||||
}
|
||||
@ -245,44 +231,26 @@ class PluginDescription{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getDepend() : array{
|
||||
return $this->depend;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription() : string{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getLoadBefore() : array{
|
||||
return $this->loadBefore;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMain() : string{
|
||||
return $this->main;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName() : string{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getOrder() : int{
|
||||
return $this->order;
|
||||
}
|
||||
@ -294,23 +262,14 @@ class PluginDescription{
|
||||
return $this->permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getSoftDepend() : array{
|
||||
return $this->softDepend;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getVersion() : string{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getWebsite() : string{
|
||||
return $this->website;
|
||||
}
|
||||
|
@ -30,33 +30,21 @@ interface PluginLoader{
|
||||
|
||||
/**
|
||||
* Returns whether this PluginLoader can load the plugin in the given path.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canLoadPlugin(string $path) : bool;
|
||||
|
||||
/**
|
||||
* Loads the plugin contained in $file
|
||||
*
|
||||
* @param string $file
|
||||
*/
|
||||
public function loadPlugin(string $file) : void;
|
||||
|
||||
/**
|
||||
* Gets the PluginDescription from the file
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return null|PluginDescription
|
||||
*/
|
||||
public function getPluginDescription(string $file) : ?PluginDescription;
|
||||
|
||||
/**
|
||||
* Returns the protocol prefix used to access files in this plugin, e.g. file://, phar://
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAccessProtocol() : string;
|
||||
}
|
||||
|
@ -51,9 +51,6 @@ class PluginLogger implements \AttachableLogger{
|
||||
return $this->attachments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $context
|
||||
*/
|
||||
public function __construct(Plugin $context){
|
||||
$prefix = $context->getDescription()->getPrefix();
|
||||
$this->pluginName = $prefix != null ? "[$prefix] " : "[" . $context->getDescription()->getName() . "] ";
|
||||
|
@ -94,11 +94,6 @@ class PluginManager{
|
||||
/** @var string|null */
|
||||
private $pluginDataDirectory;
|
||||
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param SimpleCommandMap $commandMap
|
||||
* @param null|string $pluginDataDirectory
|
||||
*/
|
||||
public function __construct(Server $server, SimpleCommandMap $commandMap, ?string $pluginDataDirectory){
|
||||
$this->server = $server;
|
||||
$this->commandMap = $commandMap;
|
||||
@ -113,8 +108,6 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return null|Plugin
|
||||
*/
|
||||
public function getPlugin(string $name){
|
||||
@ -125,9 +118,6 @@ class PluginManager{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param PluginLoader $loader
|
||||
*/
|
||||
public function registerInterface(PluginLoader $loader) : void{
|
||||
$this->fileAssociations[get_class($loader)] = $loader;
|
||||
}
|
||||
@ -147,10 +137,7 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @param PluginLoader[] $loaders
|
||||
*
|
||||
* @return Plugin|null
|
||||
*/
|
||||
public function loadPlugin(string $path, array $loaders = null) : ?Plugin{
|
||||
foreach($loaders ?? $this->fileAssociations as $loader){
|
||||
@ -215,7 +202,6 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $directory
|
||||
* @param array $newLoaders
|
||||
*
|
||||
* @return Plugin[]
|
||||
@ -373,8 +359,6 @@ class PluginManager{
|
||||
* Returns whether a specified API version string is considered compatible with the server's API version.
|
||||
*
|
||||
* @param string ...$versions
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isCompatibleApi(string ...$versions) : bool{
|
||||
$serverString = $this->server->getApiVersion();
|
||||
@ -416,8 +400,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::getPermission()
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return null|Permission
|
||||
*/
|
||||
public function getPermission(string $name){
|
||||
@ -427,10 +409,6 @@ class PluginManager{
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::addPermission()
|
||||
*
|
||||
* @param Permission $permission
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function addPermission(Permission $permission) : bool{
|
||||
return PermissionManager::getInstance()->addPermission($permission);
|
||||
@ -452,8 +430,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::getDefaultPermissions()
|
||||
*
|
||||
* @param bool $op
|
||||
*
|
||||
* @return Permission[]
|
||||
*/
|
||||
public function getDefaultPermissions(bool $op) : array{
|
||||
@ -464,8 +440,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::recalculatePermissionDefaults()
|
||||
*
|
||||
* @param Permission $permission
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function recalculatePermissionDefaults(Permission $permission){
|
||||
@ -476,9 +450,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::subscribeToPermission()
|
||||
*
|
||||
* @param string $permission
|
||||
* @param Permissible $permissible
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function subscribeToPermission(string $permission, Permissible $permissible){
|
||||
@ -489,9 +460,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::unsubscribeFromPermission()
|
||||
*
|
||||
* @param string $permission
|
||||
* @param Permissible $permissible
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unsubscribeFromPermission(string $permission, Permissible $permissible){
|
||||
@ -501,10 +469,6 @@ class PluginManager{
|
||||
/**
|
||||
* @deprecated
|
||||
* @see PermissionManager::unsubscribeFromAllPermissions()
|
||||
*
|
||||
* @param Permissible $permissible
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unsubscribeFromAllPermissions(Permissible $permissible) : void{
|
||||
PermissionManager::getInstance()->unsubscribeFromAllPermissions($permissible);
|
||||
@ -514,8 +478,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::getPermissionSubscriptions()
|
||||
*
|
||||
* @param string $permission
|
||||
*
|
||||
* @return array|Permissible[]
|
||||
*/
|
||||
public function getPermissionSubscriptions(string $permission) : array{
|
||||
@ -526,9 +488,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::subscribeToDefaultPerms()
|
||||
*
|
||||
* @param bool $op
|
||||
* @param Permissible $permissible
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function subscribeToDefaultPerms(bool $op, Permissible $permissible){
|
||||
@ -539,9 +498,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::unsubscribeFromDefaultPerms()
|
||||
*
|
||||
* @param bool $op
|
||||
* @param Permissible $permissible
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unsubscribeFromDefaultPerms(bool $op, Permissible $permissible){
|
||||
@ -552,8 +508,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see PermissionManager::getDefaultPermSubscriptions()
|
||||
*
|
||||
* @param bool $op
|
||||
*
|
||||
* @return Permissible[]
|
||||
*/
|
||||
public function getDefaultPermSubscriptions(bool $op) : array{
|
||||
@ -570,18 +524,11 @@ class PluginManager{
|
||||
return PermissionManager::getInstance()->getPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isPluginEnabled(Plugin $plugin) : bool{
|
||||
return isset($this->plugins[$plugin->getDescription()->getName()]) and $plugin->isEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function enablePlugin(Plugin $plugin){
|
||||
@ -607,8 +554,6 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
* @return PluginCommand[]
|
||||
*/
|
||||
protected function parseYamlCommands(Plugin $plugin) : array{
|
||||
@ -673,8 +618,6 @@ class PluginManager{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function disablePlugin(Plugin $plugin){
|
||||
@ -720,8 +663,6 @@ class PluginManager{
|
||||
* @deprecated
|
||||
* @see Event::call()
|
||||
*
|
||||
* @param Event $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function callEvent(Event $event){
|
||||
@ -731,9 +672,6 @@ class PluginManager{
|
||||
/**
|
||||
* Registers all the events in the given Listener class
|
||||
*
|
||||
* @param Listener $listener
|
||||
* @param Plugin $plugin
|
||||
*
|
||||
* @throws PluginException
|
||||
*/
|
||||
public function registerEvents(Listener $listener, Plugin $plugin) : void{
|
||||
@ -798,11 +736,6 @@ class PluginManager{
|
||||
|
||||
/**
|
||||
* @param string $event Class name that extends Event
|
||||
* @param Listener $listener
|
||||
* @param int $priority
|
||||
* @param EventExecutor $executor
|
||||
* @param Plugin $plugin
|
||||
* @param bool $ignoreCancelled
|
||||
*
|
||||
* @throws PluginException
|
||||
*/
|
||||
@ -830,11 +763,6 @@ class PluginManager{
|
||||
$this->getEventListeners($event)->register(new RegisteredListener($listener, $executor, $priority, $plugin, $ignoreCancelled, $timings));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $event
|
||||
*
|
||||
* @return HandlerList
|
||||
*/
|
||||
private function getEventListeners(string $event) : HandlerList{
|
||||
$list = HandlerList::getHandlerListFor($event);
|
||||
if($list === null){
|
||||
|
@ -48,15 +48,6 @@ class RegisteredListener{
|
||||
/** @var TimingsHandler */
|
||||
private $timings;
|
||||
|
||||
|
||||
/**
|
||||
* @param Listener $listener
|
||||
* @param EventExecutor $executor
|
||||
* @param int $priority
|
||||
* @param Plugin $plugin
|
||||
* @param bool $ignoreCancelled
|
||||
* @param TimingsHandler $timings
|
||||
*/
|
||||
public function __construct(Listener $listener, EventExecutor $executor, int $priority, Plugin $plugin, bool $ignoreCancelled, TimingsHandler $timings){
|
||||
$this->listener = $listener;
|
||||
$this->priority = $priority;
|
||||
@ -66,30 +57,19 @@ class RegisteredListener{
|
||||
$this->timings = $timings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Listener
|
||||
*/
|
||||
public function getListener() : Listener{
|
||||
return $this->listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Plugin
|
||||
*/
|
||||
public function getPlugin() : Plugin{
|
||||
return $this->plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getPriority() : int{
|
||||
return $this->priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Event $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function callEvent(Event $event){
|
||||
@ -105,9 +85,6 @@ class RegisteredListener{
|
||||
$this->timings->remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isIgnoringCancelled() : bool{
|
||||
return $this->ignoreCancelled;
|
||||
}
|
||||
|
@ -46,8 +46,6 @@ class ScriptPluginLoader implements PluginLoader{
|
||||
|
||||
/**
|
||||
* Loads the plugin contained in $file
|
||||
*
|
||||
* @param string $file
|
||||
*/
|
||||
public function loadPlugin(string $file) : void{
|
||||
include_once $file;
|
||||
@ -55,10 +53,6 @@ class ScriptPluginLoader implements PluginLoader{
|
||||
|
||||
/**
|
||||
* Gets the PluginDescription from the file
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return null|PluginDescription
|
||||
*/
|
||||
public function getPluginDescription(string $file) : ?PluginDescription{
|
||||
$content = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||
|
Reference in New Issue
Block a user