Test Failed
Push — master ( bc5b04...424213 )
by Hannes
03:21
created

ExampleName   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespaceName() 0 3 1
A __construct() 0 4 1
A getName() 0 3 1
A getShortName() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace hanneskod\readmetester\Name;
6
7
final class ExampleName implements NameInterface
8
{
9
    /** @var string */
10
    private $shortName;
11
12
    /** @var string */
13
    private $namespace;
14
15
    public function __construct(string $shortName, string $namespace)
16
    {
17
        $this->shortName = $shortName;
18
        $this->namespace = $namespace;
19
    }
20
21
    public function getName(): string
22
    {
23
        return $this->getNamespaceName() . self::NAME_DELIMITER . $this->getShortName();
24
    }
25
26
    public function getShortName(): string
27
    {
28
        return $this->shortName;
29
    }
30
31
    public function getNamespaceName(): string
32
    {
33
        return $this->namespace;
34
    }
35
}
36