Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class CommentForm extends Form |
||
12 | { |
||
13 | #[Locked] |
||
14 | public ?int $blog_article_id = null; |
||
15 | |||
16 | public ?string $content = null; |
||
17 | |||
18 | /** |
||
19 | * Rules used for validating the model. |
||
20 | * |
||
21 | * @return array |
||
22 | */ |
||
23 | public function rules(): array |
||
27 | ]; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Translated attribute used in failed messages. |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | public function validationAttributes(): array |
||
36 | { |
||
37 | return [ |
||
38 | 'content' => 'commentaire' |
||
39 | ]; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Function to store the model. |
||
44 | * |
||
45 | * @return BlogComment |
||
46 | */ |
||
47 | public function store(): BlogComment |
||
52 | ])); |
||
53 | } |
||
55 |