Total Complexity | 7 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | final class InputText extends AbstractField |
||
16 | { |
||
17 | use PlaceholderTrait; |
||
18 | |||
19 | private ?Input $tag = null; |
||
20 | |||
21 | public function inputTag(?Input $tag): self |
||
22 | { |
||
23 | if ($tag !== null && $tag->getAttribute('type') !== 'text') { |
||
|
|||
24 | throw new InvalidArgumentException('Input tag should be with type "text".'); |
||
25 | } |
||
26 | |||
27 | $new = clone $this; |
||
28 | $new->tag = $tag; |
||
29 | return $new; |
||
30 | } |
||
31 | |||
32 | protected function generateInput(): string |
||
48 | } |
||
49 | } |
||
50 |
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.