1 | <?php |
||
10 | abstract class FormModel |
||
11 | { |
||
12 | /** |
||
13 | * @var Anax\DI\DIInterface $di the DI/service container. |
||
14 | * @var class $form the main form class. |
||
15 | */ |
||
16 | protected $di; |
||
17 | protected $form; |
||
18 | |||
19 | |||
20 | |||
21 | /** |
||
22 | * Constructor injects with DI container. |
||
23 | * |
||
24 | * @param Anax\DI\DIInterface $di a service container |
||
25 | */ |
||
26 | public function __construct(DIInterface $di) |
||
31 | |||
32 | |||
33 | |||
34 | /** |
||
35 | * Customise the check() method to use own methods. |
||
36 | * |
||
37 | * @return boolean|null $callbackStatus if submitted&validates, false if |
||
38 | * not validate, null if not submitted. |
||
39 | * If submitted the callback function |
||
40 | * will return the actual value which |
||
41 | * should be true or false. |
||
42 | */ |
||
43 | public function check() |
||
50 | |||
51 | |||
52 | |||
53 | /** |
||
54 | * Return HTML for the form. |
||
55 | * |
||
56 | * @param array $options with options affecting the form output. |
||
57 | * |
||
58 | * @return string with HTML for the form. |
||
59 | */ |
||
60 | public function getHTML($options = []) |
||
64 | |||
65 | |||
66 | |||
67 | /** |
||
68 | * Callback what to do if the form was submitted successfully? |
||
69 | */ |
||
70 | public function callbackSuccess() |
||
74 | |||
75 | |||
76 | |||
77 | /** |
||
78 | * Callback what to do when submitted form could not be processed? |
||
79 | */ |
||
80 | public function callbackFail() |
||
84 | } |
||
85 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..