Test Failed
Push — stable ( 994ca0...7d5c83 )
by Nuno
04:30
created

ComposerServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 15
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 10 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 29
    public function register(): void
28
    {
29 29
        $this->app->singleton(
30 29
            'composer',
31
            function ($app) {
32
                return new Composer($app);
33 29
            }
34
        );
35
36 29
        $this->app->alias('composer', ComposerContract::class);
37 29
    }
38
}
39