Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/phid/PholioMockPHIDType.php
Show All 34 Lines | foreach ($handles as $phid => $handle) { | ||||
$id = $mock->getID(); | $id = $mock->getID(); | ||||
$name = $mock->getName(); | $name = $mock->getName(); | ||||
$handle->setURI("/M{$id}"); | $handle->setURI("/M{$id}"); | ||||
$handle->setName("M{$id}"); | $handle->setName("M{$id}"); | ||||
$handle->setFullName("M{$id}: {$name}"); | $handle->setFullName("M{$id}: {$name}"); | ||||
if ($mock->isClosed()) { | if ($mock->isClosed()) { | ||||
$handle->setStatus(PhabricatorObjectHandleStatus::STATUS_CLOSED); | $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
public function canLoadNamedObject($name) { | public function canLoadNamedObject($name) { | ||||
return preg_match('/^M\d*[1-9]\d*$/i', $name); | return preg_match('/^M\d*[1-9]\d*$/i', $name); | ||||
} | } | ||||
Show All 26 Lines |