// from
$i += 1;
// to
++$i;
// from
$i = $i + 1;
// to
++$i;
// from
$i -= 1;
// to
--$i;
// from
$i = $i - 1;
// to
--$i;
then I;m afraid one will want to have reverse fixer...
I like this one :)
@keradus Fixer 'increment_style' already exists for this :)
I think it was about the reverse of;
proposed:
// from
$i = $i - 1;
// to
--$i;
reverse of proposed:
// from
--$i;
// to
$i = $i - 1;
we don't have a fixer for any of the two cases
@KacerCZ huh? increment_style is about post/pre increment, not about += operator at all!
exactly as @SpacePossum said
And what about:
// from
$i = $i + 42;
// to
$i += 42;
Or maybe it's the role of another fixer?
@Soullivaneuh
As discussed here https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3235#issuecomment-349463668 and here https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3235#issuecomment-361674308, I think the best course of action is two separate fixers
Most helpful comment
then I;m afraid one will want to have reverse fixer...