Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
69.23% |
9 / 13 |
|
66.67% |
6 / 9 |
CRAP | |
0.00% |
0 / 1 |
| ClassMetadataSearchRequest | |
69.23% |
9 / 13 |
|
66.67% |
6 / 9 |
11.36 | |
0.00% |
0 / 1 |
| getIgnoredWidgets | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| ignoreWidgets | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getStructure | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setStructure | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| hasClassUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getClassUri | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setClassUri | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getMaxListSize | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setMaxListSize | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2020-2022 (original work) Open Assessment Technologies SA; |
| 19 | */ |
| 20 | |
| 21 | declare(strict_types=1); |
| 22 | |
| 23 | namespace oat\tao\model\Lists\Business\Domain; |
| 24 | |
| 25 | class ClassMetadataSearchRequest |
| 26 | { |
| 27 | public const DEFAULT_MAX_LIST_SIZE = 5; |
| 28 | |
| 29 | /** @var string */ |
| 30 | private $classUri; |
| 31 | |
| 32 | /** @var int */ |
| 33 | private $maxListSize = self::DEFAULT_MAX_LIST_SIZE; |
| 34 | |
| 35 | /** @var string */ |
| 36 | private $structure; |
| 37 | |
| 38 | /** @var array */ |
| 39 | private $ignoredWidgets = []; |
| 40 | |
| 41 | public function getIgnoredWidgets(): array |
| 42 | { |
| 43 | return $this->ignoredWidgets; |
| 44 | } |
| 45 | |
| 46 | public function ignoreWidgets(array $ignoredWidgets): self |
| 47 | { |
| 48 | $this->ignoredWidgets = $ignoredWidgets; |
| 49 | |
| 50 | return $this; |
| 51 | } |
| 52 | |
| 53 | public function getStructure(): ?string |
| 54 | { |
| 55 | return $this->structure; |
| 56 | } |
| 57 | |
| 58 | public function setStructure(string $structure): self |
| 59 | { |
| 60 | $this->structure = $structure; |
| 61 | |
| 62 | return $this; |
| 63 | } |
| 64 | |
| 65 | public function hasClassUri(): bool |
| 66 | { |
| 67 | return null !== $this->classUri; |
| 68 | } |
| 69 | |
| 70 | public function getClassUri(): string |
| 71 | { |
| 72 | return $this->classUri; |
| 73 | } |
| 74 | |
| 75 | public function setClassUri(string $classUri): self |
| 76 | { |
| 77 | $this->classUri = $classUri; |
| 78 | |
| 79 | return $this; |
| 80 | } |
| 81 | |
| 82 | public function getMaxListSize(): int |
| 83 | { |
| 84 | return $this->maxListSize; |
| 85 | } |
| 86 | |
| 87 | public function setMaxListSize(int $maxListSize): ClassMetadataSearchRequest |
| 88 | { |
| 89 | $this->maxListSize = $maxListSize; |
| 90 | |
| 91 | return $this; |
| 92 | } |
| 93 | } |