<commit_before><?php

namespace Contentify;

use Config;
use Route;

/**
 * This class decorates the Router class of Laravel
 *
 * @see \Illuminate\Routing\Router
 */
class ModuleRoute
{

    /**
     * Since Laravel 5.3 we have to manually prefix the names
     * of backend (admin) routes. We use this const as the prefix.
     * Note that it is not possible to directly access this constant
     * if the facade of this class is used. Use the getter instead!
     */
    const ADMIN_NAME_PREFIX = 'admin.';
  
    /**
     * The namespace for all modules
     * @var  string
     */
    protected $namespace;

    /**
     * The name of the module set by context()
     * @var string
     */
    protected $moduleName;

    /**
     * The path to the models of the module
     * @var string
     */
    protected $modelPath;

    /**
     * The path to the controllers of the module
     * @var string
     */
    protected $controllerPath;

    /**
     * Sets the context (name) of the module.
     * 
     * @param string $moduleName Name or path of the module.
     * @return void
     */
    public function context($moduleName)
    {
        $moduleName = class_basename($moduleName);
        $moduleName = ucfirst(strtolower($moduleName));

        $this->moduleName       = $moduleName;

        /*
         * Create the namespace from the directory path
         */
        if (! $this->namespace) {
            $this->namespace    = Config::get('modules.namespace');
        }
<commit_msg>Potential bugfix when generating routes<commit_after><?php

namespace Contentify;

use Config;
use Route;

/**
 * This class decorates the Router class of Laravel
 *
 * @see \Illuminate\Routing\Router
 */
class ModuleRoute
{

    /**
     * Since Laravel 5.3 we have to manually prefix the names
     * of backend (admin) routes. We use this const as the prefix.
     * Note that it is not possible to directly access this constant
     * if the facade of this class is used. Use the getter instead!
     */
    const ADMIN_NAME_PREFIX = 'admin.';
  
    /**
     * The namespace for all modules
     * @var  string
     */
    protected $namespace;

    /**
     * The name of the module set by context()
     * @var string
     */
    protected $moduleName;

    /**
     * The path to the models of the module
     * @var string
     */
    protected $modelPath;

    /**
     * The path to the controllers of the module
     * @var string
     */
    protected $controllerPath;

    /**
     * Sets the context (name) of the module.
     * 
     * @param string $moduleName Name or path of the module.
     * @return void
     */
    public function context($moduleName)
    {
        $moduleName = class_basename($moduleName);
        $moduleName = ucfirst($moduleName);

        $this->moduleName       = $moduleName;

        /*
         * Create the namespace from the directory path
         */
        if (! $this->namespace) {
            $this->namespace    = Config::get('modules.namespace');
        }

{'fraction_non_alphanumeric': 0.09807819748177601, 'fraction_numerical': 0.0013253810470510272, 'mean_word_length': 2.046417759838547, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '3277424', 'n_tokens_mistral': 852, 'n_tokens_neox': 834, 'n_words': 302}