diff --git a/src/AcornMailServiceProvider.php b/src/AcornMailServiceProvider.php index 0372e57..74310c6 100755 --- a/src/AcornMailServiceProvider.php +++ b/src/AcornMailServiceProvider.php @@ -13,7 +13,7 @@ class AcornMailServiceProvider extends ServiceProvider */ public function register() { - $this->app->singleton('Roots\AcornMail', fn () => AcornMail::make($this->app)); + $this->app->singleton(AcornMail::class, fn () => AcornMail::make($this->app)); } /** @@ -30,6 +30,6 @@ public function boot() ]); } - $this->app->make('Roots\AcornMail'); + $this->app->make(AcornMail::class); } } diff --git a/src/Console/Commands/MailTestCommand.php b/src/Console/Commands/MailTestCommand.php index 316a941..914f76b 100644 --- a/src/Console/Commands/MailTestCommand.php +++ b/src/Console/Commands/MailTestCommand.php @@ -4,6 +4,7 @@ use Illuminate\Console\Command; use Illuminate\Support\Str; +use Roots\AcornMail\AcornMail; class MailTestCommand extends Command { @@ -47,7 +48,7 @@ class MailTestCommand extends Command */ public function handle() { - $package = app('Roots\AcornMail'); + $package = app()->make(AcornMail::class); if (! $package->configured()) { $this->components->error('The mail SMTP configuration is not set.'); @@ -64,7 +65,7 @@ public function handle() $config = collect($phpmailer) ->filter(fn ($value, $key) => in_array($key, array_keys($this->options))) ->map(fn ($value, $key) => $key === 'Password' ? Str::mask($value, '*', 0) : $value) - ->map(fn ($value, $key) => Str::finish($this->options[$key], ': ').(is_null($value) || empty($value) ? 'Not set' : "{$value}")); + ->map(fn ($value, $key) => Str::finish($this->options[$key], ': ') . (is_null($value) || empty($value) ? 'Not set' : "{$value}")); $this->components->bulletList($config); });