public function registerModuleDirectory($directory, $excludePattern = '/\/tests\//')
    {
        if (!isset($this->moduleDirectories[$directory])) {
            $this->moduleDirectories[$directory] = $excludePattern;
            
            return true;
        }
        
        return false;
    }