Constructs a result object.
bool $success: Whether or not the check was successful.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $reason: The reason in case of an unsuccessful check.
protected function __construct($success, TranslatableMarkup $reason = NULL) {
$this->success = $success;
$this->message = $reason;
}