HtmlMinServiceProvider   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 2
A register() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Abordage\LaravelHtmlMin;
6
7
use Illuminate\Support\ServiceProvider;
8
9
class HtmlMinServiceProvider extends ServiceProvider
10
{
11
    /**
12
     * Bootstrap the application services.
13
     */
14
    public function boot(): void
15
    {
16
        if ($this->app->runningInConsole()) {
17
            $this->publishes([
18
                __DIR__ . '/../config/html-min.php' => config_path('html-min.php'),
19
            ], 'html-min-config');
20
        }
21
    }
22
23
    /**
24
     * Register the application services.
25
     */
26
    public function register(): void
27
    {
28
        $this->mergeConfigFrom(__DIR__ . '/../config/html-min.php', 'html-min');
29
        $this->app->singleton('laravel-html-min', fn () => new HtmlMin());
30
    }
31
}
32