@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $config = __DIR__.'/../config/disposable-email.php'; |
|
| 16 | + protected $config = __DIR__ . '/../config/disposable-email.php'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * Bootstrap the application services. |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $this->config => config_path('disposable-email.php'), |
| 31 | 31 | ], 'laravel-disposable-email'); |
| 32 | 32 | |
| 33 | - $this->app['validator']->extend('indisposable', Indisposable::class.'@validate', Indisposable::$errorMessage); |
|
| 33 | + $this->app['validator']->extend('indisposable', Indisposable::class . '@validate', Indisposable::$errorMessage); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $this->mergeConfigFrom($this->config, 'disposable-email'); |
| 44 | 44 | |
| 45 | - $this->app->singleton('disposable_email.domains', function ($app) { |
|
| 45 | + $this->app->singleton('disposable_email.domains', function($app) { |
|
| 46 | 46 | // Only build and pass the requested cache store if caching is enabled. |
| 47 | 47 | if ($app['config']['disposable-email.cache.enabled']) { |
| 48 | 48 | $store = $app['config']['disposable-email.cache.store']; |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | return; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if (! $this->isValidData($data)) { |
|
| 83 | + if (!$this->isValidData($data)) { |
|
| 84 | 84 | $this->error('Source returned invalid JSON. Aborting.'); |
| 85 | 85 | |
| 86 | 86 | return; |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | $this->line('Saving response to storage...'); |
| 90 | 90 | |
| 91 | - if (! $this->save($data)) { |
|
| 92 | - $this->error('Couldn\'t write to storage ('.$this->disposableDomains->getStoragePath().')! Aborting.'); |
|
| 91 | + if (!$this->save($data)) { |
|
| 92 | + $this->error('Couldn\'t write to storage (' . $this->disposableDomains->getStoragePath() . ')! Aborting.'); |
|
| 93 | 93 | |
| 94 | 94 | return; |
| 95 | 95 | } |
@@ -113,9 +113,9 @@ discard block |
||
| 113 | 113 | return $content; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - $this->error('PHP failed to interpret the source URL ('.$sourceUrl.')'); |
|
| 116 | + $this->error('PHP failed to interpret the source URL (' . $sourceUrl . ')'); |
|
| 117 | 117 | } catch (Exception $e) { |
| 118 | - $this->error('Couldn\'t reach the source ('.$sourceUrl.').'); |
|
| 118 | + $this->error('Couldn\'t reach the source (' . $sourceUrl . ').'); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return false; |
@@ -60,11 +60,11 @@ discard block |
||
| 60 | 60 | $data = $inCache = $this->getFromCache(); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - if (! isset($data) || ! $data) { |
|
| 63 | + if (!isset($data) || !$data) { |
|
| 64 | 64 | $data = $this->getFromStorage(); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - if ($this->cache && (! isset($inCache) || ! $inCache)) { |
|
| 67 | + if ($this->cache && (!isset($inCache) || !$inCache)) { |
|
| 68 | 68 | $this->cache->forever($this->getCacheKey(), $data); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | // Fall back to the list provided by the package. |
| 102 | - return $this->parseJson(file_get_contents(__DIR__.'/../domains.json')); |
|
| 102 | + return $this->parseJson(file_get_contents(__DIR__ . '/../domains.json')); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function isNotDisposable($email) |
| 128 | 128 | { |
| 129 | - return ! $this->isDisposable($email); |
|
| 129 | + return !$this->isDisposable($email); |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |