<commit_before><?php
namespace Server;

class Utils
{
    public static function pluck($list, $key)
    {
        $value_array = array();
        if($list)
        {
            foreach($list as $item)
            {
                $value_array =$item[$key];
            }
        }
        return $value_array;
    }
    
    public static function reject(array $list, $callback)
    {
        $arr = array();
        foreach($list as $item)
        {
            if(!call_user_func($callback, $item))
            {
                $arr[] = $item;
            }
        }
        return $arr;
    }
    
    public static function any(array $list, $callback)
    {
        foreach($list as $item)
        {
            if(call_user_func($callback, $item))
            {
                return true;
            }
        }
        return false;
    }<commit_msg>fix pluck<commit_after><?php
namespace Server;

class Utils
{
    public static function pluck($list, $key)
    {
        $value_array = array();
        if($list)
        {
            foreach($list as $item)
            {
                $value_array[] =$item[$key];
            }
        }
        return $value_array;
    }
    
    public static function reject(array $list, $callback)
    {
        $arr = array();
        foreach($list as $item)
        {
            if(!call_user_func($callback, $item))
            {
                $arr[] = $item;
            }
        }
        return $arr;
    }
    
    public static function any(array $list, $callback)
    {
        foreach($list as $item)
        {
            if(call_user_func($callback, $item))
            {
                return true;
            }
        }
        return false;
    }
{'fraction_non_alphanumeric': 0.11600928074245939, 'fraction_numerical': 0.0, 'mean_word_length': 1.2172236503856042, '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': '7138417', 'n_tokens_mistral': 496, 'n_tokens_neox': 490, 'n_words': 105}