LaravelGuzzleThrottleServiceProvider::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace hamburgscleanest\LaravelGuzzleThrottle;
4
5
use hamburgscleanest\LaravelGuzzleThrottle\Models\GuzzleThrottle;
6
use Illuminate\Support\ServiceProvider;
7
8
class LaravelGuzzleThrottleServiceProvider extends ServiceProvider
9
{
10 8
    public function boot(): void
11
    {
12 8
        $this->publishes([
13 8
            __DIR__ . '/config.php' => \config_path('laravel-guzzle-throttle.php')
14
        ]);
15 8
    }
16
17 8
    public function register(): void
18
    {
19 8
        $this->app->singleton('laravel-guzzle-throttle', function () {
20 2
            return new GuzzleThrottle();
21 8
        });
22 8
    }
23
}
24