Changeset View
Changeset View
Standalone View
Standalone View
src/parser/PhutilLanguageGuesser.php
Context not available. | |||||
foreach ($patterns as $pattern => $language) { | foreach ($patterns as $pattern => $language) { | ||||
$matches = null; | $matches = null; | ||||
if (preg_match($pattern, $source, $matches)) { | if (@preg_match($pattern, $source, $matches)) { | ||||
if (is_numeric($language)) { | if (is_numeric($language)) { | ||||
return $matches[$language]; | return $matches[$language]; | ||||
} else { | } else { | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0