Same as v1.2.1 but contains the code this time 😂
Represent RouteArgument
as ArrayAccessor
to enable type-casting.
Before:
$limit = RouteArgument::get($request, 'limit');
if (false === is_numeric($limit) {
throw new HttpBadRequestException($request);
}
$limit = (int) $limit;
After:
$limit = RouteArgument::of($request)->int('limit');