original_string: public static function getConfigFile($filename)
      {
          $filename = addslashes($filename);
          if (is_file($filename)) {
              $data = str_replace("\\", "\\\\", file_get_contents($filename));
              $json = json_decode($data, true);
  
              if (empty($json)) {
                  throw new \Exception("Config file has a json parse error, $filename");
              }
  
          } else {
              throw new \Exception("Config file not found, $filename");
          }
          
          return $json;
      }
code: public static function getConfigFile($filename)
      {
          $filename = addslashes($filename);
          if (is_file($filename)) {
              $data = str_replace("\\", "\\\\", file_get_contents($filename));
              $json = json_decode($data, true);
  
              if (empty($json)) {
                  throw new \Exception("Config file has a json parse error, $filename");
              }
  
          } else {
              throw new \Exception("Config file not found, $filename");
          }
          
          return $json;
      }
code_tokens: public static function getConfigFile ( $ filename ) { $ filename = addslashes ( $ filename ) ; if ( is_file ( $ filename ) ) { $ data = str_replace ( "\\" , "\\\\" , file_get_contents ( $ filename ) ) ; $ json = json_decode ( $ data , true ) ; if ( empty ( $ json ) ) { throw new \ Exception ( "Config file has a json parse error, $filename" ) ; } } else { throw new \ Exception ( "Config file not found, $filename" ) ; } return $ json ; }
docstring: Read JSON config file and return array
  
  @param string $file
  @return array $config
docstring_tokens: Read JSON config file and return array