<commit_before><?php
namespace Kunstmaan\Skylab\Command;

use Kunstmaan\Skylab\Skeleton\BaseSkeleton;
use RuntimeException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * SetPermissionsCommand
 */
class SetPermissionsCommand extends AbstractCommand
{

    /**
     * Configures the current command.
     */
    protected function configure()
    {
        $this
            ->addDefaults()
            ->setName('permissions')
            ->setDescription('Set the permissions of a Skylab project')
            ->addArgument('name', InputArgument::REQUIRED, 'The name of the project')
            ->setHelp(<<<EOT
The <info>permissions</info> command will fix the permissions of a project.

<info>php skylab.phar permissions testproject</info>

EOT
            );
    }

    /**
     * @throws \RuntimeException
     */
    protected function doExecute()
    {
        $projectname = $this->input->getArgument('name');

        if (!$this->fileSystemProvider->projectExists($projectname)) {
            throw new RuntimeException("The $projectname project does not exist.");
        }

        $this->dialogProvider->logStep($this->output, OutputInterface::VERBOSITY_NORMAL, "Setting permissions on project $projectname");

        /** @var BaseSkeleton $baseSkeleton */<commit_msg>Bugfix: Output line in permissions command was not updated<commit_after><?php
namespace Kunstmaan\Skylab\Command;

use Kunstmaan\Skylab\Skeleton\BaseSkeleton;
use RuntimeException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * SetPermissionsCommand
 */
class SetPermissionsCommand extends AbstractCommand
{

    /**
     * Configures the current command.
     */
    protected function configure()
    {
        $this
            ->addDefaults()
            ->setName('permissions')
            ->setDescription('Set the permissions of a Skylab project')
            ->addArgument('name', InputArgument::REQUIRED, 'The name of the project')
            ->setHelp(<<<EOT
The <info>permissions</info> command will fix the permissions of a project.

<info>php skylab.phar permissions testproject</info>

EOT
            );
    }

    /**
     * @throws \RuntimeException
     */
    protected function doExecute()
    {
        $projectname = $this->input->getArgument('name');

        if (!$this->fileSystemProvider->projectExists($projectname)) {
            throw new RuntimeException("The $projectname project does not exist.");
        }

        $this->dialogProvider->logStep("Setting permissions on project $projectname");

        /** @var BaseSkeleton $baseSkeleton */
{'fraction_non_alphanumeric': 0.11519881085098477, 'fraction_numerical': 0.0, 'mean_word_length': 3.017910447761194, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 34, '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': '3867547', 'n_tokens_mistral': 721, 'n_tokens_neox': 714, 'n_words': 172}