PackageMaintainer   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 58
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getName() 0 4 1
A setName() 0 5 1
A getAvatarUrl() 0 4 1
A setAvatarUrl() 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 PackageMaintainer
16
 *
17
 * @author Alexey Samara <[email protected]>
18
 * @package wow-apps/symfony-packagist
19
 */
20
class PackageMaintainer
21
{
22
    /** @var string */
23
    private $name;
24
25
    /** @var string */
26
    private $avatarUrl;
27
28
    /**
29
     * PackageMaintainer constructor.
30
     *
31
     * @param string $name
32
     * @param string $avatarUrl
33
     */
34
    public function __construct(string $name = '', string $avatarUrl = '')
35
    {
36
        $this
37
            ->setName($name)
38
            ->setAvatarUrl($avatarUrl)
39
        ;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getName(): string
46
    {
47
        return $this->name;
48
    }
49
50
    /**
51
     * @param string $name
52
     * @return PackageMaintainer
53
     */
54
    public function setName(string $name): PackageMaintainer
55
    {
56
        $this->name = $name;
57
        return $this;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getAvatarUrl(): string
64
    {
65
        return $this->avatarUrl;
66
    }
67
68
    /**
69
     * @param string $avatarUrl
70
     * @return PackageMaintainer
71
     */
72
    public function setAvatarUrl(string $avatarUrl): PackageMaintainer
73
    {
74
        $this->avatarUrl = $avatarUrl;
75
        return $this;
76
    }
77
}
78