diff --git a/lib/NoPermissionResponse.php b/lib/NoPermissionResponse.php index b334923..60fbc61 100644 --- a/lib/NoPermissionResponse.php +++ b/lib/NoPermissionResponse.php @@ -2,22 +2,22 @@ namespace OCA\BigBlueButton; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\Response; use OCP\Template; /** - * @template-extends Response> + * @template-extends Response> * * (NC < 28) * @psalm-suppress TooManyTemplateParams */ class NoPermissionResponse extends Response { public function __construct() { - parent::__construct(); + parent::__construct(Http::STATUS_FORBIDDEN); $this->setContentSecurityPolicy(new ContentSecurityPolicy()); - $this->setStatus(403); } public function render() { diff --git a/lib/NotFoundResponse.php b/lib/NotFoundResponse.php index 9630175..72cdc1b 100644 --- a/lib/NotFoundResponse.php +++ b/lib/NotFoundResponse.php @@ -2,22 +2,22 @@ namespace OCA\BigBlueButton; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\Response; use OCP\Template; /** - * @template-extends Response> + * @template-extends Response> * * (NC < 28) * @psalm-suppress TooManyTemplateParams */ class NotFoundResponse extends Response { public function __construct() { - parent::__construct(); + parent::__construct(Http::STATUS_NOT_FOUND); $this->setContentSecurityPolicy(new ContentSecurityPolicy()); - $this->setStatus(404); } public function render() { diff --git a/psalm.xml b/psalm.xml index be99b57..341e7b9 100644 --- a/psalm.xml +++ b/psalm.xml @@ -11,6 +11,7 @@ > + @@ -36,4 +37,4 @@ - \ No newline at end of file +