<commit_before><?php

namespace Scheb\Tombstone\Analyzer\Source;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeVisitor\NameResolver;
use Scheb\Tombstone\Analyzer\TombstoneIndex;
use Scheb\Tombstone\Tombstone;

class TombstoneVisitor extends NameResolver
{
    /**
     * @var string|null
     */
    private $currentClass = null;

    /**
     * @var string[]
     */
    private $currentMethod = array();

    /**
     * @var string
     */
    private $file;

    /**
     * @var TombstoneIndex
     */
    private $tombstoneIndex;

    /**
     * @param TombstoneIndex $tombstoneIndex
     */
    public function __construct(TombstoneIndex $tombstoneIndex)
    {
        $this->tombstoneIndex = $tombstoneIndex;
    }

    /**
     * @param string $file
     */
    public function setCurrentFile($file)
    {
        $this->file = $file;
    }

    public function enterNode(Node $node)
    {
        parent::enterNode($node);<commit_msg>Fix construction of TombstoneVisitor<commit_after><?php

namespace Scheb\Tombstone\Analyzer\Source;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use PhpParser\NodeVisitor\NameResolver;
use Scheb\Tombstone\Analyzer\TombstoneIndex;
use Scheb\Tombstone\Tombstone;

class TombstoneVisitor extends NameResolver
{
    /**
     * @var string|null
     */
    private $currentClass = null;

    /**
     * @var string[]
     */
    private $currentMethod = array();

    /**
     * @var string
     */
    private $file;

    /**
     * @var TombstoneIndex
     */
    private $tombstoneIndex;

    /**
     * @param TombstoneIndex $tombstoneIndex
     */
    public function __construct(TombstoneIndex $tombstoneIndex)
    {
        parent::__construct();
        $this->tombstoneIndex = $tombstoneIndex;
    }

    /**
     * @param string $file
     */
    public function setCurrentFile($file)
    {
        $this->file = $file;
    }

    public function enterNode(Node $node)
    {
        parent::enterNode($node);
{'fraction_non_alphanumeric': 0.11938325991189427, 'fraction_numerical': 0.0, 'mean_word_length': 2.741350906095552, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4905318', 'n_tokens_mistral': 742, 'n_tokens_neox': 737, 'n_words': 133}