<commit_before><?php

/**
 * This file is part of the ORMiny library.
 * (c) <NAME> <<EMAIL>>
 *
 * For licensing information see the LICENSE file.
 */

namespace ORMiny\Metadata;

class Field implements Setter, Getter
{
    /**
     * @var Setter
     */
    private $setter;
    /**
     * @var Getter
     */
    private $getter;

    public function __construct(Setter $setter, Getter $getter)
    {
        $this->setter = $setter;
        $this->getter = $getter;
    }

    /**
     * @param $object
     *
     * @return mixed The field value from $object
     */
    public function get($object)
    {
        return $this->getter->get($object);
    }

    /**
     * @param $object
     * @param $value
     *
     * @return mixed The new value
     */
    public function set($object, $value)
    {
        return $this->setter->set($object, $value);
    }
}<commit_msg>Always return with the newly set value<commit_after><?php

/**
 * This file is part of the ORMiny library.
 * (c) <NAME> <<EMAIL>>
 *
 * For licensing information see the LICENSE file.
 */

namespace ORMiny\Metadata;

class Field implements Setter, Getter
{
    /**
     * @var Setter
     */
    private $setter;
    /**
     * @var Getter
     */
    private $getter;

    public function __construct(Setter $setter, Getter $getter)
    {
        $this->setter = $setter;
        $this->getter = $getter;
    }

    /**
     * @param $object
     *
     * @return mixed The field value from $object
     */
    public function get($object)
    {
        return $this->getter->get($object);
    }

    /**
     * @param $object
     * @param $value
     *
     * @return mixed The new value
     */
    public function set($object, $value)
    {
        $this->setter->set($object, $value);

        return $value;
    }
}
{'fraction_non_alphanumeric': 0.1385809312638581, 'fraction_numerical': 0.0, 'mean_word_length': 1.9933665008291874, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, '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': '2722039', 'n_tokens_mistral': 588, 'n_tokens_neox': 576, 'n_words': 155}