Passed
Push — master ( 3847de...717744 )
by Korvin
02:25
created

Pong   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 9
dl 0
loc 43
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getReplyTo() 0 3 1
A setData() 0 4 1
A getData() 0 3 1
A setReplyTo() 0 4 1
1
<?php
2
namespace PortlandLabs\Slackbot\Slack\Rtm\Event;
3
4
use PortlandLabs\Slackbot\Slack\Rtm\Event;
5
6
/**
7
 * A reply to a "ping" message
8
 */
9
final class Pong implements Event
10
{
11
12
    /** @var array */
13
    protected $data;
14
15
    /** @var int */
16
    protected $replyTo;
17
18
    /**
19
     * @return array
20
     */
21
    public function getData(): array
22
    {
23
        return $this->data;
24
    }
25
26
    /**
27
     * @param array $data
28
     * @return Pong
29
     */
30
    public function setData(array $data): Pong
31
    {
32
        $this->data = $data;
33
        return $this;
34
    }
35
36
    /**
37
     * @return int
38
     */
39
    public function getReplyTo(): int
40
    {
41
        return $this->replyTo;
42
    }
43
44
    /**
45
     * @param int $replyTo
46
     * @return Pong
47
     */
48
    public function setReplyTo(int $replyTo): Pong
49
    {
50
        $this->replyTo = $replyTo;
51
        return $this;
52
    }
53
54
}