Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialDiff.php
| Show First 20 Lines • Show All 381 Lines • ▼ Show 20 Lines | final class DifferentialDiff | ||||
| } | } | ||||
| public function loadCoverageMap(PhabricatorUser $viewer) { | public function loadCoverageMap(PhabricatorUser $viewer) { | ||||
| $target_phids = $this->getBuildTargetPHIDs(); | $target_phids = $this->getBuildTargetPHIDs(); | ||||
| if (!$target_phids) { | if (!$target_phids) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| $unit = id(new HarbormasterBuildUnitMessage())->loadAllWhere( | $unit = id(new HarbormasterBuildUnitMessageQuery()) | ||||
| 'buildTargetPHID IN (%Ls)', | ->setViewer($viewer) | ||||
| $target_phids); | ->withBuildTargetPHIDs($target_phids) | ||||
| ->execute(); | |||||
| $map = array(); | $map = array(); | ||||
| foreach ($unit as $message) { | foreach ($unit as $message) { | ||||
| $coverage = $message->getProperty('coverage', array()); | $coverage = $message->getProperty('coverage', array()); | ||||
| foreach ($coverage as $path => $coverage_data) { | foreach ($coverage as $path => $coverage_data) { | ||||
| $map[$path][] = $coverage_data; | $map[$path][] = $coverage_data; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines | |||||