src/core/DeCaptchaAbstract.php
public function getParamSpec($param, $spec = null, $coding = null)
    {
        if (is_null($spec)) {
            $spec = $param;
        }
        if (!array_key_exists($param, $this->params) || is_null($this->params[$param])) {
            if (!array_key_exists($spec, $this->params) || is_null($this->params[$spec])) {
                return null;
            }
            $param = $spec;
        }
        switch ($spec) {
            case static::PARAM_SPEC_FILE:
                switch ($coding) {
                    case static::PARAM_SLUG_CODING_BASE64:
                        return base64_encode(file_get_contents($this->params[$param]));
                }

                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]);
            case static::PARAM_SPEC_API_KEY:
                return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param];
            case static::PARAM_SPEC_CAPTCHA:
                return (int) $this->params[$param];
            case static::PARAM_SPEC_CODE:
                return (string) $this->params[$param];
        }

        return null;
    }
public function getParamSpec($param, $spec = null, $coding = null)
    {
        if (is_null($spec)) {
            $spec = $param;
        }
        if (!array_key_exists($param, $this->params) || is_null($this->params[$param])) {
            if (!array_key_exists($spec, $this->params) || is_null($this->params[$spec])) {
                return null;
            }
            $param = $spec;
        }
        switch ($spec) {
            case static::PARAM_SPEC_FILE:
                switch ($coding) {
                    case static::PARAM_SLUG_CODING_BASE64:
                        return base64_encode(file_get_contents($this->params[$param]));
                }

                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]);
            case static::PARAM_SPEC_API_KEY:
                return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param];
            case static::PARAM_SPEC_CAPTCHA:
                return (int) $this->params[$param];
            case static::PARAM_SPEC_CODE:
                return (string) $this->params[$param];
        }

        return null;
    }
@param $param
@param $spec
@param $coding

@return \CURLFile|mixed|null|string