FlashServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A boot() 0 6 1
1
<?php
2
3
namespace Jalle19\Laravel\UnshittyFlash;
4
5
use Illuminate\Support\ServiceProvider;
6
7
/**
8
 * Class FlashServiceProvider
9
 * @package Jalle19\Laravel\UnshittyFlash
10
 */
11
class FlashServiceProvider extends ServiceProvider
12
{
13
14
    /**
15
     * Registers bindings into the container
16
     */
17
    public function register()
18
    {
19
        $this->app->singleton(FlashService::class, function() {
20
            return new FlashService(config('flash'));
21
        });
22
    }
23
24
25
    /**
26
     *
27
     */
28
    public function boot()
29
    {
30
        $this->publishes([
31
            __DIR__ . '/../config/flash.php' => config_path('flash.php'),
32
        ]);
33
    }
34
35
}
36