diff --git a/CHANGELOG.md b/CHANGELOG.md index 72a6cb3b..e3aa7db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ Please also have a look at our ### Fixed +- Use typesafe versions of PHP functions (#1368) + ### Documentation ## 9.0.0: New features, deprecation removals and bug fixes diff --git a/src/CSSList/CSSList.php b/src/CSSList/CSSList.php index ee09b79e..e09a03a9 100644 --- a/src/CSSList/CSSList.php +++ b/src/CSSList/CSSList.php @@ -25,6 +25,8 @@ use Sabberworm\CSS\Value\URL; use Sabberworm\CSS\Value\Value; +use function Safe\preg_match; + /** * This is the most generic container available. It can contain `DeclarationBlock`s (rule sets with a selector), * `RuleSet`s as well as other `CSSList` objects. @@ -242,7 +244,7 @@ private static function identifierIs(string $identifier, string $match): bool return true; } - return \preg_match("/^(-\\w+-)?$match$/i", $identifier) === 1; + return preg_match("/^(-\\w+-)?$match$/i", $identifier) === 1; } /**