@@ -59,7 +59,7 @@ class ApiProblem
5959 /**
6060 * HTTP status for the error.
6161 */
62- protected ? int $ status = null ;
62+ protected int | null $ status = null ;
6363
6464 /**
6565 * Normalized property names for overloading.
@@ -123,7 +123,7 @@ class ApiProblem
123123 /**
124124 * Title of the error.
125125 */
126- protected ? string $ title ;
126+ protected string | null $ title ;
127127
128128 /**
129129 * Create an instance using the provided information. If nothing is
@@ -133,7 +133,7 @@ class ApiProblem
133133 *
134134 * @param string[] $additional
135135 */
136- public function __construct (int |string $ status , string |Throwable $ detail , ? string $ type = null , ? string $ title = null , array $ additional = [])
136+ public function __construct (int |string $ status , string |Throwable $ detail , string | null $ type = null , string | null $ title = null , array $ additional = [])
137137 {
138138 if ($ detail instanceof ProblemExceptionInterface) {
139139 if ($ type === null ) {
@@ -193,7 +193,7 @@ public function __get(string $name): mixed
193193
194194 throw new InvalidArgumentException (sprintf (
195195 'Invalid property name "%s" ' ,
196- $ name
196+ $ name,
197197 ));
198198 }
199199
@@ -277,7 +277,7 @@ protected function getDetail(): string
277277 * If an exception was provided, creates the status code from it;
278278 * otherwise, code as provided is used.
279279 */
280- protected function getStatus (): ? int
280+ protected function getStatus (): int | null
281281 {
282282 if ($ this ->detail instanceof Throwable || $ this ->detail instanceof Exception) {
283283 $ this ->status = (int ) $ this ->createStatusFromException ();
0 commit comments