<commit_before><?php
/**
 * @copyright	Copyright (C) 2007 - 2015 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		Mozilla Public License, version 2.0
 * @link		http://github.com/joomlatools/joomlatools-console for the canonical source repository
 */

namespace Joomlatools\Console\Command\Site;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question;
use Joomlatools\Console\Joomla\Util;

abstract class AbstractSite extends Command
{
    protected $site;
    protected $www;

    protected $target_dir;

    protected static $files;

    protected function configure()
    {
        if (empty(self::$files)) {
            self::$files = Util::getTemplatePath() . '/bin/.files';
        }

        $this->addArgument(
            'site',
            InputArgument::REQUIRED,
            'Alphanumeric site name. Also used in the site URL with .test domain'
        )->addOption(
            'www',
            null,
            InputOption::VALUE_REQUIRED,
            "Web server root",
            '/var/www'
        )
        ->addOption(
            'use-webroot-dir',
            null,
            InputOption::VALUE_NONE,
            "Uses directory specified with --www as the site install dir"
         )
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->site       = $input->getArgument('site');
        $this->www        = $input->getOption('www');
        echo "WR OPTION ".$input->getOption('use-webroot-dir');
        if ($input->getOption('use-webroot-dir')) {
            $this->target_dir = $this->www;
        } else {
            $this->target_dir = $this->www.'/'.$this->site;
        }
        echo "TARGET DIR ".$this->target_dir;
    }

    /**
     * Prompt user to fill in a value
     *
     * @param InputInterface $input
     * @param OutputInterface $output
     * @param $label    string          The description of the value<commit_msg>removed debugging echos<commit_after><?php
/**
 * @copyright	Copyright (C) 2007 - 2015 <NAME> and Timble CVBA. (http://www.timble.net)
 * @license		Mozilla Public License, version 2.0
 * @link		http://github.com/joomlatools/joomlatools-console for the canonical source repository
 */

namespace Joomlatools\Console\Command\Site;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question;
use Joomlatools\Console\Joomla\Util;

abstract class AbstractSite extends Command
{
    protected $site;
    protected $www;

    protected $target_dir;

    protected static $files;

    protected function configure()
    {
        if (empty(self::$files)) {
            self::$files = Util::getTemplatePath() . '/bin/.files';
        }

        $this->addArgument(
            'site',
            InputArgument::REQUIRED,
            'Alphanumeric site name. Also used in the site URL with .test domain'
        )->addOption(
            'www',
            null,
            InputOption::VALUE_REQUIRED,
            "Web server root",
            '/var/www'
        )
        ->addOption(
            'use-webroot-dir',
            null,
            InputOption::VALUE_NONE,
            "Uses directory specified with --www as the site install dir"
         )
        ;
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->site       = $input->getArgument('site');
        $this->www        = $input->getOption('www');
        if ($input->getOption('use-webroot-dir')) {
            $this->target_dir = $this->www;
        } else {
            $this->target_dir = $this->www.'/'.$this->site;
        }
    }

    /**
     * Prompt user to fill in a value
     *
     * @param InputInterface $input
     * @param OutputInterface $output
     * @param $label    string          The description of the value
{'fraction_non_alphanumeric': 0.12048757618377871, 'fraction_numerical': 0.0046882325363338025, 'mean_word_length': 2.264728385615914, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 18, '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': '6267230', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1206, 'n_words': 283}