src/UserAgent.php
private static function validateFilter($filterBy = [])
    {
        // Components of $filterBy that will not be ignored
        $filterParams = [
            'agent_name',
            'agent_type',
            'device_type',
            'os_name',
            'os_type',
        ];

        $outputFilter = [];

        foreach ($filterParams as $field) {
            if (!empty($filterBy[$field])) {
                $outputFilter[$field] = $filterBy[$field];
            }
        }

        return $outputFilter;
    }
private static function validateFilter($filterBy = [])
    {
        // Components of $filterBy that will not be ignored
        $filterParams = [
            'agent_name',
            'agent_type',
            'device_type',
            'os_name',
            'os_type',
        ];

        $outputFilter = [];

        foreach ($filterParams as $field) {
            if (!empty($filterBy[$field])) {
                $outputFilter[$field] = $filterBy[$field];
            }
        }

        return $outputFilter;
    }
private static function validateFilter ( $ filterBy = [ ] ) { // Components of $filterBy that will not be ignored $ filterParams = [ 'agent_name' , 'agent_type' , 'device_type' , 'os_name' , 'os_type' , ] ; $ outputFilter = [ ] ; foreach ( $ filterParams as $ field ) { if ( ! empty ( $ filterBy [ $ field ] ) ) { $ outputFilter [ $ field ] = $ filterBy [ $ field ] ; } } return $ outputFilter ; }
Validates the filter so that no unexpected values make their way through

@param array $filterBy
@return array
Validates the filter so that no unexpected values make their way through