| Total Complexity | 8 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class IPBlockerServiceProvider extends ServiceProvider |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Register the application services. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function register() |
||
| 15 | { |
||
| 16 | // |
||
| 17 | } |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Bootstrap the application services. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function boot() |
||
| 25 | { |
||
| 26 | //$this->publishMiddleware(); |
||
| 27 | $this->publishMigrations(); |
||
| 28 | $this->publishModels(); |
||
| 29 | } |
||
| 30 | |||
| 31 | |||
| 32 | private function publishMiddleware() |
||
|
|
|||
| 33 | { |
||
| 34 | $path = $this->getMiddlwarePath(); |
||
| 35 | $this->publishes([$path => app_path('/Http/Middleware/IPBlocking.php')], 'ipblocker'); |
||
| 36 | } |
||
| 37 | |||
| 38 | private function publishMigrations() |
||
| 39 | { |
||
| 40 | $path = $this->getMigrationsPath(); |
||
| 41 | $this->publishes([$path => database_path('migrations')], 'ipblocker'); |
||
| 42 | } |
||
| 43 | |||
| 44 | private function publishModels() |
||
| 45 | { |
||
| 46 | $path = $this->getModelPath(); |
||
| 47 | $this->publishes([$path => app_path('IPBlocker.php')], 'ipblocker'); |
||
| 48 | } |
||
| 49 | |||
| 50 | private function getMiddlwarePath() |
||
| 51 | { |
||
| 52 | return __DIR__ . '/Middlewares/IPBlocking.php'; |
||
| 53 | } |
||
| 54 | |||
| 55 | private function getMigrationsPath() |
||
| 58 | } |
||
| 59 | |||
| 60 | private function getModelPath() |
||
| 63 | } |
||
| 64 | } |
This check looks for private methods that have been defined, but are not used inside the class.