<commit_before><?php

namespace ForkCMS\Bundle\InstallerBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class InstallerController extends Controller
{
    public function step1Action()
    {
        var_dump('1');exit;
    }

    public function step2Action()
    {
        var_dump('2');exit;
    }

    public function step3Action()
    {
        var_dump('3');exit;
    }

    public function step4Action()
    {
        var_dump('4');exit;
    }

    public function step5Action()
    {
        var_dump('5');exit;
    }

    public function step6Action()
    {
        var_dump('6');exit;
    }

    public function step7Action()
    {
        var_dump('7');exit;
    }

    public function noStepAction()
    {
        var_dump('no step');exit;
    }
}
<commit_msg>Check if Fork has been installed before installing again.<commit_after><?php

namespace ForkCMS\Bundle\InstallerBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Filesystem\Filesystem;

class InstallerController extends Controller
{
    public function step1Action()
    {
        $this->checkInstall();
        var_dump('1');exit;
    }

    public function step2Action()
    {
        $this->checkInstall();
        var_dump('2');exit;
    }

    public function step3Action()
    {
        $this->checkInstall();
        var_dump('3');exit;
    }

    public function step4Action()
    {
        $this->checkInstall();
        var_dump('4');exit;
    }

    public function step5Action()
    {
        $this->checkInstall();
        var_dump('5');exit;
    }

    public function step6Action()
    {
        $this->checkInstall();
        var_dump('6');exit;
    }

    public function step7Action()
    {
        $this->checkInstall();
        var_dump('7');exit;
    }

    public function noStepAction()
    {
        $this->checkInstall();
        var_dump('no step');exit;
    }

    protected function checkInstall()
    {
        $fs = new FileSystem();
        $installCacheDir = $this->container->getParameter('kernel.cache_dir');
        if ($fs->exists($installCacheDir . 'installed.txt')) {
            exit('This Fork has already been installed. To reinstall, delete
                 installed.txt from the ' . $installCacheDir . ' directory. To log in,
                 <a href="/private">click here</a>.');
        }
    }
}

{'fraction_non_alphanumeric': 0.12776617954070982, 'fraction_numerical': 0.011691022964509395, 'mean_word_length': 2.346368715083799, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 16, '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': '679790', 'n_tokens_mistral': 712, 'n_tokens_neox': 695, 'n_words': 133}