From 6387d319390850274d205f1abc802b5d9f439b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 4 Aug 2023 21:48:24 +0200 Subject: [PATCH] chore(psalm): Add assistant event to stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- composer.lock | 8 ++++---- psalm.xml | 2 +- tests/stub.php | 26 +++++++++++++++++++++----- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/composer.lock b/composer.lock index cc337289cec..218ff98cbe2 100644 --- a/composer.lock +++ b/composer.lock @@ -183,12 +183,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "13aca78b1a060e2e2274e660b6954597e13a7035" + "reference": "7840fe73084751b843b69d263b4ba70e59c63750" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/13aca78b1a060e2e2274e660b6954597e13a7035", - "reference": "13aca78b1a060e2e2274e660b6954597e13a7035", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/7840fe73084751b843b69d263b4ba70e59c63750", + "reference": "7840fe73084751b843b69d263b4ba70e59c63750", "shasum": "" }, "require": { @@ -220,7 +220,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2023-07-29T00:34:58+00:00" + "time": "2023-08-04T12:45:05+00:00" }, { "name": "nikic/php-parser", diff --git a/psalm.xml b/psalm.xml index 62b01cf6352..84337f8ace4 100644 --- a/psalm.xml +++ b/psalm.xml @@ -7,7 +7,7 @@ errorBaseline="tests/psalm-baseline.xml" > - + diff --git a/tests/stub.php b/tests/stub.php index 327ea0cb171..39176d3c23d 100644 --- a/tests/stub.php +++ b/tests/stub.php @@ -3,19 +3,23 @@ declare(strict_types=1); namespace OC\Hooks { - class Emitter {} + class Emitter { + } } namespace OC\AppFramework\OCS { - class BaseResponse {} + class BaseResponse { + } } namespace OCA\Files\Event { - class LoadAdditionalScriptsEvent extends \OCP\EventDispatcher\Event {} + class LoadAdditionalScriptsEvent extends \OCP\EventDispatcher\Event { + } } namespace OCA\Viewer\Event { - class LoadViewer extends \OCP\EventDispatcher\Event {} + class LoadViewer extends \OCP\EventDispatcher\Event { + } } namespace OCA\Files_Sharing\Event { @@ -25,7 +29,8 @@ abstract public function getShare(): \OCP\Share\IShare; } namespace OC\User { - class NoUserException extends \Exception {} + class NoUserException extends \Exception { + } } namespace OCA\Files_Sharing { @@ -33,3 +38,14 @@ abstract class SharedStorage implements \OCP\Files\Storage\IStorage { abstract public function getShare(): \OCP\Share\IShare; } } + +namespace OCA\TPAssistant\Event { + + use OCP\TextProcessing\Task; + + abstract class BeforeAssistantNotificationEvent extends \OCP\EventDispatcher\Event { + abstract public function getTask(): Task; + abstract public function setWantsNotification(bool $wantsNotification): void; + abstract public function setNotificationTarget(?string $notificationTarget): void; + } +}