| Total Complexity | 7 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PostBuilder extends ModelBuilder |
||
| 10 | { |
||
| 11 | 2 | public function setMessage(string $message): self |
|
| 12 | { |
||
| 13 | 2 | $this->params['message'] = $message; |
|
| 14 | |||
| 15 | 2 | return $this; |
|
| 16 | } |
||
| 17 | |||
| 18 | 2 | public function setChannelId(string $channelId): self |
|
| 19 | { |
||
| 20 | 2 | $this->params['channel_id'] = $channelId; |
|
| 21 | |||
| 22 | 2 | return $this; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Set the post ID to comment on. |
||
| 27 | */ |
||
| 28 | 1 | public function setRootId(string $postId): self |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * A list of file IDs to associate with the post. |
||
| 37 | * |
||
| 38 | * @param string[] $fileIds |
||
| 39 | */ |
||
| 40 | 1 | public function setFileIds(array $fileIds): self |
|
| 41 | { |
||
| 42 | 1 | $this->params['file_ids'] = $fileIds; |
|
| 43 | |||
| 44 | 1 | return $this; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Set if the post is pinned. |
||
| 49 | */ |
||
| 50 | 1 | public function setIsPinned(bool $isPinned): self |
|
| 55 | } |
||
| 56 | |||
| 57 | 5 | protected function getRequiredFields(string $buildType = self::BUILD_FOR_CREATE): array |
|
| 64 | } |
||
| 65 | } |
||
| 67 |