1 | <?php |
||
13 | class Host extends Model |
||
14 | { |
||
15 | use HostPresenter, HasCustomProperties; |
||
16 | |||
17 | public $casts = [ |
||
18 | 'custom_properties' => 'array', |
||
19 | ]; |
||
20 | |||
21 | public $guarded = []; |
||
22 | |||
23 | public function checks(): HasMany |
||
27 | |||
28 | public function getTable() |
||
29 | { |
||
30 | return config('server-monitor.hosts_table'); |
||
31 | } |
||
32 | |||
33 | public function getEnabledChecksAttribute(): Collection |
||
37 | |||
38 | public function isHealthy(): bool |
||
42 | |||
43 | public function isUnhealthy(): bool |
||
47 | |||
48 | public function hasWarning(): bool |
||
52 | |||
53 | public function getStatusAttribute(): string |
||
69 | |||
70 | public function hasCheckType(string $type): bool |
||
76 | } |
||
77 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.