Tool::summary()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Zalas\Toolbox\Tool;
4
5
class Tool
6
{
7
    private string $name;
8
    private string $summary;
9
    private string $website;
10
    private Command $command;
11
    private Command $testCommand;
12
    private array $tags;
13
14 44
    public function __construct(string $name, string $summary, string $website, array $tags, Command $command, Command $testCommand)
15
    {
16 44
        $this->name = $name;
17 44
        $this->summary = $summary;
18 44
        $this->website = $website;
19 44
        $this->tags = \array_map(function (string $tag) {
20 17
            return $tag;
21 44
        }, $tags);
22 43
        $this->command = $command;
23 43
        $this->testCommand = $testCommand;
24
    }
25
26 7
    public function name(): string
27
    {
28 7
        return $this->name;
29
    }
30
31 5
    public function summary(): string
32
    {
33 5
        return $this->summary;
34
    }
35
36 5
    public function website(): string
37
    {
38 5
        return $this->website;
39
    }
40
41 24
    public function command(): Command
42
    {
43 24
        return $this->command;
44
    }
45
46 3
    public function testCommand(): Command
47
    {
48 3
        return $this->testCommand;
49
    }
50
51
    /**
52
     * @return array|string[]
53
     */
54 30
    public function tags(): array
55
    {
56 30
        return $this->tags;
57
    }
58
}
59