| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php namespace App\LaravelRestCms\Template; |
||
| 24 | public function transform(BaseModel $templateDetail) |
||
| 25 | { |
||
| 26 | return [ |
||
| 27 | 'id' => (int) $templateDetail->id, |
||
|
|
|||
| 28 | 'parent_id' => (int) $templateDetail->parent_id, |
||
| 29 | 'name' => $templateDetail->name, |
||
| 30 | 'description' => $templateDetail->description, |
||
| 31 | 'var' => $templateDetail->var, |
||
| 32 | 'type' => $templateDetail->type, |
||
| 33 | 'data' => $templateDetail->data, |
||
| 34 | 'sort' => (int) $templateDetail->sort, |
||
| 35 | ]; |
||
| 36 | } |
||
| 37 | } |
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@propertyannotation 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.