LaravelJobHandlerServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 7 2
1
<?php
2
3
namespace Famdirksen\LaravelJobHandler;
4
5
use Famdirksen\LaravelJobHandler\Console\Commands\LaravelJobHandlerClearLogsCommand;
6
use Illuminate\Support\ServiceProvider;
7
8
class LaravelJobHandlerServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Perform post-registration booting of services.
12
     *
13
     * @return void
14
     */
15
    public function boot()
16
    {
17
        $this->loadMigrationsFrom(__DIR__.'/migrations');
18
19
        if ($this->app->runningInConsole()) {
20
            $this->commands([
21
                LaravelJobHandlerClearLogsCommand::class
22
            ]);
23
        }
24
    }
25
26
    /**
27
     * Register any package services.
28
     *
29
     * @return void
30
     */
31
    public function register()
32
    {
33
        $this->mergeConfigFrom(
34
            __DIR__.'/config/laravel-job-handler.php', 'laravel-job-handler'
35
        );
36
    }
37
}
38