<commit_before><?php
/**
 * Copyright (C) 2018 Twister's Fury.
 * Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
 */

namespace TwistersFury\Phalcon\Shared\Mvc;

use Phalcon\Mvc\ModuleDefinitionInterface;
use Phalcon\DiInterface;

abstract class AbstractModule implements ModuleDefinitionInterface
{
    public function registerAutoloaders(DiInterface $dependencyInjector = null)
    {}

    public function registerServices(DiInterface $dependencyInjector)
    {
        $dependencyInjector->getShared('dispatcher')
            ->setModuleName($this->getModuleName())
            ->setDefaultNameSpace(
                __NAMESPACE__ . '\\' . $this->getDefaultControllerNamespace()
            );
    }

    protected function getDefaultControllerNamespace(): string
    {
        return 'Controllers';
    }

    protected function getModuleName(): string
    {
        return explode('\\', get_called_class())[2];
    }
}<commit_msg>Debugging<commit_after><?php
/**
 * Copyright (C) 2018 Twister's Fury.
 * Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
 */

namespace TwistersFury\Phalcon\Shared\Mvc;

use Phalcon\Mvc\ModuleDefinitionInterface;
use Phalcon\DiInterface;

abstract class AbstractModule implements ModuleDefinitionInterface
{
    public function registerAutoloaders(DiInterface $dependencyInjector = null)
    {}

    public function registerServices(DiInterface $dependencyInjector)
    {
        $dispatcher = $dependencyInjector->getShared('dispatcher');

        $dispatcher->setModuleName($this->getModuleName());
        $dispatcher->setDefaultNameSpace(
            __NAMESPACE__ . '\\' . $this->getDefaultControllerNamespace()
        );
    }

    protected function getDefaultControllerNamespace(): string
    {
        return 'Controllers';
    }

    protected function getModuleName(): string
    {
        return explode('\\', get_called_class())[2];
    }
}
{'fraction_non_alphanumeric': 0.10802624936900555, 'fraction_numerical': 0.005047955577990914, 'mean_word_length': 3.5045454545454544, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '3071374', 'n_tokens_mistral': 544, 'n_tokens_neox': 532, 'n_words': 109}