Passed
Push — master ( 2aad05...4fe473 )
by Yo
02:45
created

Author::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
namespace Yoanm\ComposerConfigManager\Domain\Model;
3
4
class Author implements ConfigurationItemInterface
5
{
6
    /** @var string */
7
    private $name;
8
    /** @var string */
9
    private $email;
10
    /** @var string */
11
    private $role;
12
13 4
    public function __construct($name, $email = null, $role = null)
14
    {
15 4
        $this->name = $name;
16 4
        $this->email = $email;
17 4
        $this->role = $role;
18 4
    }
19
20
    /**
21
     * @return string
22
     */
23 4
    public function getName()
24
    {
25 4
        return $this->name;
26
    }
27
28
    /**
29
     * @return string
30
     */
31 4
    public function getEmail()
32
    {
33 4
        return $this->email;
34
    }
35
36
    /**
37
     * @return string
38
     */
39 4
    public function getRole()
40
    {
41 4
        return $this->role;
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getItemId()
48
    {
49
        return $this->getName();
50
    }
51
}
52