ConsoleOutput::__call()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
namespace EricMakesStuff\ServerMonitor\Helpers;
4
5
class ConsoleOutput
6
{
7
    /** @var \Illuminate\Console\OutputStyle  */
8
    protected $output;
9
10
    /**
11
     * @param $output
12
     */
13
    public function setOutput($output)
14
    {
15
        $this->output = $output;
16
    }
17
18
    /**
19
     * @param string $method
20
     * @param array  $arguments
21
     */
22
    public function __call($method, array $arguments)
23
    {
24
        $consoleOutput = app(static::class);
25
26
        if (!$consoleOutput->output) {
27
            return;
28
        }
29
30
        $consoleOutput->output->$method($arguments[0]);
31
    }
32
}
33