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;