public function validateArgument($argname, $value, $type, $nullable = false)
    {
        if (!$this->checkType($value, $type, $nullable)) {
            throw new OperationArgumentException(sprintf(
                'Method %s() expects $%s to be %s, %s given.',
                $this->operation,
                $argname,
                $type,
                gettype($value)
            ));
        }
    }