| Total Complexity | 4 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get the count of likes in digital format. |
||
| 41 | * |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | public function likesCountDigital(): string |
||
| 45 | { |
||
| 46 | return count_digital($this->likesCount()); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Get the count of dislikes in digital format. |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | public function dislikesCountDigital(): string |
||
| 57 | } |
||
| 58 | } |
||
| 59 |