| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class SecurityTxtServiceProvider extends \Illuminate\Support\ServiceProvider |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * Indicates if loading of the provider is deferred. |
||
| 23 | * |
||
| 24 | * @var bool |
||
| 25 | */ |
||
| 26 | protected $defer = false; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Perform post-registration booting of services. |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function boot() |
||
| 34 | { |
||
| 35 | $this->publishes([ |
||
| 36 | __DIR__ . '/config/security-txt.php' => config_path('security-txt.php'), |
||
| 37 | ]); |
||
| 38 | |||
| 39 | if (! $this->app->routesAreCached()) { |
||
| 40 | require __DIR__ . '/routes/security-txt.php'; |
||
| 41 | } |
||
| 42 | |||
| 43 | if (! defined('LARAVEL_SECURITY_TXT_VERSION')) { |
||
| 44 | define('LARAVEL_SECURITY_TXT_VERSION', SecurityTxtHelper::VERSION); |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Register the service provider. |
||
| 50 | * |
||
| 51 | * @return void |
||
| 52 | */ |
||
| 53 | public function register() |
||
| 61 | }); |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return \AustinHeap\Security\Txt\SecurityTxtHelper |
||
| 66 | */ |
||
| 67 | public static function getInstance() |
||
| 72 |