app/Providers/CurrencyExchangeService/FloatRatesService.php
/**
     * Filter through the xml data and return only the needed Currency Rates
     *
     * @return array
     */
Filter through the xml data and return only the needed Currency Rates
@return array
Filter through the xml data and return only the needed Currency Rates @return array
public static function filterData(): array
    {
        $rates = [];
        if (self::$ratesXml !== null) {
            foreach (self::$ratesXml->item as $item) {
                if (in_array((string)$item->targetCurrency, self::CURRENCIES, true)) {
                    $rates[(string)$item->targetCurrency]['rate'] = (string)str_replace(',','',$item->exchangeRate);
                }
            }
        }
        return $rates;
    }
public static function filterData ( ) : array { $ rates = [ ] ; if ( self :: $ ratesXml !== null ) { foreach ( self :: $ ratesXml -> item as $ item ) { if ( in_array ( ( string ) $ item -> targetCurrency , self :: CURRENCIES , true ) ) { $ rates [ ( string ) $ item -> targetCurrency ] [ 'rate' ] = ( string ) str_replace ( ',' , '' , $ item -> exchangeRate ) ; } } } return $ rates ; }
Filter through the xml data and return only the needed Currency Rates
 @return array
Filter through the xml data and return only the needed Currency Rates @return array