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

@param array  $args       List of arguments
@param int    $min        integer Minimum valid params
@param int    $max        Maximum valid params
@param string $methodName Method name
Check if args are valid or not .