1 | <?php |
||
12 | class form |
||
13 | { |
||
14 | /** @var \phpbb\request\request_interface */ |
||
15 | protected $request; |
||
16 | |||
17 | /** @var \phpbb\template\context */ |
||
18 | protected $template_context; |
||
19 | |||
20 | /** @var \phpbb\language\language */ |
||
21 | protected $language; |
||
22 | |||
23 | /** @var \blitze\sitemaker\services\auto_lang */ |
||
24 | protected $auto_lang; |
||
25 | |||
26 | /** @var \blitze\content\services\form\fields_factory */ |
||
27 | protected $fields_factory; |
||
28 | |||
29 | /** @var \blitze\sitemaker\services\template */ |
||
30 | protected $ptemplate; |
||
31 | |||
32 | /** @var array */ |
||
33 | protected $db_fields = array(); |
||
34 | |||
35 | /** @var array */ |
||
36 | protected $data = array(); |
||
37 | |||
38 | /** @var array */ |
||
39 | protected $form = array(); |
||
40 | |||
41 | /** @var array */ |
||
42 | protected $errors = array(); |
||
43 | |||
44 | /** |
||
45 | * Constructor |
||
46 | * |
||
47 | * @param \phpbb\request\request_interface $request Request object |
||
48 | * @param \phpbb\template\context $template_context Template context object |
||
49 | * @param \phpbb\language\language $language Language object |
||
50 | * @param \blitze\sitemaker\services\auto_lang $auto_lang Auto add lang file |
||
51 | * @param \blitze\content\services\form\fields_factory $fields_factory Form fields factory |
||
52 | * @param \blitze\sitemaker\services\template $ptemplate Sitemaker template object |
||
53 | */ |
||
54 | public function __construct(\phpbb\request\request_interface $request, \phpbb\template\context $template_context, \phpbb\language\language $language, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\sitemaker\services\template $ptemplate) |
||
63 | |||
64 | /** |
||
65 | * @param string $form_name |
||
66 | * @param string $form_key |
||
67 | * @param string $action |
||
68 | * @param string $legend |
||
69 | * @param string $method |
||
70 | * @return \blitze\content\services\form\form |
||
71 | */ |
||
72 | public function create($form_name, $form_key, $action = '', $legend = '', $method = 'post') |
||
92 | |||
93 | /** |
||
94 | * @param string $name |
||
95 | * @param string $type |
||
96 | * @param array $field_data |
||
97 | * @param int $forum_id |
||
98 | * @param int $topic_id |
||
99 | * @return \blitze\content\services\form\form |
||
100 | */ |
||
101 | public function add($name, $type, array $field_data, $forum_id = 0, $topic_id = 0) |
||
120 | |||
121 | /** |
||
122 | * @param bool $wrap_form_element |
||
123 | * @return string |
||
124 | */ |
||
125 | public function get_form($wrap_form_element = true) |
||
143 | |||
144 | /** |
||
145 | * @return array |
||
146 | */ |
||
147 | public function handle_request() |
||
163 | |||
164 | /** |
||
165 | * @return array |
||
166 | */ |
||
167 | public function get_data() |
||
171 | |||
172 | /** |
||
173 | * @return array |
||
174 | */ |
||
175 | public function get_errors() |
||
180 | |||
181 | /** |
||
182 | * @param array $content_fields |
||
183 | * @param bool $req_mod_input |
||
184 | * @param string $cp_class ucp|mcp |
||
185 | * @return array |
||
186 | */ |
||
187 | public function get_submitted_data(array $content_fields, &$req_mod_input, $cp_class = 'ucp') |
||
209 | |||
210 | /** |
||
211 | * @param int $topic_id |
||
212 | * @param array $content_fields |
||
213 | * @return void |
||
214 | */ |
||
215 | public function save_db_fields($topic_id, array $content_fields) |
||
225 | |||
226 | /** |
||
227 | * @param array $row |
||
228 | * @param bool $req_mod_input |
||
229 | * @param string $cp_class |
||
230 | * @return mixed |
||
231 | */ |
||
232 | protected function get_submitted_field_data(array &$row, &$req_mod_input, $cp_class) |
||
256 | |||
257 | /** |
||
258 | * @return array |
||
259 | */ |
||
260 | protected function get_default_field_data() |
||
270 | |||
271 | /** |
||
272 | * @param string $field_type |
||
273 | * @return string |
||
274 | */ |
||
275 | protected function get_field_key($field_type) |
||
279 | } |
||
280 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.