Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function add(ContentBlockRequest $request) |
||
14 | { |
||
15 | $model = $this->getModelFromRequest($request); |
||
16 | |||
17 | $contentBlock = new ContentBlock(['collection_name' => $request->collection_name]); |
||
|
|||
18 | |||
19 | $model->contentBlocks()->save($contentBlock); |
||
20 | |||
21 | return fractal($contentBlock, new ContentBlockTransformer()); |
||
22 | } |
||
23 | |||
29 |
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.