We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function store(CreatePostRequest $request) |
||
29 | { |
||
30 | $post = new Post(); |
||
31 | $post->title = $request['title']; |
||
|
|||
32 | $post->content = $request['content']; |
||
33 | $post->image = $request['image']; |
||
34 | $post->user_id = $request['user_id']; |
||
35 | |||
36 | return response()->json(compact('post')); |
||
37 | } |
||
38 | |||
70 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.