<commit_before><?php

namespace LessCompiler;

use Less_Parser;
use Phulp\PipeInterface;
use Phulp\Source;

class LessCompiler implements PipeInterface
{
    /**
     * @var string $uri
     */
    private $uri;

    /**
     * @param string $uri
     */
    public function __construct($uri = null)
    {
        $this->uri = $uri;
    }

    /**
     * @inheritdoc
     */
    public function execute(Source $src)
    {
        foreach ($src->getDistFiles() as $key => $file) {
            if (preg_match('/less$/', $file->getName())) {
                $parser = new Less_Parser();
                $parser->parseFile($file->getFullpath() . DIRECTORY_SEPARATOR . $file->getName(), $this->uri);
                $css = $parser->getCss();

                $file->setContent($css);
                $file->setDistpathname(preg_replace('/less$/', 'css', $file->getDistpathname()));
            }
        }
    }
}<commit_msg>Updating - release 0.0.3<commit_after><?php

namespace LessCompiler;

use Less_Parser;
use Phulp\PipeInterface;
use Phulp\Source;

class LessCompiler implements PipeInterface
{
    /**
     * @var string $uri
     */
    private $uri;

    /**
     * @param string $uri
     */
    public function __construct($uri = null)
    {
        $this->uri = $uri;
    }

    /**
     * @inheritdoc
     */
    public function execute(Source $src)
    {
        foreach ($src->getDistFiles() as $key => $file) {
            if (preg_match('/less$/', $file->getName()) || preg_match('/less$/', $file->getDistpathname())) {
                $parser = new Less_Parser();
                $parser->parseFile($file->getFullpath() . DIRECTORY_SEPARATOR . $file->getName(), $this->uri);
                $css = $parser->getCss();

                $file->setContent($css);
                $file->setDistpathname(preg_replace('/less$/', 'css', $file->getDistpathname()));
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.1661409043112513, 'fraction_numerical': 0.0015772870662460567, 'mean_word_length': 2.0350877192982457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, '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': '5070389', 'n_tokens_mistral': 597, 'n_tokens_neox': 575, 'n_words': 110}