<commit_before><?php namespace Orchestra\Model\Value;

use Illuminate\Support\Arr;
use Illuminate\Support\Fluent;

class Meta extends Fluent
{
    /**
     * Get an attribute from the container.
     *
     * @param  string  $key
     * @param  mixed   $default
     *
     * @return mixed
     */
    public function get($key, $default = null)
    {
        return Arr::get($this->attributes, $key, $default);
    }

    /**
     * Set a value from a key.
     *
     * @param  string  $key    A string of key to add the value.
     * @param  mixed   $value  The value.
     *
     * @return $this
     */
    public function put($key, $value = '')
    {
        Arr::set($this->attributes, $key, $value);

        return $this;
    }

    /**
     * Forget a key.
     *
     * @param  string  $key
     *
     * @return $this
     */
    public function forget($key)
    {
        Arr::forget($this->attributes, $key);

        return $this;
    }
}<commit_msg>Add simple transformer to fluent interface.<commit_after><?php namespace Orchestra\Model\Value;

use Illuminate\Support\Arr;
use Illuminate\Support\Fluent;

class Meta extends Fluent
{
    /**
     * Get an attribute from the container.
     *
     * @param  string  $key
     * @param  mixed   $default
     *
     * @return mixed
     */
    public function get($key, $default = null)
    {
        return Arr::get($this->attributes, $key, $default);
    }

    /**
     * Set a value from a key.
     *
     * @param  string  $key    A string of key to add the value.
     * @param  mixed   $value  The value.
     *
     * @return $this
     */
    public function put($key, $value = '')
    {
        Arr::set($this->attributes, $key, $value);

        return $this;
    }

    /**
     * Forget a key.
     *
     * @param  string  $key
     *
     * @return $this
     */
    public function forget($key)
    {
        Arr::forget($this->attributes, $key);

        return $this;
    }

    /**
     * Transform each item in the attributes using a callback.
     *
     * @param  callable  $callback
     * @return $this
     */
    public function transform(callable $callback)
    {
        $this->attributes = $callback($this);

        return $this;
    }
}
{'fraction_non_alphanumeric': 0.12948028673835124, 'fraction_numerical': 0.0, 'mean_word_length': 1.815889029003783, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '4182549', 'n_tokens_mistral': 700, 'n_tokens_neox': 698, 'n_words': 191}