Skip to content

Commit

Permalink
* change type to scalar|null
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondDantes committed Oct 29, 2024
1 parent e38600c commit 93b1dcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/BaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ public static function serializeToArray(\Throwable|BaseExceptionInterface|null $
* Key of an array: message, code, previous
* overridden the parameters $code and $previous,
* and other data is saved to the property `$data`.
* 3. $exception - BaseExceptionI
* 3. $exception - BaseExceptionInterface
* In this case, exception acts as container,
* but it does not inherit data from the $exception.
* 4. $exception - \Throwable -
* In this case, exception acts as container,
* and inherits data from the $exception
*
* @param BaseExceptionInterface|\Throwable|array<string, scalar|array<string, scalar>|scalar[]>|string $exception Exception data
* @param \Throwable|array<string, scalar|null|array<string, scalar>|scalar[]>|string $exception Exception data
* @param int $code Code
* @param \Throwable|null $previous Previous or aggregate exception
*/
public function __construct(BaseExceptionInterface|\Throwable|array|string $exception, int $code = 0, ?\Throwable $previous = null)
public function __construct(\Throwable|array|string $exception, int $code = 0, ?\Throwable $previous = null)
{
$template = '';
$message = '';
Expand Down
4 changes: 2 additions & 2 deletions src/ClientException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class ClientException extends BaseException implements ClientAvailableInterface
{
/**
* @param string $template
* @param array<string, scalar|scalar[]> $parameters
* @param array<string, scalar|scalar[]> $debugData
* @param array<string, scalar|null|scalar[]> $parameters
* @param array<string, scalar|null|scalar[]> $debugData
*/
public function __construct(string $template, array $parameters = [], array $debugData = [])
{
Expand Down

0 comments on commit 93b1dcb

Please sign in to comment.