Page MenuHomePhabricator
Diviner Arcanist Tech Docs PhutilLanguageGuesser

final class PhutilLanguageGuesser
Arcanist Technical Documentation ()

Very simple class to guess the languages of source files which we failed to determine by examining file name/extension rules.

Methods

public static function guessLanguage($source)

Guess which computer programming language a file is written in.

Parameters
string$sourceSource text of the file.
Return
mixedLanguage string, or null if unable to guess.