Completed
Push — master ( f0cf24...757a85 )
by Dmitrij
9s
created

HasArguments::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
3
namespace HotRodCli\Checkers\Container;
4
5
use HotRodCli\Checkers\BaseChecker;
6
use HotRodCli\Checkers\BaseStatus;
7
8
class HasArguments extends BaseChecker
9
{
10
    protected $args;
11
12
    public function __construct($args)
13
    {
14
        $this->args = $args;
15
    }
16
17
    public function check(BaseStatus $status)
18
    {
19
        if (!is_null($this->args)) {
20
            $status->setFailedWith(HasArguments::class);
21
            $status->setStatus(false);
22
23
            return $status;
24
        }
25
26
        return $this->next($status);
27
    }
28
}
29