CommandArguments   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 21
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A namespace() 0 3 1
A basename() 0 3 1
A directory() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gacela\Console\Domain\CommandArguments;
6
7
final class CommandArguments
8
{
9 21
    public function __construct(
10
        private readonly string $namespace,
11
        private readonly string $directory,
12
    ) {
13 21
    }
14
15 18
    public function namespace(): string
16
    {
17 18
        return $this->namespace;
18
    }
19
20 18
    public function directory(): string
21
    {
22 18
        return $this->directory;
23
    }
24
25 10
    public function basename(): string
26
    {
27 10
        return basename($this->directory);
28
    }
29
}
30