Tool   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 21
dl 0
loc 52
ccs 21
cts 21
cp 1
c 0
b 0
f 0
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A name() 0 3 1
A tags() 0 3 1
A summary() 0 3 1
A testCommand() 0 3 1
A command() 0 3 1
A website() 0 3 1
A __construct() 0 10 1
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