These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * The handler for a plugin hook receives information about the hook (name and |
||
4 | * type), the current value for the hook, and parameters related to the hook. |
||
5 | */ |
||
6 | |||
7 | elgg_register_plugin_hook_handler('forward', '404', 'example_plugin_hook_handler'); |
||
8 | |||
9 | function example_plugin_hook_handler($hook, $type, $value, $params) { |
||
0 ignored issues
–
show
|
|||
10 | var_dump($hook); |
||
0 ignored issues
–
show
|
|||
11 | var_dump($type); |
||
12 | var_dump($value); |
||
13 | var_dump($params); |
||
14 | |||
15 | // we are not changing $value so return null |
||
16 | return null; |
||
17 | } |
||
18 |
This check looks for functions that have already been defined in other files.
Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the
@ignore
annotation.See also the PhpDoc documentation for @ignore.