diff --git a/src/Subscription.php b/src/Subscription.php index 55e44f86..bc75f27e 100644 --- a/src/Subscription.php +++ b/src/Subscription.php @@ -527,7 +527,7 @@ public function reportUsageFor($plan, $quantity = 1, $timestamp = null) * @param string|null $plan * @return \Illuminate\Support\Collection */ - public function usageRecords($options = [], $plan = null) + public function usageRecords(array $options = [], $plan = null) { if (! $plan) { $this->guardAgainstMultiplePlans(); @@ -543,7 +543,7 @@ public function usageRecords($options = [], $plan = null) * @param array $options * @return \Illuminate\Support\Collection */ - public function usageRecordsFor($plan, $options = []) + public function usageRecordsFor($plan, array $options = []) { return $this->usageRecords($options, $plan); } @@ -635,7 +635,7 @@ public function extendTrial(CarbonInterface $date) * * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function swap($plans, $options = []) + public function swap($plans, array $options = []) { if (empty($plans = (array) $plans)) { throw new InvalidArgumentException('Please provide at least one plan when swapping.'); @@ -695,7 +695,7 @@ public function swap($plans, $options = []) * @throws \Laravel\Cashier\Exceptions\IncompletePayment * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function swapAndInvoice($plans, $options = []) + public function swapAndInvoice($plans, array $options = []) { $this->alwaysInvoice(); @@ -794,7 +794,7 @@ protected function getSwapOptions(Collection $items, $options) * * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function addPlan($plan, $quantity = 1, $options = []) + public function addPlan($plan, $quantity = 1, array $options = []) { $this->guardAgainstIncomplete(); @@ -841,7 +841,7 @@ public function addPlan($plan, $quantity = 1, $options = []) * @throws \Laravel\Cashier\Exceptions\IncompletePayment * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function addPlanAndInvoice($plan, $quantity = 1, $options = []) + public function addPlanAndInvoice($plan, $quantity = 1, array $options = []) { $this->alwaysInvoice(); diff --git a/src/SubscriptionItem.php b/src/SubscriptionItem.php index 3f43182c..e4a9c6b5 100644 --- a/src/SubscriptionItem.php +++ b/src/SubscriptionItem.php @@ -138,7 +138,7 @@ public function updateQuantity($quantity) * * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function swap($plan, $options = []) + public function swap($plan, array $options = []) { $this->subscription->guardAgainstIncomplete(); @@ -181,7 +181,7 @@ public function swap($plan, $options = []) * @throws \Laravel\Cashier\Exceptions\IncompletePayment * @throws \Laravel\Cashier\Exceptions\SubscriptionUpdateFailure */ - public function swapAndInvoice($plan, $options = []) + public function swapAndInvoice($plan, array $options = []) { $this->alwaysInvoice(); diff --git a/tests/Feature/FeatureTestCase.php b/tests/Feature/FeatureTestCase.php index 9b29f5b5..c54a30e4 100644 --- a/tests/Feature/FeatureTestCase.php +++ b/tests/Feature/FeatureTestCase.php @@ -46,7 +46,7 @@ protected static function deleteStripeResource(ApiResource $resource) } } - protected function createCustomer($description = 'taylor', $options = []): User + protected function createCustomer($description = 'taylor', array $options = []): User { return User::create(array_merge([ 'email' => "{$description}@cashier-test.com",