Skip to content

Commit

Permalink
Fix some PHP 8.4 deprecation(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziming committed Dec 8, 2024
1 parent abbca9b commit 9f0b5f9
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 23 deletions.
16 changes: 0 additions & 16 deletions psalm.xml.dist

This file was deleted.

2 changes: 1 addition & 1 deletion src/Exceptions/AccessTokenNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class AccessTokenNotFoundException extends HttpException
{
public function __construct(int $statusCode = 404, string $message = 'Access Token Not Found', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = 404, string $message = 'Access Token Not Found', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidAccessTokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class InvalidAccessTokenException extends HttpException
{
public function __construct(int $statusCode = Response::HTTP_BAD_REQUEST, string $message = 'Invalid Access Token', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = Response::HTTP_BAD_REQUEST, string $message = 'Invalid Access Token', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class InvalidDataOrSignatureForPersonDataException extends HttpException
{
public function __construct(int $statusCode = 500, string $message = 'Invalid Data or Signature for Person Data', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = 500, string $message = 'Invalid Data or Signature for Person Data', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidStateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class InvalidStateException extends HttpException
{
public function __construct(int $statusCode = 404, string $message = 'Invalid State', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = 404, string $message = 'Invalid State', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MyinfoPersonDataNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class MyinfoPersonDataNotFoundException extends HttpException
{
public function __construct(int $statusCode = 404, string $message = 'MyInfo Person Data not found', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = 404, string $message = 'MyInfo Person Data not found', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SubNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class SubNotFoundException extends HttpException
{
public function __construct(int $statusCode = 404, string $message = 'Sub not found', Exception $previous = null, array $headers = [], ?int $code = 0)
public function __construct(int $statusCode = 404, string $message = 'Sub not found', ?Exception $previous = null, array $headers = [], ?int $code = 0)
{
parent::__construct($statusCode, $message, $previous, $headers, $code);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/MyinfoAvailabilityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Ziming\LaravelMyinfoSg\Utils;

use Illuminate\Support\Carbon;
use Carbon\Carbon;

/*
* @internal
Expand Down

0 comments on commit 9f0b5f9

Please sign in to comment.