Skip to content

Commit 633bf16

Browse files
Add more tests
1 parent 6cc41f7 commit 633bf16

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ if (true) {};
6060

6161
while (true) {};
6262

63+
class ABC {} ; ;
64+
65+
switch ( $a ) {
66+
case 1:
67+
break;
68+
case 2:
69+
break;
70+
default:
71+
break; ;
72+
};
73+
6374
// Do not break closure and anonymous class;
6475
$a = function () {};
6576
$b = new class {};

src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.inc.fixed

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ if (true) {}
5555

5656
while (true) {}
5757

58+
class ABC {}
59+
60+
switch ( $a ) {
61+
case 1:
62+
break;
63+
case 2:
64+
break;
65+
default:
66+
break;
67+
}
68+
5869
// Do not break closure and anonymous class;
5970
$a = function () {};
6071
$b = new class {};

src/Standards/Generic/Tests/CodeAnalysis/EmptyPHPStatementUnitTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public function getWarningList()
5656
57 => 1,
5757
59 => 1,
5858
61 => 1,
59+
63 => 2,
60+
71 => 1,
61+
72 => 1,
5962
];
6063

6164
}//end getWarningList()

0 commit comments

Comments
 (0)