Skip to content
Closed
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/Exceptions/AmountExceedsMolliePaymentMethodLimit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CouponException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CouponNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CurrencyMismatchException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidMandateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MandateIsNotYetFinalizedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/OrderRetryRequiresStatusFailedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/PlanNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Order/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/Plan/AdvancedIntervalGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/Plan/BaseIntervalGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plan/Contracts/IntervalGeneratorContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion src/Plan/DefaultIntervalGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down