1.2.185. Collect Parameter Names¶
This analysis collects the names of all parameters. It also counts the number of occurrences of each name.
The names are collected from functions, methods, closures and arrow functions. Compulsory and optional parameters are all processed.
<?php
// parameter $a
function foo($a) { }
// parameter $b, $c
function ($b, $c = 2) {}
// parameters in interfaces are counted too.
// Here, $a will be counted with the one above.
interfaces x {
function moo($a);
}
?>
1.2.185.1. Connex PHP features¶
1.2.185.1.1. Specs¶
Short name |
Dump/CollectParameterNames |
Rulesets |
|
Exakat since |
2.1.5 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |