<commit_before><?php
/**
 * Created by RidaSmart Apps UG (haftungsbeschränkt).
 * Initial version by: ridaamirini
 * Initial version created on: 26.08.17 - 16:22
 */

namespace App\Command;



use App\Schema\ConfigFile;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CommandInit extends Command
{
    protected function configure()
    {
        $this->setName('init')
            ->setDescription('Initializes a new project');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln(getcwd());
        $config = new ConfigFile();
        //if ($config->save(getcwd()) === FALSE)  return $output->writeln('<errorr>Cannot write phpqb.json!!!</errorr>');

        //$output->writeln('phpqb.json successfully created.');
        return false;
    }
}<commit_msg>Added CLI<commit_after><?php
/**
 * Created by RidaSmart Apps UG (haftungsbeschränkt).
 * Initial version by: ridaamirini
 * Initial version created on: 26.08.17 - 16:22
 */

namespace App\Command;



use App\Schema\ConfigFile;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CommandInit extends Command
{
    protected function configure()
    {
        $this->setName('init')
            ->setDescription('Initializes a new project');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $path = getcwd();
        $output->writeln(getcwd());
        $config = new ConfigFile();

        if (!is_writable($path)) return $output->writeln('<errorr>Permission denied to write phpqb.json!!!</errorr>');
        if ($config->save($path) === FALSE)  return $output->writeln('<errorr>Cannot write phpqb.json!!!</errorr>');

        $output->writeln('phpqb.json successfully created.');
        return false;
    }
}
{'fraction_non_alphanumeric': 0.1374312843578211, 'fraction_numerical': 0.009995002498750625, 'mean_word_length': 3.560364464692483, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 22, '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': '3509983', 'n_tokens_mistral': 610, 'n_tokens_neox': 579, 'n_words': 133}