Skip to content

Commit

Permalink
Fix psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Nov 9, 2023
1 parent 084d748 commit 52d0983
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
8 changes: 4 additions & 4 deletions lib/AppInfo/Application.php
Expand Up @@ -28,12 +28,12 @@
use OCA\DAV\Connector\Sabre\Principal;
use OCA\DAV\Events\SabrePluginAuthInitEvent;
use OCA\Photos\Listener\AlbumsManagementEventListener;
use OCA\Photos\Listener\ExifMetadataProvider;
use OCA\Photos\Listener\OriginalDateTimeMetadataProvider;
use OCA\Photos\Listener\PlaceMetadataProvider;
use OCA\Photos\Listener\SabrePluginAuthInitListener;
use OCA\Photos\Listener\SizeMetadataProvider;
use OCA\Photos\Listener\TagListener;
use OCA\Photos\MetadataProvider\ExifMetadataProvider;
use OCA\Photos\MetadataProvider\OriginalDateTimeMetadataProvider;
use OCA\Photos\MetadataProvider\PlaceMetadataProvider;
use OCA\Photos\MetadataProvider\SizeMetadataProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
Expand Down
3 changes: 3 additions & 0 deletions lib/Listener/AlbumsManagementEventListener.php
Expand Up @@ -15,6 +15,9 @@
use OCP\User\Events\UserDeletedEvent;
use Psr\Log\LoggerInterface;

/**
* @template-implements IEventListener<NodeDeletedEvent|NodeDeletedEvent|UserRemovedEvent|GroupDeletedEvent|UserDeletedEvent|ShareDeletedEvent>
*/
class AlbumsManagementEventListener implements IEventListener {
private AlbumMapper $albumMapper;
private LoggerInterface $logger;
Expand Down
Expand Up @@ -20,7 +20,7 @@
*
*/

namespace OCA\Photos\MetadataProvider;
namespace OCA\Photos\Listener;

use OCA\Photos\AppInfo\Application;
use OCP\EventDispatcher\Event;
Expand All @@ -33,7 +33,7 @@
* Extract EXIF, IFD0, and GPS data from a picture file.
* EXIF data reference: https://web.archive.org/web/20220428165430/exif.org/Exif2-2.PDF
*
* @template-implements IEventListener
* @template-implements IEventListener<MetadataLiveEvent>
*/
class ExifMetadataProvider implements IEventListener {
public function __construct(
Expand Down
Expand Up @@ -20,7 +20,7 @@
*
*/

namespace OCA\Photos\MetadataProvider;
namespace OCA\Photos\Listener;

use DateTime;
use OCA\Photos\AppInfo\Application;
Expand All @@ -30,7 +30,7 @@
use OCP\FilesMetadata\Event\MetadataLiveEvent;

/**
* @template-implements IEventListener
* @template-implements IEventListener<MetadataLiveEvent>
*/
class OriginalDateTimeMetadataProvider implements IEventListener {
public function __construct() {
Expand Down
Expand Up @@ -20,7 +20,7 @@
*/


namespace OCA\Photos\MetadataProvider;
namespace OCA\Photos\Listener;

use OCA\Photos\AppInfo\Application;
use OCA\Photos\Service\MediaPlaceManager;
Expand All @@ -31,7 +31,7 @@
use OCP\FilesMetadata\Event\MetadataLiveEvent;

/**
* @template-implements IEventListener
* @template-implements IEventListener<MetadataLiveEvent>
*/
class PlaceMetadataProvider implements IEventListener {
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions lib/Listener/SabrePluginAuthInitListener.php
Expand Up @@ -30,6 +30,9 @@
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;

/**
* @template-implements IEventListener<SabrePluginAuthInitEvent>
*/
class SabrePluginAuthInitListener implements IEventListener {
private PublicAlbumAuthBackend $publicAlbumAuthBackend;

Expand Down
Expand Up @@ -20,7 +20,7 @@
*
*/

namespace OCA\Photos\MetadataProvider;
namespace OCA\Photos\Listener;

use OCA\Photos\AppInfo\Application;
use OCP\EventDispatcher\Event;
Expand All @@ -30,7 +30,7 @@
use Psr\Log\LoggerInterface;

/**
* @template-implements IEventListener
* @template-implements IEventListener<MetadataLiveEvent>
*/
class SizeMetadataProvider implements IEventListener {
public function __construct(
Expand Down
6 changes: 5 additions & 1 deletion lib/Listener/TagListener.php
Expand Up @@ -3,13 +3,17 @@
namespace OCA\Photos\Listener;

use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\IRootFolder;
use OCP\ICacheFactory;
use OCP\SystemTag\MapperEvent;

class TagListener implements \OCP\EventDispatcher\IEventListener {
/**
* @template-implements IEventListener<MapperEvent>
*/
class TagListener implements IEventListener {
private \OCP\ICache $tagCountsCache;
private IRootFolder $rootFolder;
private IUserMountCache $userMountCache;
Expand Down

0 comments on commit 52d0983

Please sign in to comment.