1 | <?php |
||
11 | class Subscription extends Model implements SubscriptionContact |
||
12 | { |
||
13 | protected $table = 'subscriptions'; |
||
14 | |||
15 | protected $fillable = [ |
||
16 | 'plan_id', 'start_at', 'end_at', |
||
17 | ]; |
||
18 | |||
19 | public function scopeCurrent(Builder $q, Carbon $date) |
||
24 | |||
25 | public function isPerpetual(): bool |
||
29 | |||
30 | public function getDaysLeft(): int |
||
34 | |||
35 | public function getElapsedDays(): int |
||
39 | |||
40 | public function getExpirationDate(): ?Carbon |
||
44 | |||
45 | public function getStartDate(): ?Carbon |
||
49 | |||
50 | public function subscriber() |
||
54 | |||
55 | public static function make(PlanContract $plan, Carbon $start_at, Carbon $end_at = null): Model |
||
63 | } |
||
64 |
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: