<commit_before><?php
/**
 * @license MIT
 * @author <NAME> <<EMAIL>>
 */
namespace Dspbee\Bundle\Console;
use Dspbee\Bundle\Common\TFileSystem;

/**
 * Console utility.
 *
 * Class Controller
 * @package Dspbee\Bundle\Console
 */
class Controller
{
    use TFileSystem;

    public static function process($root)
    {
        $server = filter_input_array(INPUT_SERVER);
        $argv = $server['argv'];
        array_shift($argv);
        switch ($argv[0]) {
            case 'cache:clear':
                if ($handle = opendir($root)) {
                    while (false !== ($entry = readdir($handle))) {
                        if ($entry != "." && $entry != "..") {
                            $path = $root . '/' . $entry . '/view/cache';
                            if (file_exists($path)) {
                                self::removeFromDir($path);
                            }
                        }
                    }
                    closedir($handle);
                }
                break;
            default:
                echo "\nAvailable commands:\n\n";
                echo "cache:clear\n";
        }
    }
}<commit_msg>FileSystem trait<commit_after><?php
/**
 * @license MIT
 * @author <NAME> <<EMAIL>>
 */
namespace Dspbee\Bundle\Console;

use Dspbee\Bundle\Common\TFileSystem;

/**
 * Console utility.
 *
 * Class Controller
 * @package Dspbee\Bundle\Console
 */
class Controller
{
    use TFileSystem;

    public static function process($root)
    {
        $server = filter_input_array(INPUT_SERVER);
        $argv = $server['argv'];
        array_shift($argv);
        switch ($argv[0]) {
            case 'cache:clear':
                if ($handle = opendir($root)) {
                    while (false !== ($entry = readdir($handle))) {
                        if ($entry != "." && $entry != "..") {
                            $path = $root . '/' . $entry . '/view/cache';
                            if (file_exists($path)) {
                                self::removeFromDir($path);
                            }
                        }
                    }
                    closedir($handle);
                }
                break;
            default:
                echo "\nAvailable commands:\n\n";
                echo "cache:clear\n";
        }
    }
}
{'fraction_non_alphanumeric': 0.14174589455488332, 'fraction_numerical': 0.000864304235090752, 'mean_word_length': 1.2410454985479187, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '226694', 'n_tokens_mistral': 628, 'n_tokens_neox': 598, 'n_words': 117}