Skip to content

Commit

Permalink
Merge 6c560f6 into 390432c
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Mar 10, 2022
2 parents 390432c + 6c560f6 commit 1e245de
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Tests/Utils/PassedParameters/GetParametersNamedTest.php
Expand Up @@ -89,12 +89,11 @@ public function dataGetParameters()
* 3. The new `match` keyword being recognized on PHP 8, but not before, while
* the `match` control structure is not supported in PHPCS yet.
*/
$phpcsVersion = Helper::getVersion();
$php8Names = parent::usesPhp8NameTokens();
$namedParamsInPhpcs = \version_compare($phpcsVersion, '3.6.0', '>=');
$namedParamsInPhpcs = \version_compare(Helper::getVersion(), '3.6.0', '>=');
$matchIsKeyword = \version_compare(\PHP_VERSION_ID, '80000', '>=');

$data = [
return [
'only-positional-args' => [
'/* testPositionalArgs */',
\T_STRING,
Expand Down Expand Up @@ -640,19 +639,5 @@ public function dataGetParameters()
],
],
];

/*
* Temporarily ignore a test failure caused by an upstream bug.
* The bug is only in PHPCS `master` (and 4.x) and is expected to be fixed before 3.7.0
* will be released.
* Once the fix is in, this commit can and should be removed.
*
* @link https://github.com/squizlabs/PHP_CodeSniffer/pull/3546
*/
if (\version_compare($phpcsVersion, '3.7.0', '>=') === true) {
unset($data['named-args-in-class-instantiation-with-static']);
}

return $data;
}
}

0 comments on commit 1e245de

Please sign in to comment.