Completed
Push — master ( 76453f...1c4278 )
by Julien
06:31
created

ArticleCreatedEvent::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Eole\Sandstone\Tests\Integration\App;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
class ArticleCreatedEvent extends Event
8
{
9
    /**
10
     * @var string
11
     */
12
    const ARTICLE_CREATED_EVENT = 'article.created';
13
14
    /**
15
     * @var int
16
     */
17
    private $id;
18
19
    /**
20
     * @var string
21
     */
22
    private $title;
23
24
    /**
25
     * @var string
26
     */
27
    private $url;
28
29
    /**
30
     * @param int $id
31
     * @param string $title
32
     * @param string $url
33
     */
34
    public function __construct($id, $title, $url)
35
    {
36
        $this->id = $id;
37
        $this->title = $title;
38
        $this->url = $url;
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getId()
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @param int $id
51
     *
52
     * @return self
53
     */
54
    public function setId($id)
55
    {
56
        $this->id = $id;
57
58
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getTitle()
65
    {
66
        return $this->title;
67
    }
68
69
    /**
70
     * @param string $title
71
     *
72
     * @return self
73
     */
74
    public function setTitle($title)
75
    {
76
        $this->title = $title;
77
78
        return $this;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getUrl()
85
    {
86
        return $this->url;
87
    }
88
89
    /**
90
     * @param string $url
91
     *
92
     * @return self
93
     */
94
    public function setUrl($url)
95
    {
96
        $this->url = $url;
97
98
        return $this;
99
    }
100
}
101