private function getAttributeName(callable $controller)
{
list($object, $name) = $controller;
$method = new \ReflectionMethod($object, $name);
foreach ($method->getParameters() as $param) {
if ($this->isParamFetcherType($param)) {
return $param->getName();
}
}
// If there is no typehint, inject the ParamFetcher using a default name.
return 'paramFetcher';
}