ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 23
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
A register() 0 7 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