From 8110ad66103d95ef9b5d508ba744c4341cf72895 Mon Sep 17 00:00:00 2001 From: Stephan Bauer Date: Sun, 21 May 2023 02:47:04 +0200 Subject: [PATCH] Remove PHP version check for pattern --- Classes/ResourceMatcher.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Classes/ResourceMatcher.php b/Classes/ResourceMatcher.php index ef59e48..c9ff274 100644 --- a/Classes/ResourceMatcher.php +++ b/Classes/ResourceMatcher.php @@ -28,7 +28,7 @@ public function match(string $input): array } $matches = []; preg_match_all( - $this->getPatternForCurrentPhpVersion(), + $this->getPattern(), $input, $matches ); @@ -47,18 +47,11 @@ public function match(string $input): array /** * @return string */ - protected function getPatternForCurrentPhpVersion(): string + protected function getPattern(): string { - if (version_compare(phpversion(), '7.3', '>')) { - return '/]*>' - . '/ui'; - } else { - return '/]*>' - . '/ui'; - } + return '/]*>' + . '/ui'; } }