| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | class ReactionEvent extends AbstractEvent |
||
| 10 | { |
||
| 11 | public const NAME = 'reaction'; |
||
| 12 | |||
| 13 | protected $timestamp; |
||
| 14 | protected $reaction; |
||
| 15 | |||
| 16 | 2 | public function __construct(string $senderId, string $recipientId, int $timestamp, Reaction $reaction) |
|
| 17 | { |
||
| 18 | 2 | parent::__construct($senderId, $recipientId); |
|
| 19 | |||
| 20 | 2 | $this->timestamp = $timestamp; |
|
| 21 | 2 | $this->reaction = $reaction; |
|
| 22 | 2 | } |
|
| 23 | |||
| 24 | 1 | public function getTimestamp(): int |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | public function getReaction(): Reaction |
|
| 30 | { |
||
| 31 | 1 | return $this->reaction; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | public function getName(): string |
|
| 35 | { |
||
| 36 | 1 | return self::NAME; |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return \Kerox\Messenger\Event\ReactionEvent |
||
| 41 | */ |
||
| 42 | 1 | public static function create(array $payload): self |
|
| 50 | } |
||
| 51 | } |
||
| 52 |