<commit_before><?php

class PHPUnitUtil
{
    // http://stackoverflow.com/questions/249664/best-practices-to-test-protected-methods-with-phpunit
    public static function callMethod($obj, $name, array $args = array()) {
        $class = new ReflectionClass($obj);
        $method = $class->getMethod($name);
        $method->setAccessible(true);
        return $method->invokeArgs($obj, $args);
    }
}

/*
 * This file is part of Raven.
 *
 * (c) Sentry Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

// XXX: Is there a better way to stub the client?
class Dummy_Raven_Client extends Raven_Client
{
    private $__sent_events = array();

    public function getSentEvents()
    {
        return $this->__sent_events;
    }
    public function send($data)
    {
        $this->__sent_events[] = $data;
    }
    public function is_http_request()
    {
        return true;
    }<commit_msg>setAccessible only works on 5.3 (uh oh)<commit_after><?php

class PHPUnitUtil
{
    // http://stackoverflow.com/questions/249664/best-practices-to-test-protected-methods-with-phpunit
    public static function callMethod($obj, $name, array $args = array()) {
        $class = new ReflectionClass($obj);
        $method = $class->getMethod($name);
        if (phpversion() >= 5.3) {
            $method->setAccessible(true);
        }
        return $method->invokeArgs($obj, $args);
    }
}

/*
 * This file is part of Raven.
 *
 * (c) Sentry Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

// XXX: Is there a better way to stub the client?
class Dummy_Raven_Client extends Raven_Client
{
    private $__sent_events = array();

    public function getSentEvents()
    {
        return $this->__sent_events;
    }
    public function send($data)
    {
        $this->__sent_events[] = $data;
    }
    public function is_http_request()
    {
        return true;
    }
{'fraction_non_alphanumeric': 0.1194322075379344, 'fraction_numerical': 0.00783162016642193, 'mean_word_length': 2.8063314711359406, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '3722836', 'n_tokens_mistral': 629, 'n_tokens_neox': 612, 'n_words': 171}