| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class UserController extends Controller |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var UserService |
||
| 16 | */ |
||
| 17 | protected $service; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * UserController constructor. |
||
| 21 | * |
||
| 22 | * @param $service |
||
| 23 | */ |
||
| 24 | public function __construct(UserServiceContract $service) |
||
| 25 | { |
||
| 26 | $this->service = $service; |
||
|
|
|||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Display a listing of the resource. |
||
| 31 | * |
||
| 32 | * @return |
||
| 33 | */ |
||
| 34 | public function index() |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Show the specified resource. |
||
| 41 | * |
||
| 42 | * @return UserTransformer |
||
| 43 | */ |
||
| 44 | public function show() |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Update the roles in storage. |
||
| 51 | * |
||
| 52 | * @param Request $request |
||
| 53 | * |
||
| 54 | * @return JsonResponse |
||
| 55 | */ |
||
| 56 | public function update(Request $request, $id) |
||
| 63 |
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.