Changeset View
Changeset View
Standalone View
Standalone View
src/ref/simple/ArcanistSimpleSymbolRef.php
Context not available. | |||||
$id_pattern = '(^'.$prefix_pattern.'([1-9]\d*)\z)'; | $id_pattern = '(^'.$prefix_pattern.'([1-9]\d*)\z)'; | ||||
$is_id = preg_match($id_pattern, $symbol, $matches); | $is_id = @preg_match($id_pattern, $symbol, $matches); | ||||
if ($is_id) { | if ($is_id) { | ||||
$this->type = self::TYPE_ID; | $this->type = self::TYPE_ID; | ||||
return (int)$matches[1]; | return (int)$matches[1]; | ||||
Context not available. | |||||
$phid_type = $this->getSimpleSymbolPHIDType(); | $phid_type = $this->getSimpleSymbolPHIDType(); | ||||
$phid_type = preg_quote($phid_type); | $phid_type = preg_quote($phid_type); | ||||
$phid_pattern = '(^PHID-'.$phid_type.'-\S+\z)'; | $phid_pattern = '(^PHID-'.$phid_type.'-\S+\z)'; | ||||
$is_phid = preg_match($phid_pattern, $symbol, $matches); | $is_phid = @preg_match($phid_pattern, $symbol, $matches); | ||||
if ($is_phid) { | if ($is_phid) { | ||||
$this->type = self::TYPE_PHID; | $this->type = self::TYPE_PHID; | ||||
return $matches[0]; | return $matches[0]; | ||||
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