service = $service; if (!$user->isAdmin()) { throw new ForbiddenSilent(); } } public function postActionCheckSyntax(Request $request): stdClass { $expression = $request->getParsedBody()->expression ?? null; if (!$expression || !is_string($expression)) { throw new BadRequest("No or non-string expression."); } return $this->service ->checkSyntax($expression) ->toStdClass(); } }