Completed
Push — master ( 706182...8198d4 )
by Jérémy
01:34
created

Author::getUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace JDecool\JsonFeed;
4
5
/**
6
 * Specifies the feed author
7
 */
8
class Author
9
{
10
    /** @var string */
11
    private $name;
12
13
    /** @var string */
14
    private $url;
15
16
    /** @var string */
17
    private $avatar;
18
19
    /**
20
     * Constructor
21
     *
22
     * @param string $name
23
     */
24
    public function __construct($name)
25
    {
26
        $this->name = $name;
27
    }
28
29
    /**
30
     * Get the author’s name
31
     *
32
     * @return string
33
     */
34
    public function getName()
35
    {
36
        return $this->name;
37
    }
38
39
    /**
40
     * Get the URL of a site owned by the author
41
     *
42
     * @return string
43
     */
44
    public function getUrl()
45
    {
46
        return $this->url;
47
    }
48
49
    /**
50
     * Set the URL of a site owned by the author
51
     *
52
     * @param string $url
53
     * @return Author
54
     */
55
    public function setUrl($url)
56
    {
57
        $this->url = $url;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Get the URL for an image for the author
64
     *
65
     * @return string
66
     */
67
    public function getAvatar()
68
    {
69
        return $this->avatar;
70
    }
71
72
    /**
73
     * Set the URL for an image for the author
74
     *
75
     * @param string $avatar
76
     * @return Author
77
     */
78
    public function setAvatar($avatar)
79
    {
80
        $this->avatar = $avatar;
81
82
        return $this;
83
    }
84
}
85