Passed
Push — master ( c51e21...61371d )
by Romain
35s
created

RawEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 40
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getRaw() 0 4 1
A getName() 0 4 1
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