diff --git a/src/Concerns/BaseServiceProvider.php b/src/Concerns/BaseServiceProvider.php index 41185e76..ee6a167a 100644 --- a/src/Concerns/BaseServiceProvider.php +++ b/src/Concerns/BaseServiceProvider.php @@ -22,11 +22,10 @@ use DragonCode\Support\Facades\Helpers\Ables\Arrayable; use Illuminate\Support\ServiceProvider; use LaravelLang\Publisher\Constants\Config; -use LaravelLang\Publisher\Exceptions\ProviderNotDefinedException; -class BaseServiceProvider extends ServiceProvider +abstract class BaseServiceProvider extends ServiceProvider { - protected $provider; + abstract protected function getProvider(): string; public function register(): void { @@ -42,15 +41,6 @@ protected function registerProvider(): void $this->setConfig($plugins); } - protected function getProvider(): string - { - if ($this->provider) { - return $this->provider; - } - - throw new ProviderNotDefinedException(); - } - protected function push(array $plugins): array { return Arrayable::of($plugins) diff --git a/src/Exceptions/ProviderNotDefinedException.php b/src/Exceptions/ProviderNotDefinedException.php deleted file mode 100644 index f605df40..00000000 --- a/src/Exceptions/ProviderNotDefinedException.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * @copyright 2021 Andrey Helldar - * - * @license MIT - * - * @see https://github.com/Laravel-Lang/publisher - */ - -declare(strict_types=1); - -namespace LaravelLang\Publisher\Exceptions; - -use RuntimeException; - -class ProviderNotDefinedException extends RuntimeException -{ - public function __construct() - { - parent::__construct('Provider class not defined.'); - } -}