Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/diff/view/PHUIDiffTableOfContentsItemView.php
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | return javelin_tag( | ||||
), | ), | ||||
), | ), | ||||
$name); | $name); | ||||
} | } | ||||
private function renderChangesetLines() { | private function renderChangesetLines() { | ||||
$changeset = $this->getChangeset(); | $changeset = $this->getChangeset(); | ||||
$line_count = $changeset->getAffectedLineCount(); | $add = $changeset->getAddLines(); | ||||
if (!$line_count) { | $del = $changeset->getDelLines(); | ||||
return null; | |||||
$t = array(); | |||||
if ($add) { | |||||
$t[] = pht('%d line(s) added', (int)$add); | |||||
} | |||||
if ($del) { | |||||
$t[] = pht('%d line(s) deleted', (int)$del); | |||||
} | } | ||||
return ' '.pht('(%d line(s))', $line_count); | if (!$t) { | ||||
return null; | |||||
} | |||||
return pht(' (%s)', implode(', ', $t)); | |||||
} | } | ||||
private function renderCoverage() { | private function renderCoverage() { | ||||
$not_applicable = '-'; | $not_applicable = '-'; | ||||
$coverage = $this->getCoverage(); | $coverage = $this->getCoverage(); | ||||
if (!strlen($coverage)) { | if (!strlen($coverage)) { | ||||
return $not_applicable; | return $not_applicable; | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |