Using ReflectionClass inline, since we don't need to cache the instance
Moving class method to anonymous in-line function