public function getExternalId()
    {
        $externalIds = array_flip($this->externalIds);
        $id          = null;
        $idIndex     = null;
        foreach (['headers', 'body'] as $type) {
            if (isset($this->responseActual[$type]) && isset($this->responseActual[$type])) {
                foreach ($this->responseActual[$type] as $key => $value) {
                    $key = preg_replace('/[^a-z0-9]/', '', strtolower($key));
                    if (isset($externalIds[$key]) && (null === $idIndex || $externalIds[$key] < $idIndex)) {
                        $idIndex = $externalIds[$key];
                        $id      = $value;
                        if (0 == $idIndex) {
                            break;
                        }
                    }
                }
            }
        }

        return $id;
    }
public function getExternalId()
    {
        $externalIds = array_flip($this->externalIds);
        $id          = null;
        $idIndex     = null;
        foreach (['headers', 'body'] as $type) {
            if (isset($this->responseActual[$type]) && isset($this->responseActual[$type])) {
                foreach ($this->responseActual[$type] as $key => $value) {
                    $key = preg_replace('/[^a-z0-9]/', '', strtolower($key));
                    if (isset($externalIds[$key]) && (null === $idIndex || $externalIds[$key] < $idIndex)) {
                        $idIndex = $externalIds[$key];
                        $id      = $value;
                        if (0 == $idIndex) {
                            break;
                        }
                    }
                }
            }
        }

        return $id;
    }
public function getExternalId ( ) { $ externalIds = array_flip ( $ this -> externalIds ) ; $ id = null ; $ idIndex = null ; foreach ( [ 'headers' , 'body' ] as $ type ) { if ( isset ( $ this -> responseActual [ $ type ] ) && isset ( $ this -> responseActual [ $ type ] ) ) { foreach ( $ this -> responseActual [ $ type ] as $ key => $ value ) { $ key = preg_replace ( '/[^a-z0-9]/' , '' , strtolower ( $ key ) ) ; if ( isset ( $ externalIds [ $ key ] ) && ( null === $ idIndex || $ externalIds [ $ key ] < $ idIndex ) ) { $ idIndex = $ externalIds [ $ key ] ; $ id = $ value ; if ( 0 == $ idIndex ) { break ; } } } } } return $ id ; }
Given the response fields, attempt to assume an external ID for future correlation.
Find the best possible fit.
Given the response fields attempt to assume an external ID for future correlation . Find the best possible fit .