Improve exception handling and model binding

This commit is contained in:
Jonny Barnes 2020-08-09 15:54:10 +01:00
parent e9ca934cb4
commit 0fca80e7e4
22 changed files with 148 additions and 82 deletions

View file

@ -13,18 +13,18 @@ class TokenEndpointController extends Controller
/**
* The IndieAuth Client.
*/
protected $client;
protected Client $client;
/**
* The Token handling service.
*/
protected $tokenService;
protected TokenService $tokenService;
/**
* Inject the dependencies.
*
* @param \IndieAuth\Client $client
* @param \App\Services\TokenService $tokenService
* @param Client $client
* @param TokenService $tokenService
*/
public function __construct(
Client $client,
@ -37,7 +37,7 @@ class TokenEndpointController extends Controller
/**
* If the user has authd via the IndieAuth protocol, issue a valid token.
*
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function create(): JsonResponse
{