From 07ae6ee1a16c4b4c605591b2e0db74eb20a5caa8 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 8 Dec 2024 14:31:05 +0100 Subject: [PATCH] model/Configuration/Category: Fix regex for PHPStan PHPStan 1.12 gained a support for regex analysis but there are still some bugs. See: https://github.com/phpstan/phpstan/issues/12173 Fortunately, the capture group is extraneous. --- app/Model/Configuration/Category.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Model/Configuration/Category.php b/app/Model/Configuration/Category.php index b3aa3f7..e4e1865 100644 --- a/app/Model/Configuration/Category.php +++ b/app/Model/Configuration/Category.php @@ -58,7 +58,7 @@ public static function from( } public const CONSTRAINT_REGEX = '(^\s*(?Pall|some)\((?Page|gender)(?P[<>]?=?)(?P.+)\)$\s*)'; - public const AGGREGATE_CONSTRAINT_REGEX = '(^\s*(?P(sum|min|max))\((?Page)\)(?P[<>]?=?)(?P[0-9]+)$\s*)'; + public const AGGREGATE_CONSTRAINT_REGEX = '(^\s*(?Psum|min|max)\((?Page)\)(?P[<>]?=?)(?P[0-9]+)$\s*)'; public const OP_LOOKUP = [ '<' => Constraints\ComparisonOperator::LessThan,