1.2.183. 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.183.1. Specs

Short name

Dump/CollectParameterNames

Rulesets

All, CE, Dump

Exakat since

2.1.5

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Features

inclusion

Available in

Entreprise Edition, Community Edition, Exakat Cloud