DummySubscription.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace Test\Support\Subscription;
  8. class DummySubscription implements \OCP\Support\Subscription\ISubscription {
  9. /** @var bool */
  10. private $hasValidSubscription;
  11. /** @var bool */
  12. private $hasExtendedSupport;
  13. /** @var bool */
  14. private $isHardUserLimitReached;
  15. /**
  16. * DummySubscription constructor.
  17. *
  18. * @param bool $hasValidSubscription
  19. * @param bool $hasExtendedSupport
  20. */
  21. public function __construct(bool $hasValidSubscription, bool $hasExtendedSupport, bool $isHardUserLimitReached) {
  22. $this->hasValidSubscription = $hasValidSubscription;
  23. $this->hasExtendedSupport = $hasExtendedSupport;
  24. $this->isHardUserLimitReached = $isHardUserLimitReached;
  25. }
  26. /**
  27. * @inheritDoc
  28. */
  29. public function hasValidSubscription(): bool {
  30. return $this->hasValidSubscription;
  31. }
  32. /**
  33. * @inheritDoc
  34. */
  35. public function hasExtendedSupport(): bool {
  36. return $this->hasExtendedSupport;
  37. }
  38. public function isHardUserLimitReached(): bool {
  39. return $this->isHardUserLimitReached;
  40. }
  41. }