public static function getRequiredFields(AddressFormat $addressFormat, FieldOverrides $fieldOverrides)
    {
        $requiredFields = $addressFormat->getRequiredFields();
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getOptionalFields());
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getHiddenFields());
        if ($fieldOverrides->getRequiredFields()) {
            $requiredFields = array_merge($requiredFields, $fieldOverrides->getRequiredFields());
            $requiredFields = array_unique($requiredFields);
        }

        return $requiredFields;
    }
public static function getRequiredFields(AddressFormat $addressFormat, FieldOverrides $fieldOverrides)
    {
        $requiredFields = $addressFormat->getRequiredFields();
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getOptionalFields());
        $requiredFields = array_diff($requiredFields, $fieldOverrides->getHiddenFields());
        if ($fieldOverrides->getRequiredFields()) {
            $requiredFields = array_merge($requiredFields, $fieldOverrides->getRequiredFields());
            $requiredFields = array_unique($requiredFields);
        }

        return $requiredFields;
    }
public static function getRequiredFields ( AddressFormat $ addressFormat , FieldOverrides $ fieldOverrides ) { $ requiredFields = $ addressFormat -> getRequiredFields ( ) ; $ requiredFields = array_diff ( $ requiredFields , $ fieldOverrides -> getOptionalFields ( ) ) ; $ requiredFields = array_diff ( $ requiredFields , $ fieldOverrides -> getHiddenFields ( ) ) ; if ( $ fieldOverrides -> getRequiredFields ( ) ) { $ requiredFields = array_merge ( $ requiredFields , $ fieldOverrides -> getRequiredFields ( ) ) ; $ requiredFields = array_unique ( $ requiredFields ) ; } return $ requiredFields ; }
Gets the required fields.

Applies field overrides to the required fields
specified by the address format.

@param AddressFormat $addressFormat   The address format.
@param FieldOverrides $fieldOverrides The field overrides.

@return string[] The required fields.
Gets the required fields .