| 1 | <?php |
||
| 10 | class AuthenticationException extends Exception |
||
| 11 | { |
||
| 12 | protected $response; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * AuthenticationException constructor. |
||
| 16 | * |
||
| 17 | * @param string $message Exception message. |
||
| 18 | * @param int $code Error code. |
||
| 19 | * @param HTTPResponse $response Response object for error. |
||
| 20 | * @param Throwable|null $previous Previous exception. |
||
| 21 | */ |
||
| 22 | public function __construct($message = "", $code = 0, HTTPResponse $response, Throwable $previous = null) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the error response object. |
||
| 30 | * |
||
| 31 | * @return HTTPResponse |
||
| 32 | */ |
||
| 33 | public function getResponse() |
||
| 37 | } |
||
| 38 |
If you place a parameter with a default value before a parameter with a default value, the default value of the first parameter will never be used as it will always need to be passed anyway: