chore: psalm analyze

pull/322/head
Sebastien Marinier 2025-05-15 22:19:08 +02:00
parent e68a28d7d2
commit a9ef4fe30c
3 changed files with 8 additions and 7 deletions

View File

@ -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<int, array<string, mixed>>
* @template-extends Response<Http::STATUS_*, array<string, mixed>>
*
* (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() {

View File

@ -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<int, array<string, mixed>>
* @template-extends Response<Http::STATUS_*, array<string, mixed>>
*
* (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() {

View File

@ -11,6 +11,7 @@
>
<projectFiles>
<directory name="lib" />
<directory name="vendor/nextcloud/ocp" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
@ -36,4 +37,4 @@
</errorLevel>
</UndefinedDocblockClass>
</issueHandlers>
</psalm>
</psalm>