Total Complexity | 9 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | trait HasComments |
||
14 | { |
||
15 | 13 | public function comments(): MorphMany |
|
18 | } |
||
19 | |||
20 | 1 | public function canBeRated(): bool |
|
23 | } |
||
24 | |||
25 | 1 | public function mustBeApproved(): bool |
|
28 | } |
||
29 | |||
30 | 1 | public function primaryId(): string |
|
31 | { |
||
32 | 1 | return (string)$this->getAttribute($this->primaryKey); |
|
33 | } |
||
34 | |||
35 | 3 | public function averageRate(int $round = 2): float |
|
49 | } |
||
50 | |||
51 | 2 | public function totalCommentsCount(): int |
|
60 |