| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function response($input) { |
||
| 45 | return [ |
||
| 46 | 'label' => $this->label, |
||
| 47 | 'response' => $this->fields->map(function ($field) use ($input) { |
||
| 48 | |||
| 49 | // Handle empty radio buttons sending nothing in POST request |
||
| 50 | if ($field instanceof \Riclep\StoryblokForms\Blocks\LsfRadioButton) { |
||
| 51 | if (!array_key_exists($field->name, $input)) { |
||
| 52 | $input[$field->name] = null; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | return $field->response($input[$field->name]); |
||
| 57 | })->toArray() |
||
| 58 | ]; |
||
| 60 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.