From 951c3074a522f2c816a568e1b5da63ab02c2668a Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Fri, 24 Jan 2025 15:14:42 +0000 Subject: [PATCH] chore: add back null --- .../src/main/java/io/package/exceptions/Exception.kt.twig | 2 +- templates/dotnet/Package/Exception.cs.twig | 4 ++-- .../main/kotlin/io/appwrite/exceptions/Exception.kt.twig | 2 +- templates/php/src/Exception.php.twig | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/android/library/src/main/java/io/package/exceptions/Exception.kt.twig b/templates/android/library/src/main/java/io/package/exceptions/Exception.kt.twig index 59f2702e2..64a147af9 100644 --- a/templates/android/library/src/main/java/io/package/exceptions/Exception.kt.twig +++ b/templates/android/library/src/main/java/io/package/exceptions/Exception.kt.twig @@ -18,5 +18,5 @@ class {{spec.title | caseUcfirst}}Exception( override val message: String? = null, val code: Int? = null, val type: String? = null, - val response: ResponseResult + val response: ResponseResult? ) : Exception(message) \ No newline at end of file diff --git a/templates/dotnet/Package/Exception.cs.twig b/templates/dotnet/Package/Exception.cs.twig index 84380d647..dece1f50a 100644 --- a/templates/dotnet/Package/Exception.cs.twig +++ b/templates/dotnet/Package/Exception.cs.twig @@ -14,13 +14,13 @@ namespace {{spec.title | caseUcfirst}} { public int? Code { get; set; } public string? Type { get; set; } = null; - public object Response { get; set; } + public object? Response { get; set; } = null; public {{spec.title | caseUcfirst}}Exception( string? message = null, int? code = null, string? type = null, - object response) : base(message) + object? response = null) : base(message) { this.Code = code; this.Type = type; diff --git a/templates/kotlin/src/main/kotlin/io/appwrite/exceptions/Exception.kt.twig b/templates/kotlin/src/main/kotlin/io/appwrite/exceptions/Exception.kt.twig index 59f2702e2..64a147af9 100644 --- a/templates/kotlin/src/main/kotlin/io/appwrite/exceptions/Exception.kt.twig +++ b/templates/kotlin/src/main/kotlin/io/appwrite/exceptions/Exception.kt.twig @@ -18,5 +18,5 @@ class {{spec.title | caseUcfirst}}Exception( override val message: String? = null, val code: Int? = null, val type: String? = null, - val response: ResponseResult + val response: ResponseResult? ) : Exception(message) \ No newline at end of file diff --git a/templates/php/src/Exception.php.twig b/templates/php/src/Exception.php.twig index 2421057b5..9228f16d8 100644 --- a/templates/php/src/Exception.php.twig +++ b/templates/php/src/Exception.php.twig @@ -14,7 +14,7 @@ class Response { class {{spec.title | caseUcfirst}}Exception extends Exception { /** - * @var Response|string + * @var Response|string|null */ private $response; @@ -27,7 +27,7 @@ class {{spec.title | caseUcfirst}}Exception extends Exception { * @param ?string $message * @param int $code * @param string $type - * @param Response|string $response + * @param Response|string|null $response */ public function __construct( ?string $message = null, @@ -49,9 +49,9 @@ class {{spec.title | caseUcfirst}}Exception extends Exception { } /** - * @return Response|string + * @return Response|string|null */ - final public function getResponse(): Response|string + final public function getResponse(): Response|string|null { return $this->response; }