1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 19:52:44 +01:00
phorge-phorge/src/applications/diffusion/query/DiffusionCommitResultBucket.php

34 lines
679 B
PHP
Raw Normal View History

<?php
abstract class DiffusionCommitResultBucket
extends PhabricatorSearchResultBucket {
public static function getAllResultBuckets() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
->setUniqueMethod('getResultBucketKey')
->execute();
}
protected function hasAuditorsWithStatus(
PhabricatorRepositoryCommit $commit,
array $phids,
array $statuses) {
foreach ($commit->getAudits() as $audit) {
if (!isset($phids[$audit->getAuditorPHID()])) {
continue;
}
if (!isset($statuses[$audit->getAuditStatus()])) {
continue;
}
return true;
}
return false;
}
}