| Total Complexity | 3 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class BackupShieldServiceProvider extends ServiceProvider |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Config-path |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | protected $config; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Constructor |
||
| 24 | * |
||
| 25 | * @param \Illuminate\Foundation\Application $app |
||
| 26 | */ |
||
| 27 | public function __construct($app) { |
||
| 28 | $this->config = __DIR__ . '/config/backup-shield.php'; |
||
| 29 | |||
| 30 | parent::__construct($app); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Perform post-registration booting of services. |
||
| 35 | * |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function boot() : void |
||
| 39 | { |
||
| 40 | // Publishing of configuration |
||
| 41 | $this->publishes([ |
||
| 42 | $this->config => config_path('backup-shield.php'), |
||
| 43 | ]); |
||
| 44 | |||
| 45 | // Listen for the "BackupZipWasCreated" event |
||
| 46 | Event::listen( |
||
| 47 | BackupZipWasCreated::class, |
||
| 48 | PasswordProtectZip::class |
||
| 49 | ); |
||
| 50 | |||
| 51 | parent::boot(); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Register any package services. |
||
| 56 | * |
||
| 57 | * @return void |
||
| 58 | */ |
||
| 59 | public function register() : void |
||
| 63 | ); |
||
| 64 | } |
||
| 65 | } |
||
| 66 |