| 1 | <?php |
||
| 11 | class FavoritesController extends Controller |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Add a new favorite if it does not exist and |
||
| 15 | * remove it if does exist |
||
| 16 | * |
||
| 17 | * @param Request $request User request |
||
| 18 | * @return array favorite or unfavorite message |
||
| 19 | */ |
||
| 20 | public function update(Request $request) |
||
| 33 | } |
||
| 34 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: