Completed
Push — lonja/eduard ( 66fb34 )
by Albert
05:35
created

SeaFood::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Kata;
4
5
final class SeaFood
6
{
7
    private $seafood_id;
8
    private $name;
9
    private $kg_bought;
10
11
    public function __construct(int $seafood_id, string $name, float $kg_bought)
12
    {
13
        $this->seafood_id = $seafood_id;
14
        $this->name       = $name;
15
        $this->kg_bought  = $kg_bought;
16
    }
17
18
    public function getSeafoodId(): int
19
    {
20
        return $this->seafood_id;
21
    }
22
23
    public function getName(): string
24
    {
25
        return $this->name;
26
    }
27
28
    public function getKgBought(): float
29
    {
30
        return $this->kg_bought;
31
    }
32
}
33