Business identifier code validation

@param string $sBIC code to check

@return bool
327554
public function isValidBIC($sBIC)
    {
        $oBICValidator = oxNew(\OxidEsales\Eshop\Core\SepaBICValidator::class);

        return $oBICValidator->isValid($sBIC);
    }
545141
public function isValidEntryIdentifier($identifier)
    {
        if (false === GeneralUtility::isValidUrl($identifier)) {
            return false;
        }
        $urlParts = \parse_url($identifier);
        $required = ['host', 'path', 'scheme'];
        foreach ($required as $item) {
            if (!isset($urlParts[$item]) || \mb_strlen($urlParts[$item]) <= 0) {
                return false;
            }
        }

        return true;
    }
840411
private function codecIsValid(string $codec): bool
    {
        return in_array(
            $codec, //@codeCoverageIgnore
            [
                IbmWatsonAudioFormatsInterface::CODEC_OPUS,
                IbmWatsonAudioFormatsInterface::CODEC_VORBIS
            ]
        );
    }
1302590
private function isChecksumValid()
    {
        $countryCode = $this->getCountryCode();
        $checksum = $this->getChecksum();
        $accountIdentification = $this->getAccountIdentification();
        $numericCountryCode = $this->getNumericCountryCode($countryCode);
        $numericAccountIdentification = $this->getNumericAccountIdentification($accountIdentification);
        $invertedIban = $numericAccountIdentification . $numericCountryCode . $checksum;

        return $this->bcmod($invertedIban, 97) === '1';
    }
1358011
public function validateCredentials(&$errstr = null)
    {
        try {
            $errstr = '';
            $params = $this->defaultRequestParams();
            $this->call('acquia.agent.validate', $params);
            return true;
        } catch (ResponseException $e) {
            $errstr = $e->getMessage();
            return false;
        }
    }
1223503
protected function cardValidate()
    {

        if ($this->getOpaqueDataDescriptor() && $this->getOpaqueDataValue()) {
            return;
        }

        /** @var CreditCard $card */
        $card = $this->getCard();
        $card->validate();
    }
1033245
public function confirmByCode($code)
    {
        $identity = ['confirmation_code' => $code];

        $account = $this->findByIdentity($identity);

        if($account){

            return $this->confirm($account);
        } else{

            return false;
        }
    }
1279713
public function check($code)
    {
        $promocode = Promocode::byCode($code)->first();

        if ($promocode === null) {
            throw new InvalidPromocodeException;
        }

        if ($promocode->isExpired() || ($promocode->isDisposable() && $promocode->users()->exists())) {
            return false;
        }

        return $promocode;
    }
212869
public function valid(){
        $rs = $_GET['echostr'];
        if ($this->check_signature()){
            echo $rs;
            exit;
        }else{
            if ($this->business_interface) $this->business_interface->log('valid fail. get data:'.json_encode($_GET));
            echo '';
            exit;
        }
    }
982319
public function validate()
    {
        if (is_numeric($this->categoryId) && $this->categoryId >= 1
                && is_numeric($this->forumId) && $this->forumId >= 1
                && is_numeric($this->threadId) && $this->threadId >= 1
                && !empty($this->threadSlug)) {
            return true;
        }
        return false;
    }
1247891
public function isValid(): bool
    {
        return $this->result_code === ResponseInterface::RESULT_OK
            || $this->result_code === ResponseInterface::RESULT_RECEIPT_VALID_BUT_SUB_EXPIRED;
    }
1046987
private function validateType(array $types): bool
    {
        $value = $this->value;
        $length = \strlen($value);
        $foundPrefix = false;
        $foundLength = false;
        foreach ($types as $type) {
            foreach ($this->validationData[$type]['prefixes'] as $prefix) {
                if (\substr($value, 0, \strlen($prefix)) == $prefix) {
                    $foundPrefix = true;
                    if (\in_array($length, $this->validationData[$type]['length'])) {
                        $foundLength = true;
                        break 2;
                    }
                }
            }
        }
        if (!$foundPrefix) {
            $this->setError(self::VALIDATOR_ERROR_CREDIT_CARD_NUMBER_PREFIX_NOT_MATCH);
        }
        if (!$foundLength) {
            $this->setError(self::VALIDATOR_ERROR_CREDIT_CARD_NUMBER_LENGTH_NOT_MATCH);
        }
        return $foundPrefix === true && $foundLength === true;
    }
1124881
protected function validateCode($code)
    {
        if (is_integer($code)) {
            return true;
        }

        // Plug it back in and see what we get
        if (is_string($code)) {
            return $this->set($code);
        }

        if (is_array($code)) {
            return $this->validateCodeArray($code);
        }

        return false;
    }
699066
public function isValid($intCount = null)
    {
        $blnReturn = false;
        $intDynamicCount = ($this->isDynamicCounter()) ? $this->__validator->getValue() : 0;

        for ($intCount = 0; $intCount <= $intDynamicCount; $intCount ++) {
            $blnReturn = $this->__validator->validate($intCount);

            if (! $blnReturn) {
                break;
            }
        }

        return $blnReturn;
    }
618827
public static function validate($msg, $type){
    $userId = !empty($msg["userId"]);
    $anonId = !empty($msg["anonymousId"]);
    self::assert($userId || $anonId, "Segment::${type}() requires userId or anonymousId");
  }
191555
public function validate(\OxidEsales\Eshop\Application\Model\CompanyVatIn $vatIn)
    {
        $result = false;
        $country = $this->getCountry();
        if (!is_null($country)) {
            $result = ($country->getVATIdentificationNumberPrefix() === $vatIn->getCountryCode());
            if (!$result) {
                $this->setError(self::ERROR_ID_NOT_VALID);
            }
        }

        return $result;
    }
1333272
private function _scsi()
    {
        $get_type = false;
        if (CommonFunctions::rfts('/proc/scsi/scsi', $bufr, 0, 4096, PSI_DEBUG)) {
            $bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
            foreach ($bufe as $buf) {
                if (preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i', $buf, $dev)) {
                    $get_type = true;
                    continue;
                }
                if ($get_type) {
                    preg_match('/Type:\s+(\S+)/i', $buf, $dev_type);
                    $dev = new HWDevice();
                    $dev->setName($dev[1].' '.$dev[2].' ('.$dev_type[1].')');
                    $this->sys->setScsiDevices($dev);
                    $get_type = false;
                }
            }
        }
    }