ServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * CalamandreiLorenzo\LaravelBrowserLang
4
 */
5
6
namespace CalamandreiLorenzo\LaravelBrowserLang;
7
8
use function config_path;
9
10
/**
11
 * Class ServiceProvider.
12
 * @author Lorenzo Calamandrei <[email protected]>
13
 * @github https://github.com/CalamandreiLorenzo
14
 */
15
class ServiceProvider extends \Illuminate\Support\ServiceProvider
16
{
17
    /**
18
     * boot
19
     */
20 3
    public function boot(): void
21
    {
22 3
        $this->publishes([
23 3
            __DIR__ . '/../config/browser-lang.php' => config_path('browser-lang.php'),
24 3
        ], 'config');
25 3
    }
26
27
    /**
28
     * register
29
     */
30 3
    public function register(): void
31
    {
32 3
        $this->mergeConfigFrom(
33 3
            __DIR__ . '/../config/browser-lang.php',
34 3
            'browser-lang'
35
        );
36 3
    }
37
}
38