src/Module/ModuleManager.php
public function reload($module)
    {
        $module = Inflector::camelize($module);
        $config = [];

        if (isset($this->loadedModules[$module]) && $this->loadedModules[$module]['plugin'] === true) {
            $config += [
                'pathDir' => $this->loadedModules[$module]['pluginPath'],
                'plugin' => $this->loadedModules[$module]['pluginName']
            ];
        }

        $unload = $this->unload($module);

        if ($unload != "U") {
            return $unload;
        }

        return $this->load($module, $config);
    }
public function reload($module)
    {
        $module = Inflector::camelize($module);
        $config = [];

        if (isset($this->loadedModules[$module]) && $this->loadedModules[$module]['plugin'] === true) {
            $config += [
                'pathDir' => $this->loadedModules[$module]['pluginPath'],
                'plugin' => $this->loadedModules[$module]['pluginName']
            ];
        }

        $unload = $this->unload($module);

        if ($unload != "U") {
            return $unload;
        }

        return $this->load($module, $config);
    }
Reloads a module by first calling unload and then load.

@param string $module The module to reload.

@return string