Pre- or post-increment and decrement operators should be used if possible.
Whether to use pre- or post-increment and decrement operators.
Allowed values: 'post'
and 'pre'
Default value: 'pre'
Default configuration.
--- Original
+++ New
<?php
-$a++;
-$b--;
+++$a;
+--$b;
With configuration: ['style' => 'post']
.
--- Original
+++ New
<?php
-++$a;
---$b;
+$a++;
+$b--;
The rule is part of the following rule sets: