Command   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 15
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setOptions() 0 3 1
A reverse() 0 4 2
1
<?php
2
3
namespace yentu\commands;
4
5
abstract class Command
6
{
7
    protected array $options;
8
9
    abstract public function run();
10
11
    public function setOptions(array $options): void
12
    {
13
        $this->options = $options;
14
    }
15
16
    public function reverse(): void
17
    {
18
        if ($this instanceof Reversible) {
19
            $this->reverseActions();
20
        }
21
    }
22
}
23