Flips the coin and returns its side
@return string
496648
public function flip()
    {
        $this->counter++;
        unset($this->isLucky);
        $this->currentSide = $this->isLucky()? $this->expectedSide : $this->getOppositeSide($this->expectedSide);
        return $this->currentSide;
    }
357706
public function OppositeDirection()
    {
        // If direction is set, then just reverse it.
        $direction = $this->request->getVar('Dir');
        if ($direction) {
            if ($direction == 'ASC') {
                return 'DESC';
            }
            return 'ASC';
        }

        // If the sort column is set, then we're sorting by ASC (default is omitted)
        if ($this->request->getVar('Sort')) {
            return 'DESC';
        }

        // Otherwise we're not sorting at all so default to ASC.
        return 'ASC';
    }
1152502
protected function getVlqBytesToInt()
    {
        $value = 0;
        $isBigInt = false;

        for ($this->pos; $this->pos < $this->maxLen; $this->pos++) {
            if (!$isBigInt) {
                $lshift = $value << 7;
                # An overflow bitshift will result in a negative number. This will check if GMP is available and flip it
                # to a bigint safe method in one shot.
                if ($lshift < 0) {
                    $isBigInt = true;
                    $this->throwIfBigIntGmpNeeded(true);
                    $value = \gmp_init($value);
                }
            }
            if ($isBigInt) {
                $lshift = \gmp_mul($value, \gmp_pow('2', 7));
            }
            $orVal = (\ord($this->binary[$this->pos]) & 0x7f);
            if ($isBigInt) {
                $value = \gmp_or($lshift, \gmp_init($orVal));
            } else {
                $value = $lshift | $orVal;
            }
            # We have reached the last byte if the MSB is not set.
            if ((\ord($this->binary[$this->pos]) & 0x80) === 0) {
                $this->pos++;
                return $isBigInt ? \gmp_strval($value) : $value;
            }
        }

        throw new EncoderException('Expected an ending byte to decode a VLQ, but none was found.');
    }
112832
function reverse () {
    $rev = $this;
    	$rev->edits = array();
    	foreach ($this->edits as $edit) {
    		$rev->edits[] = $edit->reverse();
    	}
    return $rev;
    }
940103
public function getBalance($currency = '')
    {
        $currency = strtoupper($currency);
        $url = 'balance';
        if (!empty($currency)) {
            $url .= '/' . strtoupper($currency);
        }

        $requestResult = $this->sendRequest($url);

        return $this->handleResult($requestResult);
    }
991346
public function getBinary()
    {
        $data = '';

        $guid = str_replace('-', '', $this->value);

        foreach ($this->octetSections as $section) {
            $data .= $this->parseSection($guid, $section, true);
        }

        return hex2bin($data);
    }
693580
public function valid()
    {
        try {
            $this->g->current();
            return $this->e === null && $this->g->valid() && $this->g->key() !== CoInterface::RETURN_WITH;
        } catch (\Throwable $e) {} catch (\Exception $e) {}
        $this->e = $e;
        return false;
    }
255406
public function getFTotalPrice()
    {
        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->getPrice()->getPrice());
    }
361624
public function getQrString(): string
    {
        $this->checkProperties();

        $qr = "SPD*1.0*";
        $qr .= sprintf("ACC:%s*", $this->getIBAN());
        $qr .= sprintf("AM:%.2f*", $this->amount);
        $qr .= sprintf("CC:%s*", strtoupper($this->currency));

        if ($this->repeat) {
            $qr .= sprintf("X-PER:%d*", $this->repeat);
        }
        if ($this->comment) {
            $qr .= sprintf("MSG:%.60s*", $this->comment);
        }
        if ($this->internalId) {
            $qr .= sprintf("X-ID:%s*", $this->internalId);
        }
        if ($this->variableSymbol) {
            $qr .= sprintf("X-VS:%d*", $this->variableSymbol);
        }
        if ($this->specificSymbol) {
            $qr .= sprintf("X-SS:%d*", $this->specificSymbol);
        }
        if ($this->constantSymbol) {
            $qr .= sprintf("X-KS:%d*", $this->constantSymbol);
        }
        if (($dueDate = $this->getDueDate())) {
            $qr .= sprintf("DT:%s*", $dueDate->format('Ymd'));
        }

        return substr($qr, 0, -1);
    }
1158529
public function polarString()
    {
        if ($this->isZero()) {
            return '0';
        }

        $rho = $this->checkIntType($this->radius()->asFloatType()->get());
        $theta = $this->checkIntType($this->theta()->asFloatType()->get());
        $tpattern = (is_int($theta) ? 'cos %1$d + i⋅sin %1$d' : 'cos %1$f + i⋅sin %1$f');

        if ($rho == 1) {
            return sprintf($tpattern, $theta);
        }
        
        $rpattern = (is_int($rho) ? '%2$d' : '%2$f');
        $pattern = "{$rpattern}({$tpattern})";
        
        return sprintf($pattern, $theta, $rho);
    }
169446
public function getCheckDigits()
    {
        $checkDigits = '';
        $iban = $this->getIban();
        if (!empty($iban)) {
            $checkDigits = substr($iban, 2, 2);
        }
        return $checkDigits;
    }
1308188
public function getCurrencyNumeric()
    {
        $currency = Currency::find($this->getCurrency());

        return $currency ? $currency->getNumeric() : null;
    }
612543
protected static function mintRand(): string
    {
        $uuid = static::randomBytes(16);
        // set variant
        $uuid[8] = \chr(\ord($uuid[8]) & static::CLEAR_VAR | static::VAR_RFC);
        // set version
        $uuid[6] = \chr(\ord($uuid[6]) & static::CLEAR_VER | static::VERSION_4);

        return $uuid;
    }
61482
public function balance() {
        $data = $this->getSend()->parameters([
            'method' => 'GetNum'
        ])->json();
        if ($data['code'] == 2) {
            return $data['num'];
        }
        throw new \Exception($data['msg']);
    }
1340321
public function getCeil()
	{
		if ( $this->getIsDecimal() === false )
		{
			return $this;
		}

		if ( $this->getIsNegative() === true )
		{
			return new DecimalValue( bcadd( $this->_value, '0', 0 ) );
		}

		return new DecimalValue( bcadd( $this->_value, '1', 0 ) );  // Add one and truncate
	}
904613
public function flip($pos = null){
		
		if(\is_int($pos)){
			$this->_List[$pos] = !$this->_List[$pos];
		}
		else{
			$this->_List = $this->_List->map(function($v){
				return !$v;
			});
		}
		
	}
700929
public function getPrevChar()
	{
		if( $this->direction == ">" )
			$this->pointer--;
		if( $this->pointer <= $this->count() &&  $this->pointer > 0 )
		{
			$this->direction = "<";
			$this->pointer--;
			$character = $this->buffer[$this->pointer];
		}
		return $character;
	}