Completed
Push — IncomprehensibleFinder/xavi ( c40efa...577002 )
by
unknown
02:24
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 firstPerson() 0 4 1
A secondPerson() 0 4 1
A birthdayDifference() 0 4 1
A setFirstPerson() 0 4 1
A setSecondPerson() 0 4 1
A setBirthdayDifference() 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 $first_person;
11
12
    /** @var Person */
13
    private $second_person;
14
15
    /** @var int */
16
    private $birthday_difference;
17
18 6
    public function firstPerson()
19
    {
20 6
        return $this->first_person;
21
    }
22
23 6
    public function secondPerson()
24
    {
25 6
        return $this->second_person;
26
    }
27
28 4
    public function birthdayDifference()
29
    {
30 4
        return $this->birthday_difference;
31
    }
32
33 4
    public function setFirstPerson(Person $a_person)
34
    {
35 4
        $this->first_person = $a_person;
36 4
    }
37
38 4
    public function setSecondPerson(Person $a_person)
39
    {
40 4
        $this->second_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