Completed
Push — stable ( 386c57...2cb6a4 )
by Nuno
02:05
created

ComposerServiceProvider::register()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1.0019

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 11
ccs 7
cts 8
cp 0.875
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
crap 1.0019
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 19
            function ($app) {
32
                return new Composer($app);
33 19
            }
34
        );
35
36 19
        $this->app->alias('composer', ComposerContract::class);
37 19
    }
38
}
39