public function hasMethod($name)
{
try {
$method = new ReflectionMethod($this, $name);
if (!$method->isPublic()) {
return false;
}
return $method->getDeclaringClass()->name !== 'Cake\\Console\\Shell';
} catch (ReflectionException $e) {
return false;
}
}