1<?php 2 3/** 4 * webtrees: online genealogy 5 * Copyright (C) 2019 webtrees development team 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17declare(strict_types=1); 18 19namespace Fisharebest\Webtrees\Statistics\Repository\Interfaces; 20 21/** 22 * A repository providing methods for individual related statistics. 23 */ 24interface IndividualRepositoryInterface 25{ 26 /** 27 * How many GEDCOM records exist in the tree. 28 * 29 * @return string 30 */ 31 public function totalRecords(): string; 32 33 /** 34 * How many individuals exist in the tree. 35 * 36 * @return string 37 */ 38 public function totalIndividuals(): string; 39 40 /** 41 * Count the number of males. 42 * 43 * @return string 44 */ 45 public function totalSexMales(): string; 46 47 /** 48 * Count the number of females. 49 * 50 * @return string 51 */ 52 public function totalSexFemales(): string; 53 54 /** 55 * Count the number of individuals with unknown sex. 56 * 57 * @return string 58 */ 59 public function totalSexUnknown(): string; 60 61 /** 62 * Count the total families. 63 * 64 * @return string 65 */ 66 public function totalFamilies(): string; 67 68 /** 69 * Count the number of repositories 70 * 71 * @return string 72 */ 73 public function totalRepositories(): string; 74 75 /** 76 * Count the total number of sources. 77 * 78 * @return string 79 */ 80 public function totalSources(): string; 81 82 /** 83 * Count the number of notes. 84 * 85 * @return string 86 */ 87 public function totalNotes(): string; 88 89 /** 90 * Show the total individuals as a percentage. 91 * 92 * @return string 93 */ 94 public function totalIndividualsPercentage(): string; 95 96 /** 97 * Show the total families as a percentage. 98 * 99 * @return string 100 */ 101 public function totalFamiliesPercentage(): string; 102 103 /** 104 * Show the total number of repositories as a percentage. 105 * 106 * @return string 107 */ 108 public function totalRepositoriesPercentage(): string; 109 110 /** 111 * Show the number of sources as a percentage. 112 * 113 * @return string 114 */ 115 public function totalSourcesPercentage(): string; 116 117 /** 118 * Show the number of notes as a percentage. 119 * 120 * @return string 121 */ 122 public function totalNotesPercentage(): string; 123 124 /** 125 * Count the number of living individuals. 126 * 127 * @return string 128 */ 129 public function totalLivingPercentage(): string; 130 131 /** 132 * Count the number of dead individuals. 133 * 134 * @return string 135 */ 136 public function totalDeceasedPercentage(): string; 137 138 /** 139 * Count the number of males 140 * 141 * @return string 142 */ 143 public function totalSexMalesPercentage(): string; 144 145 /** 146 * Count the number of females. 147 * 148 * @return string 149 */ 150 public function totalSexFemalesPercentage(): string; 151 152 /** 153 * Count the number of individuals with unknown sex. 154 * 155 * @return string 156 */ 157 public function totalSexUnknownPercentage(): string; 158 159 /** 160 * Generate a chart showing sex distribution. 161 * 162 * @param string|null $color_female 163 * @param string|null $color_male 164 * @param string|null $color_unknown 165 * 166 * @return string 167 */ 168 public function chartSex( 169 string $color_female = null, 170 string $color_male = null, 171 string $color_unknown = null 172 ): string; 173} 174