From efc4fb5288d39e66a81df3707255278b33506232 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Sat, 11 Apr 2020 23:21:20 +0200 Subject: [PATCH] Remove deprecated AbstractPlugin::__call() Use AbstractPlugin::getPico() instead (e.g. `->getPico()->getConfig('my_config')` instead of `->getConfig('my_config')`). --- lib/AbstractPlugin.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/AbstractPlugin.php b/lib/AbstractPlugin.php index a8c6725..1176bba 100644 --- a/lib/AbstractPlugin.php +++ b/lib/AbstractPlugin.php @@ -195,30 +195,6 @@ abstract class AbstractPlugin implements PluginInterface return isset($pluginConfig[$configName]) ? $pluginConfig[$configName] : $default; } - /** - * Passes all not satisfiable method calls to Pico - * - * @see PluginInterface::getPico() - * - * @deprecated 2.1.0 - * - * @param string $methodName name of the method to call - * @param array $params parameters to pass - * - * @return mixed return value of the called method - */ - public function __call($methodName, array $params) - { - if (method_exists($this->getPico(), $methodName)) { - return call_user_func_array([ $this->getPico(), $methodName ], $params); - } - - throw new \BadMethodCallException( - 'Call to undefined method ' . get_class($this->getPico()) . '::' . $methodName . '() ' - . 'through ' . get_called_class() . '::__call()' - ); - } - /** * Enables all plugins which this plugin depends on *