Test Failed
Push — stable ( 977f63...62e79c )
by Nuno
02:59
created

Installer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getComponentName() 0 4 1
A install() 0 22 1
1
<?php
2
3
namespace LaravelZero\Framework\Commands\Component\Illuminate\Log;
4
5
use LaravelZero\Framework\Commands\Component\Installer as BaseInstaller;
6
use LaravelZero\Framework\Contracts\Commands\Component\Installer as InstallerContract;
7
8
/**
9
 * This is the Laravel Zero Framework illuminate/database install class.
10
 *
11
 * @author Nuno Maduro <[email protected]>
12
 */
13
class Installer extends BaseInstaller implements InstallerContract
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    protected $name = 'install:log';
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected $description = 'Installs illuminate/log';
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getComponentName(): string
29
    {
30
        return 'log';
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function install(): bool
37
    {
38
        $this->require('illuminate/log "5.5.*"');
39
40
        $this->info('Usage:');
41
        $this->comment(
42
            '
43
use Illuminate\Support\Facades\Log;
44
45
Log::emergency($message);
46
Log::alert($message);
47
Log::critical($message);
48
Log::error($message);
49
Log::warning($message);
50
Log::notice($message);
51
Log::info($message);
52
Log::debug($message);
53
'
54
        );
55
56
        return true;
57
    }
58
}
59