Completed
Pull Request — master (#10)
by Romain
02:38
created

RawEvent::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
namespace Kerox\Messenger\Event;
3
4
class RawEvent extends AbstractEvent
5
{
6
7
    const NAME = 'raw';
8
9
    /**
10
     * @var array
11
     */
12
    protected $raw;
13
14
    /**
15
     * RawEvent constructor.
16
     *
17
     * @param string $senderId
18
     * @param string $recipientId
19
     * @param array $raw
20
     */
21 1
    public function __construct(string $senderId, string $recipientId, array $raw)
22
    {
23 1
        parent::__construct($senderId, $recipientId);
24
25 1
        $this->raw = $raw;
26 1
    }
27
28
    /**
29
     * @return array
30
     */
31
    public function getRaw(): array
32
    {
33
        return $this->raw;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getName(): string
40
    {
41
        return self::NAME;
42
    }
43
}
44