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

SeaFood   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 28
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSeafoodId() 0 4 1
A getName() 0 4 1
A getKgBought() 0 4 1
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