Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
CRAP
100.00% covered (success)
100.00%
1 / 1
TenantQuotas
100.00% covered (success)
100.00%
6 / 6
100.00% covered (success)
100.00%
6 / 6
6
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMaxFaqs
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMaxAttachmentSize
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMaxUsers
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMaxApiRequests
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getMaxCategories
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * Tenant quotas
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License,
7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
8 * obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * @package   phpMyFAQ
11 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
12 * @copyright 2026 phpMyFAQ Team
13 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
14 * @link      https://www.phpmyfaq.de
15 * @since     2026-02-08
16 */
17
18declare(strict_types=1);
19
20namespace phpMyFAQ\Tenant;
21
22readonly class TenantQuotas
23{
24    public function __construct(
25        private ?int $maxFaqs = null,
26        private ?int $maxAttachmentSize = null,
27        private ?int $maxUsers = null,
28        private ?int $maxApiRequests = null,
29        private ?int $maxCategories = null,
30    ) {
31    }
32
33    public function getMaxFaqs(): ?int
34    {
35        return $this->maxFaqs;
36    }
37
38    public function getMaxAttachmentSize(): ?int
39    {
40        return $this->maxAttachmentSize;
41    }
42
43    public function getMaxUsers(): ?int
44    {
45        return $this->maxUsers;
46    }
47
48    public function getMaxApiRequests(): ?int
49    {
50        return $this->maxApiRequests;
51    }
52
53    public function getMaxCategories(): ?int
54    {
55        return $this->maxCategories;
56    }
57}