Skip to content

Commit

Permalink
Added object typehinting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van den Nieuwenhuisen committed Nov 24, 2020
1 parent e94d742 commit ff1a986
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1574,10 +1574,7 @@ protected function handleXmlHttpRequestErrorResponse(Request $request, FormInter
], Response::HTTP_BAD_REQUEST);
}

/**
* @param object $object
*/
protected function handleXmlHttpRequestSuccessResponse(Request $request, $object): JsonResponse
protected function handleXmlHttpRequestSuccessResponse(Request $request, object $object): JsonResponse
{
if (empty(array_intersect(['application/json', '*/*'], $request->getAcceptableContentTypes()))) {
@trigger_error(sprintf('"%s" is not supported since sonata-project/admin-bundle 3.x and the status code 406 will be set in the returned response in 4.0. Use `application/json`.', implode('", "', $request->getAcceptableContentTypes())));
Expand Down

0 comments on commit ff1a986

Please sign in to comment.