ConsoleOutput   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setOutput() 0 4 1
A __callStatic() 0 8 2
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