Skip to content

Commit

Permalink
Merge branch 'php-8.0/squiz-disallowmultipleassignments-support-match…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Feb 24, 2021
2 parents 3095cb6 + 87bc198 commit 6836945
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public function process(File $phpcsFile, $stackPtr)
T_SWITCH => T_SWITCH,
T_CASE => T_CASE,
T_FOR => T_FOR,
T_MATCH => T_MATCH,
];
foreach ($nested as $opener => $closer) {
if (isset($tokens[$opener]['parenthesis_owner']) === true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,15 @@ class Bar
public bool $c = false, $d = true;
protected int $e = 123, $f = 987;
}

switch ($b < 10 && $a = 10) {
case true:
break;
}

$array = [
match ($b < 10 && $a = 10) {
true => 10,
false => 0
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public function getErrorList()
12 => 1,
14 => 1,
15 => 1,
79 => 1,
85 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit 6836945

Please sign in to comment.