diff --git a/src/Exceptions/AmountExceedsMolliePaymentMethodLimit.php b/src/Exceptions/AmountExceedsMolliePaymentMethodLimit.php index ded5205d..36470ec7 100644 --- a/src/Exceptions/AmountExceedsMolliePaymentMethodLimit.php +++ b/src/Exceptions/AmountExceedsMolliePaymentMethodLimit.php @@ -14,7 +14,7 @@ class AmountExceedsMolliePaymentMethodLimit extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'The order total is greater than the total accepted by Mollie', int $code = 500, Throwable $previous = null) + public function __construct(string $message = 'The order total is greater than the total accepted by Mollie', int $code = 500, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/CouponException.php b/src/Exceptions/CouponException.php index 78c2a3b2..68371383 100644 --- a/src/Exceptions/CouponException.php +++ b/src/Exceptions/CouponException.php @@ -14,7 +14,7 @@ class CouponException extends Exception * @param int $code * @param \Throwable|null $previous */ - public function __construct(string $message, int $code = 404, Throwable $previous = null) + public function __construct(string $message, int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/CouponNotFoundException.php b/src/Exceptions/CouponNotFoundException.php index 1a477c95..04695da1 100644 --- a/src/Exceptions/CouponNotFoundException.php +++ b/src/Exceptions/CouponNotFoundException.php @@ -13,7 +13,7 @@ class CouponNotFoundException extends CouponException * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'Coupon not found', int $code = 404, Throwable $previous = null) + public function __construct(string $message = 'Coupon not found', int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/CurrencyMismatchException.php b/src/Exceptions/CurrencyMismatchException.php index 3df8fc19..ec53038f 100644 --- a/src/Exceptions/CurrencyMismatchException.php +++ b/src/Exceptions/CurrencyMismatchException.php @@ -14,7 +14,7 @@ class CurrencyMismatchException extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'Currencies do not match', int $code = 404, Throwable $previous = null) + public function __construct(string $message = 'Currencies do not match', int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/InvalidMandateException.php b/src/Exceptions/InvalidMandateException.php index b4bb2cc9..b6206d90 100644 --- a/src/Exceptions/InvalidMandateException.php +++ b/src/Exceptions/InvalidMandateException.php @@ -14,7 +14,7 @@ class InvalidMandateException extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'Invalid customer mandate', int $code = 404, Throwable $previous = null) + public function __construct(string $message = 'Invalid customer mandate', int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/MandateIsNotYetFinalizedException.php b/src/Exceptions/MandateIsNotYetFinalizedException.php index b921a2d7..e0f54b04 100644 --- a/src/Exceptions/MandateIsNotYetFinalizedException.php +++ b/src/Exceptions/MandateIsNotYetFinalizedException.php @@ -14,7 +14,7 @@ class MandateIsNotYetFinalizedException extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'The customer mandate is still pending', int $code = 404, Throwable $previous = null) + public function __construct(string $message = 'The customer mandate is still pending', int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/OrderRetryRequiresStatusFailedException.php b/src/Exceptions/OrderRetryRequiresStatusFailedException.php index 0a94e53a..63e378f7 100644 --- a/src/Exceptions/OrderRetryRequiresStatusFailedException.php +++ b/src/Exceptions/OrderRetryRequiresStatusFailedException.php @@ -14,7 +14,7 @@ class OrderRetryRequiresStatusFailedException extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'The order status is not failed', int $code = 500, Throwable $previous = null) + public function __construct(string $message = 'The order status is not failed', int $code = 500, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Exceptions/PlanNotFoundException.php b/src/Exceptions/PlanNotFoundException.php index 4afb1ec1..d6d954f7 100644 --- a/src/Exceptions/PlanNotFoundException.php +++ b/src/Exceptions/PlanNotFoundException.php @@ -14,7 +14,7 @@ class PlanNotFoundException extends Exception * @param int $code * @param Throwable|null $previous */ - public function __construct(string $message = 'Plan not found', int $code = 404, Throwable $previous = null) + public function __construct(string $message = 'Plan not found', int $code = 404, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Order/Invoice.php b/src/Order/Invoice.php index bfc4059b..00048c89 100644 --- a/src/Order/Invoice.php +++ b/src/Order/Invoice.php @@ -461,7 +461,7 @@ public function view(array $data = [], string $view = self::DEFAULT_VIEW) * @param \Dompdf\Options $options * @return string */ - public function pdf(array $data = [], string $view = self::DEFAULT_VIEW, Options $options = null) + public function pdf(array $data = [], string $view = self::DEFAULT_VIEW, ?Options $options = null) { if (!defined('DOMPDF_ENABLE_AUTOLOAD')) { define('DOMPDF_ENABLE_AUTOLOAD', false); @@ -482,7 +482,7 @@ public function pdf(array $data = [], string $view = self::DEFAULT_VIEW, Options * @param \Dompdf\Options $options * @return \Symfony\Component\HttpFoundation\Response */ - public function download(array $data = [], string $view = self::DEFAULT_VIEW, Options $options = null) + public function download(array $data = [], string $view = self::DEFAULT_VIEW, ?Options $options = null) { $filename = implode('_', [ $this->id, diff --git a/src/Plan/AdvancedIntervalGenerator.php b/src/Plan/AdvancedIntervalGenerator.php index 0793eb1c..228214cc 100644 --- a/src/Plan/AdvancedIntervalGenerator.php +++ b/src/Plan/AdvancedIntervalGenerator.php @@ -26,7 +26,7 @@ public function __construct(array $configuration) * @param \Laravel\Cashier\Subscription|null $subscription * @return \Carbon\Carbon|\Carbon\Traits\Modifiers */ - public function getEndOfNextSubscriptionCycle(Subscription $subscription = null) + public function getEndOfNextSubscriptionCycle(?Subscription $subscription = null) { $cycle_ends_at = $subscription->cycle_ends_at ?? now(); $subscription_date = $this->startOfTheSubscription($subscription); diff --git a/src/Plan/BaseIntervalGenerator.php b/src/Plan/BaseIntervalGenerator.php index 1d4816d2..cc1000b5 100644 --- a/src/Plan/BaseIntervalGenerator.php +++ b/src/Plan/BaseIntervalGenerator.php @@ -11,7 +11,7 @@ class BaseIntervalGenerator * @param \Laravel\Cashier\Subscription|null $subscription * @return \Carbon\Carbon */ - protected function startOfTheSubscription(Subscription $subscription = null) + protected function startOfTheSubscription(?Subscription $subscription = null) { if (isset($subscription->trial_ends_at) && ! is_null($subscription->trial_ends_at)) { return $subscription->trial_ends_at; diff --git a/src/Plan/Contracts/IntervalGeneratorContract.php b/src/Plan/Contracts/IntervalGeneratorContract.php index cb04323c..5b4b6d0b 100644 --- a/src/Plan/Contracts/IntervalGeneratorContract.php +++ b/src/Plan/Contracts/IntervalGeneratorContract.php @@ -10,5 +10,5 @@ interface IntervalGeneratorContract * @param \Laravel\Cashier\Subscription $subscription * @return \Carbon\Carbon */ - public function getEndOfNextSubscriptionCycle(Subscription $subscription = null); + public function getEndOfNextSubscriptionCycle(?Subscription $subscription = null); } diff --git a/src/Plan/DefaultIntervalGenerator.php b/src/Plan/DefaultIntervalGenerator.php index 37ed1d2b..4a30daf7 100644 --- a/src/Plan/DefaultIntervalGenerator.php +++ b/src/Plan/DefaultIntervalGenerator.php @@ -23,7 +23,7 @@ public function __construct(string $interval) * @param \Laravel\Cashier\Subscription|null $subscription * @return \Carbon\Carbon|\Carbon\Traits\Modifiers */ - public function getEndOfNextSubscriptionCycle(Subscription $subscription = null) + public function getEndOfNextSubscriptionCycle(?Subscription $subscription = null) { $cycle_ends_at = $subscription->cycle_ends_at ?? now(); $subscription_date = $this->startOfTheSubscription($subscription);