| Total Complexity | 7 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class PrivateMessageFolderItem |
||
| 11 | { |
||
| 12 | 12 | public function __construct(private PrivateMessageRepositoryInterface $privateMessageRepository, private PrivateMessageFolderInterface $privateMessageFolder) {} |
|
| 13 | |||
| 14 | 12 | /** |
|
| 15 | * Returns the id of the folder |
||
| 16 | */ |
||
| 17 | public function getId(): int |
||
| 18 | { |
||
| 19 | 7 | return $this->privateMessageFolder->getId(); |
|
| 20 | } |
||
| 21 | 7 | ||
| 22 | public function isMain(): bool |
||
| 23 | { |
||
| 24 | return $this->privateMessageFolder->getSpecial() === PrivateMessageFolderTypeEnum::SPECIAL_MAIN; |
||
| 25 | } |
||
| 26 | |||
| 27 | 7 | /** |
|
| 28 | * Returns the name of the folder |
||
| 29 | 7 | */ |
|
| 30 | public function getDescription(): string |
||
| 33 | } |
||
| 34 | |||
| 35 | 4 | /** |
|
| 36 | * Returns the amount if pms |
||
| 37 | 4 | */ |
|
| 38 | 4 | public function getCategoryCount(): int |
|
| 39 | 4 | { |
|
| 40 | return $this->privateMessageRepository->getAmountByFolder( |
||
| 41 | $this->privateMessageFolder |
||
| 42 | ); |
||
| 43 | } |
||
| 44 | |||
| 45 | 7 | /** |
|
| 46 | * Returns the amount of new pms |
||
| 47 | 7 | */ |
|
| 48 | 7 | public function getCategoryCountNew(): int |
|
| 52 | ); |
||
| 53 | } |
||
| 54 | |||
| 55 | 1 | /** |
|
| 56 | * Returns `true` if the folder can be moved |
||
| 57 | 1 | */ |
|
| 58 | public function isDropable(): bool |
||
| 63 |