Align matcher tests with substring matching
linter / quality (pull_request) Successful in 1m18s
tests / ci (8.4) (pull_request) Successful in 1m33s

This commit is contained in:
2026-06-03 09:25:11 +00:00
parent 5af4c6a9df
commit dbfbc26866
3 changed files with 14 additions and 12 deletions
@@ -6,9 +6,6 @@ class TicketKeyReferenceMatcher
{
public function matches(string $ticketKey, string $referenceName): bool
{
return preg_match(
'/^'.preg_quote($ticketKey, '/').'(?=$|[-_\/])/i',
$referenceName,
) === 1;
return str_contains(mb_strtolower($referenceName), mb_strtolower($ticketKey));
}
}