public static function checkAttributes(array $result)
    {
        $expectedAttributes = [
            self::ON_PEP_LIST_KEY,
            self::ON_WATCH_LIST_KEY,
            self::ON_WATCH_LIST_KEY,
        ];
        $providedAttributes = array_keys($result);
        $missingAttr = array_diff($expectedAttributes, $providedAttributes);

        // Throw an error if any expected attribute is missing.
        if (!empty($missingAttr)) {
            throw new AmlException('Missing attributes from the result: ' . implode(',', $missingAttr), 106);
        }
    }
public static function checkAttributes(array $result)
    {
        $expectedAttributes = [
            self::ON_PEP_LIST_KEY,
            self::ON_WATCH_LIST_KEY,
            self::ON_WATCH_LIST_KEY,
        ];
        $providedAttributes = array_keys($result);
        $missingAttr = array_diff($expectedAttributes, $providedAttributes);

        // Throw an error if any expected attribute is missing.
        if (!empty($missingAttr)) {
            throw new AmlException('Missing attributes from the result: ' . implode(',', $missingAttr), 106);
        }
    }
public static function checkAttributes ( array $ result ) { $ expectedAttributes = [ self :: ON_PEP_LIST_KEY , self :: ON_WATCH_LIST_KEY , self :: ON_WATCH_LIST_KEY , ] ; $ providedAttributes = array_keys ( $ result ) ; $ missingAttr = array_diff ( $ expectedAttributes , $ providedAttributes ) ; // Throw an error if any expected attribute is missing. if ( ! empty ( $ missingAttr ) ) { throw new AmlException ( 'Missing attributes from the result: ' . implode ( ',' , $ missingAttr ) , 106 ) ; } }
Check if all the attributes are included in the result.

@param array $result

@throws \Yoti\Exception\AmlException
Check if all the attributes are included in the result .