Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function getCasts() |
||
26 | { |
||
27 | if (Str::startsWith(app()->version(), '5.6')) { |
||
28 | if (! $this->initializeSchemalessAttributesTrait) { |
||
29 | $this->initializeSchemalessAttributesTrait(); |
||
30 | $this->initializeSchemalessAttributesTrait = true; |
||
31 | } |
||
32 | } |
||
33 | |||
34 | return parent::getCasts(); |
||
35 | } |
||
36 | |||
65 |
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.