Completed
Pull Request — master (#6)
by James Ekow Abaka
20:00 queued 18:35
created

Command::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 4
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace yentu\commands;
4
5
abstract class Command
6
{
7
    protected $options;
8
9
    abstract public function run();
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
10
11 27
    public function setOptions(array $options)
12
    {
13 27
        $this->options = $options;
14 27
    }
15
16
    public function reverse()
17
    {
18
        if ($this instanceof Reversible) {
19
            $this->reverseActions();
0 ignored issues
show
Bug introduced by
The method reverseActions() does not exist on yentu\commands\Command. Did you maybe mean reverse()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
20
        }
21
    }
22
}
23