<commit_before><?php

class Kint_Parser_Plugin_Closure extends Kint_Parser_Plugin
{
    public function parse(&$var, Kint_Object &$o)
    {
        if (!$var instanceof Closure || !$o instanceof Kint_Object_Instance) {
            return;
        }

        $o = $o->transplant(new Kint_Object_Closure());
        $o->removeRepresentation('contents');

        $closure = new ReflectionFunction($var);

        $o->filename = $closure->getFileName();
        $o->startline = $closure->getStartLine();

        foreach ($closure->getParameters() as $param) {
            $o->parameters[] = new Kint_Object_Parameter($param);
        }

        if ($statics = $closure->getStaticVariables()) {
            if (method_exists($closure, 'getClousureThis') && $v = $closure->getClosureThis()) {
                $statics = array_merge(array('this' => $v), $statics);
            }

            foreach ($statics as $name => &$static) {
                $obj = Kint_Object::blank('$'.$name);
                $obj->depth = $o->depth + 1;
                $static = $this->parser->parse($static, $obj);
            }

            $r = new Kint_Object_Representation('Uses');
            $r->contents = $statics;
            $o->addRepresentation($r, 0);
        }
    }

    public function renderModifiers()
    {
        $out = array(
            $this->abstract ? 'abstract' : null,
            $this->final ? 'final' : null,<commit_msg>Kint_Parser_Plugin_Closure: Display parameters<commit_after><?php

class Kint_Parser_Plugin_Closure extends Kint_Parser_Plugin
{
    public function parse(&$var, Kint_Object &$o)
    {
        if (!$var instanceof Closure || !$o instanceof Kint_Object_Instance) {
            return;
        }

        $o = $o->transplant(new Kint_Object_Closure());
        $o->removeRepresentation('contents');

        $closure = new ReflectionFunction($var);

        $o->filename = $closure->getFileName();
        $o->startline = $closure->getStartLine();

        foreach ($closure->getParameters() as $param) {
            $o->parameters[] = new Kint_Object_Parameter($param);
        }

        $p = new Kint_Object_Representation('Parameters');
        $p->contents = &$o->parameters;
        $o->addRepresentation($p, 0);

        if ($statics = $closure->getStaticVariables()) {
            if (method_exists($closure, 'getClousureThis') && $v = $closure->getClosureThis()) {
                $statics = array_merge(array('this' => $v), $statics);
            }

            foreach ($statics as $name => &$static) {
                $obj = Kint_Object::blank('$'.$name);
                $obj->depth = $o->depth + 1;
                $static = $this->parser->parse($static, $obj);
            }

            $r = new Kint_Object_Representation('Uses');
            $r->contents = $statics;
            $o->addRepresentation($r, 0);
        }
    }

    public function renderModifiers()
    {
        $out = array(
            $this->abstract ? 'abstract' : null,
            $this->final ? 'final' : null,
{'fraction_non_alphanumeric': 0.1542781631978857, 'fraction_numerical': 0.0016518004625041295, 'mean_word_length': 2.1873684210526316, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 46, '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': '640977', 'n_tokens_mistral': 913, 'n_tokens_neox': 874, 'n_words': 166}