<commit_before><?php namespace Way\Generators\Commands;

use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Way\Generators\Templates\Data\Controller as ControllerData;

class ApiControllerGeneratorCommand extends GeneratorCommand {

    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'generate:api';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Generate a API controller';

    /**
     * Get the path to the template for the generator.
     *
     * @return mixed
     */
    protected function getTemplatePath()
    {
        return $this->getPathByOptionOrConfig('templatePath', 'controller_template_path');
    }

    /**
     * Fetch the template data.
     *
     * @return array
     */
    protected function getTemplateData()
    {
        return [
            'NAME' => $this->argument('name'),
            'NAMESPACE' => $this->argument('ns'),
            'VERSION' => $this->argument('version')
        ];
    }

    /**
     * The path to where the file will be created.
     *
     * @return mixed
     */
    protected function getFileGenerationPath()
    {
        $path = $this->getPathByOptionOrConfig('path', 'controller_target_path');

        return $path. '/Api/' . $this->argument('name') . '.php';
    }

    /**
     * Get the console command arguments.
     *
     * @return array
     */
    protected function getArguments()
    {
        return [
            ['name', InputArgument::REQUIRED, 'Api Name'],
            ['version', InputArgument::REQUIRED, 'Api Version'],
            ['ns', InputArgument::OPTIONAL, 'Controller Namespace']
        ];
    }

}
<commit_msg>update controller path<commit_after><?php namespace Way\Generators\Commands;

use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Way\Generators\Templates\Data\Controller as ControllerData;

class ApiControllerGeneratorCommand extends GeneratorCommand {

    /**
     * The console command name.
     *
     * @var string
     */
    protected $name = 'generate:api';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Generate a API controller';

    /**
     * Get the path to the template for the generator.
     *
     * @return mixed
     */
    protected function getTemplatePath()
    {
        return $this->getPathByOptionOrConfig('templatePath', 'api_controller_template_path');
    }

    /**
     * Fetch the template data.
     *
     * @return array
     */
    protected function getTemplateData()
    {
        return [
            'NAME' => $this->argument('name'),
            'NAMESPACE' => $this->argument('ns'),
            'VERSION' => $this->argument('version')
        ];
    }

    /**
     * The path to where the file will be created.
     *
     * @return mixed
     */
    protected function getFileGenerationPath()
    {
        $path = $this->getPathByOptionOrConfig('path', 'controller_target_path');

        return $path. '/Api/' . $this->argument('name') . 'Controller.php';
    }

    /**
     * Get the console command arguments.
     *
     * @return array
     */
    protected function getArguments()
    {
        return [
            ['name', InputArgument::REQUIRED, 'Api Name'],
            ['version', InputArgument::REQUIRED, 'Api Version'],
            ['ns', InputArgument::OPTIONAL, 'Controller Namespace']
        ];
    }

}

{'fraction_non_alphanumeric': 0.12819791959516447, 'fraction_numerical': 0.0, 'mean_word_length': 2.2374886260236577, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '5105876', 'n_tokens_mistral': 973, 'n_tokens_neox': 972, 'n_words': 230}