Completed
Push — stable ( 86ecc3...3a45ea )
by Nuno
07:34
created

ComposerServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 87.5%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 19
ccs 7
cts 8
cp 0.875
rs 10

1 Method

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