Passed
Push — master ( 56813c...ebb300 )
by Paweł
03:29
created

Trophy   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSellValue() 0 3 1
A getDescription() 0 3 1
A getName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Inventory\Trophy;
6
7
use AardsGerds\Game\Inventory\Coin;
8
use AardsGerds\Game\Inventory\InventoryItem;
9
10
abstract class Trophy implements InventoryItem
11
{
12
    public function __construct(
13
        protected string $name,
14
        protected string $description,
15
        protected Coin $sellValue,
16
    ) {}
17
18
    public function getName(): string
19
    {
20
        return $this->name;
21
    }
22
23
    public function getDescription(): string
24
    {
25
        return $this->description;
26
    }
27
28
    public function getSellValue(): Coin
29
    {
30
        return $this->sellValue;
31
    }
32
}
33