Ejemplo n.º 1
0
 /**
  * @dataProvider redYellowGreenDP
  */
 public function testRedYellowGreen($a, $b)
 {
     $obj = new _Utils();
     $this->string($obj->redYellowGreen($a))->contains($b);
 }
Ejemplo n.º 2
0
}
// Closing content div for each tab, concatenate all the html
$content = '';
foreach (array_keys($html) as $project) {
    if (!empty($html[$project]['repos'])) {
        $content .= $html[$project]['repos'] . '</table>' . Health::getStatsPane($projects[$project]) . '</div>';
    }
}
// Get stats
$stats = Health::getStats($projects);
$translated = $stats['translated'];
$reference = $stats['total'];
$completion = round($translated / $reference * 100, 2);
$completion = $completion > 100 ? 100 : $completion;
// Get color from completion value
$color = Utils::redYellowGreen($completion);
// Get active projects
$active_projects = '<h4>Active projects:</h4><ul>';
if (isset($projects['release']['repos'])) {
    $active_projects .= '<li><b>Desktop:</b> ';
    foreach (array_keys($projects['release']['repos']) as $repo) {
        if (in_array($repo, array_keys(Project::$components_names))) {
            $active_projects .= Project::$components_names[$repo] . ', ';
        }
    }
    $active_projects .= '</li>';
}
if (isset($projects['gaia'])) {
    $active_projects .= '<li><b>Gaia:</b> ';
    foreach (array_keys($projects['gaia']) as $repo) {
        $active_projects .= Project::getRepositoriesNames()[$repo] . ', ';