<commit_before><?php

namespace Knp\PhpSpec\WellDone;

use PhpSpec\Extension\ExtensionInterface;
use PhpSpec\ServiceContainer;
use Symfony\Component\Console\Input\InputArgument;
use Knp\PhpSpec\WellDone\Locator\ResourceManager;
use Knp\PhpSpec\WellDone\Locator\NoSpecLocator;
use Knp\PhpSpec\WellDone\Locator\ResourceInspector;
use Knp\PhpSpec\WellDone\Util\Filesystem;

class Extension implements ExtensionInterface
{
    public function load(ServiceContainer $container)
    {
        $this->setupCommands($container);
        $this->setupLocators($container);
        $this->setupFormatter($container);
        $this->setupUtils($container);
        $this->setupApplication($container);
    }

    protected function setupApplication(ServiceContainer $container)
    {
        $app = $GLOBALS['app'];

        $app->add($container->get('console.commands.status'));
    }

    protected function setupCommands(ServiceContainer $container)
    {
        $container->setShared('console.commands.status', function ($c) {
            return new Console\Command\StatusCommand($c->get('well.utils.filesystem'), $c->get('well.console.formater.progress'));
        });
    }

    protected function setupLocators(ServiceContainer $container)
    {
        $container->setShared('locator.resource_manager', function ($c) {
            $manager = new ResourceManager();<commit_msg>Remove crappy code<commit_after><?php

namespace Knp\PhpSpec\WellDone;

use PhpSpec\Extension\ExtensionInterface;
use PhpSpec\ServiceContainer;
use Symfony\Component\Console\Input\InputArgument;
use Knp\PhpSpec\WellDone\Locator\ResourceManager;
use Knp\PhpSpec\WellDone\Locator\NoSpecLocator;
use Knp\PhpSpec\WellDone\Locator\ResourceInspector;
use Knp\PhpSpec\WellDone\Util\Filesystem;

class Extension implements ExtensionInterface
{
    public function load(ServiceContainer $container)
    {
        $this->setupCommands($container);
        $this->setupLocators($container);
        $this->setupFormatter($container);
        $this->setupUtils($container);
    }

    protected function setupCommands(ServiceContainer $container)
    {
        $container->setShared('console.commands.status', function ($c) {
            return new Console\Command\StatusCommand($c->get('well.utils.filesystem'), $c->get('well.console.formater.progress'));
        });
    }

    protected function setupLocators(ServiceContainer $container)
    {
        $container->setShared('locator.resource_manager', function ($c) {
            $manager = new ResourceManager();
{'fraction_non_alphanumeric': 0.1238132911392405, 'fraction_numerical': 0.0, 'mean_word_length': 4.109090909090909, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3090688', 'n_tokens_mistral': 704, 'n_tokens_neox': 703, 'n_words': 109}