SentryServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Skater4\LaravelSentryNotifications\Providers;
4
5
use Illuminate\Support\ServiceProvider;
6
use Skater4\LaravelSentryNotifications\Services\Sentry\Interfaces\SentryServiceInterface;
7
use Skater4\LaravelSentryNotifications\Services\Sentry\SentryService;
8
9
class SentryServiceProvider extends ServiceProvider
10
{
11
    public function register(): void
12
    {
13
        $this->app->singleton(SentryServiceInterface::class, function ($app) {
14
            return new SentryService(
15
                $app['sentry'],
16
                $app['config']['services']['laravel-sentry-notifications']['issues_url'],
17
            );
18
        });
19
    }
20
}
21