1.2.632. Links Between Parameter And Argument¶

Collect various stats about arguments and parameter usage.

A parameter is one slot in the method definition. An argument is a slot in the method call. Both are linked by the method and their respective position in the argument list.

  • Total number of argument usage, linked to a parameter : this excludes arguments from external libraries and native PHP functions. For reference.

  • Number of identical parameter : cases where argument and parameter have the same name.

  • Number of different parameter : cases where argument and parameter have the different name.

  • Number of expression argument : cases where argument is an expression

  • Number of constant argument : cases where the argument is a constant

<?php

function foo($a, $b) {
    // some code
}

// $a is the same as the parameter
// $c is different from the paramter $b
foo($a, $c);

const C = 1;

// Foo is called with a constant (1rst argument)
// Foo is called with a expression (2nd argument)
foo(C, 1+3);

?>

1.2.632.1. Connex PHP features¶

  • parameter

  • argument

1.2.632.1.1. Specs¶

Short name

Dump/ParameterArgumentsLinks

Rulesets

All, Appinfo, CE, Changed Behavior

Exakat since

2.0.6

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Available in

Entreprise Edition, Community Edition, Exakat Cloud

Exakat

Navigation

  • Introduction
  • Release Note

GETTING STARTED

  • Standard installation
  • Docker installation
  • Tutorials

USER GUIDE

  • Overview
  • PHP Version
  • Library & Framework Support
  • Configuration
  • Scoping analysis
  • Rule
  • Report
  • Cobbler

REFERENCE GUIDE

  • 1. Rules
  • 2. Rulesets
  • 3. Reports
  • 4. Cobblers
  • 5. Real Code Cases

ADMINISTRATOR GUIDE

  • Installation
  • Upgrading
  • Configuration
  • Commands

OTHERS

  • Frequently Asked Questions
  • Glossary
  • Annex

Related Topics

  • Documentation overview
    • 1. Rules
      • Previous: 1.2.631. Law of Demeter
      • Next: 1.2.633. Linux Only Files
©2015-2025, Damien Seguy - Exakat. | Powered by Sphinx 9.0.4 & Alabaster 1.0.0 | Page source