This PR was merged into the 2.15 branch. Discussion ---------- clean ups search `isGivenKind\(\[[^,]*\)` , more hits on `master` which I'll fix after merging this one Commits ------- 68b3ead0 clean ups
@@ -178,13 +178,11 @@ class Sample
foreach (array_reverse(Preg::split('/(\\\\)/', $namespace, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)) as $piece) {
$index = $tokens->getPrevMeaningfulToken($index);
if ('\\' === $piece) {
- if (!$tokens[$index]->isGivenKind([T_NS_SEPARATOR])) {
- return null;
- }
- } else {
- if (!$tokens[$index]->equals([T_STRING, $piece], false)) {
+ if (!$tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
return null;
}
+ } elseif (!$tokens[$index]->equals([T_STRING, $piece], false)) {
+ return null;
@@ -108,7 +108,7 @@ final class PhpUnitSizeClassFixer extends AbstractFixer implements WhitespacesAw
{
$typeIndex = $tokens->getPrevMeaningfulToken($i);
- return $tokens[$typeIndex]->isGivenKind([T_ABSTRACT]);
+ return $tokens[$typeIndex]->isGivenKind(T_ABSTRACT);
private function createDocBlock(Tokens $tokens, $docBlockIndex)