<commit_before><?php namespace Fenos\Notifynder\Builder;

use InvalidArgumentException;

/**
 * Class BuilderRules
 *
 * Simple trait that define the rules that
 * the builder has to match. It required mandatory
 * fields listed in the $requiredFields property
 *
 * @package Fenos\Notifynder\Builder
 */
trait BuilderRules
{

    /**
     * @var array
     */
    private $requiredFields = ['from_id','to_id','url','category_id'];

    /**
     * Value has to be a string
     *
     * @param $value
     * @return bool
     */
    protected function isString($value)
    {
        if (! is_string($value)) {
            throw new InvalidArgumentException("The value Passed is not a string");
        }

        return true;
    }

    /**
     * Value has to be a valid Carbon Instance
     *
     * @param $value
     * @return bool | InvalidArgumentException
     */
    protected function isCarbon($value)
    {
        if(!$value isInstanceOf Carbon)
        {
            throw new InvalidArgumentException("The value Passed is not an instance of Carbon API");
        }

        return true;
    }

    /**
     * Value has to be numeric
     *
     * @param $value
     * @return bool
     */
    protected function isNumeric($value)
    {
        if (! is_numeric($value)) {
            throw new InvalidArgumentException("The value Passed must be a number");
        }

        return true;<commit_msg>Builder Rules typo for #43 tests<commit_after><?php namespace Fenos\Notifynder\Builder;

use InvalidArgumentException;

/**
 * Class BuilderRules
 *
 * Simple trait that define the rules that
 * the builder has to match. It required mandatory
 * fields listed in the $requiredFields property
 *
 * @package Fenos\Notifynder\Builder
 */
trait BuilderRules
{

    /**
     * @var array
     */
    private $requiredFields = ['from_id','to_id','url','category_id'];

    /**
     * Value has to be a string
     *
     * @param $value
     * @return bool
     */
    protected function isString($value)
    {
        if (! is_string($value)) {
            throw new InvalidArgumentException("The value Passed is not a string");
        }

        return true;
    }

    /**
     * Value has to be a valid Carbon Instance
     *
     * @param $value
     * @return bool | InvalidArgumentException
     */
    protected function isCarbon($value)
    {
        if(!$value instanceof Carbon)
        {
            throw new InvalidArgumentException("The value Passed is not an instance of Carbon API");
        }

        return true;
    }

    /**
     * Value has to be numeric
     *
     * @param $value
     * @return bool
     */
    protected function isNumeric($value)
    {
        if (! is_numeric($value)) {
            throw new InvalidArgumentException("The value Passed must be a number");
        }

        return true;
{'fraction_non_alphanumeric': 0.09954273654590222, 'fraction_numerical': 0.0007034822370735139, 'mean_word_length': 2.13215859030837, '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': '6632586', 'n_tokens_mistral': 781, 'n_tokens_neox': 760, 'n_words': 246}