Skip to content

Commit

Permalink
chore: add back null
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiragAgg5k committed Jan 24, 2025
1 parent b87ab47 commit 951c307
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions templates/dotnet/Package/Exception.cs.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
8 changes: 4 additions & 4 deletions templates/php/src/Exception.php.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Response {
class {{spec.title | caseUcfirst}}Exception extends Exception {
/**
* @var Response|string
* @var Response|string|null
*/
private $response;
Expand All @@ -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,
Expand All @@ -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;
}
Expand Down

0 comments on commit 951c307

Please sign in to comment.