$english_strings[$entity] = $strings[$ref_locale][$repo][$entity]; if (isset($strings[$locale][$repo][$entity])) { $locale_strings[$entity] = $strings[$locale][$repo][$entity]; } } // Get pretty name for component or fallback to folder name $name = in_array($component, array_keys(Project::$components_names)) ? Project::$components_names[$component] : $component; // Store stats and status data for current component and repo. $projects[$repo]['stats'] = $stats; $projects[$repo]['repos'][$component] = Health::getStatus($name, $english_strings, $locale_strings); unset($locale_entities, $english_entities, $english_strings, $locale_strings); } } else { // Define if grouped repos in the view then store the data in the same place $grouped_repos = in_array($repo, Project::getGaiaRepositories()) ? 'gaia' : 'others'; $projects[$grouped_repos][$repo] = Health::getStatus(Project::getRepositoriesNames()[$repo], $strings[$ref_locale][$repo], $strings[$locale][$repo]); $projects[$grouped_repos][$repo]['stats'] = $stats; } unset($strings); } } // Build content // Titles $table_header = '<table class="stats-table"><tr>'; foreach (Health::getColumnsNames() as $name) { $table_header .= '<th>' . $name . '</th>'; } $table_header .= '</tr>'; $html = []; $links = ''; $first_tab = true;
/** * @dataProvider getStatusDP */ public function testGetStatus($a, $b, $c, $d) { $obj = new _Health(); $this->array($obj->getStatus($a, $b, $c))->isEqualTo($d); }