CRITICAL
Rule Definition
Using unconditional IF and ELSEIF statements often increases memory use and reduces performance.
Remediation
Modify the source code to reduce the number of unconditional IF and ELSEIF statements.
Violation Code Sample
class CAST{
public function close() {
if (true) {
echo 'test';
}
}
}
Fixed Code Sample
class CAST{
public function close() {
echo 'test';
}
}
Reference
Code Sniffer - http://pear.php.net/package/PHP_CodeSniffer/docs/1.5.2/PHP_CodeSniffer/Generic_Sniffs_CodeAnalysis_UselessOverridingMethodSniff.html
Related Technologies
Technical Criterion
Programming Practices - Structuredness
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.