<commit_before><?php

include_once 'BottomlineWrapperBase.php';

class BottomlineWrapper extends BottomLineWrapperBase
{
    /**
     * @var mixed $value
     */
    private $value;

    /**
     * BottomlineWrapper constructor.
     *
     * @param mixed $value the value that is going to be chained
     */
    public function __construct($value)
    {
        $this->value = $value;
    }

    /**
     * dynamically calls bottomline function, prepend the list of parameters with the current collection list
     *
     * @param string $functionName must be a valid bottomline function
     * @param array  $params
     *
     * @throws \Exception
     *
     * @return $this
     */
    public function __call($functionName, $params)
    {
        if (is_callable('__', $functionName)) {
            $params = $params == null ? [] : $params;
            $params = __::prepend($params, $this->value);
            $this->value = call_user_func_array(array('__', $functionName), $params);
            return $this;
        } else {
            throw new \Exception("Invalid function {$functionName}");
        }
    }<commit_msg>Throw BacFunctionCallException in our sequence<commit_after><?php

include_once 'BottomlineWrapperBase.php';

class BottomlineWrapper extends BottomLineWrapperBase
{
    /**
     * @var mixed $value
     */
    private $value;

    /**
     * BottomlineWrapper constructor.
     *
     * @param mixed $value the value that is going to be chained
     */
    public function __construct($value)
    {
        $this->value = $value;
    }

    /**
     * dynamically calls bottomline function, prepend the list of parameters with the current collection list
     *
     * @param string $functionName must be a valid bottomline function
     * @param array  $params
     *
     * @throws \BadFunctionCallException
     *
     * @return $this
     */
    public function __call($functionName, $params)
    {
        if (is_callable('__', $functionName)) {
            $params = $params == null ? [] : $params;
            $params = __::prepend($params, $this->value);
            $this->value = call_user_func_array(array('__', $functionName), $params);

            return $this;
        }

        throw new \BadFunctionCallException("Invalid function {$functionName}");
    }
{'fraction_non_alphanumeric': 0.11371527777777778, 'fraction_numerical': 0.0, 'mean_word_length': 2.3797653958944283, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6068460', 'n_tokens_mistral': 642, 'n_tokens_neox': 627, 'n_words': 175}