1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

bugfix: remove preg_quote as that will also quote wildcard

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2021-11-15 18:06:24 +01:00
parent a050ff2878
commit 743f570f66
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -2420,7 +2420,7 @@ class SimpleAssertionReconciler extends \Psalm\Type\Reconciler
return $existing_type;
}
$constant_regex_pattern = sprintf('#^%s$#', preg_quote(str_replace('*', '.*', $constant_pattern), '#'));
$constant_regex_pattern = sprintf('#^%s$#', str_replace('*', '.*', $constant_pattern));
$class_like_storage = $codebase->classlike_storage_provider->get($class_name);
$matched_class_constant_types = [];