本文整理汇总了PHP中DifferentialDiff::getLintStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP DifferentialDiff::getLintStatus方法的具体用法?PHP DifferentialDiff::getLintStatus怎么用?PHP DifferentialDiff::getLintStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DifferentialDiff
的用法示例。
在下文中一共展示了DifferentialDiff::getLintStatus方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderHarbormasterStatus
protected function renderHarbormasterStatus(DifferentialDiff $diff, array $messages)
{
$colors = array(DifferentialLintStatus::LINT_NONE => 'grey', DifferentialLintStatus::LINT_OKAY => 'green', DifferentialLintStatus::LINT_WARN => 'yellow', DifferentialLintStatus::LINT_FAIL => 'red', DifferentialLintStatus::LINT_SKIP => 'blue', DifferentialLintStatus::LINT_AUTO_SKIP => 'blue');
$icon_color = idx($colors, $diff->getLintStatus(), 'grey');
$message = DifferentialRevisionUpdateHistoryView::getDiffLintMessage($diff);
$excuse = $diff->getProperty('arc:lint-excuse');
if (strlen($excuse)) {
$excuse = array(phutil_tag('strong', array(), pht('Excuse:')), ' ', phutil_escape_html_newlines($excuse));
}
$status = id(new PHUIStatusListView())->addItem(id(new PHUIStatusItemView())->setIcon(PHUIStatusItemView::ICON_STAR, $icon_color)->setTarget($message)->setNote($excuse));
return $status;
}
示例2: getDiffLintMessage
public static function getDiffLintMessage(DifferentialDiff $diff)
{
switch ($diff->getLintStatus()) {
case DifferentialLintStatus::LINT_NONE:
return pht('No Linters Available');
case DifferentialLintStatus::LINT_OKAY:
return pht('Lint OK');
case DifferentialLintStatus::LINT_WARN:
return pht('Lint Warnings');
case DifferentialLintStatus::LINT_FAIL:
return pht('Lint Errors');
case DifferentialLintStatus::LINT_SKIP:
return pht('Lint Skipped');
case DifferentialLintStatus::LINT_AUTO_SKIP:
return pht('Automatic diff as part of commit; lint not applicable.');
case DifferentialLintStatus::LINT_POSTPONED:
return pht('Lint Postponed');
}
return '???';
}
示例3: getDiffLintMessage
public static function getDiffLintMessage(DifferentialDiff $diff)
{
switch ($diff->getLintStatus()) {
case DifferentialLintStatus::LINT_NONE:
return 'No Linters Available';
case DifferentialLintStatus::LINT_OKAY:
return 'Lint OK';
case DifferentialLintStatus::LINT_WARN:
return 'Lint Warnings';
case DifferentialLintStatus::LINT_FAIL:
return 'Lint Errors';
case DifferentialLintStatus::LINT_SKIP:
return 'Lint Skipped';
case DifferentialLintStatus::LINT_POSTPONED:
return 'Lint Postponed';
}
return '???';
}