Validate rich objects passed to SetupResult

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-01-09 16:25:25 +01:00 committed by John Molakvoæ
parent 25c91e6eea
commit 0b58618712
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF

View file

@ -26,6 +26,8 @@ declare(strict_types=1);
namespace OCP\SetupCheck;
use OCP\RichObjectStrings\IValidator;
/**
* @brief This class is used for storing the result of a setup check
*
@ -54,6 +56,9 @@ class SetupResult implements \JsonSerializable {
private ?array $descriptionParameters = null,
private ?string $linkToDoc = null,
) {
if ($description !== null && $descriptionParameters !== null) {
\OCP\Server::get(IValidator::class)->validate($description, $descriptionParameters);
}
}
/**