LaravelIpMiddlewareServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Orkhanahmadov\LaravelIpMiddleware;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * @codeCoverageIgnore
9
 */
10
class LaravelIpMiddlewareServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * Bootstrap the application services.
14
     */
15
    public function boot(): void
16
    {
17
        if ($this->app->runningInConsole()) {
18
            $this->publishes([
19
                __DIR__ . '/../config/config.php' => config_path('ip-middleware.php'),
20
            ], 'config');
21
        }
22
    }
23
24
    /**
25
     * Register the application services.
26
     */
27
    public function register(): void
28
    {
29
        $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'ip-middleware');
30
    }
31
}
32