Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] Document throwing behavior of SetupResult upon invalid rich object #43196

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/public/SetupCheck/SetupResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SetupResult implements \JsonSerializable {
/**
* @brief Private constructor, use success()/info()/warning()/error() instead
* @param self::SUCCESS|self::INFO|self::WARNING|self::ERROR $severity
* @throws \OCP\RichObjectStrings\InvalidObjectExeption
* @since 28.0.0
* @since 28.0.2 Optional parameter ?array $descriptionParameters
* @since 28.0.2 throws \OCP\RichObjectStrings\InvalidObjectExeption
Expand All @@ -66,8 +67,10 @@ private function __construct(
* @brief Create a success result object
* @param ?string $description Translated detailed description to display to the user
* @param ?string $linkToDoc URI of related relevent documentation, be it from Nextcloud or another project
* @throws \OCP\RichObjectStrings\InvalidObjectExeption
* @since 28.0.0
* @since 28.0.2 Optional parameter ?array $descriptionParameters
* @since 28.0.2 throws \OCP\RichObjectStrings\InvalidObjectExeption
*/
public static function success(?string $description = null, ?string $linkToDoc = null, ?array $descriptionParameters = null): self {
return new self(self::SUCCESS, $description, $descriptionParameters, $linkToDoc);
Expand All @@ -77,8 +80,10 @@ public static function success(?string $description = null, ?string $linkToDoc =
* @brief Create an info result object
* @param ?string $description Translated detailed description to display to the user
* @param ?string $linkToDoc URI of related relevent documentation, be it from Nextcloud or another project
* @throws \OCP\RichObjectStrings\InvalidObjectExeption
* @since 28.0.0
* @since 28.0.2 Optional parameter ?array $descriptionParameters
* @since 28.0.2 throws \OCP\RichObjectStrings\InvalidObjectExeption
*/
public static function info(?string $description = null, ?string $linkToDoc = null, ?array $descriptionParameters = null): self {
return new self(self::INFO, $description, $descriptionParameters, $linkToDoc);
Expand All @@ -88,8 +93,10 @@ public static function info(?string $description = null, ?string $linkToDoc = nu
* @brief Create a warning result object
* @param ?string $description Translated detailed description to display to the user
* @param ?string $linkToDoc URI of related relevent documentation, be it from Nextcloud or another project
* @throws \OCP\RichObjectStrings\InvalidObjectExeption
* @since 28.0.0
* @since 28.0.2 Optional parameter ?array $descriptionParameters
* @since 28.0.2 throws \OCP\RichObjectStrings\InvalidObjectExeption
*/
public static function warning(?string $description = null, ?string $linkToDoc = null, ?array $descriptionParameters = null): self {
return new self(self::WARNING, $description, $descriptionParameters, $linkToDoc);
Expand All @@ -99,8 +106,10 @@ public static function warning(?string $description = null, ?string $linkToDoc =
* @brief Create an error result object
* @param ?string $description Translated detailed description to display to the user
* @param ?string $linkToDoc URI of related relevent documentation, be it from Nextcloud or another project
* @throws \OCP\RichObjectStrings\InvalidObjectExeption
* @since 28.0.0
* @since 28.0.2 Optional parameter ?array $descriptionParameters
* @since 28.0.2 throws \OCP\RichObjectStrings\InvalidObjectExeption
*/
public static function error(?string $description = null, ?string $linkToDoc = null, ?array $descriptionParameters = null): self {
return new self(self::ERROR, $description, $descriptionParameters, $linkToDoc);
Expand Down
Loading