original_string: public static function resolveConfigHandler($fileName)
      {
          $configHandler = NULL;
  
          preg_match("/(\.)([a-z]{3,})/", $fileName, $matches);
  
          $fileExtension = $matches[2];
  
          if (!in_array($fileExtension, ConfigConsts::getExtensions())) {
              throw new ConfigException("Not correct config file extension.");
          }
  
          switch ($fileExtension) {
              case(ConfigConsts::INI):
                  $configHandler = new ConfigIniHandler();
                  break;
              default:
                  throw new ConfigException("Config handler wasn't set.");
          }
  
          return $configHandler;
      }
code: public static function resolveConfigHandler($fileName)
      {
          $configHandler = NULL;
  
          preg_match("/(\.)([a-z]{3,})/", $fileName, $matches);
  
          $fileExtension = $matches[2];
  
          if (!in_array($fileExtension, ConfigConsts::getExtensions())) {
              throw new ConfigException("Not correct config file extension.");
          }
  
          switch ($fileExtension) {
              case(ConfigConsts::INI):
                  $configHandler = new ConfigIniHandler();
                  break;
              default:
                  throw new ConfigException("Config handler wasn't set.");
          }
  
          return $configHandler;
      }
code_tokens: public static function resolveConfigHandler ( $ fileName ) { $ configHandler = NULL ; preg_match ( "/(\.)([a-z]{3,})/" , $ fileName , $ matches ) ; $ fileExtension = $ matches [ 2 ] ; if ( ! in_array ( $ fileExtension , ConfigConsts :: getExtensions ( ) ) ) { throw new ConfigException ( "Not correct config file extension." ) ; } switch ( $ fileExtension ) { case ( ConfigConsts :: INI ) : $ configHandler = new ConfigIniHandler ( ) ; break ; default : throw new ConfigException ( "Config handler wasn't set." ) ; } return $ configHandler ; }
docstring: Resolve config handler by file extension.
  
  @param $fileName
  @return ConfigIniHandler|null
  @throws ConfigException
docstring_tokens: Resolve config handler by file extension .