@@ -206,7 +206,7 @@ |
||
206 | 206 | |
207 | 207 | if ($this->writer->getDebug()) { |
208 | 208 | $text .= '# Cache is '.($this->cache ? 'enabled with key "'.$this->cacheKey.'"' : 'disabled').'.'.PHP_EOL. |
209 | - '#'.PHP_EOL; |
|
209 | + '#'.PHP_EOL; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | if ($this->cache) { |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @author Austin Heap <[email protected]> |
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace AustinHeap\Security\Txt; |
11 | 11 | |
@@ -120,21 +120,21 @@ discard block |
||
120 | 120 | if (is_null(config($key, null))) { |
121 | 121 | $this->addLogEntry('"'.__CLASS__.'" cannot process null value for key "'.$key.'".', 'debug'); |
122 | 122 | continue; |
123 | - } elseif (! function_exists($mapping['validator'])) { |
|
123 | + } elseif (!function_exists($mapping['validator'])) { |
|
124 | 124 | $this->addLogEntry('"'.__CLASS__.'" cannot find "validator" function named "'.$mapping['validator'].'".', 'warning'); |
125 | 125 | continue; |
126 | - } elseif (! $mapping['validator'](config($key))) { |
|
126 | + } elseif (!$mapping['validator'](config($key))) { |
|
127 | 127 | $this->addLogEntry('"'.__CLASS__.'" failed the "validator" function named "'.$mapping['validator'].'".', 'warning'); |
128 | 128 | continue; |
129 | 129 | } elseif (array_key_exists('self', $mapping) && is_bool($mapping['self']) && $mapping['self'] === true) { |
130 | - if (! method_exists($this, $mapping['setter'])) { |
|
130 | + if (!method_exists($this, $mapping['setter'])) { |
|
131 | 131 | $this->addLogEntry('"'.__CLASS__.'" cannot find mapping "setter" method on object "'.get_class($this).'" named "'.$mapping['setter'].'".', 'error'); |
132 | 132 | continue; |
133 | 133 | } |
134 | 134 | |
135 | 135 | $this->{$mapping['setter']}(config($key)); |
136 | 136 | } else { |
137 | - if (! method_exists($this->writer, $mapping['setter'])) { |
|
137 | + if (!method_exists($this->writer, $mapping['setter'])) { |
|
138 | 138 | $this->addLogEntry('"'.__CLASS__.'" cannot find mapping "setter" method on object "'.get_class($this->writer).'" named "'.$mapping['setter'].'".', 'error'); |
139 | 139 | continue; |
140 | 140 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | if ($this->cache) { |
196 | 196 | $text = cache($this->cacheKey, null); |
197 | 197 | |
198 | - if (! is_null($text)) { |
|
198 | + if (!is_null($text)) { |
|
199 | 199 | return $text; |
200 | 200 | } |
201 | 201 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | */ |
372 | 372 | public function hasWriter(): bool |
373 | 373 | { |
374 | - return ! is_null($this->writer); |
|
374 | + return !is_null($this->writer); |
|
375 | 375 | } |
376 | 376 | |
377 | 377 | /** |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | */ |
382 | 382 | public function getWriter(): Writer |
383 | 383 | { |
384 | - if (! $this->hasWriter()) { |
|
384 | + if (!$this->hasWriter()) { |
|
385 | 385 | throw new Exception('Writer not set.'); |
386 | 386 | } |
387 | 387 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | 8 | Route::get('/.well-known/security.txt', '\AustinHeap\Security\Txt\SecurityTxtController@show') |
9 | - ->name('security.txt'); |
|
9 | + ->name('security.txt'); |
|
10 | 10 | |
11 | 11 | Route::get('/security.txt', '\AustinHeap\Security\Txt\SecurityTxtController@redirect') |
12 | - ->name('security.txt-redirect'); |
|
12 | + ->name('security.txt-redirect'); |
@@ -5,9 +5,9 @@ |
||
5 | 5 | * @author Austin Heap <[email protected]> |
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | -if (! function_exists('securitytxt')) { |
|
10 | +if (!function_exists('securitytxt')) { |
|
11 | 11 | /** |
12 | 12 | * @return \AustinHeap\Security\Txt\SecurityTxtHelper |
13 | 13 | */ |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @author Austin Heap <[email protected]> |
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace AustinHeap\Security\Txt; |
11 | 11 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $instance = static::getFacadeRoot(); |
45 | 45 | |
46 | - if (! $instance) { |
|
46 | + if (!$instance) { |
|
47 | 47 | throw new RuntimeException('A facade root has not been set.'); |
48 | 48 | } |
49 | 49 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @author Austin Heap <[email protected]> |
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace AustinHeap\Security\Txt; |
11 | 11 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function show() |
29 | 29 | { |
30 | - if (! config('security-txt.enabled', false)) { |
|
30 | + if (!config('security-txt.enabled', false)) { |
|
31 | 31 | abort(404); |
32 | 32 | } |
33 | 33 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function redirect() |
47 | 47 | { |
48 | - if (! config('security-txt.enabled', false)) { |
|
48 | + if (!config('security-txt.enabled', false)) { |
|
49 | 49 | abort(404); |
50 | 50 | } |
51 | 51 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @author Austin Heap <[email protected]> |
6 | 6 | * @version v0.4.0 |
7 | 7 | */ |
8 | -declare(strict_types=1); |
|
8 | +declare(strict_types = 1); |
|
9 | 9 | |
10 | 10 | namespace AustinHeap\Security\Txt; |
11 | 11 | |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | __DIR__.'/config/security-txt.php' => config_path('security-txt.php'), |
37 | 37 | ]); |
38 | 38 | |
39 | - if (! $this->app->routesAreCached()) { |
|
39 | + if (!$this->app->routesAreCached()) { |
|
40 | 40 | require __DIR__.'/routes/security-txt.php'; |
41 | 41 | } |
42 | 42 | |
43 | - if (! defined('LARAVEL_SECURITY_TXT_VERSION')) { |
|
43 | + if (!defined('LARAVEL_SECURITY_TXT_VERSION')) { |
|
44 | 44 | define('LARAVEL_SECURITY_TXT_VERSION', SecurityTxtHelper::VERSION); |
45 | 45 | } |
46 | 46 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | __DIR__.'/config/security-txt.php', 'security-txt' |
57 | 57 | ); |
58 | 58 | |
59 | - $this->app->singleton('SecurityTxt', function () { |
|
59 | + $this->app->singleton('SecurityTxt', function() { |
|
60 | 60 | return new SecurityTxtHelper; |
61 | 61 | }); |
62 | 62 | } |