<commit_before><?php

/*
 * This file is part of Class Preloader.
 *
 * (c) <NAME> <<EMAIL>>
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace ClassPreloader\Parser;

use PhpParser\NodeTraverser as BaseTraverser;

/**
 * This is the file node visitor class.
 *
 * This allows a filename to be set when visiting.
 */
class NodeTraverser extends BaseTraverser
{
    /**
     * Transverse the file.
     *
     * @param array  $nodes
     * @param string $filename
     *
     * @return \PhpParse\Node[]
     */
    public function traverseFile(array $nodes, $filename)
    {
        // Set the correct state on each visitor
        foreach ($this->visitors as $visitor) {
            if ($visitor instanceof AbstractNodeVisitor) {
                $visitor->setFilename($filename);
            }
        }

        return $this->traverse($nodes);
    }
}<commit_msg>Fixed typo<commit_after><?php

/*
 * This file is part of Class Preloader.
 *
 * (c) <NAME> <<EMAIL>>
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace ClassPreloader\Parser;

use PhpParser\NodeTraverser as BaseTraverser;

/**
 * This is the file node visitor class.
 *
 * This allows a filename to be set when visiting.
 */
class NodeTraverser extends BaseTraverser
{
    /**
     * Transverse the file.
     *
     * @param array  $nodes
     * @param string $filename
     *
     * @return \PhpParser\Node[]
     */
    public function traverseFile(array $nodes, $filename)
    {
        // Set the correct state on each visitor
        foreach ($this->visitors as $visitor) {
            if ($visitor instanceof AbstractNodeVisitor) {
                $visitor->setFilename($filename);
            }
        }

        return $this->traverse($nodes);
    }
}
{'fraction_non_alphanumeric': 0.11009174311926606, 'fraction_numerical': 0.0, 'mean_word_length': 2.443859649122807, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '7031350', 'n_tokens_mistral': 571, 'n_tokens_neox': 569, 'n_words': 187}