original_string: protected function loadConfigFile($configName, array $configPaths): ConfigORM
      {
          // Cycle through all directories
          foreach ($configPaths as $directory) 
          {
              // If file exists, load it and break the loop
              $file = $directory . DS . 'config.'.$configName.'.php';
              if (file_exists($file))
              {
                  // Load object
                  return new ConfigORM($file);
                  break;
              }
          }
  
          // Try fallback
          $file = Core::$coreDir . DS . 'Config' . DS . 'config.' . $configName . '.php';
          if (file_exists($file))
          {
              // Load object
              return new ConfigORM($file);
          }
  
          throw new ConfigException("Could not load config. File $configName not found", 1);
      }
code: protected function loadConfigFile($configName, array $configPaths): ConfigORM
      {
          // Cycle through all directories
          foreach ($configPaths as $directory) 
          {
              // If file exists, load it and break the loop
              $file = $directory . DS . 'config.'.$configName.'.php';
              if (file_exists($file))
              {
                  // Load object
                  return new ConfigORM($file);
                  break;
              }
          }
  
          // Try fallback
          $file = Core::$coreDir . DS . 'Config' . DS . 'config.' . $configName . '.php';
          if (file_exists($file))
          {
              // Load object
              return new ConfigORM($file);
          }
  
          throw new ConfigException("Could not load config. File $configName not found", 1);
      }
code_tokens: protected function loadConfigFile ( $ configName , array $ configPaths ) : ConfigORM { // Cycle through all directories foreach ( $ configPaths as $ directory ) { // If file exists, load it and break the loop $ file = $ directory . DS . 'config.' . $ configName . '.php' ; if ( file_exists ( $ file ) ) { // Load object return new ConfigORM ( $ file ) ; break ; } } // Try fallback $ file = Core :: $ coreDir . DS . 'Config' . DS . 'config.' . $ configName . '.php' ; if ( file_exists ( $ file ) ) { // Load object return new ConfigORM ( $ file ) ; } throw new ConfigException ( "Could not load config. File $configName not found" , 1 ) ; }
docstring: Determine whether the file exists and, if so, load the ConfigORM
  
  @param string $configName  Name of the config file. Eg. 'main'
  @param array  $configPaths Required array of where to look for the config files
  @return  ConfigORM of the config file. Allows for easy reading and editing of the file
  @throws  ConfigException
docstring_tokens: Determine whether the file exists and if so load the ConfigORM