Skip to content

1.2.2

Latest
Compare
Choose a tag to compare
@mlebkowski mlebkowski released this 25 Oct 09:01

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');