@param array $aAddressData

@return bool
196677
public function UpdateBillingAddress($aAddressData)
    {
        $oOldShippingAddress = clone $this->GetShippingAddress();
        $oOldBillingAddress = clone $this->GetBillingAddress();

        $bUpdated = parent::UpdateBillingAddress($aAddressData);
        $oNewShippingAddress = $this->GetShippingAddress();
        if (false === $oNewShippingAddress->hasSameDataInSqlData($oOldShippingAddress)) {
            $this->hookChangedShippingAddress($oOldShippingAddress, $oNewShippingAddress);
        }
        $oNewBillingAddress = $this->GetBillingAddress();
        if (false === $oNewBillingAddress->hasSameDataInSqlData($oOldBillingAddress)) {
            $this->hookChangedBillingAddress($oOldBillingAddress, $oNewBillingAddress);
        }

        return $bUpdated;
    }
734270
public function removePostDataSet ($array) {
		if (!Arrays::IsTraversable($array)) {
			return false;
		}
		foreach ($array as $name) {
			if (isset($this->request->data->$name)) {
				Request::RemovePostData($name);
				unset($this->request->data->$name);
			}
		}
		return true;
	}
559039
private function _readBIFF5CellRangeAddressFixed($subData)
	{
		// offset: 0; size: 2; index to first row
		$fr = self::_GetInt2d($subData, 0) + 1;

		// offset: 2; size: 2; index to last row
		$lr = self::_GetInt2d($subData, 2) + 1;

		// offset: 4; size: 1; index to first column
		$fc = ord($subData{4});

		// offset: 5; size: 1; index to last column
		$lc = ord($subData{5});

		// check values
		if ($fr > $lr || $fc > $lc) {
			throw new PHPExcel_Reader_Exception('Not a cell range address');
		}

		// column index to letter
		$fc = PHPExcel_Cell::stringFromColumnIndex($fc);
		$lc = PHPExcel_Cell::stringFromColumnIndex($lc);

		if ($fr == $lr and $fc == $lc) {
			return "$fc$fr";
		}
		return "$fc$fr:$lc$lr";
	}
323815
protected function UpdateShippingAddress($aAddress)
    {
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($oUser->DHLPackStationStatusChanged($aAddress)) {
            $aAddress = $oUser->fillPackStationFieldValue($aAddress);
            if (true === $this->isAddressBillingAddress($aAddress, $oUser) &&
                true === $this->isAddressPackstation($aAddress)
            ) {
                $this->getFlashMessage()->addMessage(
                    TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING,
                    'PkgShopDhlPackstation-ERROR-SHIPPING-IS-BILLING-MAY-NOT-BE-PACKSTATION'
                );

                return false;
            }
            $bUpdateOk = $oUser->UpdateShippingAddress($aAddress);
            $oShippingAddress = $oUser->GetShippingAddress();
            if ($oShippingAddress) {
                $bUpdateOk = $oShippingAddress->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING);
            }
        } else {
            $bUpdateOk = parent::UpdateShippingAddress($aAddress);
        }

        return $bUpdateOk;
    }
663326
public static function isAddress($string) {
        static $pattern = '/^([a-zäöüÄÖÜ](-?[a-zäöüßÄÖÜé])+\.? *)+[a-z0-9\/.-]*$/';

        return is_string($string) && strlen($string) && preg_match($pattern, strtolower($string));
    }
1254236
private function isDataSetProperly(array $data): bool
    {
        return (isset($data["in"]) && isset($data["out"]) && isset($data["from"]) && isset($data["to"]));
    }
614089
protected static function clientIdArrayToAddressArray(array $client_id_array)
    {
        $address_connection_array = array();
        foreach ($client_id_array as $client_id) {
            $address_data = Context::clientIdToAddress($client_id);
            if ($address_data) {
                $address                                                            = long2ip($address_data['local_ip']) .
                    ":{$address_data['local_port']}";
                $address_connection_array[$address][$address_data['connection_id']] = $address_data['connection_id'];
            }
        }
        return $address_connection_array;
    }
1053725
private function isAddressComplete($address)
    {
        foreach ($this->requiredAddressFields as $field) {
            if (empty($address[$field])) {
                return false;
            }
        }
        return true;
    }
1343156
private function _readBIFF8CellRangeAddressList($subData)
	{
		$cellRangeAddresses = array();

		// offset: 0; size: 2; number of the following cell range addresses
		$nm = self::_GetInt2d($subData, 0);

		$offset = 2;
		// offset: 2; size: 8 * $nm; list of $nm (fixed) cell range addresses
		for ($i = 0; $i < $nm; ++$i) {
			$cellRangeAddresses[] = $this->_readBIFF8CellRangeAddressFixed(substr($subData, $offset, 8));
			$offset += 8;
		}

		return array(
			'size' => 2 + 8 * $nm,
			'cellRangeAddresses' => $cellRangeAddresses,
		);
	}
176077
function fromRawData($data)
    {
        $versionVarInt = VarInt::readUnsignedVarInt($data);
        $data = substr($data, $versionVarInt->getDataLength());

        $addressStringLength = VarInt::readUnsignedVarInt($data);
        $data = substr($data, $addressStringLength->getDataLength());

        $address = substr($data, 0, $addressStringLength->getValue());
        $data = substr($data, $addressStringLength->getValue());

        $portShort = unpack('nshort', substr($data, 0, 2))['short'];
        $data = substr($data, 2);

        $nextVarInt = VarInt::readUnsignedVarInt($data);

        try {
            $nextStage = Stage::get($nextVarInt->getValue());

            //disconnect if not a valid stage
            if ($nextStage != Stage::LOGIN() && $nextStage != Stage::STATUS()) {
                throw new InvalidDataException('Stage must be LOGIN or STATUS on handshake');
            }

            //set all of the data
            $this->setNextStage($nextStage)
                ->setServerPort($portShort)
                ->setProtocolVersion($versionVarInt->getValue())
                ->setServerAddress($address);
        } catch (InvalidArgumentException $ex) {
            throw new InvalidDataException('Stage is not a valid number');
        }
    }
74070
public function send(array $data)
    {
        $text = self::sanitizeText($data['text']);
        $to   = preg_replace("/[(,),\-,\s]/", "", $data['to']);
        $from = preg_replace("/[(,),\-,\s]/", "", $data['from']);

        $this->client->messages->create($to, ['from' => $from, 'body' => $text]);

        return true;
    }
974879
public function searchPage(array $data)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_PAGE_SEARCH_PREFIX, $data, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errcode']) && !$result['errcode'] ? $result['data'] : false;
    }
904157
public static function checkKey(array $aData) {

		foreach ($aData as $sKey => $mVal) {
			if (strpos($sKey, '$') !== FALSE || strpos($sKey, '.') !== FALSE) {
				return FALSE;
			}
			if (is_array($mVal) && !self::checkKey($mVal)) {
				return FALSE;
			}
		}
		return TRUE;
	}
1071185
private function sendEventData(array $eventData)
    {
        $socket = $this->prepareSocket();
        $datagram = json_encode($eventData);
        $result = socket_write($socket, $datagram, strlen($datagram));
        if ($result === false) {
            $this->prepareSocket(true);
        }
        return $result;
    }
659330
private function logAddressData($addressData) {
        $this->bugsnag->registerCallback(function ($report) use ($addressData) {
            $report->setMetaData([
                'ADDRESS_DATA' => $addressData
            ]);
        });
    }
220861
protected function checkZoneIdByAddressId($condition, $data, $key)
    {
        $address = $this->address->get($data['data']['order'][$key]);

        if (empty($address)) {
            return false;
        }

        $fields = array('country_zone_id', 'state_zone_id', 'city_zone_id');

        $ids = array();

        foreach ($fields as $field) {
            $ids[] = $address[$field];
        }

        return $this->compare($ids, $condition['value'], $condition['operator']);
    }
817432
private function _readBIFF5CellRangeAddressList($subData)
	{
		$cellRangeAddresses = array();

		// offset: 0; size: 2; number of the following cell range addresses
		$nm = self::_GetInt2d($subData, 0);

		$offset = 2;
		// offset: 2; size: 6 * $nm; list of $nm (fixed) cell range addresses
		for ($i = 0; $i < $nm; ++$i) {
			$cellRangeAddresses[] = $this->_readBIFF5CellRangeAddressFixed(substr($subData, $offset, 6));
			$offset += 6;
		}

		return array(
			'size' => 2 + 6 * $nm,
			'cellRangeAddresses' => $cellRangeAddresses,
		);
	}