Passed
Push — feature/add-gacela-cli ( 2018fc )
by Chema
05:13 queued 15s
created

CommandArguments   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 24
ccs 9
cts 9
cp 1
rs 10
wmc 4

4 Methods

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