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