Passed
Push — master ( a3b7e3...18ad97 )
by Paweł
02:55
created

Location   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 3
c 1
b 0
f 0
dl 0
loc 14
ccs 2
cts 6
cp 0.3333
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getName() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Location;
6
7
abstract class Location implements \Stringable
8
{
9 1
    public function __construct(
10
        protected string $name,
11 1
    ) {}
12
13
    public function getName(): string
14
    {
15
        return $this->name;
16
    }
17
18
    public function __toString(): string
19
    {
20
        return $this->name;
21
    }
22
}
23