<commit_before><?php

class ModLoader implements ISystemComponent
{
    
    public function __construct()
    {
        
        $this->loadAllMods ();
        
    }
    
    private function loadAllMods ()
    {
        
        $modFiles = scandir ("system/mods");
        
        for ($i = 0; $i <= 1; $i++) 
            array_splice ($modFiles, 0, 1);
        
        foreach ($modFiles as $file)
            require_once ("system/mods/" . $file);
        
    }

    public static function getInstance()
    {
        
        return new self ();
        
    }

}<commit_msg>Use glob instead of scandir<commit_after><?php

class ModLoader implements ISystemComponent
{
    
    public function __construct()
    {
        
        $this->loadAllMods ();
        
    }
    
    private function loadAllMods ()
    {
        
        $modFiles = glob ("system/mods/*.php");

        foreach ($modFiles as $file)
            require_once ("system/mods/" . $file);
        
    }

    public static function getInstance()
    {
        
        return new self ();
        
    }

}
{'fraction_non_alphanumeric': 0.10927456382001836, 'fraction_numerical': 0.0036730945821854912, 'mean_word_length': 1.449438202247191, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, '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': '4417385', 'n_tokens_mistral': 324, 'n_tokens_neox': 316, 'n_words': 72}