override(Route::__callStatic(0), map([
'add' => Router::class
]));
class Router
{
public function add(...$params)
{
// some logic
}
}
abstract class Facade
{
abstract protected static function getFacadeAccessor();
public static function __callStatic($name, $arguments)
{
$class = static::getFacadeAccessor();
$service = new $class;
return call_user_func_array([$service, $name], $arguments);
}
}
class Route extends Facade
{
protected static function getFacadeAccessor()
{
return Router::class;
}
}
https://www.jetbrains.com/help/phpstorm/ide-advanc...