CRITICAL
Rule Definition
For performance reasons, it is preferable to avoid incrementer/decrementer operators because they increase response time and memory consumption.
Remediation
Modify the source code to reduce the number of Methods and Functions containing increment/decrement operators.
Violation Code Sample
Fixed Code Sample
<?php
$a=0;
$a++; //Violation removed
$a--; //Violation removed
$a++; //Violation removed
$a--; //Violation removed
?>
Reference
Code Sniffer - http://pear.php.net/reference/PHP_CodeSniffer-1.5.2/PHP_CodeSniffer/Squiz_Sniffs_Operators_IncrementDecrementUsageSniff.html
Related Technologies
Technical Criterion
Complexity - Algorithmic and Control Structure Complexity
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.