Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lulco committed May 25, 2018
1 parent f3b4d9a commit bb17368
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/TextFinder/RegexTextFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function find(string $content): array
}
$content = preg_replace($pattern, '', $content);
}

return $texts;
}
}
2 changes: 1 addition & 1 deletion src/TokenModifier/FalsePositiveRemoverTokenModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function modifyAll(TokenCollection $tokenCollection): TokenCollection
$newTokenCollection = new TokenCollection($tokenCollection->getFilePath());
foreach ($tokenCollection->getTokens() as $token) {
foreach ($this->falsePositivePatterns as $falsePositivePattern) {
if (!preg_match($falsePositivePattern['block_pattern'], $token->getOriginalBlock()) && preg_match($falsePositivePattern['text_pattern'], $token->getOriginalText())) {
if (!preg_match($falsePositivePattern['block_pattern'], $token->getOriginalBlock()) || !preg_match($falsePositivePattern['text_pattern'], $token->getOriginalText())) {
$newTokenCollection->addToken($token);
}
}
Expand Down

0 comments on commit bb17368

Please sign in to comment.