Skip to content

Commit

Permalink
Removed most of the typed properties to avoid breaking changes.
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Johansson <datasage@gmail.com>
  • Loading branch information
datasage committed Apr 26, 2024
1 parent 83ce172 commit 01ee6df
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/ApiProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,39 @@ class ApiProblem

/**
* Additional details to include in report.
*
* @var array
*/
protected array $additionalDetails = [];
protected $additionalDetails = [];

/**
* URL describing the problem type; defaults to HTTP status codes.
*
* @var string
*/
protected string $type = 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html';
protected $type = 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html';

/**
* Description of the specific problem.
*
* @var string|Exception|Throwable
*/
protected string|Exception|Throwable $detail = '';
protected $detail = '';

/**
* Whether or not to include a stack trace and previous
* exceptions when an exception is provided for the detail.
*
* @var bool
*/
protected bool $detailIncludesStackTrace = false;
protected $detailIncludesStackTrace = false;

/**
* HTTP status for the error.
*
* @var int
*/
protected int $status;
protected $status;

/**
* Normalized property names for overloading.
Expand Down Expand Up @@ -113,8 +123,10 @@ class ApiProblem

/**
* Title of the error.
*
* @var string|null
*/
protected ?string $title;
protected $title;

/**
* Create an instance using the provided information. If nothing is
Expand Down

0 comments on commit 01ee6df

Please sign in to comment.