diff --git a/lib/public/Federation/Exceptions/BadRequestException.php b/lib/public/Federation/Exceptions/BadRequestException.php index 8054c0e89f000..bc8b5c7b72473 100644 --- a/lib/public/Federation/Exceptions/BadRequestException.php +++ b/lib/public/Federation/Exceptions/BadRequestException.php @@ -32,6 +32,9 @@ * @since 14.0.0 */ class BadRequestException extends HintException { + /** + * @var string[] $parameterList + */ private $parameterList; /** @@ -55,7 +58,7 @@ public function __construct(array $missingParameters) { * * @since 14.0.0 * - * @return array + * @return array{message: string, validationErrors: array{message: string, name: string}[]} */ public function getReturnMessage() { $result = [ @@ -65,7 +68,7 @@ public function getReturnMessage() { ]; foreach ($this->parameterList as $missingParameter) { - $result['validationErrors'] = [ + $result['validationErrors'][] = [ 'name' => $missingParameter, 'message' => 'NOT_FOUND' ];