Skip to content

Commit 1a5df40

Browse files
authored
fix: Use explicit nullable types in parameters
1 parent 85def4e commit 1a5df40

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Billable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@ public function invoices()
420420
* @param $orderId
421421
* @param null|array $data
422422
* @param string $view
423-
* @param \Dompdf\Options $options
423+
* @param \Dompdf\Options|null $options
424424
* @return \Symfony\Component\HttpFoundation\Response
425425
*/
426-
public function downloadInvoice($orderId, $data = [], $view = Invoice::DEFAULT_VIEW, Options $options = null)
426+
public function downloadInvoice($orderId, $data = [], $view = Invoice::DEFAULT_VIEW, ?Options $options = null)
427427
{
428428
/** @var Order $order */
429429
$order = $this->orders()->where('id', $orderId)->firstOrFail();

src/Subscription.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,10 @@ public function scheduled_order_item()
468468
* @param Carbon|null $process_at
469469
* @param array $item_overrides
470470
* @param bool $fill_link Indicates whether scheduled_order_item_id field should be filled to point to the newly scheduled order item
471-
* @param \Laravel\Cashier\Plan\Contracts\Plan $plan
471+
* @param \Laravel\Cashier\Plan\Contracts\Plan|null $plan
472472
* @return \Illuminate\Database\Eloquent\Model|\Laravel\Cashier\Order\OrderItem
473473
*/
474-
public function scheduleNewOrderItemAt(Carbon $process_at, $item_overrides = [], $fill_link = true, Plan $plan = null)
474+
public function scheduleNewOrderItemAt(Carbon $process_at, $item_overrides = [], $fill_link = true, ?Plan $plan = null)
475475
{
476476
if ($this->scheduled_order_item_id) {
477477
throw new LogicException('Cannot schedule a new subscription order item if there is already one scheduled.');

0 commit comments

Comments
 (0)