Skip to content

Commit 527f2bb

Browse files
committed
Added "yield from" to the list of lowercase keywords + test
1 parent b9146ab commit 527f2bb

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/Standards/Generic/Sniffs/PHP/LowerCaseKeywordSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function register()
9494
T_VAR,
9595
T_WHILE,
9696
T_YIELD,
97+
T_YIELD_FROM,
9798
);
9899

99100
}//end register()

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const PRIVATE;
1818
HttpStatus::CONTINUE;
1919
Function ($f) {
2020
Yield $f;
21+
Yield From fun();
2122
}
2223
class X extends Y {
2324
public function m() {

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.inc.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const PRIVATE;
1818
HttpStatus::CONTINUE;
1919
function ($f) {
2020
yield $f;
21+
yield from fun();
2122
}
2223
class X extends Y {
2324
public function m() {

src/Standards/Generic/Tests/PHP/LowerCaseKeywordUnitTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ public function getErrorList()
3535
16 => 1,
3636
19 => 1,
3737
20 => 1,
38-
24 => 1,
39-
27 => 1,
38+
21 => 1,
39+
25 => 1,
40+
28 => 1,
4041
);
4142

4243
}//end getErrorList()

0 commit comments

Comments
 (0)