ComposerServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
c 0
b 0
f 0
dl 0
loc 11
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Laravel Zero.
7
 *
8
 * (c) Nuno Maduro <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace LaravelZero\Framework\Providers\Composer;
15
16
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
17
use LaravelZero\Framework\Contracts\Providers\ComposerContract;
18
19
/**
20
 * @internal
21
 */
22
final class ComposerServiceProvider extends BaseServiceProvider
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27 39
    public function register(): void
28
    {
29 39
        $this->app->singleton(
30 39
            ComposerContract::class,
31
            function ($app) {
32 2
                return new Composer($app);
33 39
            }
34
        );
35 39
    }
36
}
37