Completed
Push — master ( 121042...c79028 )
by Mr
05:32
created

ServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 33
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 7 1
A register() 0 12 1
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__ . '/../../configs/openvpn-client.php' => config_path('openvpn-client.php'),
18
            __DIR__ . '/../../configs/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__ . '/../../configs/openvpn-client.php', 'openvpn-client'
31
        );
32
33
        $this->mergeConfigFrom(
34
            __DIR__ . '/../../configs/openvpn-server.php', 'openvpn-server'
35
        );
36
37
        $this->app->bind(ConfigWrapper::class);
38
    }
39
}
40