Checks if a method's name is get.* and can be called without parameters.
ReflectionMethod $method the method to check:
Boolean whether the method is a getter.
private function isGetMethod(\ReflectionMethod $method) {
return 0 === strpos($method->name, 'get') && 3 < strlen($method->name) && 0 === $method
->getNumberOfRequiredParameters();
}