<commit_before><?php

class CoreAPIModule extends APIModule
{
    protected $id = 'core';
    protected $vmin = 1;
    protected $vmax = 1;

    // special factory method for core
    public static function factory($command='', $args=array()) {
        $module = new CoreAPIModule();
        $module->init($command, $args);
        return $module;
    }
 
    //always allow access
    protected function getAccessControlLists($type) {
        return array(AccessControlList::factory(AccessControlList::RULE_ACTION_ALLOW, 
                                                AccessControlList::RULE_TYPE_EVERYONE,
                                                AccessControlList::RULE_VALUE_ALL));
    }
    
    public function initializeForCommand() {  
    
        switch ($this->command) {
            case 'hello':
            
                $allmodules = $this->getAllModules();
                foreach ($allmodules as $moduleID=>$module) {
                    if (!$module->getModuleVar('disabled', 'module')) {
                        $modules[] = array(
                            'id'=>$moduleID,
                            'title'=>$module->getModuleVar('title','module'),
                            'vmin'=>$module->getVmin(),
                            'vmax'=>$module->getVmax()
                        );
                    }
                }
                $response = array(
                    'version'=>KUROGO_VERSION,
                    'modules'=>$modules
                );
                $this->setResponse($response);
                $this->setResponseVersion(1);
                break;
            default:
                $this->invalidCommand();
                break;
        }
    }
}<commit_msg>return class and tag values for modules<commit_after><?php

class CoreAPIModule extends APIModule
{
    protected $id = 'core';
    protected $vmin = 1;
    protected $vmax = 1;

    // special factory method for core
    public static function factory($command='', $args=array()) {
        $module = new CoreAPIModule();
        $module->init($command, $args);
        return $module;
    }
 
    //always allow access
    protected function getAccessControlLists($type) {
        return array(AccessControlList::factory(AccessControlList::RULE_ACTION_ALLOW, 
                                                AccessControlList::RULE_TYPE_EVERYONE,
                                                AccessControlList::RULE_VALUE_ALL));
    }
    
    public function initializeForCommand() {  
    
        switch ($this->command) {
            case 'hello':
            
                $allmodules = $this->getAllModules();
                foreach ($allmodules as $moduleID=>$module) {
                    if (!$module->getModuleVar('disabled', 'module')) {
                        $modules[] = array(
                            'class'=>$moduleID,
                            'tag'=>$module->getConfigModule(),
                            'title'=>$module->getModuleVar('title','module'),
                            'vmin'=>$module->getVmin(),
                            'vmax'=>$module->getVmax()
                        );
                    }
                }
                $response = array(
                    'version'=>KUROGO_VERSION,
                    'modules'=>$modules
                );
                $this->setResponse($response);
                $this->setResponseVersion(1);
                break;
            default:
                $this->invalidCommand();
                break;
        }
    }
}
{'fraction_non_alphanumeric': 0.11566535654126894, 'fraction_numerical': 0.0016844469399213925, 'mean_word_length': 1.3121349772874757, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4514531', 'n_tokens_mistral': 860, 'n_tokens_neox': 834, 'n_words': 153}