Passed
Pull Request — master (#5)
by Samuel
03:12 queued 01:40
created

JsonHandlerServiceProvider::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SMartins\Exceptions;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class JsonHandlerServiceProvider extends ServiceProvider
8
{
9
    public function boot()
10
    {
11
        $this->publishes([
12
            $this->configPath() => config_path('json-exception-handler.php'),
13
        ]);
14
15
        $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'exception');
16
17
        $this->publishes([
18
            __DIR__.'/../resources/lang' => resource_path('lang/vendor/exception'),
19
        ]);
20
    }
21
22
    public function register()
23
    {
24
        $this->mergeConfigFrom($this->configPath(), 'json-exception-handler');
25
    }
26
27
    public function configPath()
28
    {
29
        return __DIR__.'/../config/json-exception-handler.php';
30
    }
31
}
32