Passed
Pull Request — master (#354)
by Mihai
03:59
created

PhiveInstallCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A __construct() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace Zalas\Toolbox\Tool\Command;
4
5
use Zalas\Toolbox\Tool\Command;
6
7
final class PhiveInstallCommand implements Command
8
{
9
    private $alias;
10
    private $bin;
11
12 5
    public function __construct(string $alias, string $bin)
13
    {
14 5
        $this->alias = $alias;
15 5
        $this->bin = $bin;
16
    }
17
18 2
    public function __toString(): string
19
    {
20 2
        return \sprintf('phive install -g %s -t %s', $this->alias, $this->bin);
21
    }
22
}
23