Completed
Push — master ( 71c78b...6eeaca )
by recca
10:24 queued 05:45
created

TerminalManager::output()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Recca0120\Terminal;
4
5
use Illuminate\Support\Arr;
6
7
class TerminalManager
8
{
9
    /**
10
     * $kernel.
11
     *
12
     * @var Recca0120\Terminal\Kernel
13
     */
14
    protected $kernel;
15
16
    /**
17
     * $config.
18
     *
19
     * @var array
20
     */
21
    protected $config;
22
23
    /**
24
     * __construct.
25
     *
26
     * @param \Recca0120\Terminal\Kernel $kernel
27
     * @param array $config
28
     */
29 2
    public function __construct(Kernel $kernel, $config = [])
30
    {
31 2
        $this->kernel = $kernel;
1 ignored issue
show
Documentation Bug introduced by
It seems like $kernel of type object<Recca0120\Terminal\Kernel> is incompatible with the declared type object<Recca0120\Termina...ca0120\Terminal\Kernel> of property $kernel.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32 2
        $this->config = Arr::except(array_merge([
33 2
            'username' => 'LARAVEL',
34 2
            'hostname' => php_uname('n'),
35 2
            'os' => PHP_OS,
36 2
        ], $config), [
37 2
            'enabled',
38 2
            'whitelists',
39 2
            'route',
40 2
            'commands',
41 2
        ]);
42 2
    }
43
44
    /**
45
     * getConfig.
46
     *
47
     * @return array
48
     */
49 1
    public function getConfig()
50
    {
51 1
        return $this->config;
52
    }
53
54
    /**
55
     * call.
56
     *
57
     * @param  string $command
58
     * @return int
59
     */
60
    public function call($command)
61
    {
62
        return $this->kernel->call($command);
63
    }
64
65
    /**
66
     * output.
67
     *
68
     * @return string
69
     */
70
    public function output()
71
    {
72
        return $this->kernel->output();
73
    }
74
}
75