From 925cf21d1bdfb8457162c9834390c04a75906282 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 9 Nov 2023 23:37:24 +0100 Subject: [PATCH] Fix psalm Signed-off-by: Louis Chemineau --- .../AlbumsManagementEventListener.php | 3 +++ lib/Listener/PlaceMetadataProvider.php | 2 +- tests/psalm-baseline.xml | 15 ++++++++++-- tests/stub.phpstub | 24 +++++++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/lib/Listener/AlbumsManagementEventListener.php b/lib/Listener/AlbumsManagementEventListener.php index 25c1f87af..320073baf 100644 --- a/lib/Listener/AlbumsManagementEventListener.php +++ b/lib/Listener/AlbumsManagementEventListener.php @@ -15,6 +15,9 @@ use OCP\User\Events\UserDeletedEvent; use Psr\Log\LoggerInterface; +/** + * @template-implements IEventListener + */ class AlbumsManagementEventListener implements IEventListener { private AlbumMapper $albumMapper; private LoggerInterface $logger; diff --git a/lib/Listener/PlaceMetadataProvider.php b/lib/Listener/PlaceMetadataProvider.php index 5c6da5802..11dbef0ab 100644 --- a/lib/Listener/PlaceMetadataProvider.php +++ b/lib/Listener/PlaceMetadataProvider.php @@ -31,7 +31,7 @@ use OCP\FilesMetadata\Event\MetadataLiveEvent; /** - * @template-implements IEventListener + * @template-implements IEventListener */ class PlaceMetadataProvider implements IEventListener { public function __construct( diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml index 3e9dbb515..d8c4ea7b5 100644 --- a/tests/psalm-baseline.xml +++ b/tests/psalm-baseline.xml @@ -8,7 +8,8 @@ - new SearchQuery(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'systemtag', $tag->getName()), 0, 0, [], $user) + new SearchQuery(new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'systemtag', + $tag->getName()), 0, 0, [], $user) $e @@ -31,4 +32,14 @@ LoadViewer - + + + registerEventListener + + + + + addBackend + + + \ No newline at end of file diff --git a/tests/stub.phpstub b/tests/stub.phpstub index 777f1a2f3..7524366a0 100644 --- a/tests/stub.phpstub +++ b/tests/stub.phpstub @@ -633,3 +633,27 @@ use OCP\EventDispatcher\Event; class LoadSidebar extends Event { } + +namespace OCA\DAV\Events; + +use OCP\EventDispatcher\Event; +use Sabre\DAV\Server; + +/** + * @since 20.0.0 + */ +class SabrePluginAuthInitEvent extends Event { + + /** @var Server */ + private $server; + + /** + * @since 20.0.0 + */ + public function __construct(Server $server); + + /** + * @since 20.0.0 + */ + public function getServer(): Server; +}