| Total Complexity | 7 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 13 | trait LikeCount |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Get the count of likes. |
||
| 17 | * |
||
| 18 | * @return int |
||
| 19 | */ |
||
| 20 | public function likesCount(): int |
||
| 21 | { |
||
| 22 | return $this->likesTo()->count(); |
||
|
|
|||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the count of dislikes. |
||
| 27 | * |
||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | public function dislikesCount(): int |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get digital count. |
||
| 37 | * |
||
| 38 | * @param $count |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | public function countDigital($count): string |
||
| 43 | { |
||
| 44 | if ($count < 1000) { |
||
| 45 | return $count; |
||
| 46 | } |
||
| 47 | |||
| 48 | if ($count < 1000000) { |
||
| 49 | return round($count / 1000, 1) . 'K'; |
||
| 50 | } |
||
| 51 | |||
| 52 | return round($count / 1000000, 1) . 'M'; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Get the count of likes in digital format. |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function likesCountDigital(): string |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Get the count of dislikes in digital format. |
||
| 67 | * |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function dislikesCountDigital(): string |
||
| 73 | } |
||
| 74 | } |
||
| 75 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.