Issues (1)

src/IPBlockerServicesProvider.php (1 issue)

Severity
1
<?php
2
3
namespace Larasecure\IPBlocker;
4
5
use Illuminate\Support\ServiceProvider;
6
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()
0 ignored issues
show
The method publishMiddleware() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
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()
56
    {
57
        return __DIR__ . '/Migrations/';
58
    }
59
60
        private function getModelPath()
61
    {
62
        return __DIR__ . '/Models/IPBlocker.php';
63
    }
64
}