xref: /webtrees/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php (revision 00b1984e374faddab4698e73088f0c964e529b65)
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 */
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 families as a percentage.
99     *
100     * @return string
101     */
102    public function totalFamiliesPercentage(): string;
103
104    /**
105     * Show the total number of repositories as a percentage.
106     *
107     * @return string
108     */
109    public function totalRepositoriesPercentage(): string;
110
111    /**
112     * Show the number of sources as a percentage.
113     *
114     * @return string
115     */
116    public function totalSourcesPercentage(): string;
117
118    /**
119     * Show the number of notes as a percentage.
120     *
121     * @return string
122     */
123    public function totalNotesPercentage(): string;
124
125    /**
126     * Count the number of living individuals.
127     *
128     * @return string
129     */
130    public function totalLivingPercentage(): string;
131
132    /**
133     * Count the number of dead individuals.
134     *
135     * @return string
136     */
137    public function totalDeceasedPercentage(): string;
138
139    /**
140     * Count the number of males
141     *
142     * @return string
143     */
144    public function totalSexMalesPercentage(): string;
145
146    /**
147     * Count the number of females.
148     *
149     * @return string
150     */
151    public function totalSexFemalesPercentage(): string;
152
153    /**
154     * Count the number of individuals with unknown sex.
155     *
156     * @return string
157     */
158    public function totalSexUnknownPercentage(): string;
159
160    /**
161     * Generate a chart showing sex distribution.
162     *
163     * @param string|null $color_female
164     * @param string|null $color_male
165     * @param string|null $color_unknown
166     *
167     * @return string
168     */
169    public function chartSex(
170        string $color_female = null,
171        string $color_male = null,
172        string $color_unknown = null
173    ): string;
174}
175