| Total Complexity | 1 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class CommentForm extends Form |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * The article id where the comment belong to. |
||
| 19 | * |
||
| 20 | * @var int|null |
||
| 21 | */ |
||
| 22 | #[Locked] |
||
| 23 | public ?int $blog_article_id = null; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The content of the comment. |
||
| 27 | * |
||
| 28 | * @var string|null |
||
| 29 | */ |
||
| 30 | #[Validate('required|min:10')] |
||
| 31 | public ?string $content = null; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Function to store the model. |
||
| 35 | * |
||
| 36 | * @return BlogComment |
||
| 37 | * |
||
| 38 | * @throws Throwable |
||
| 39 | */ |
||
| 40 | public function create(): BlogComment |
||
| 57 |