ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace OpenVPN\Laravel;
4
5
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
6
7
class ServiceProvider extends BaseServiceProvider
8
{
9
    /**
10
     * Bootstrap any application services.
11
     *
12
     * @return void
13
     */
14
    public function boot(): void
15
    {
16
        $this->publishes([
17
            __DIR__ . '/../../config/openvpn-client.php' => config_path('openvpn-client.php'),
18
            __DIR__ . '/../../config/openvpn-server.php' => config_path('openvpn-server.php'),
19
        ]);
20
    }
21
22
    /**
23
     * Register any application services.
24
     *
25
     * @return void
26
     */
27
    public function register(): void
28
    {
29
        $this->mergeConfigFrom(
30
            __DIR__ . '/../../config/openvpn-client.php', 'openvpn-client'
31
        );
32
33
        $this->mergeConfigFrom(
34
            __DIR__ . '/../../config/openvpn-server.php', 'openvpn-server'
35
        );
36
37
        $this->app->bind(Wrapper::class);
38
    }
39
}
40