Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Errors/GenericCarrierError.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
class GenericCarrierError extends AbstractCarrierError
{
public function __construct(string $errorCode, string $detail, string $pointer = null)
public function __construct(string $errorCode, string $detail, ?string $pointer = null)
{
parent::__construct($errorCode, 'Generic carrier error', $detail, $pointer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Errors/InvalidInputContextError.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class InvalidInputContextError extends AbstractCarrierError
{
public function __construct(string $errorCode, string $detail, string $pointer = null)
public function __construct(string $errorCode, string $detail, ?string $pointer = null)
{
parent::__construct($errorCode, 'Invalid input context', $detail, $pointer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Errors/InvalidInputError.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class InvalidInputError extends AbstractCarrierError
{
public function __construct(string $errorCode, string $detail, string $pointer = null)
public function __construct(string $errorCode, string $detail, ?string $pointer = null)
{
parent::__construct($errorCode, 'Invalid input', $detail, $pointer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Errors/MissingInputError.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class MissingInputError extends AbstractCarrierError
{
public function __construct(string $errorCode, string $detail, string $pointer = null)
public function __construct(string $errorCode, string $detail, ?string $pointer = null)
{
parent::__construct($errorCode, 'Missing input', $detail, $pointer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/AuthException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class AuthException extends AbstractException
{
public function __construct(string $detail, int $status, Throwable $previous = null)
public function __construct(string $detail, int $status, ?Throwable $previous = null)
{
parent::__construct(
$detail,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CarrierApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class CarrierApiException extends AbstractException
{
public function __construct(int $status, array $carrierApiResponse, Throwable $previous = null)
public function __construct(int $status, array $carrierApiResponse, ?Throwable $previous = null)
{
parent::__construct(
'There was a problem with the request to the carrier. The original response can be found in the meta under `carrier_response`.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ExternalRequestException.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
class ExternalRequestException extends AbstractException
{
public function __construct(int $status, int $externalStatus, array $externalError = [], Throwable $previous = null)
public function __construct(int $status, int $externalStatus, array $externalError = [], ?Throwable $previous = null)
{
parent::__construct(
'An error occurred while making a request to an external service. When available, details can be found in the meta of this request. If the problem persists, please contact support.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ForbiddenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class ForbiddenException extends AbstractException
{
public function __construct(string $message = null, Throwable $previous = null)
public function __construct(?string $message = null, ?Throwable $previous = null)
{
parent::__construct(
$message ?? 'This user is not allowed to perform this action.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidAccessTokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class InvalidAccessTokenException extends AbstractException
{
public function __construct(string $detail, Throwable $previous = null)
public function __construct(string $detail, ?Throwable $previous = null)
{
parent::__construct(
$detail,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidExternalErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class InvalidExternalErrorException extends AbstractException
{
public function __construct(Throwable $previous = null)
public function __construct(?Throwable $previous = null)
{
parent::__construct(
'An error was thrown during the request to the external source. We cannot provide more information since the returned error was improperly formatted.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidJsonSchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class InvalidJsonSchemaException extends AbstractException
{
public function __construct(array $errors, Throwable $previous = null)
public function __construct(array $errors, ?Throwable $previous = null)
{
parent::__construct(
'The supplied data is invalid according to our API Specification. See meta for details.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidScopeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class InvalidScopeException extends AbstractException
{
use EnumTrait;

public function __construct(array $scopeSlugs, Throwable $previous = null)
public function __construct(array $scopeSlugs, ?Throwable $previous = null)
{
$scopeStrings = collect($scopeSlugs)
->map(fn (mixed $scopeSlug) => $this->getEnumValue($scopeSlug))
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidSecretException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class InvalidSecretException extends AbstractException
{
public function __construct(Throwable $previous = null)
public function __construct(?Throwable $previous = null)
{
parent::__construct(
'The provided secret is invalid. Please try again later. If the problem persists, contact customer support.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MethodNotAllowedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
class MethodNotAllowedException extends AbstractException
{
public function __construct(string $httpMethod, Throwable $previous = null)
public function __construct(string $httpMethod, ?Throwable $previous = null)
{
$httpMethod = strtoupper($httpMethod);
parent::__construct(
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingHeaderException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class MissingHeaderException extends AbstractException
{
public function __construct(array $headers, Throwable $previous = null)
public function __construct(array $headers, ?Throwable $previous = null)
{
parent::__construct(
'The request does not contain the required header(s): ' . implode(', ', $headers) . '.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingScopeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MissingScopeException extends AbstractException
{
use EnumTrait;

public function __construct(array $scopeSlugs, Throwable $previous = null)
public function __construct(array $scopeSlugs, ?Throwable $previous = null)
{
$scopeStrings = collect($scopeSlugs)
->map(fn (mixed $scopeSlug) => $this->getEnumValue($scopeSlug))
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissingTokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class MissingTokenException extends AbstractException
{
public function __construct(Throwable $previous = null)
public function __construct(?Throwable $previous = null)
{
parent::__construct(
'No access token was provided for the request. Please add this to the \'Authorization: Bearer\' header.',
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class NotFoundException extends AbstractException
{
public function __construct(string $detail, Throwable $previous = null)
public function __construct(string $detail, ?Throwable $previous = null)
{
parent::__construct(
$detail,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/RelationshipCannotBeModifiedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RelationshipCannotBeModifiedException extends AbstractException
{
use EnumTrait;

public function __construct(UnitEnum|string $relationshipType, Throwable $previous = null)
public function __construct(UnitEnum|string $relationshipType, ?Throwable $previous = null)
{
parent::__construct(
sprintf(
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ResourceCannotBeModifiedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ResourceCannotBeModifiedException extends AbstractException
{
public function __construct(string $message, Throwable $previous = null)
public function __construct(string $message, ?Throwable $previous = null)
{
parent::__construct(
$message,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ResourceConflictException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class ResourceConflictException extends AbstractException
{
public function __construct(string $field, Throwable $previous = null)
public function __construct(string $field, ?Throwable $previous = null)
{
parent::__construct(
"The supplied resource `$field` is invalid.",
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ResourceHandledBy3rdPartyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ResourceHandledBy3rdPartyException extends AbstractException
{
use EnumTrait;

public function __construct(UnitEnum|string $resourceType, string $platform, Throwable $previous = null)
public function __construct(UnitEnum|string $resourceType, string $platform, ?Throwable $previous = null)
{
parent::__construct(
sprintf('One or more of the %s resource is handled by a 3rd party.', $this->getEnumValue($resourceType)),
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ResourceNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ResourceNotFoundException extends AbstractException
{
use EnumTrait;

public function __construct(UnitEnum|string $resourceType, Throwable $previous = null)
public function __construct(UnitEnum|string $resourceType, ?Throwable $previous = null)
{
parent::__construct(
sprintf('One or more of the %s resource could not be found.', $this->getEnumValue($resourceType)),
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/TooManyRequestsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class TooManyRequestsException extends AbstractException
{
public function __construct(string $detail, Throwable $previous = null)
public function __construct(string $detail, ?Throwable $previous = null)
{
parent::__construct(
$detail,
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnprocessableEntityException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/
class UnprocessableEntityException extends AbstractException
{
public function __construct(string $detail, Throwable $previous = null)
public function __construct(string $detail, ?Throwable $previous = null)
{
parent::__construct(
$detail,
Expand Down
2 changes: 1 addition & 1 deletion src/Http/UrlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class UrlBuilder

protected ?string $fragment = null;

public function __construct(string $url = null)
public function __construct(?string $url = null)
{
if ($url !== null) {
$this->setUrl($url);
Expand Down
Loading