@@ -24,6 +24,6 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function validate($attribute, $value, $parameters, $validator) |
| 26 | 26 | { |
| 27 | - return ! DisposableDomains::isDisposable($value); |
|
| 27 | + return !DisposableDomains::isDisposable($value); |
|
| 28 | 28 | } |
| 29 | 29 | } |
@@ -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']; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if (! $this->isValidData($data)) { |
|
| 74 | + if (!$this->isValidData($data)) { |
|
| 75 | 75 | $this->error('Source returned invalid JSON. Aborting.'); |
| 76 | 76 | |
| 77 | 77 | return; |
@@ -79,8 +79,8 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | $this->line('Saving response to storage...'); |
| 81 | 81 | |
| 82 | - if (! $this->save($data)) { |
|
| 83 | - $this->error('Couldn\'t write to storage ('.$this->disposableDomains->getStoragePath().'). Aborting.'); |
|
| 82 | + if (!$this->save($data)) { |
|
| 83 | + $this->error('Couldn\'t write to storage (' . $this->disposableDomains->getStoragePath() . '). Aborting.'); |
|
| 84 | 84 | |
| 85 | 85 | return; |
| 86 | 86 | } |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | return $content; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - $this->error('PHP failed to interpret the source URL ('.$sourceUrl.')'); |
|
| 107 | + $this->error('PHP failed to interpret the source URL (' . $sourceUrl . ')'); |
|
| 108 | 108 | } catch (Exception $e) { |
| 109 | - $this->error('Couldn\'t reach the source ('.$sourceUrl.').'); |
|
| 109 | + $this->error('Couldn\'t reach the source (' . $sourceUrl . ').'); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return false; |
@@ -59,11 +59,11 @@ discard block |
||
| 59 | 59 | $data = $inCache = $this->getFromCache(); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if (! isset($data) || ! $data) { |
|
| 62 | + if (!isset($data) || !$data) { |
|
| 63 | 63 | $data = $this->getFromStorage(); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if ($this->cache && (! isset($inCache) || ! $inCache)) { |
|
| 66 | + if ($this->cache && (!isset($inCache) || !$inCache)) { |
|
| 67 | 67 | $this->cache->forever($this->getCacheKey(), $data); |
| 68 | 68 | } |
| 69 | 69 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // Fall back to the list provided by the package. |
| 101 | - return $this->parseJson(file_get_contents(__DIR__.'/../domains.json')); |
|
| 101 | + return $this->parseJson(file_get_contents(__DIR__ . '/../domains.json')); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |