<commit_before><?php
namespace Objection\Mapper\Utils;


use Objection\Mapper\Base\Values\IObjectValuesProcessor;
use Objection\Mapper\ValuesProcessor;


class ValuesProcessorCreator
{
	/** @var IObjectValuesProcessor */
	private $objectValuesProcessor;
	
	
	/**
	 * @param IObjectValuesProcessor $processor
	 */
	public function __construct(IObjectValuesProcessor $processor) 
	{
		$this->objectValuesProcessor = $processor;
	}
	
	
	/**
	 * @param string $field
	 * @param string $glue
	 * @return static
	 */
	public function arrayToString($field, $glue = ',')
	{
		$this->objectValuesProcessor->add($field, new ValuesProcessor\ArrayToStringValueProcessor($glue));
		return $this;
	}
	
	/**
	 * @param string $field
	 * @param \Closure $toObject
	 * @param \Closure $toRawData
	 * @return static
	 */
	public function callback($field, $toObject, $toRawData)
	{
		$this->objectValuesProcessor->add($field, new ValuesProcessor\CallbackValueProcessor($toObject, $toRawData));
		return $this;
	}
}<commit_msg>Add set method to ValuesProcessorCreator<commit_after><?php
namespace Objection\Mapper\Utils;


use Objection\Mapper\Base\Values\IObjectValuesProcessor;
use Objection\Mapper\Base\Values\IValueProcessor;
use Objection\Mapper\ValuesProcessor;


class ValuesProcessorCreator
{
	/** @var IObjectValuesProcessor */
	private $objectValuesProcessor;
	
	
	/**
	 * @param IObjectValuesProcessor $processor
	 */
	public function __construct(IObjectValuesProcessor $processor) 
	{
		$this->objectValuesProcessor = $processor;
	}
	
	
	/**
	 * @param string $field
	 * @param string $glue
	 * @return static
	 */
	public function arrayToString($field, $glue = ',')
	{
		$this->objectValuesProcessor->add($field, new ValuesProcessor\ArrayToStringValueProcessor($glue));
		return $this;
	}
	
	/**
	 * @param string $field
	 * @param \Closure $toObject
	 * @param \Closure $toRawData
	 * @return static
	 */
	public function callback($field, $toObject, $toRawData)
	{
		$this->objectValuesProcessor->add($field, new ValuesProcessor\CallbackValueProcessor($toObject, $toRawData));
		return $this;
	}
	
	/**
	 * @param string $field
	 * @param IValueProcessor $processor
	 * @return static
	 */
	public function set($field, IValueProcessor $processor)
	{
		$this->objectValuesProcessor->add($field, $processor);
		return $this;
	}
}
{'fraction_non_alphanumeric': 0.12839293408013788, 'fraction_numerical': 0.0, 'mean_word_length': 4.761786600496278, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '1212480', 'n_tokens_mistral': 756, 'n_tokens_neox': 683, 'n_words': 145}