Skip to content

1.2.1

Compare
Choose a tag to compare
@mlebkowski mlebkowski released this 25 Oct 08:58
· 22 commits to main since this release

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