diff options
Diffstat (limited to 'lib/public/Notification')
-rw-r--r-- | lib/public/Notification/AlreadyProcessedException.php | 6 | ||||
-rw-r--r-- | lib/public/Notification/IAction.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/IApp.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/IDeferrableApp.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/IDismissableNotifier.php | 5 | ||||
-rw-r--r-- | lib/public/Notification/IManager.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/INotification.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/INotifier.php | 8 | ||||
-rw-r--r-- | lib/public/Notification/IncompleteNotificationException.php | 5 | ||||
-rw-r--r-- | lib/public/Notification/IncompleteParsedNotificationException.php | 5 | ||||
-rw-r--r-- | lib/public/Notification/InvalidValueException.php | 6 | ||||
-rw-r--r-- | lib/public/Notification/UnknownNotificationException.php | 6 |
12 files changed, 36 insertions, 45 deletions
diff --git a/lib/public/Notification/AlreadyProcessedException.php b/lib/public/Notification/AlreadyProcessedException.php index 0e7458185ff..162abd81864 100644 --- a/lib/public/Notification/AlreadyProcessedException.php +++ b/lib/public/Notification/AlreadyProcessedException.php @@ -8,9 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * @since 17.0.0 - */ +use OCP\AppFramework\Attribute\Throwable; + +#[Throwable(since: '17.0.0')] class AlreadyProcessedException extends \RuntimeException { /** * @since 17.0.0 diff --git a/lib/public/Notification/IAction.php b/lib/public/Notification/IAction.php index f1cffa49075..722dac72826 100644 --- a/lib/public/Notification/IAction.php +++ b/lib/public/Notification/IAction.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface IAction - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Consumable; + +#[Consumable(since: '9.0.0')] interface IAction { /** * @since 17.0.0 diff --git a/lib/public/Notification/IApp.php b/lib/public/Notification/IApp.php index 1574ae8a091..37c352d44cd 100644 --- a/lib/public/Notification/IApp.php +++ b/lib/public/Notification/IApp.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface IApp - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Implementable; + +#[Implementable(since: '9.0.0')] interface IApp { /** * @param INotification $notification diff --git a/lib/public/Notification/IDeferrableApp.php b/lib/public/Notification/IDeferrableApp.php index 1820ed7ecd6..00c7d691b10 100644 --- a/lib/public/Notification/IDeferrableApp.php +++ b/lib/public/Notification/IDeferrableApp.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface IDeferrableApp - * - * @since 20.0.0 - */ +use OCP\AppFramework\Attribute\Implementable; + +#[Implementable(since: '20.0.0')] interface IDeferrableApp extends IApp { /** * Start deferring notifications until `flush()` is called diff --git a/lib/public/Notification/IDismissableNotifier.php b/lib/public/Notification/IDismissableNotifier.php index 39f9658a8c4..d2f649b45a1 100644 --- a/lib/public/Notification/IDismissableNotifier.php +++ b/lib/public/Notification/IDismissableNotifier.php @@ -8,15 +8,16 @@ declare(strict_types=1); */ namespace OCP\Notification; +use OCP\AppFramework\Attribute\Implementable; + /** * Interface INotifier classes should implement if they want to process notifications * that are dismissed by the user. * * This can be useful if dismissing the notification will leave it in an incomplete * state. The handler can choose to for example do some default action. - * - * @since 18.0.0 */ +#[Implementable(since: '18.0.0')] interface IDismissableNotifier extends INotifier { /** * @param INotification $notification diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php index 96427ddff92..23664af17cd 100644 --- a/lib/public/Notification/IManager.php +++ b/lib/public/Notification/IManager.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface IManager - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Consumable; + +#[Consumable(since: '9.0.0')] interface IManager extends IApp, INotifier { /** * @param string $appClass The service must implement IApp, otherwise a diff --git a/lib/public/Notification/INotification.php b/lib/public/Notification/INotification.php index 7a1ee960b28..a740678376f 100644 --- a/lib/public/Notification/INotification.php +++ b/lib/public/Notification/INotification.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface INotification - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Consumable; + +#[Consumable(since: '9.0.0')] interface INotification { /** * @param string $app diff --git a/lib/public/Notification/INotifier.php b/lib/public/Notification/INotifier.php index 39a962b0392..bdc7207216f 100644 --- a/lib/public/Notification/INotifier.php +++ b/lib/public/Notification/INotifier.php @@ -8,11 +8,9 @@ declare(strict_types=1); */ namespace OCP\Notification; -/** - * Interface INotifier - * - * @since 9.0.0 - */ +use OCP\AppFramework\Attribute\Implementable; + +#[Implementable(since: '9.0.0')] interface INotifier { /** * Identifier of the notifier, only use [a-z0-9_] diff --git a/lib/public/Notification/IncompleteNotificationException.php b/lib/public/Notification/IncompleteNotificationException.php index f5ae5254509..49d388ebee6 100644 --- a/lib/public/Notification/IncompleteNotificationException.php +++ b/lib/public/Notification/IncompleteNotificationException.php @@ -9,6 +9,8 @@ declare(strict_types=1); namespace OCP\Notification; +use OCP\AppFramework\Attribute\Catchable; + /** * Thrown when {@see \OCP\Notification\IManager::notify()} is called with a notification * that does not have all required fields set: @@ -19,8 +21,7 @@ namespace OCP\Notification; * - objectType * - objectId * - subject - * - * @since 30.0.0 */ +#[Catchable(since: '30.0.0')] class IncompleteNotificationException extends \InvalidArgumentException { } diff --git a/lib/public/Notification/IncompleteParsedNotificationException.php b/lib/public/Notification/IncompleteParsedNotificationException.php index b69967e2781..c31ab129fd4 100644 --- a/lib/public/Notification/IncompleteParsedNotificationException.php +++ b/lib/public/Notification/IncompleteParsedNotificationException.php @@ -9,6 +9,8 @@ declare(strict_types=1); namespace OCP\Notification; +use OCP\AppFramework\Attribute\Catchable; + /** * Thrown when {@see \OCP\Notification\IManager::prepare()} is called with a notification * that does not have all required fields set at the end of the manager or after a INotifier @@ -22,8 +24,7 @@ namespace OCP\Notification; * - objectType * - objectId * - parsedSubject - * - * @since 30.0.0 */ +#[Catchable(since: '30.0.0')] class IncompleteParsedNotificationException extends \InvalidArgumentException { } diff --git a/lib/public/Notification/InvalidValueException.php b/lib/public/Notification/InvalidValueException.php index 05cf1a253b2..ec52381ee3c 100644 --- a/lib/public/Notification/InvalidValueException.php +++ b/lib/public/Notification/InvalidValueException.php @@ -9,9 +9,9 @@ declare(strict_types=1); namespace OCP\Notification; -/** - * @since 30.0.0 - */ +use OCP\AppFramework\Attribute\Catchable; + +#[Catchable(since: '30.0.0')] class InvalidValueException extends \InvalidArgumentException { /** * @since 30.0.0 diff --git a/lib/public/Notification/UnknownNotificationException.php b/lib/public/Notification/UnknownNotificationException.php index 7e630c59dd0..976d9179592 100644 --- a/lib/public/Notification/UnknownNotificationException.php +++ b/lib/public/Notification/UnknownNotificationException.php @@ -9,8 +9,8 @@ declare(strict_types=1); namespace OCP\Notification; -/** - * @since 30.0.0 - */ +use OCP\AppFramework\Attribute\Throwable; + +#[Throwable(since: '30.0.0')] class UnknownNotificationException extends \InvalidArgumentException { } |