1.2.182. Collect Parameter Counts

This analysis collects the number of parameter per method.

The count applies to functions, methods, closures and arrow functions.

<?php

// parameter count on function : 1
function foo($a) { }

// parameter count on closure : 2
function ($b, $c = 2) {}

// parameter count on method : 0 (none)
class x {
    function moo() { }
}
?>

1.2.182.1. Specs

Short name

Dump/CollectParameterCounts

Rulesets

All, CE, Changed Behavior, Dump

Exakat since

1.9.6

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Features

inclusion

Available in

Entreprise Edition, Community Edition, Exakat Cloud