Skip to content

Commit 5d35caf

Browse files
author
Dome
committed
[TASK] Fixed issue with Exception code as string
1 parent 7f7415d commit 5d35caf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Exception/BaseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(
3030
protected $code = 200,
3131
Throwable $previous = null
3232
) {
33-
parent::__construct($message, $code, $previous);
33+
parent::__construct($message, (int) $code, $previous);
3434
}
3535

3636
/**

src/Model/CustomResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class CustomResponse implements CustomResponseInterface
2323
private string $status = '';
2424

2525
/**
26-
* @var int
26+
* @var int|string
2727
*/
28-
private int $code = 0;
28+
private int|string $code = 0;
2929

3030
/**
3131
* @var string

0 commit comments

Comments
 (0)