Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait DiscussConversationPresenter |
||
10 | { |
||
11 | /** |
||
12 | * We must decrement the post count due to the first post being counted. |
||
13 | * |
||
14 | * @return Attribute |
||
15 | */ |
||
16 | protected function postCountFormated(): Attribute |
||
17 | { |
||
18 | return Attribute::make( |
||
19 | get: fn () => $this->post_count - 1 |
||
20 | ); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Get the conversation url. |
||
25 | * |
||
26 | * @return Attribute |
||
27 | */ |
||
28 | protected function conversationUrl(): Attribute |
||
32 | ); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get the last page number for the conversation. |
||
37 | * |
||
38 | * @return Attribute |
||
39 | */ |
||
40 | protected function lastPage(): Attribute |
||
57 |