Changeset View
Changeset View
Standalone View
Standalone View
src/parser/PhutilLanguageGuesser.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Very simple class to guess the languages of source files which we failed to | * Very simple class to guess the languages of source files which we failed to | ||||
| * determine by examining file name/extension rules. | * determine by examining file name/extension rules. | ||||
| */ | */ | ||||
| final class PhutilLanguageGuesser { | final class PhutilLanguageGuesser extends Phobject { | ||||
| /** | /** | ||||
| * Guess which computer programming language a file is written in. | * Guess which computer programming language a file is written in. | ||||
| * | * | ||||
| * @param string Source text of the file. | * @param string Source text of the file. | ||||
| * @return mixed Language string, or null if unable to guess. | * @return mixed Language string, or null if unable to guess. | ||||
| */ | */ | ||||
| public static function guessLanguage($source) { | public static function guessLanguage($source) { | ||||
| Show All 32 Lines | |||||