Passed
Push — master ( b808b9...919917 )
by Ehsan
04:54
created

Event::setText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Botonomous;
4
5
class Event extends AbstractBaseSlack
6
{
7
    private $type;
8
    private $user;
9
    private $text;
10
    private $timestamp;
11
    private $eventTimestamp;
12
    private $channel;
13
    private $botId;
14
15
    /**
16
     * Event constructor.
17
     *
18
     * @param $type
19
     */
20 9
    public function __construct($type)
21
    {
22 9
        $this->setType($type);
23 9
    }
24
25
    /**
26
     * @return string
27
     */
28 4
    public function getType()
29
    {
30 4
        return $this->type;
31
    }
32
33
    /**
34
     * @param string $type
35
     */
36 9
    public function setType($type)
37
    {
38 9
        $this->type = $type;
39 9
    }
40
41
    /**
42
     * @return string
43
     */
44 1
    public function getUser()
45
    {
46 1
        return $this->user;
47
    }
48
49
    /**
50
     * @param string $user
51
     */
52 5
    public function setUser($user)
53
    {
54 5
        $this->user = $user;
55 5
    }
56
57
    /**
58
     * @return string
59
     */
60 3
    public function getText()
61
    {
62 3
        return $this->text;
63
    }
64
65
    /**
66
     * @param string $text
67
     */
68 6
    public function setText($text)
69
    {
70 6
        $this->text = $text;
71 6
    }
72
73
    /**
74
     * @return string
75
     */
76 2
    public function getTimestamp()
77
    {
78 2
        return $this->timestamp;
79
    }
80
81
    /**
82
     * @param string $timestamp
83
     */
84 6
    public function setTimestamp($timestamp)
85
    {
86 6
        $this->timestamp = $timestamp;
87 6
    }
88
89
    /**
90
     * @return string
91
     */
92 2
    public function getEventTimestamp()
93
    {
94 2
        return $this->eventTimestamp;
95
    }
96
97
    /**
98
     * @param string $eventTimestamp
99
     */
100 6
    public function setEventTimestamp($eventTimestamp)
101
    {
102 6
        $this->eventTimestamp = $eventTimestamp;
103 6
    }
104
105
    /**
106
     * @return string
107
     */
108 1
    public function getChannel()
109
    {
110 1
        return $this->channel;
111
    }
112
113
    /**
114
     * @param string $channel
115
     */
116 5
    public function setChannel($channel)
117
    {
118 5
        $this->channel = $channel;
119 5
    }
120
121
    /**
122
     * @return string
123
     */
124 4
    public function getBotId()
125
    {
126 4
        return $this->botId;
127
    }
128
129
    /**
130
     * @param string $botId
131
     */
132 3
    public function setBotId($botId)
133
    {
134 3
        $this->botId = $botId;
135 3
    }
136
}
137