1 | <?php |
||
7 | class Text extends Field |
||
8 | { |
||
9 | use PlainInput; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $icon = 'fa-pencil'; |
||
15 | |||
16 | /** |
||
17 | * Add custom fa-icon. |
||
18 | * |
||
19 | * @param string $icon |
||
20 | * |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function addIcon($icon) |
||
29 | |||
30 | /** |
||
31 | * Render this filed. |
||
32 | * |
||
33 | * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
||
34 | */ |
||
35 | public function render() |
||
54 | |||
55 | /** |
||
56 | * Add inputmask to an elements. |
||
57 | * |
||
58 | * @param array $options |
||
59 | * |
||
60 | * @return $this |
||
61 | */ |
||
62 | public function inputmask($options) |
||
70 | |||
71 | /** |
||
72 | * Encode options to Json. |
||
73 | * |
||
74 | * @param array $options |
||
75 | * |
||
76 | * @return $json |
||
77 | */ |
||
78 | protected function json_encode_options($options) |
||
88 | |||
89 | /** |
||
90 | * Prepare options. |
||
91 | * |
||
92 | * @param array $options |
||
93 | * |
||
94 | * @return array |
||
95 | */ |
||
96 | protected function prepare_options($options) |
||
116 | |||
117 | /** |
||
118 | * Add datalist element to Text input. |
||
119 | * |
||
120 | * @param array $entries |
||
121 | * |
||
122 | * @return $this |
||
123 | */ |
||
124 | public function datalist($entries = []) |
||
136 | } |
||
137 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.