xref: /webtrees/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php (revision b50dba3a86d260384d07c30bedf82d8e78ab49f7)
18add1155SRico Sonntag<?php
23976b470SGreg Roach
38add1155SRico Sonntag/**
48add1155SRico Sonntag * webtrees: online genealogy
5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
68add1155SRico Sonntag * This program is free software: you can redistribute it and/or modify
78add1155SRico Sonntag * it under the terms of the GNU General Public License as published by
88add1155SRico Sonntag * the Free Software Foundation, either version 3 of the License, or
98add1155SRico Sonntag * (at your option) any later version.
108add1155SRico Sonntag * This program is distributed in the hope that it will be useful,
118add1155SRico Sonntag * but WITHOUT ANY WARRANTY; without even the implied warranty of
128add1155SRico Sonntag * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
138add1155SRico Sonntag * GNU General Public License for more details.
148add1155SRico Sonntag * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
168add1155SRico Sonntag */
17fcfa147eSGreg Roach
188add1155SRico Sonntagdeclare(strict_types=1);
198add1155SRico Sonntag
208add1155SRico Sonntagnamespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
218add1155SRico Sonntag
228add1155SRico Sonntag/**
238add1155SRico Sonntag * A repository providing methods for individual related statistics.
248add1155SRico Sonntag */
258add1155SRico Sonntaginterface IndividualRepositoryInterface
268add1155SRico Sonntag{
278add1155SRico Sonntag    /**
288add1155SRico Sonntag     * How many GEDCOM records exist in the tree.
298add1155SRico Sonntag     *
308add1155SRico Sonntag     * @return string
318add1155SRico Sonntag     */
328add1155SRico Sonntag    public function totalRecords(): string;
338add1155SRico Sonntag
348add1155SRico Sonntag    /**
358add1155SRico Sonntag     * How many individuals exist in the tree.
368add1155SRico Sonntag     *
378add1155SRico Sonntag     * @return string
388add1155SRico Sonntag     */
398add1155SRico Sonntag    public function totalIndividuals(): string;
408add1155SRico Sonntag
418add1155SRico Sonntag    /**
428add1155SRico Sonntag     * Count the number of males.
438add1155SRico Sonntag     *
448add1155SRico Sonntag     * @return string
458add1155SRico Sonntag     */
468add1155SRico Sonntag    public function totalSexMales(): string;
478add1155SRico Sonntag
488add1155SRico Sonntag    /**
498add1155SRico Sonntag     * Count the number of females.
508add1155SRico Sonntag     *
518add1155SRico Sonntag     * @return string
528add1155SRico Sonntag     */
538add1155SRico Sonntag    public function totalSexFemales(): string;
548add1155SRico Sonntag
558add1155SRico Sonntag    /**
568add1155SRico Sonntag     * Count the number of individuals with unknown sex.
578add1155SRico Sonntag     *
588add1155SRico Sonntag     * @return string
598add1155SRico Sonntag     */
608add1155SRico Sonntag    public function totalSexUnknown(): string;
618add1155SRico Sonntag
628add1155SRico Sonntag    /**
638add1155SRico Sonntag     * Count the total families.
648add1155SRico Sonntag     *
658add1155SRico Sonntag     * @return string
668add1155SRico Sonntag     */
678add1155SRico Sonntag    public function totalFamilies(): string;
688add1155SRico Sonntag
698add1155SRico Sonntag    /**
708add1155SRico Sonntag     * Count the number of repositories
718add1155SRico Sonntag     *
728add1155SRico Sonntag     * @return string
738add1155SRico Sonntag     */
748add1155SRico Sonntag    public function totalRepositories(): string;
758add1155SRico Sonntag
768add1155SRico Sonntag    /**
778add1155SRico Sonntag     * Count the total number of sources.
788add1155SRico Sonntag     *
798add1155SRico Sonntag     * @return string
808add1155SRico Sonntag     */
818add1155SRico Sonntag    public function totalSources(): string;
828add1155SRico Sonntag
838add1155SRico Sonntag    /**
848add1155SRico Sonntag     * Count the number of notes.
858add1155SRico Sonntag     *
868add1155SRico Sonntag     * @return string
878add1155SRico Sonntag     */
888add1155SRico Sonntag    public function totalNotes(): string;
898add1155SRico Sonntag
908add1155SRico Sonntag    /**
918add1155SRico Sonntag     * Show the total individuals as a percentage.
928add1155SRico Sonntag     *
938add1155SRico Sonntag     * @return string
948add1155SRico Sonntag     */
958add1155SRico Sonntag    public function totalIndividualsPercentage(): string;
968add1155SRico Sonntag
978add1155SRico Sonntag    /**
98baa78b21STheDutchJewel     * Show the total individuals with sources as a percentage.
99baa78b21STheDutchJewel     *
100baa78b21STheDutchJewel     * @return string
101baa78b21STheDutchJewel     */
102baa78b21STheDutchJewel    public function totalIndisWithSourcesPercentage(): string;
103baa78b21STheDutchJewel
104baa78b21STheDutchJewel    /**
1058add1155SRico Sonntag     * Show the total families as a percentage.
1068add1155SRico Sonntag     *
1078add1155SRico Sonntag     * @return string
1088add1155SRico Sonntag     */
1098add1155SRico Sonntag    public function totalFamiliesPercentage(): string;
1108add1155SRico Sonntag
1118add1155SRico Sonntag    /**
112baa78b21STheDutchJewel     * Show the total families with sources as a percentage.
113baa78b21STheDutchJewel     *
114baa78b21STheDutchJewel     * @return string
115baa78b21STheDutchJewel     */
116baa78b21STheDutchJewel    public function totalFamsWithSourcesPercentage(): string;
117baa78b21STheDutchJewel
118baa78b21STheDutchJewel    /**
1198add1155SRico Sonntag     * Show the total number of repositories as a percentage.
1208add1155SRico Sonntag     *
1218add1155SRico Sonntag     * @return string
1228add1155SRico Sonntag     */
1238add1155SRico Sonntag    public function totalRepositoriesPercentage(): string;
1248add1155SRico Sonntag
1258add1155SRico Sonntag    /**
1268add1155SRico Sonntag     * Show the number of sources as a percentage.
1278add1155SRico Sonntag     *
1288add1155SRico Sonntag     * @return string
1298add1155SRico Sonntag     */
1308add1155SRico Sonntag    public function totalSourcesPercentage(): string;
1318add1155SRico Sonntag
1328add1155SRico Sonntag    /**
1338add1155SRico Sonntag     * Show the number of notes as a percentage.
1348add1155SRico Sonntag     *
1358add1155SRico Sonntag     * @return string
1368add1155SRico Sonntag     */
1378add1155SRico Sonntag    public function totalNotesPercentage(): string;
1388add1155SRico Sonntag
1398add1155SRico Sonntag    /**
1408add1155SRico Sonntag     * Count the number of living individuals.
1418add1155SRico Sonntag     *
1428add1155SRico Sonntag     * @return string
1438add1155SRico Sonntag     */
1448add1155SRico Sonntag    public function totalLivingPercentage(): string;
1458add1155SRico Sonntag
1468add1155SRico Sonntag    /**
1478add1155SRico Sonntag     * Count the number of dead individuals.
1488add1155SRico Sonntag     *
1498add1155SRico Sonntag     * @return string
1508add1155SRico Sonntag     */
1518add1155SRico Sonntag    public function totalDeceasedPercentage(): string;
1528add1155SRico Sonntag
1538add1155SRico Sonntag    /**
1548add1155SRico Sonntag     * Count the number of males
1558add1155SRico Sonntag     *
1568add1155SRico Sonntag     * @return string
1578add1155SRico Sonntag     */
1588add1155SRico Sonntag    public function totalSexMalesPercentage(): string;
1598add1155SRico Sonntag
1608add1155SRico Sonntag    /**
1618add1155SRico Sonntag     * Count the number of females.
1628add1155SRico Sonntag     *
1638add1155SRico Sonntag     * @return string
1648add1155SRico Sonntag     */
1658add1155SRico Sonntag    public function totalSexFemalesPercentage(): string;
1668add1155SRico Sonntag
1678add1155SRico Sonntag    /**
1688add1155SRico Sonntag     * Count the number of individuals with unknown sex.
1698add1155SRico Sonntag     *
1708add1155SRico Sonntag     * @return string
1718add1155SRico Sonntag     */
1728add1155SRico Sonntag    public function totalSexUnknownPercentage(): string;
1738add1155SRico Sonntag
1748add1155SRico Sonntag    /**
175f78da678SGreg Roach     * Find common surnames.
176f78da678SGreg Roach     *
177f78da678SGreg Roach     * @return string
178f78da678SGreg Roach     */
179f78da678SGreg Roach    public function getCommonSurname(): string;
180f78da678SGreg Roach
181f78da678SGreg Roach    /**
1828add1155SRico Sonntag     * Generate a chart showing sex distribution.
1838add1155SRico Sonntag     *
1848add1155SRico Sonntag     * @param string|null $color_female
1858add1155SRico Sonntag     * @param string|null $color_male
1868add1155SRico Sonntag     * @param string|null $color_unknown
1878add1155SRico Sonntag     *
1888add1155SRico Sonntag     * @return string
1898add1155SRico Sonntag     */
1908add1155SRico Sonntag    public function chartSex(
1912c6f1bd5SGreg Roach        string|null $color_female = null,
1922c6f1bd5SGreg Roach        string|null $color_male = null,
193*b50dba3aSGreg Roach        string|null $color_unknown = null
1948add1155SRico Sonntag    ): string;
1958add1155SRico Sonntag}
196