Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
20 | public function index() |
||
21 | { |
||
22 | $this->getView()->set('headerTitle', $this->_getUser()->getManager()->getLabel('recoverPassword')); |
||
23 | |||
24 | /** @var RecoverPasswordFormTrait|Form $formsRecover */ |
||
25 | $formsRecover = $this->_getUser()->getForm('recoverPassword'); |
||
26 | |||
27 | if ($formsRecover->execute()) { |
||
|
|||
28 | $redirect = $this->Url()->assemble('frontend.recover', $this->getRequest()->query->all()); |
||
29 | $this->flashRedirect($this->getModelManager()->getMessage('recoverPassword.success'), $redirect); |
||
30 | } |
||
31 | |||
32 | $this->forms['recover'] = $formsRecover; |
||
33 | $this->_setMeta('recoverPassword'); |
||
34 | } |
||
35 | } |
||
36 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: