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