| 1 | <?php |
||
| 9 | class Form |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The form fields. |
||
| 13 | * |
||
| 14 | * @var Field[] |
||
| 15 | */ |
||
| 16 | protected $fields = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The form model. |
||
| 20 | * |
||
| 21 | * @var Model |
||
| 22 | */ |
||
| 23 | protected $model; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the model fields. |
||
| 27 | * |
||
| 28 | * @return Field[] |
||
| 29 | */ |
||
| 30 | public function getFields(): array |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Set the model fields. |
||
| 37 | * |
||
| 38 | * @param $name |
||
| 39 | * @param array $rules |
||
| 40 | */ |
||
| 41 | public function addField($name, array $rules) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Get the form model. |
||
| 48 | * |
||
| 49 | * @return Model |
||
| 50 | */ |
||
| 51 | public function getModel(): Model |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Set the form model. |
||
| 58 | * |
||
| 59 | * @param Model $model |
||
| 60 | */ |
||
| 61 | public function setModel(Model $model) |
||
| 65 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.