Redaxscript\Captcha::_getOperator PHP Method

_getOperator() protected method

get the mathematical operator used for the task
Since: 2.0.0
protected _getOperator ( ) : integer
return integer
    protected function _getOperator()
    {
        /* switch mode */
        switch ($this->_mode) {
            case 2:
                $output = 1;
                break;
            case 3:
                $output = -1;
                break;
            default:
                $output = mt_rand(0, 1) * 2 - 1;
                break;
        }
        return $output;
    }