public function invokeMethod($object, $name, array $args = [])
    {
        $method = new ReflectionMethod($object, $name);
        $method->setAccessible(true);

        if (empty($args)) {
            return $method->invoke($object);
        }

        return $method->invokeArgs($object, $args);
    }