Skip to content

Commit

Permalink
PHP 8.0 | Generic/DisallowYodaConditions: add tests with match contro…
Browse files Browse the repository at this point in the history
…l structure
  • Loading branch information
jrfnl committed Feb 23, 2021
1 parent b52a018 commit 7def79e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,12 @@ if ([function() { echo 'hi'; }] === [$foo]
) {
}

echo match (5 == $num) {
true => "true\n",
false => "false\n"
};

echo match ($text) {
'foo' => 10 === $y,
10 === $y => 'bar',
};
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public function getErrorList()
142 => 1,
156 => 1,
160 => 1,
167 => 1,
173 => 1,
174 => 1,
];

}//end getErrorList()
Expand Down

0 comments on commit 7def79e

Please sign in to comment.