diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-06-10 18:12:41 +0200 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-06-11 14:10:29 +0200 |
commit | f09c7815db6511ea24b0b551316c8ba07732f6f1 (patch) | |
tree | f7b55de7c933e79f975ec513ca641b6ac2e3afda | |
parent | 19bc3ed1e3f52a9d9cd0a540e7e754a2fa16eb54 (diff) | |
download | nextcloud-server-f09c7815db6511ea24b0b551316c8ba07732f6f1.tar.gz nextcloud-server-f09c7815db6511ea24b0b551316c8ba07732f6f1.zip |
fix(webhooks): Fix a few of psalm errors
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 files changed, 8 insertions, 2 deletions
diff --git a/apps/webhook_listeners/lib/Controller/WebhooksController.php b/apps/webhook_listeners/lib/Controller/WebhooksController.php index 88a6e473d85..c09da53d5f2 100644 --- a/apps/webhook_listeners/lib/Controller/WebhooksController.php +++ b/apps/webhook_listeners/lib/Controller/WebhooksController.php @@ -12,6 +12,7 @@ namespace OCA\WebhookListeners\Controller; use OCA\WebhookListeners\Db\AuthMethod; use OCA\WebhookListeners\Db\WebhookListenerMapper; use OCA\WebhookListeners\ResponseDefinitions; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\ApiRoute; use OCP\AppFramework\Http\Attribute\AuthorizedAdminSetting; use OCP\AppFramework\Http\Attribute\OpenAPI; diff --git a/apps/webhook_listeners/lib/Db/WebhookListener.php b/apps/webhook_listeners/lib/Db/WebhookListener.php index 0d08082666f..222e6b981bd 100644 --- a/apps/webhook_listeners/lib/Db/WebhookListener.php +++ b/apps/webhook_listeners/lib/Db/WebhookListener.php @@ -15,7 +15,12 @@ use OCP\Security\ICrypto; /** * @method void setUserId(string $userId) * @method string getUserId() + * @method string getHttpMethod() + * @method string getUri() * @method ?array getHeaders() + * @method ?string getAuthData() + * @method void setAuthData(?string $data) + * @method ?string getAuthMethod() */ class WebhookListener extends Entity implements \JsonSerializable { /** @var ?string id of the app_api application who added the webhook listener */ @@ -66,7 +71,7 @@ class WebhookListener extends Entity implements \JsonSerializable { } public function getAuthMethodEnum(): AuthMethod { - return AuthMethod::from(parent::getAuthMethod()); + return AuthMethod::from($this->getAuthMethod()); } public function getAuthDataClear(): array { diff --git a/apps/webhook_listeners/lib/Listener/WebhooksEventListener.php b/apps/webhook_listeners/lib/Listener/WebhooksEventListener.php index 72d48d790e1..5ea4d531c9f 100644 --- a/apps/webhook_listeners/lib/Listener/WebhooksEventListener.php +++ b/apps/webhook_listeners/lib/Listener/WebhooksEventListener.php @@ -22,7 +22,7 @@ use Psr\Log\LoggerInterface; /** * The class to handle the share events - * @template-implements IEventListener<IWebhookCompatibleEvent> + * @template-implements IEventListener<IWebhookCompatibleEvent&Event> */ class WebhooksEventListener implements IEventListener { public function __construct( |