<commit_before><?php
namespace Hyperframework\Common;

class EventEmitter {
    /**
     * @param string $name
     * @param callable $callback
     * @return void
     */
    public static function bind($name, $callback) {
        static::getEngine()->bind($name, $callback);
    }

    /**
     * @param array $bindings
     * @return void
     */
    public static function bindAll($bindings) {
        $engine = static::getEngine();
        foreach ($bindings as $binding) {
            $engine->bind($binding['name'], $binding['callback']);
        }
    }

    /**
     * @param object $listener
     * @return void
     */
    public static function addListener($listener) {
        static::bindAll($listener->getEventBindings());
    }

    /**
     * @param string $name
     * @param callable $callback
     * @return void
     */
    public static function unbind($name, $callback) {
        static::getEngine()->unbind($name, $callback);
    }
<commit_msg>no message<commit_after><?php
namespace Hyperframework\Common;

class EventEmitter {
    /**
     * @param object $listener
     * @return void
     */
    public static function addListener($listener) {
        static::bindAll($listener->getEventBindings());
    }

    /**
     * @param object $listener
     * @return void
     */
    public static function removeListener($listener) {
        static::unbindAll($listener->getEventBindings());
    }

    /**
     * @param string $name
     * @param callable $callback
     * @return void
     */
    public static function bind($name, $callback) {
        static::getEngine()->bind($name, $callback);
    }

    /**
     * @param array $bindings
     * @return void
     */
    public static function bindAll($bindings) {
        $engine = static::getEngine();
        foreach ($bindings as $binding) {
            $engine->bind($binding['name'], $binding['callback']);
        }
    }

    /**
     * @param string $name
     * @param callable $callback
     * @return void
     */
    public static function unbind($name, $callback) {
        static::getEngine()->unbind($name, $callback);
    }

{'fraction_non_alphanumeric': 0.14575471698113207, 'fraction_numerical': 0.0, 'mean_word_length': 2.3613312202852614, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '4982084', 'n_tokens_mistral': 594, 'n_tokens_neox': 588, 'n_words': 135}