LaravelGuzzleThrottleServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
A boot() 0 4 1
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