diff options
Diffstat (limited to 'lib/public/Support/Subscription')
5 files changed, 33 insertions, 82 deletions
diff --git a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php index 726978c26a6..95179f0501a 100644 --- a/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php +++ b/lib/public/Support/Subscription/Exception/AlreadyRegisteredException.php @@ -3,25 +3,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> - * - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Support\Subscription\Exception; diff --git a/lib/public/Support/Subscription/IAssertion.php b/lib/public/Support/Subscription/IAssertion.php new file mode 100644 index 00000000000..973800ba854 --- /dev/null +++ b/lib/public/Support/Subscription/IAssertion.php @@ -0,0 +1,25 @@ +<?php + +declare(strict_types=1); +/** + * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Support\Subscription; + +use OCP\HintException; + +/** + * @since 26.0.0 + */ +interface IAssertion { + /** + * This method throws a localized exception when user limits are exceeded, + * if applicable. Notifications are also created in that case. It is a + * shorthand for a check against IRegistry::delegateIsHardUserLimitReached(). + * + * @throws HintException + * @since 26.0.0 + */ + public function createUserIsLegit(): void; +} diff --git a/lib/public/Support/Subscription/IRegistry.php b/lib/public/Support/Subscription/IRegistry.php index 4a34cc91c5e..5452430ceed 100644 --- a/lib/public/Support/Subscription/IRegistry.php +++ b/lib/public/Support/Subscription/IRegistry.php @@ -3,27 +3,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> - * - * @author Julius Härtl <jus@bitgrid.net> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Support\Subscription; @@ -34,7 +15,6 @@ use OCP\Support\Subscription\Exception\AlreadyRegisteredException; * @since 17.0.0 */ interface IRegistry { - /** * Register a subscription instance. In case it is called multiple times an * exception is thrown diff --git a/lib/public/Support/Subscription/ISubscription.php b/lib/public/Support/Subscription/ISubscription.php index c602156b47c..a785875d241 100644 --- a/lib/public/Support/Subscription/ISubscription.php +++ b/lib/public/Support/Subscription/ISubscription.php @@ -3,26 +3,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> - * - * @author Julius Härtl <jus@bitgrid.net> - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Support\Subscription; @@ -30,7 +12,6 @@ namespace OCP\Support\Subscription; * @since 17.0.0 */ interface ISubscription { - /** * Indicates if a valid subscription is available * diff --git a/lib/public/Support/Subscription/ISupportedApps.php b/lib/public/Support/Subscription/ISupportedApps.php index 121c2325a6e..d18870e827b 100644 --- a/lib/public/Support/Subscription/ISupportedApps.php +++ b/lib/public/Support/Subscription/ISupportedApps.php @@ -3,25 +3,8 @@ declare(strict_types=1); /** - * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de> - * - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Support\Subscription; @@ -29,7 +12,6 @@ namespace OCP\Support\Subscription; * @since 17.0.0 */ interface ISupportedApps extends ISubscription { - /** * Fetches the list of app IDs that are supported by the subscription * |