Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/query/PhabricatorRepositoryQuery.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | public function withIdentifiers(array $identifiers) { | ||||
$slugs = array(); | $slugs = array(); | ||||
foreach ($identifiers as $identifier) { | foreach ($identifiers as $identifier) { | ||||
if (ctype_digit((string)$identifier)) { | if (ctype_digit((string)$identifier)) { | ||||
$ids[$identifier] = $identifier; | $ids[$identifier] = $identifier; | ||||
continue; | continue; | ||||
} | } | ||||
if (preg_match('/^(r[A-Z]+)|(R[1-9]\d*)\z/', $identifier)) { | if (preg_match('/^(r[A-Z]+|R[1-9]\d*)\z/', $identifier)) { | ||||
$monograms[$identifier] = $identifier; | $monograms[$identifier] = $identifier; | ||||
continue; | continue; | ||||
} | } | ||||
$repository_type = PhabricatorRepositoryRepositoryPHIDType::TYPECONST; | $repository_type = PhabricatorRepositoryRepositoryPHIDType::TYPECONST; | ||||
if (phid_get_type($identifier) === $repository_type) { | if (phid_get_type($identifier) === $repository_type) { | ||||
$phids[$identifier] = $identifier; | $phids[$identifier] = $identifier; | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 597 Lines • Show Last 20 Lines |