Skip to content

Commit e532001

Browse files
committed
fix
1 parent e34bef4 commit e532001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Analyzer/UnusedDefinitionsAnalyzer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public function analyse(array $contextFiles, array $featureFiles): array
6767
private function isRegexDefinitionUsed(string $regexBehatDefinition, array $featureInstructions): bool
6868
{
6969
foreach ($featureInstructions as $featureInstruction) {
70-
if (preg_match($featureInstruction, $regexBehatDefinition)) {
70+
# @ on purpose = the feature instruction might not be a regex pattern
71+
if (@preg_match($featureInstruction, $regexBehatDefinition)) {
7172
// it is used!
7273
return true;
7374
}

0 commit comments

Comments
 (0)