Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / pholio / search / PholioMockFulltextEngine.php
blob6326cdfb77bd411abd729c6b09c3318ccc67c7fd
1 <?php
3 final class PholioMockFulltextEngine
4 extends PhabricatorFulltextEngine {
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument $document,
8 $object) {
10 $mock = $object;
12 $document->setDocumentTitle($mock->getName());
14 $document->addField(
15 PhabricatorSearchDocumentFieldType::FIELD_BODY,
16 $mock->getDescription());
18 $document->addRelationship(
19 PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR,
20 $mock->getAuthorPHID(),
21 PhabricatorPeopleUserPHIDType::TYPECONST,
22 $mock->getDateCreated());
24 $document->addRelationship(
25 $mock->isClosed()
26 ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED
27 : PhabricatorSearchRelationship::RELATIONSHIP_OPEN,
28 $mock->getPHID(),
29 PholioMockPHIDType::TYPECONST,
30 PhabricatorTime::getNow());