ConsoleOutput::setOutput()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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