<commit_before><?php

class Denkmal_Paging_Song_Search extends Denkmal_Paging_Song_Abstract {

    /**
     * @param string $term
     */
    public function __construct($term) {
        $term = (string) $term;
        $source = new CM_PagingSource_Sql('id', 'denkmal_model_song', '`label` LIKE ?', '`label`', null, null, array('%' . $term . '%'));
        parent::__construct($source);
    }
}<commit_msg>allow sending array to paging song search<commit_after><?php

class Denkmal_Paging_Song_Search extends Denkmal_Paging_Song_Abstract {

    /**
     * @param string|string[] $term
     */
    public function __construct($term) {
        $term = (array) $term;

        $whereList = array_fill(0, count($term), 'LOWER(`label`) LIKE ?');
        $where = implode(' OR ', $whereList);

        $params = Functional\map($term, function ($value) {
            return '%' . strtolower($value) . '%';
        });

        $source = new CM_PagingSource_Sql('id', 'denkmal_model_song', $where, '`label`', null, null, $params);
        parent::__construct($source);
    }
}
{'fraction_non_alphanumeric': 0.16292134831460675, 'fraction_numerical': 0.0009363295880149813, 'mean_word_length': 3.1921568627450982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1786947', 'n_tokens_mistral': 355, 'n_tokens_neox': 341, 'n_words': 71}