Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | trait HasCommentFlagHelpers |
||
17 | { |
||
18 | public function initializeHasCommwntFlagHelpers(): void |
||
19 | { |
||
20 | $this->casts['is_comment'] = 'boolean'; |
||
|
|||
21 | } |
||
22 | |||
23 | public function isComment(): bool |
||
26 | } |
||
27 | |||
28 | public function isNotComment(): bool |
||
31 | } |
||
32 | |||
33 | public function comment(): void |
||
34 | { |
||
35 | $this->setAttribute('is_comment', true); |
||
36 | $this->save(); |
||
37 | |||
38 | $this->fireModelEvent('comment', false); |
||
39 | } |
||
40 | |||
41 | public function undoComment(): void |
||
47 | } |
||
48 | } |
||
49 |