xref: /webtrees/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php (revision b50dba3a86d260384d07c30bedf82d8e78ab49f7)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 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 <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
21
22/**
23 * A repository providing methods for individual related statistics.
24 */
25interface IndividualRepositoryInterface
26{
27    /**
28     * How many GEDCOM records exist in the tree.
29     *
30     * @return string
31     */
32    public function totalRecords(): string;
33
34    /**
35     * How many individuals exist in the tree.
36     *
37     * @return string
38     */
39    public function totalIndividuals(): string;
40
41    /**
42     * Count the number of males.
43     *
44     * @return string
45     */
46    public function totalSexMales(): string;
47
48    /**
49     * Count the number of females.
50     *
51     * @return string
52     */
53    public function totalSexFemales(): string;
54
55    /**
56     * Count the number of individuals with unknown sex.
57     *
58     * @return string
59     */
60    public function totalSexUnknown(): string;
61
62    /**
63     * Count the total families.
64     *
65     * @return string
66     */
67    public function totalFamilies(): string;
68
69    /**
70     * Count the number of repositories
71     *
72     * @return string
73     */
74    public function totalRepositories(): string;
75
76    /**
77     * Count the total number of sources.
78     *
79     * @return string
80     */
81    public function totalSources(): string;
82
83    /**
84     * Count the number of notes.
85     *
86     * @return string
87     */
88    public function totalNotes(): string;
89
90    /**
91     * Show the total individuals as a percentage.
92     *
93     * @return string
94     */
95    public function totalIndividualsPercentage(): string;
96
97    /**
98     * Show the total individuals with sources as a percentage.
99     *
100     * @return string
101     */
102    public function totalIndisWithSourcesPercentage(): string;
103
104    /**
105     * Show the total families as a percentage.
106     *
107     * @return string
108     */
109    public function totalFamiliesPercentage(): string;
110
111    /**
112     * Show the total families with sources as a percentage.
113     *
114     * @return string
115     */
116    public function totalFamsWithSourcesPercentage(): string;
117
118    /**
119     * Show the total number of repositories as a percentage.
120     *
121     * @return string
122     */
123    public function totalRepositoriesPercentage(): string;
124
125    /**
126     * Show the number of sources as a percentage.
127     *
128     * @return string
129     */
130    public function totalSourcesPercentage(): string;
131
132    /**
133     * Show the number of notes as a percentage.
134     *
135     * @return string
136     */
137    public function totalNotesPercentage(): string;
138
139    /**
140     * Count the number of living individuals.
141     *
142     * @return string
143     */
144    public function totalLivingPercentage(): string;
145
146    /**
147     * Count the number of dead individuals.
148     *
149     * @return string
150     */
151    public function totalDeceasedPercentage(): string;
152
153    /**
154     * Count the number of males
155     *
156     * @return string
157     */
158    public function totalSexMalesPercentage(): string;
159
160    /**
161     * Count the number of females.
162     *
163     * @return string
164     */
165    public function totalSexFemalesPercentage(): string;
166
167    /**
168     * Count the number of individuals with unknown sex.
169     *
170     * @return string
171     */
172    public function totalSexUnknownPercentage(): string;
173
174    /**
175     * Find common surnames.
176     *
177     * @return string
178     */
179    public function getCommonSurname(): string;
180
181    /**
182     * Generate a chart showing sex distribution.
183     *
184     * @param string|null $color_female
185     * @param string|null $color_male
186     * @param string|null $color_unknown
187     *
188     * @return string
189     */
190    public function chartSex(
191        string|null $color_female = null,
192        string|null $color_male = null,
193        string|null $color_unknown = null
194    ): string;
195}
196