Completed
Push — stable ( ef4570...c41d70 )
by Nuno
03:23
created

ComposerServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 85.71%

Importance

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

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