1 | <?php |
||
13 | class Subscription extends Model implements SubscriptionContact |
||
14 | { |
||
15 | protected $table = 'subscriptions'; |
||
16 | |||
17 | protected $fillable = [ |
||
18 | 'plan_id', 'start_at', 'end_at' |
||
19 | ]; |
||
20 | |||
21 | public function scopeCurrent(Builder $q, Carbon $date) |
||
26 | |||
27 | public function isPerpetual(): bool |
||
31 | |||
32 | public function getDaysLeft(): int |
||
36 | |||
37 | public function getElapsedDays(): int |
||
41 | |||
42 | public function getExpirationDate(): ?Carbon |
||
46 | |||
47 | public function getStartDate(): ?Carbon |
||
51 | |||
52 | public function subscriber() |
||
56 | |||
57 | public static function make(PlanContract $plan, Carbon $start_at, Carbon $end_at = null): Model |
||
65 | } |
||
66 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: