Completed
Pull Request — master (#5)
by Laurent
02:35 queued 42s
created

MoneyReceiver::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 */
5
6
/**
7
 * MoneyReceiver class
8
 *
9
 * @author Laurent De Coninck <[email protected]>
10
 */
11
class MoneyReceiver
12
{
13
14
    /**
15
     * @var string
16
     */
17
    private $name;
18
19
    /**
20
     * @var string
21
     */
22
    private $firstname;
23
24
    /**
25
     * @var int
26
     */
27
    private $id;
28
29
    /**
30
     * @param string $name
31
     * @param string $firstname
32
     * @param int    $id
33
     */
34
    public function __construct($name, $firstname, $id)
35
    {
36
        $this->name = $name;
37
        $this->firstname = $firstname;
38
        $this->id = $id;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getName()
45
    {
46
        return $this->name;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getFirstname()
53
    {
54
        return $this->firstname;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getId()
61
    {
62
        return $this->id;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getDisplayName()
69
    {
70
        return $this->firstname . ' ' . $this->name;
71
    }
72
73
}