original_string: public function moduleConfig($modules)
      {
          if (is_string($modules)) {
              $config = config('society.'.strtolower($modules).'.settings');
  
              return $config;
          }
  
          $config = [];
          foreach ($modules as $module) {
              if ($moduleSettings = config('society.'.strtolower($module->getName()).'.settings')) {
                  $config[$module->getName()] = $moduleSettings;
              }
          }
  
          return $config;
      }
code: public function moduleConfig($modules)
      {
          if (is_string($modules)) {
              $config = config('society.'.strtolower($modules).'.settings');
  
              return $config;
          }
  
          $config = [];
          foreach ($modules as $module) {
              if ($moduleSettings = config('society.'.strtolower($module->getName()).'.settings')) {
                  $config[$module->getName()] = $moduleSettings;
              }
          }
  
          return $config;
      }
code_tokens: public function moduleConfig ( $ modules ) { if ( is_string ( $ modules ) ) { $ config = config ( 'society.' . strtolower ( $ modules ) . '.settings' ) ; return $ config ; } $ config = [ ] ; foreach ( $ modules as $ module ) { if ( $ moduleSettings = config ( 'society.' . strtolower ( $ module -> getName ( ) ) . '.settings' ) ) { $ config [ $ module -> getName ( ) ] = $ moduleSettings ; } } return $ config ; }
docstring: Return all modules that have settings
  with its settings.
  
  @param array|string $modules
  
  @return array
docstring_tokens: Return all modules that have settings with its settings .