| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class UserController extends Controller |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var UserService |
||
| 15 | */ |
||
| 16 | protected $service; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * UserController constructor. |
||
| 20 | * |
||
| 21 | * @param $service |
||
| 22 | */ |
||
| 23 | public function __construct(UserServiceContract $service) |
||
| 24 | { |
||
| 25 | $this->service = $service; |
||
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Display a listing of the resource. |
||
| 30 | * |
||
| 31 | * @return JsonResponse |
||
| 32 | */ |
||
| 33 | public function index() |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Show the specified resource. |
||
| 40 | * |
||
| 41 | * @return JsonResponse |
||
| 42 | */ |
||
| 43 | public function show() |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | 1 | * Update the roles in storage. |
|
| 50 | * |
||
| 51 | 1 | * @param Request $request |
|
| 52 | * |
||
| 53 | 1 | * @return JsonResponse |
|
| 54 | */ |
||
| 55 | public function update(Request $request, $id) |
||
| 62 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.