| Total Complexity | 3 | 
| Total Lines | 30 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 5 | trait HasLikes | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * Determines whether the entity was liked by the current user. | ||
| 9 | * | ||
| 10 | * @return bool | ||
| 11 | */ | ||
| 12 | public function isLiked() | ||
| 13 |     { | ||
| 14 |         return $this->getData('likes.is_liked', false) === true; | ||
|  | |||
| 15 | } | ||
| 16 | |||
| 17 | /** | ||
| 18 | * Get the entity likes count. | ||
| 19 | * | ||
| 20 | * @return int | ||
| 21 | */ | ||
| 22 | public function getLikesCount() | ||
| 25 | } | ||
| 26 | |||
| 27 | /** | ||
| 28 | * Get the entity likes sum. | ||
| 29 | * | ||
| 30 | * @return int | ||
| 31 | */ | ||
| 32 | public function getLikesSum() | ||
| 35 | } | ||
| 36 | } | ||
| 37 |