Skip to content

Commit

Permalink
finish
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Matteo Staack committed Mar 16, 2022
1 parent 0a5eca4 commit 0f6c8da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
8 changes: 0 additions & 8 deletions src/TrashmailManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Elbgoods\TrashmailRule\Contracts\ProviderContract;
use Elbgoods\TrashmailRule\Providers\ConfigProvider;
use Elbgoods\TrashmailRule\Providers\DeadLetterProvider;
use Elbgoods\TrashmailRule\Providers\DisposableEmailDetectorProvider;
use Elbgoods\TrashmailRule\Providers\VerifierProvider;
use Illuminate\Support\Manager;
Expand Down Expand Up @@ -44,13 +43,6 @@ protected function createConfigDriver(): ConfigProvider
]);
}

protected function createDeadLetterDriver(): DeadLetterProvider
{
return $this->container->make(DeadLetterProvider::class, [
'config' => $this->config->get('trashmail.dead_letter'),
]);
}

protected function createDisposableEmailDetectorDriver(): DisposableEmailDetectorProvider
{
return $this->container->make(DisposableEmailDetectorProvider::class, [
Expand Down
13 changes: 3 additions & 10 deletions src/TrashmailRuleServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ public function boot(): void
$this->bootLang();
}

Guzzle::register('dead-letter.email', [
'base_uri' => 'https://www.dead-letter.email',
RequestOptions::TIMEOUT => 10,
RequestOptions::ALLOW_REDIRECTS => true,
RequestOptions::HTTP_ERRORS => true,
]);

Guzzle::register('api.disposable-email-detector.com', [
'base_uri' => 'https://api.disposable-email-detector.com',
RequestOptions::TIMEOUT => 5,
Expand All @@ -35,7 +28,7 @@ public function boot(): void
RequestOptions::ALLOW_REDIRECTS => true,
RequestOptions::HTTP_ERRORS => true,
]);

$this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'trashmailRule');
}

Expand All @@ -44,15 +37,15 @@ public function register(): void
$this->app->singleton(TrashmailManager::class);

$this->app->singleton(Trashmail::class);

$this->mergeConfigFrom(__DIR__.'/../config/trashmail.php', 'trashmail');
}

protected function bootConfig(): void
{
$this->publishes([
__DIR__.'/../config/trashmail.php' => config_path('trashmail.php'),
], 'config');
], 'config');
}

protected function bootLang(): void
Expand Down

0 comments on commit 0f6c8da

Please sign in to comment.