Skip to content

Commit

Permalink
Added return types to order relationship methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Mar 6, 2024
1 parent 99d5393 commit 2a7e839
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Order/Models/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;
use Konekt\Address\Models\AddressProxy;
use Konekt\Enum\Eloquent\CastsEnums;
Expand Down Expand Up @@ -124,17 +126,17 @@ public function getItems(): Traversable
return $this->items;
}

public function billpayer()
public function billpayer(): BelongsTo
{
return $this->belongsTo(BillpayerProxy::modelClass());
}

public function shippingAddress()
public function shippingAddress(): BelongsTo
{
return $this->belongsTo(AddressProxy::modelClass());
}

public function items()
public function items(): HasMany
{
return $this->hasMany(OrderItemProxy::modelClass());
}
Expand Down

0 comments on commit 2a7e839

Please sign in to comment.