PackageAuthor   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 0
dl 0
loc 104
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getName() 0 4 1
A setName() 0 5 1
A getEmail() 0 4 1
A setEmail() 0 5 1
A getHomepage() 0 4 1
A setHomepage() 0 5 1
A getRole() 0 4 1
A setRole() 0 5 1
1
<?php
2
/**
3
 * This file is part of the wow-apps/symfony-packagist project
4
 * https://github.com/wow-apps/symfony-packagist
5
 *
6
 * (c) 2017 WoW-Apps
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WowApps\PackagistBundle\DTO;
13
14
/**
15
 * Class PackageVersionAuthor
16
 *
17
 * @author Alexey Samara <[email protected]>
18
 * @package wow-apps/symfony-packagist
19
 */
20
class PackageAuthor
21
{
22
    /** @var string */
23
    private $name;
24
25
    /** @var string */
26
    private $email;
27
28
    /** @var string */
29
    private $homepage;
30
31
    /** @var string */
32
    private $role;
33
34
    /**
35
     * PackageVersionAuthor constructor.
36
     *
37
     * @param string $name
38
     * @param string $email
39
     * @param string $homepage
40
     * @param string $role
41
     */
42
    public function __construct(string $name = '', string $email = '', string $homepage = '', string $role = '')
43
    {
44
        $this
45
            ->setName($name)
46
            ->setEmail($email)
47
            ->setHomepage($homepage)
48
            ->setRole($role)
49
        ;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getName(): string
56
    {
57
        return $this->name;
58
    }
59
60
    /**
61
     * @param string $name
62
     * @return PackageAuthor
63
     */
64
    public function setName(string $name): PackageAuthor
65
    {
66
        $this->name = $name;
67
        return $this;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getEmail(): string
74
    {
75
        return $this->email;
76
    }
77
78
    /**
79
     * @param string $email
80
     * @return PackageAuthor
81
     */
82
    public function setEmail(string $email): PackageAuthor
83
    {
84
        $this->email = $email;
85
        return $this;
86
    }
87
88
    /**
89
     * @return string
90
     */
91
    public function getHomepage(): string
92
    {
93
        return $this->homepage;
94
    }
95
96
    /**
97
     * @param string $homepage
98
     * @return PackageAuthor
99
     */
100
    public function setHomepage(string $homepage): PackageAuthor
101
    {
102
        $this->homepage = $homepage;
103
        return $this;
104
    }
105
106
    /**
107
     * @return string
108
     */
109
    public function getRole(): string
110
    {
111
        return $this->role;
112
    }
113
114
    /**
115
     * @param string $role
116
     * @return PackageAuthor
117
     */
118
    public function setRole(string $role): PackageAuthor
119
    {
120
        $this->role = $role;
121
        return $this;
122
    }
123
}
124