Completed
Push — IncomprehensibleFinder/xavi ( a3476a...872493 )
by
unknown
02:26
created

PeopleComparison   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 41
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A birthdayDifference() 0 4 1
A setBirthdayDifference() 0 4 1
A youngPerson() 0 4 1
A oldPerson() 0 4 1
A setYoungPerson() 0 4 1
A setOldPerson() 0 4 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kata\Algorithm;
6
7
final class PeopleComparison
8
{
9
    /** @var Person */
10
    private $young_person;
11
12
    /** @var Person */
13
    private $old_person;
14
15
    /** @var int */
16
    private $birthday_difference;
17
18 6
    public function youngPerson()
19
    {
20 6
        return $this->young_person;
21
    }
22
23 6
    public function oldPerson()
24
    {
25 6
        return $this->old_person;
26
    }
27
28 4
    public function birthdayDifference()
29
    {
30 4
        return $this->birthday_difference;
31
    }
32
33 4
    public function setYoungPerson(Person $a_person)
34
    {
35 4
        $this->young_person = $a_person;
36 4
    }
37
38 4
    public function setOldPerson(Person $a_person)
39
    {
40 4
        $this->old_person = $a_person;
41 4
    }
42
43 4
    public function setBirthdayDifference(int $a_birthday_difference)
44
    {
45 4
        $this->birthday_difference = $a_birthday_difference;
46 4
    }
47
}
48