Completed
Push — master ( 282f78...6dce89 )
by Sam
05:20
created

MessageEvent::getMessage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of PHP DNS Server.
4
 *
5
 * (c) Yif Swery <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace yswery\DNS\Event;
12
13
use React\Datagram\Socket;
14
use React\Datagram\SocketInterface;
15
16
class MessageEvent extends ServerStartEvent
17
{
18
    /**
19
     * @var string
20
     */
21
    private $remote;
22
23
    /**
24
     * @var string
25
     */
26
    private $message;
27
28
    /**
29
     * MessageEvent constructor.
30
     *
31
     * @param SocketInterface $socket
32
     * @param string          $remote
33
     * @param string          $message
34
     */
35
    public function __construct(SocketInterface $socket, string $remote, string $message)
36
    {
37
        parent::__construct($socket);
38
        $this->remote = $remote;
39
        $this->message = $message;
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getRemote(): string
46
    {
47
        return $this->remote;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getMessage(): string
54
    {
55
        return $this->message;
56
    }
57
}
58