[doc-en] master: Use explicit nullable type in language/exceptions.xml (#4631)

From: Date: Sat, 26 Apr 2025 22:21:25 +0000
Subject: [doc-en] master: Use explicit nullable type in language/exceptions.xml (#4631)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22646@lists.php.net to get a copy of this message
Author: Ben Faerber (benfaerber) Committer: GitHub (web-flow) Pusher: TimWolla Date: 2025-04-27T00:11:05+02:00 Commit: https://github.com/php/doc-en/commit/402a72776804fbb74ec5c4cad72d4c7b6cdd5b2d Raw diff: https://github.com/php/doc-en/commit/402a72776804fbb74ec5c4cad72d4c7b6cdd5b2d.diff Use explicit nullable type in language/exceptions.xml (#4631) Changed paths: M language/exceptions.xml Diff: diff --git a/language/exceptions.xml b/language/exceptions.xml index 39b54c943450..d81e4e8b38ed 100644 --- a/language/exceptions.xml +++ b/language/exceptions.xml @@ -386,7 +386,7 @@ class Exception implements Throwable private $trace; // backtrace private $previous; // previous exception if nested exception - public function __construct($message = '', $code = 0, Throwable $previous = null); + public function __construct($message = '', $code = 0, ?Throwable $previous = null); final private function __clone(); // Inhibits cloning of exceptions. @@ -432,7 +432,7 @@ class Exception implements Throwable class MyException extends Exception { // Redefine the exception so message isn't optional - public function __construct($message, $code = 0, Throwable $previous = null) { + public function __construct($message, $code = 0, ?Throwable $previous = null) { // some code // make sure everything is assigned properly

« previous php.doc.cvs (#22646) next »