Total Complexity | 6 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Coverage | 60% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | class Reaction |
||
8 | { |
||
9 | public const REACTION_SMILE = 'smile'; |
||
10 | public const REACTION_ANGRY = 'angry'; |
||
11 | public const REACTION_SAD = 'sad'; |
||
12 | public const REACTION_WOW = 'wow'; |
||
13 | public const REACTION_LOVE = 'love'; |
||
14 | public const REACTION_LIKE = 'like'; |
||
15 | public const REACTION_DISLIKE = 'dislike'; |
||
16 | public const REACTION_OTHER = 'other'; |
||
17 | |||
18 | public const ACTION_REACT = 'react'; |
||
19 | public const ACTION_UNREACT = 'unreact'; |
||
20 | |||
21 | protected $reaction; |
||
22 | protected $emoji; |
||
23 | protected $action; |
||
24 | protected $mid; |
||
25 | |||
26 | /** |
||
27 | * Reaction constructor. |
||
28 | */ |
||
29 | 1 | public function __construct(string $reaction, string $emoji, string $action, string $mid) |
|
30 | { |
||
31 | 1 | $this->reaction = $reaction; |
|
32 | 1 | $this->emoji = $emoji; |
|
33 | 1 | $this->action = $action; |
|
34 | 1 | $this->mid = $mid; |
|
35 | 1 | } |
|
36 | |||
37 | public function getReaction(): string |
||
38 | { |
||
39 | return $this->reaction; |
||
40 | } |
||
41 | |||
42 | public function getEmoji(): string |
||
45 | } |
||
46 | |||
47 | public function getAction(): string |
||
50 | } |
||
51 | |||
52 | public function getMid(): string |
||
53 | { |
||
54 | return $this->mid; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return \Kerox\Messenger\Model\Callback\Reaction |
||
59 | */ |
||
60 | 1 | public static function create(array $callbackData): self |
|
67 | ); |
||
68 | } |
||
69 | } |
||
70 |