Skip to content

Commit

Permalink
General: Fix deprecations in PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed Dec 31, 2024
1 parent e97166a commit 8f951fd
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/BadGatewayException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BadGatewayException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::BAD_GATEWAY, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/BadRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BadRequestException extends ClientDataHttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::BAD_REQUEST, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/ClientDataHttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ abstract class ClientDataHttpException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $code = 0, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $code = 0, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, $code, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/ConflictException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ConflictException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::CONFLICT, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/ExpectationFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ExpectationFailedException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::EXPECTATION_FAILED, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/FailedDependencyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class FailedDependencyException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::FAILED_DEPENDENCY, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/ForbiddenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ForbiddenException extends ClientDataHttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::FORBIDDEN, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class HttpException extends Exception
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $code = 0, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $code = 0, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message ?? '', $code, $previous);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class InternalServerErrorException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::INTERNAL_SERVER_ERROR, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/MethodNotAllowedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MethodNotAllowedException extends HttpException
public function __construct(
string $message = 'The used HTTP method is not supported for this resource!',
int $app_code = 0,
Exception $previous = NULL
?Exception $previous = NULL
)
{
parent::__construct($message, HttpCode::METHOD_NOT_ALLOWED, $app_code, $previous);
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NotFoundException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::NOT_FOUND, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/NotImplementedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class NotImplementedException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(string $message = 'Not implemented!', int $app_code = 0, Exception $previous = NULL)
public function __construct(string $message = 'Not implemented!', int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::NOT_IMPLEMENTED, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/PreconditionFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PreconditionFailedException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::PRECONDITION_FAILED, $app_code, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class RequestedRangeNotSatisfiableException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::REQUESTED_RANGE_NOT_SATISFIABLE, $app_code, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TemporarilyDisabledException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(string $message = 'The requested API is temporarily disabled', int $app_code = 0, Exception $previous = NULL)
public function __construct(string $message = 'The requested API is temporarily disabled', int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, 540, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Exceptions/UnauthorizedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UnauthorizedException extends HttpException
* @param int $app_code Application error code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::UNAUTHORIZED, $app_code, $previous);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class UnprocessableEntityException extends HttpException
* @param int $app_code The Exception code.
* @param Exception|null $previous The previous exception used for the exception chaining.
*/
public function __construct(?string $message = NULL, int $app_code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $app_code = 0, ?Exception $previous = NULL)
{
parent::__construct($message, HttpCode::UNPROCESSABLE_ENTITY, $app_code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Lunr/Corona/Tests/Helpers/MockUncaughtException.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MockUncaughtException extends Exception
* @param int $code The exception code
* @param Exception|null $previous The previously thrown exception
*/
public function __construct(?string $message = NULL, int $code = 0, Exception $previous = NULL)
public function __construct(?string $message = NULL, int $code = 0, ?Exception $previous = NULL)
{
parent::__construct($message ?? '', $code, $previous);
}
Expand Down

0 comments on commit 8f951fd

Please sign in to comment.