| Conditions | 1 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function check(Request $request, HttpValidator $httpValidator) |
||
| 34 | { |
||
| 35 | $url = $request->input('url'); |
||
| 36 | |||
| 37 | $httpCode = $httpValidator->validate($url); |
||
|
1 ignored issue
–
show
|
|||
| 38 | |||
| 39 | return response()->json(['httpCode' => $httpCode]); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
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.