<commit_before><?php

namespace eien\Helpers;

use wataridori\SFS\SimpleFuzzySearch;

class BusSearch
{
    public function searchServices($query, Cached $cached)
    {
        $serviceObject = $cached->getAsArray('bus-services');

        $sfs = new SimpleFuzzySearch($serviceObject['services'], ['name']);
        $results = $sfs->search($query);<commit_msg>Allow no. to be searched as well<commit_after><?php

namespace eien\Helpers;

use wataridori\SFS\SimpleFuzzySearch;

class BusSearch
{
    public function searchServices($query, Cached $cached)
    {
        $serviceObject = $cached->getAsArray('bus-services');

        $sfs = new SimpleFuzzySearch($serviceObject['services'], [
            'name',
            'no',
        ]);
        $results = $sfs->search($query);
{'fraction_non_alphanumeric': 0.13974358974358975, 'fraction_numerical': 0.0, 'mean_word_length': 3.462857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1971119', 'n_tokens_mistral': 239, 'n_tokens_neox': 236, 'n_words': 46}