Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function store(Requests\TransitionRequest $request) |
||
26 | { |
||
27 | $transition = $this->createTransition([ |
||
28 | 'flow' => Flow::find($request->get('flow_id')), |
||
29 | 'from' => Step::find($request->get('from')), |
||
30 | 'to' => Step::find($request->get('to')) |
||
31 | ]); |
||
32 | $response = fractal()->item($transition, new TransitionTransformer())->toArray(); |
||
33 | return response()->json($response); |
||
|
|||
34 | } |
||
35 | |||
46 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.