From fb9bdd49839e5b918c07c9d400703a1948eeef87 Mon Sep 17 00:00:00 2001 From: UserFrosting Date: Tue, 10 Dec 2024 02:22:50 +0000 Subject: [PATCH] Fix style --- app/src/Authorize/AccessConditionEvaluator.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/Authorize/AccessConditionEvaluator.php b/app/src/Authorize/AccessConditionEvaluator.php index 43ccb9b..afbc6a4 100644 --- a/app/src/Authorize/AccessConditionEvaluator.php +++ b/app/src/Authorize/AccessConditionEvaluator.php @@ -228,14 +228,16 @@ private function resolveParamPath($path) if (is_array($value) && isset($value[$token])) { $value = $value[$token]; continue; + } + // @phpstan-ignore-next-line Allow variable property for this use - } elseif (is_object($value) && isset($value->$token)) { + if (is_object($value) && isset($value->$token)) { // @phpstan-ignore-next-line Allow variable property for this use $value = $value->$token; continue; - } else { - throw new AuthorizationException("Cannot resolve the path \"$path\". Error at token \"$token\"."); } + + throw new AuthorizationException("Cannot resolve the path \"$path\". Error at token \"$token\"."); } return $value;