<commit_before><?php

namespace Brera\Utils;

/**
 * @covers \Brera\Utils\LocalFilesystem
 */
class LocalFilesystemTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var LocalFilesystem
     */
    private $filesystem;

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

    protected function setUp()
    {
        $this->filesystem = new LocalFilesystem();

        $this->testDirectory = sys_get_temp_dir() . '/brera-local-filesystem-test';

        if (!is_dir($this->testDirectory)) {
            mkdir($this->testDirectory);
        }
    }

    protected function tearDown()
    {
        $directoryIterator = new \RecursiveDirectoryIterator($this->testDirectory, \FilesystemIterator::SKIP_DOTS);

        foreach(new \RecursiveIteratorIterator($directoryIterator, \RecursiveIteratorIterator::CHILD_FIRST) as $path) {
            $path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());
        }

        rmdir($this->testDirectory);<commit_msg>Issue #67: Fix styling issue of LocalFilesystemTest<commit_after><?php

namespace Brera\Utils;

/**
 * @covers \Brera\Utils\LocalFilesystem
 */
class LocalFilesystemTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var LocalFilesystem
     */
    private $filesystem;

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

    protected function setUp()
    {
        $this->filesystem = new LocalFilesystem();

        $this->testDirectory = sys_get_temp_dir() . '/brera-local-filesystem-test';

        if (!is_dir($this->testDirectory)) {
            mkdir($this->testDirectory);
        }
    }

    protected function tearDown()
    {
        $directoryIterator = new \RecursiveDirectoryIterator($this->testDirectory, \FilesystemIterator::SKIP_DOTS);

        foreach (new \RecursiveIteratorIterator($directoryIterator, \RecursiveIteratorIterator::CHILD_FIRST) as $path) {
            $path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());
        }

        rmdir($this->testDirectory);
{'fraction_non_alphanumeric': 0.13933236574746008, 'fraction_numerical': 0.0009675858732462506, 'mean_word_length': 3.007751937984496, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2551627', 'n_tokens_mistral': 623, 'n_tokens_neox': 603, 'n_words': 98}