Total Complexity | 7 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
17 | trait LikeCount |
||
18 | { |
||
19 | /** |
||
20 | * Get the count of likes. |
||
21 | * |
||
22 | * @return int |
||
23 | */ |
||
24 | public function likesCount(): int |
||
25 | { |
||
26 | return $this->likesTo()->count(); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Get the count of dislikes. |
||
31 | * |
||
32 | * @return int |
||
33 | */ |
||
34 | public function dislikesCount(): int |
||
35 | { |
||
36 | return $this->dislikesTo()->count(); |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get digital count. |
||
41 | * |
||
42 | * @param $count |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | public function countDigital($count): string |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Get the count of likes in digital format. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function likesCountDigital(): string |
||
65 | { |
||
66 | return $this->countDigital($this->likesCount()); |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * Get the count of dislikes in digital format. |
||
71 | * |
||
72 | * @return string |
||
73 | */ |
||
74 | public function dislikesCountDigital(): string |
||
77 | } |
||
78 | } |
||
79 |