| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php namespace App\LaravelRestCms\Page; |
||
| 25 | public function transform(BaseModel $pageDetail) |
||
| 26 | { |
||
| 27 | return [ |
||
| 28 | 'id' => (int) $pageDetail->id, |
||
|
|
|||
| 29 | 'page_id' => (int) $pageDetail->page_id, |
||
| 30 | 'template_detail_id' => (int) $pageDetail->template_detail_id, |
||
| 31 | 'data' => $pageDetail->data, |
||
| 32 | 'group' => $pageDetail->group, |
||
| 33 | 'version' => $pageDetail->version, |
||
| 34 | ]; |
||
| 35 | } |
||
| 36 | |||
| 46 | } |
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.