Coding-standard: RequireCombinedAssignmentOperatorSniff

Created on 9 Jul 2018  路  4Comments  路  Source: slevomat/coding-standard

Force the usage of {operator}=. E.g.:

-$sum = $sum + 3;
+$sum += 3;

-$string = $string . 'foo';
+$string .= 'foo'; 
Enhancement

Most helpful comment

Shit... I would be much easier to add += everywhere ;)

All 4 comments

Probably rather .= in the 2nd case? :)

Shit... I would be much easier to add += everywhere ;)

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings