CRITICAL
Rule Definition
For readability reasons, Functions should not have unused parameters.
Remediation
Review the source code to try to reduce the number of Functions and Methods containing unused parameters.
Violation Code Sample
private function bar(test $param)
{
// $param is not used
}
Fixed Code Sample
<?php
private function bar() //Violation removed : the unused parameter has been removed
{
}
?>
Reference
Code Sniffer - http://pear.php.net/package/PHP_CodeSniffer/docs/1.5.2/PHP_CodeSniffer/Generic_Sniffs_CodeAnalysis_UnusedFunctionParameterSniff.html
Related Technologies
Technical Criterion
Dead code (static)
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.