protected function checkArguments(array $args, $min, $max, $methodName)
    {
        $argc = count($args);
        if ($argc < $min || $argc > $max) {
            throw new \BadMethodCallException("Method $methodName is not exist");
        }
    }