ConsoleOutput::__callStatic()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Spatie\ServerMonitor\Helpers;
4
5
use Illuminate\Console\Command;
6
7
class ConsoleOutput
8
{
9
    /** @var \Illuminate\Console\Command */
10
    public static $runningCommand;
11
12
    public function setOutput(Command $runningCommand)
13
    {
14
        static::$runningCommand = $runningCommand;
15
    }
16
17
    public static function __callStatic(string $method, $arguments)
18
    {
19
        if (! static::$runningCommand) {
20
            return;
21
        }
22
23
        static::$runningCommand->$method(...$arguments);
24
    }
25
}
26