foreach ($english_entities as $entity) { $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 = '';
public function testGetGaiaRepositories() { $obj = new _Project(); $repos = ['gaia', 'gaia_2_1', 'gaia_2_0', 'gaia_1_4', 'gaia_1_3']; $this->array($obj->getGaiaRepositories())->isEqualTo($repos); }