Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit dfd523a

Browse files
Combined assignment operators must be used (#22)
1 parent eb26b53 commit dfd523a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Libero/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
4545
<rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace"/>
4646
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
47+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
4748
<rule ref="SlevomatCodingStandard.PHP.ShortList"/>
4849
<rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
4950
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---DESCRIPTION---
2+
Combined assignment operators must be used
3+
---CONTENTS---
4+
<?php
5+
6+
declare(strict_types=1);
7+
8+
$i = $i + 2;
9+
$foo = $foo . $bar;
10+
11+
---FIXED---
12+
<?php
13+
14+
declare(strict_types=1);
15+
16+
$i += 2;
17+
$foo .= $bar;
18+
19+
---

0 commit comments

Comments
 (0)