Total Complexity | 7 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | abstract class AbstractArgument implements ArgumentInterface |
||
11 | { |
||
12 | private readonly string $description; |
||
13 | |||
14 | 1 | public function __construct( |
|
15 | private readonly string $name, |
||
16 | private readonly string $type, |
||
17 | private readonly int $mode = 0, |
||
18 | ?string $description = null, |
||
19 | ) { |
||
20 | 1 | if (null !== $description) { |
|
21 | 1 | $this->description = $description; |
|
|
|||
22 | } |
||
23 | } |
||
24 | |||
25 | 1 | public function getName(): string |
|
26 | { |
||
27 | 1 | return $this->name; |
|
28 | } |
||
29 | |||
30 | 1 | public function getDescription(): ?string |
|
31 | { |
||
32 | 1 | return $this->description ?? null; |
|
33 | } |
||
34 | |||
35 | 1 | public function getType(): string |
|
36 | { |
||
37 | 1 | return $this->type; |
|
38 | } |
||
39 | |||
40 | 1 | public function getMode(): int |
|
41 | { |
||
42 | 1 | return $this->mode ?? 0; |
|
43 | } |
||
44 | |||
45 | public function hasDefaultValue(): bool |
||
48 | } |
||
49 | } |
||
50 |