当前位置: 首页>>代码示例>>PHP>>正文


PHP DifferentialDiff::getLintStatus方法代码示例

本文整理汇总了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;
 }
开发者ID:pugong,项目名称:phabricator,代码行数:12,代码来源:DifferentialLintField.php

示例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 '???';
 }
开发者ID:denghp,项目名称:phabricator,代码行数:20,代码来源:DifferentialRevisionUpdateHistoryView.php

示例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 '???';
 }
开发者ID:neoxen,项目名称:phabricator,代码行数:18,代码来源:DifferentialRevisionUpdateHistoryView.php


注:本文中的DifferentialDiff::getLintStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。