1 | <?php |
||
24 | class FormObjectSteps |
||
25 | { |
||
26 | const METADATA_STEP_PERSISTENCE_KEY = 'core.formStepPersistence'; |
||
27 | |||
28 | /** |
||
29 | * @var FormObject |
||
30 | */ |
||
31 | protected $formObject; |
||
32 | |||
33 | /** |
||
34 | * Step persistence is saved in the form metadata. |
||
35 | * |
||
36 | * It allows having essential information about the form steps whenever it |
||
37 | * is needed: submitted form values, as well as steps that were already |
||
38 | * validated. |
||
39 | * |
||
40 | * @var FormStepPersistence |
||
41 | */ |
||
42 | protected $stepPersistence; |
||
43 | |||
44 | /** |
||
45 | * @var Step |
||
46 | */ |
||
47 | protected $currentStep; |
||
48 | |||
49 | /** |
||
50 | * @var SubstepDefinition |
||
51 | */ |
||
52 | protected $currentSubstepDefinition; |
||
53 | |||
54 | /** |
||
55 | * @param FormObject $formObject |
||
56 | */ |
||
57 | public function __construct(FormObject $formObject) |
||
61 | |||
62 | /** |
||
63 | * This function will search among the registered steps to find the one that |
||
64 | * has the same controller parameters. |
||
65 | * |
||
66 | * It is also possible not to find any step, in this case `null` is |
||
67 | * returned. |
||
68 | * |
||
69 | * @todo: memoization with request spl object storage |
||
70 | * |
||
71 | * @param Request $request |
||
72 | */ |
||
73 | public function fetchCurrentStep(Request $request) |
||
109 | |||
110 | /** |
||
111 | * @return Step|null |
||
112 | */ |
||
113 | public function getCurrentStep() |
||
121 | |||
122 | /** |
||
123 | * Fetches the step persistence object for the form, which may have been |
||
124 | * stored in the form metadata. |
||
125 | * |
||
126 | * If the form object hash did change since the persistence object was saved |
||
127 | * it is "refreshed" with the new hash (some data are also deleted as they |
||
128 | * are no longer considered as valid). |
||
129 | * |
||
130 | * @return FormStepPersistence |
||
131 | */ |
||
132 | public function getStepPersistence() |
||
157 | |||
158 | /** |
||
159 | * @return SubstepDefinition |
||
160 | */ |
||
161 | public function getCurrentSubstepDefinition() |
||
171 | |||
172 | /** |
||
173 | * @param SubstepDefinition $currentSubstepDefinition |
||
174 | */ |
||
175 | public function setCurrentSubstepDefinition(SubstepDefinition $currentSubstepDefinition) |
||
180 | } |
||
181 |
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..