1 | <?php |
||
20 | class Docs extends Model |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $table = 'docs'; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $casts = [ |
||
31 | 'importer_config' => 'collection', |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @return HasMany |
||
36 | */ |
||
37 | public function pages(): HasMany |
||
41 | |||
42 | /** |
||
43 | * @param string $title |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getTitleAttribute(string $title): string |
||
50 | |||
51 | /** |
||
52 | * @param DocsConnectionConfigInterface|array $config |
||
53 | */ |
||
54 | public function setImporterConfigAttribute($config) |
||
60 | |||
61 | /** |
||
62 | * @param string $data |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getImporterConfigAttribute(string $data): array |
||
73 | } |
||
74 |
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.