xref: /webtrees/app/Statistics.php (revision 2da2e0a6818e1203f492a103d86aebe95653ac7c)
19219296aSGreg Roach<?php
23976b470SGreg Roach
39219296aSGreg Roach/**
49219296aSGreg Roach * webtrees: online genealogy
5*2da2e0a6SGreg Roach * Copyright (C) 2021 webtrees development team
69219296aSGreg Roach * This program is free software: you can redistribute it and/or modify
79219296aSGreg Roach * it under the terms of the GNU General Public License as published by
89219296aSGreg Roach * the Free Software Foundation, either version 3 of the License, or
99219296aSGreg Roach * (at your option) any later version.
109219296aSGreg Roach * This program is distributed in the hope that it will be useful,
119219296aSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
129219296aSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
139219296aSGreg Roach * GNU General Public License for more details.
149219296aSGreg Roach * You should have received a copy of the GNU General Public License
159219296aSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
169219296aSGreg Roach */
17fcfa147eSGreg Roach
189219296aSGreg Roachdeclare(strict_types=1);
199219296aSGreg Roach
209219296aSGreg Roachnamespace Fisharebest\Webtrees;
219219296aSGreg Roach
229219296aSGreg Roachuse Fisharebest\Webtrees\Module\ModuleBlockInterface;
239219296aSGreg Roachuse Fisharebest\Webtrees\Module\ModuleInterface;
249219296aSGreg Roachuse Fisharebest\Webtrees\Services\ModuleService;
25e5a6b4d4SGreg Roachuse Fisharebest\Webtrees\Services\UserService;
269219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\BrowserRepository;
279219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\ContactRepository;
289219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\EventRepository;
299219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FamilyDatesRepository;
309219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FamilyRepository;
319219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FavoritesRepository;
329219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\GedcomRepository;
339219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\HitCountRepository;
349219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\IndividualRepository;
359219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\BrowserRepositoryInterface;
369219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\ContactRepositoryInterface;
379219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\EventRepositoryInterface;
389219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\FamilyDatesRepositoryInterface;
399219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\FavoritesRepositoryInterface;
409219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\GedcomRepositoryInterface;
419219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\HitCountRepositoryInterface;
429219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\IndividualRepositoryInterface;
439219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\LatestUserRepositoryInterface;
449219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\MediaRepositoryInterface;
459219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\MessageRepositoryInterface;
469219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\NewsRepositoryInterface;
479219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\PlaceRepositoryInterface;
489219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\ServerRepositoryInterface;
499219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\UserRepositoryInterface;
509219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\LatestUserRepository;
519219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\MediaRepository;
529219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\MessageRepository;
539219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\NewsRepository;
549219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\PlaceRepository;
559219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\ServerRepository;
569219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\UserRepository;
57e6f3d5e2SGreg Roachuse Illuminate\Database\Query\Builder;
58f021177cSGreg Roachuse Illuminate\Support\Collection;
59f021177cSGreg Roachuse ReflectionClass;
60f021177cSGreg Roachuse ReflectionException;
619219296aSGreg Roachuse ReflectionMethod;
62f021177cSGreg Roachuse ReflectionType;
633e5f5a4cSGreg Roachuse stdClass;
649219296aSGreg Roach
65b19e047dSGreg Roachuse function call_user_func;
6671378461SGreg Roachuse function count;
6771378461SGreg Roachuse function in_array;
68dec352c1SGreg Roachuse function str_contains;
6971378461SGreg Roach
709219296aSGreg Roach/**
719219296aSGreg Roach * A selection of pre-formatted statistical queries.
729219296aSGreg Roach * These are primarily used for embedded keywords on HTML blocks, but
739219296aSGreg Roach * are also used elsewhere in the code.
749219296aSGreg Roach */
759219296aSGreg Roachclass Statistics implements
769219296aSGreg Roach    GedcomRepositoryInterface,
779219296aSGreg Roach    IndividualRepositoryInterface,
789219296aSGreg Roach    EventRepositoryInterface,
799219296aSGreg Roach    MediaRepositoryInterface,
809219296aSGreg Roach    UserRepositoryInterface,
819219296aSGreg Roach    ServerRepositoryInterface,
829219296aSGreg Roach    BrowserRepositoryInterface,
839219296aSGreg Roach    HitCountRepositoryInterface,
849219296aSGreg Roach    LatestUserRepositoryInterface,
859219296aSGreg Roach    FavoritesRepositoryInterface,
869219296aSGreg Roach    NewsRepositoryInterface,
879219296aSGreg Roach    MessageRepositoryInterface,
889219296aSGreg Roach    ContactRepositoryInterface,
899219296aSGreg Roach    FamilyDatesRepositoryInterface,
909219296aSGreg Roach    PlaceRepositoryInterface
919219296aSGreg Roach{
929219296aSGreg Roach    /**
9371378461SGreg Roach     * Generate statistics for a specified tree.
9471378461SGreg Roach     *
9571378461SGreg Roach     * @var Tree
9671378461SGreg Roach     */
9771378461SGreg Roach    private $tree;
989219296aSGreg Roach    /**
999219296aSGreg Roach     * @var GedcomRepository
1009219296aSGreg Roach     */
1019219296aSGreg Roach    private $gedcomRepository;
1029219296aSGreg Roach
1039219296aSGreg Roach    /**
1049219296aSGreg Roach     * @var IndividualRepository
1059219296aSGreg Roach     */
1069219296aSGreg Roach    private $individualRepository;
1079219296aSGreg Roach
1089219296aSGreg Roach    /**
1099219296aSGreg Roach     * @var FamilyRepository
1109219296aSGreg Roach     */
1119219296aSGreg Roach    private $familyRepository;
1129219296aSGreg Roach
1139219296aSGreg Roach    /**
1149219296aSGreg Roach     * @var MediaRepository
1159219296aSGreg Roach     */
1169219296aSGreg Roach    private $mediaRepository;
1179219296aSGreg Roach
1189219296aSGreg Roach    /**
1199219296aSGreg Roach     * @var EventRepository
1209219296aSGreg Roach     */
1219219296aSGreg Roach    private $eventRepository;
1229219296aSGreg Roach
1239219296aSGreg Roach    /**
1249219296aSGreg Roach     * @var UserRepository
1259219296aSGreg Roach     */
1269219296aSGreg Roach    private $userRepository;
1279219296aSGreg Roach
1289219296aSGreg Roach    /**
1299219296aSGreg Roach     * @var ServerRepository
1309219296aSGreg Roach     */
1319219296aSGreg Roach    private $serverRepository;
1329219296aSGreg Roach
1339219296aSGreg Roach    /**
1349219296aSGreg Roach     * @var BrowserRepository
1359219296aSGreg Roach     */
1369219296aSGreg Roach    private $browserRepository;
1379219296aSGreg Roach
1389219296aSGreg Roach    /**
1399219296aSGreg Roach     * @var HitCountRepository
1409219296aSGreg Roach     */
1419219296aSGreg Roach    private $hitCountRepository;
1429219296aSGreg Roach
1439219296aSGreg Roach    /**
1449219296aSGreg Roach     * @var LatestUserRepository
1459219296aSGreg Roach     */
1469219296aSGreg Roach    private $latestUserRepository;
1479219296aSGreg Roach
1489219296aSGreg Roach    /**
1499219296aSGreg Roach     * @var FavoritesRepository
1509219296aSGreg Roach     */
1519219296aSGreg Roach    private $favoritesRepository;
1529219296aSGreg Roach
1539219296aSGreg Roach    /**
1549219296aSGreg Roach     * @var NewsRepository
1559219296aSGreg Roach     */
1569219296aSGreg Roach    private $newsRepository;
1579219296aSGreg Roach
1589219296aSGreg Roach    /**
1599219296aSGreg Roach     * @var MessageRepository
1609219296aSGreg Roach     */
1619219296aSGreg Roach    private $messageRepository;
1629219296aSGreg Roach
1639219296aSGreg Roach    /**
1649219296aSGreg Roach     * @var ContactRepository
1659219296aSGreg Roach     */
1669219296aSGreg Roach    private $contactRepository;
1679219296aSGreg Roach
1689219296aSGreg Roach    /**
1699219296aSGreg Roach     * @var FamilyDatesRepository
1709219296aSGreg Roach     */
1719219296aSGreg Roach    private $familyDatesRepository;
1729219296aSGreg Roach
1739219296aSGreg Roach    /**
1749219296aSGreg Roach     * @var PlaceRepository
1759219296aSGreg Roach     */
1769219296aSGreg Roach    private $placeRepository;
1779219296aSGreg Roach
1789219296aSGreg Roach    /**
1799219296aSGreg Roach     * @var ModuleService
1809219296aSGreg Roach     */
1819219296aSGreg Roach    private $module_service;
1829219296aSGreg Roach
1839219296aSGreg Roach    /**
1849219296aSGreg Roach     * Create the statistics for a tree.
1859219296aSGreg Roach     *
1869219296aSGreg Roach     * @param ModuleService $module_service
1879219296aSGreg Roach     * @param Tree          $tree Generate statistics for this tree
188e5a6b4d4SGreg Roach     * @param UserService   $user_service
1899219296aSGreg Roach     */
1909219296aSGreg Roach    public function __construct(
1919219296aSGreg Roach        ModuleService $module_service,
192e5a6b4d4SGreg Roach        Tree $tree,
193e5a6b4d4SGreg Roach        UserService $user_service
19498afcacfSGreg Roach    ) {
1959219296aSGreg Roach        $this->tree                  = $tree;
1969219296aSGreg Roach        $this->gedcomRepository      = new GedcomRepository($tree);
1979219296aSGreg Roach        $this->individualRepository  = new IndividualRepository($tree);
1989219296aSGreg Roach        $this->familyRepository      = new FamilyRepository($tree);
1999219296aSGreg Roach        $this->familyDatesRepository = new FamilyDatesRepository($tree);
2009219296aSGreg Roach        $this->mediaRepository       = new MediaRepository($tree);
2019219296aSGreg Roach        $this->eventRepository       = new EventRepository($tree);
202e5a6b4d4SGreg Roach        $this->userRepository        = new UserRepository($tree, $user_service);
2039219296aSGreg Roach        $this->serverRepository      = new ServerRepository();
2049219296aSGreg Roach        $this->browserRepository     = new BrowserRepository();
205e5a6b4d4SGreg Roach        $this->hitCountRepository    = new HitCountRepository($tree, $user_service);
206e5a6b4d4SGreg Roach        $this->latestUserRepository  = new LatestUserRepository($user_service);
207fd9aba47SGreg Roach        $this->favoritesRepository   = new FavoritesRepository($tree, $module_service);
2089219296aSGreg Roach        $this->newsRepository        = new NewsRepository($tree);
2099219296aSGreg Roach        $this->messageRepository     = new MessageRepository();
210e5a6b4d4SGreg Roach        $this->contactRepository     = new ContactRepository($tree, $user_service);
2119219296aSGreg Roach        $this->placeRepository       = new PlaceRepository($tree);
2129219296aSGreg Roach        $this->module_service        = $module_service;
2139219296aSGreg Roach    }
2149219296aSGreg Roach
2159219296aSGreg Roach    /**
2169219296aSGreg Roach     * Return a string of all supported tags and an example of its output in table row form.
2179219296aSGreg Roach     *
2189219296aSGreg Roach     * @return string
2199219296aSGreg Roach     */
2209219296aSGreg Roach    public function getAllTagsTable(): string
2219219296aSGreg Roach    {
222f021177cSGreg Roach        try {
223f021177cSGreg Roach            $class = new ReflectionClass($this);
2249219296aSGreg Roach
225f021177cSGreg Roach            $public_methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
226f021177cSGreg Roach
227f021177cSGreg Roach            $examples = Collection::make($public_methods)
228f021177cSGreg Roach                ->filter(static function (ReflectionMethod $method): bool {
229f021177cSGreg Roach                    return !in_array($method->getName(), ['embedTags', 'getAllTagsTable'], true);
230f021177cSGreg Roach                })
231f021177cSGreg Roach                ->filter(static function (ReflectionMethod $method): bool {
232f021177cSGreg Roach                    $type = $method->getReturnType();
233f021177cSGreg Roach
234f021177cSGreg Roach                    return $type instanceof ReflectionType && $type->getName() === 'string';
235f021177cSGreg Roach                })
236f021177cSGreg Roach                ->sort(static function (ReflectionMethod $x, ReflectionMethod $y): int {
237f021177cSGreg Roach                    return $x->getName() <=> $y->getName();
238f021177cSGreg Roach                })
239f021177cSGreg Roach                ->map(function (ReflectionMethod $method): string {
240f021177cSGreg Roach                    $tag = $method->getName();
241f021177cSGreg Roach
242f021177cSGreg Roach                    return '<dt>#' . $tag . '#</dt><dd>' . call_user_func([$this, $tag]) . '</dd>';
243f021177cSGreg Roach                });
244f021177cSGreg Roach
245f021177cSGreg Roach            return '<dl>' . $examples->implode('') . '</dl>';
246f021177cSGreg Roach        } catch (ReflectionException $ex) {
247f021177cSGreg Roach            return $ex->getMessage();
2489219296aSGreg Roach        }
2499219296aSGreg Roach    }
2509219296aSGreg Roach
2519219296aSGreg Roach    /**
2529219296aSGreg Roach     * Embed tags in text
2539219296aSGreg Roach     *
2549219296aSGreg Roach     * @param string $text
2559219296aSGreg Roach     *
2569219296aSGreg Roach     * @return string
2579219296aSGreg Roach     */
2589219296aSGreg Roach    public function embedTags(string $text): string
2599219296aSGreg Roach    {
260dec352c1SGreg Roach        if (str_contains($text, '#')) {
2619219296aSGreg Roach            $text = strtr($text, $this->getTags($text));
2629219296aSGreg Roach        }
2639219296aSGreg Roach
2649219296aSGreg Roach        return $text;
2659219296aSGreg Roach    }
2669219296aSGreg Roach
2679219296aSGreg Roach    /**
2680dcd9387SGreg Roach     * @return string
2699219296aSGreg Roach     */
2709219296aSGreg Roach    public function gedcomFilename(): string
2719219296aSGreg Roach    {
2729219296aSGreg Roach        return $this->gedcomRepository->gedcomFilename();
2739219296aSGreg Roach    }
2749219296aSGreg Roach
2759219296aSGreg Roach    /**
2760dcd9387SGreg Roach     * @return int
2779219296aSGreg Roach     */
2789219296aSGreg Roach    public function gedcomId(): int
2799219296aSGreg Roach    {
2809219296aSGreg Roach        return $this->gedcomRepository->gedcomId();
2819219296aSGreg Roach    }
2829219296aSGreg Roach
2839219296aSGreg Roach    /**
2840dcd9387SGreg Roach     * @return string
2859219296aSGreg Roach     */
2869219296aSGreg Roach    public function gedcomTitle(): string
2879219296aSGreg Roach    {
2889219296aSGreg Roach        return $this->gedcomRepository->gedcomTitle();
2899219296aSGreg Roach    }
2909219296aSGreg Roach
2919219296aSGreg Roach    /**
2920dcd9387SGreg Roach     * @return string
2939219296aSGreg Roach     */
2949219296aSGreg Roach    public function gedcomCreatedSoftware(): string
2959219296aSGreg Roach    {
2969219296aSGreg Roach        return $this->gedcomRepository->gedcomCreatedSoftware();
2979219296aSGreg Roach    }
2989219296aSGreg Roach
2999219296aSGreg Roach    /**
3000dcd9387SGreg Roach     * @return string
3019219296aSGreg Roach     */
3029219296aSGreg Roach    public function gedcomCreatedVersion(): string
3039219296aSGreg Roach    {
3049219296aSGreg Roach        return $this->gedcomRepository->gedcomCreatedVersion();
3059219296aSGreg Roach    }
3069219296aSGreg Roach
3079219296aSGreg Roach    /**
3080dcd9387SGreg Roach     * @return string
3099219296aSGreg Roach     */
3109219296aSGreg Roach    public function gedcomDate(): string
3119219296aSGreg Roach    {
3129219296aSGreg Roach        return $this->gedcomRepository->gedcomDate();
3139219296aSGreg Roach    }
3149219296aSGreg Roach
3159219296aSGreg Roach    /**
3160dcd9387SGreg Roach     * @return string
3179219296aSGreg Roach     */
3189219296aSGreg Roach    public function gedcomUpdated(): string
3199219296aSGreg Roach    {
3209219296aSGreg Roach        return $this->gedcomRepository->gedcomUpdated();
3219219296aSGreg Roach    }
3229219296aSGreg Roach
3239219296aSGreg Roach    /**
3240dcd9387SGreg Roach     * @return string
3259219296aSGreg Roach     */
3269219296aSGreg Roach    public function gedcomRootId(): string
3279219296aSGreg Roach    {
3289219296aSGreg Roach        return $this->gedcomRepository->gedcomRootId();
3299219296aSGreg Roach    }
3309219296aSGreg Roach
3319219296aSGreg Roach    /**
3320dcd9387SGreg Roach     * @return string
3339219296aSGreg Roach     */
3349219296aSGreg Roach    public function totalRecords(): string
3359219296aSGreg Roach    {
3369219296aSGreg Roach        return $this->individualRepository->totalRecords();
3379219296aSGreg Roach    }
3389219296aSGreg Roach
3399219296aSGreg Roach    /**
3400dcd9387SGreg Roach     * @return string
3419219296aSGreg Roach     */
3429219296aSGreg Roach    public function totalIndividuals(): string
3439219296aSGreg Roach    {
3449219296aSGreg Roach        return $this->individualRepository->totalIndividuals();
3459219296aSGreg Roach    }
3469219296aSGreg Roach
3479219296aSGreg Roach    /**
3480dcd9387SGreg Roach     * @return string
3499219296aSGreg Roach     */
3509219296aSGreg Roach    public function totalIndisWithSources(): string
3519219296aSGreg Roach    {
3529219296aSGreg Roach        return $this->individualRepository->totalIndisWithSources();
3539219296aSGreg Roach    }
3549219296aSGreg Roach
3559219296aSGreg Roach    /**
3560dcd9387SGreg Roach     * @param string|null $color_from
3570dcd9387SGreg Roach     * @param string|null $color_to
3580dcd9387SGreg Roach     *
3590dcd9387SGreg Roach     * @return string
3609219296aSGreg Roach     */
3619219296aSGreg Roach    public function chartIndisWithSources(
3629219296aSGreg Roach        string $color_from = null,
3639219296aSGreg Roach        string $color_to = null
36498afcacfSGreg Roach    ): string {
36588de55fdSRico Sonntag        return $this->individualRepository->chartIndisWithSources($color_from, $color_to);
3669219296aSGreg Roach    }
3679219296aSGreg Roach
3689219296aSGreg Roach    /**
3690dcd9387SGreg Roach     * @return string
3709219296aSGreg Roach     */
3719219296aSGreg Roach    public function totalIndividualsPercentage(): string
3729219296aSGreg Roach    {
3739219296aSGreg Roach        return $this->individualRepository->totalIndividualsPercentage();
3749219296aSGreg Roach    }
3759219296aSGreg Roach
3769219296aSGreg Roach    /**
3770dcd9387SGreg Roach     * @return string
3789219296aSGreg Roach     */
3799219296aSGreg Roach    public function totalFamilies(): string
3809219296aSGreg Roach    {
3819219296aSGreg Roach        return $this->individualRepository->totalFamilies();
3829219296aSGreg Roach    }
3839219296aSGreg Roach
3849219296aSGreg Roach    /**
3850dcd9387SGreg Roach     * @return string
3869219296aSGreg Roach     */
3879219296aSGreg Roach    public function totalFamiliesPercentage(): string
3889219296aSGreg Roach    {
3899219296aSGreg Roach        return $this->individualRepository->totalFamiliesPercentage();
3909219296aSGreg Roach    }
3919219296aSGreg Roach
3929219296aSGreg Roach    /**
3930dcd9387SGreg Roach     * @return string
3949219296aSGreg Roach     */
3959219296aSGreg Roach    public function totalFamsWithSources(): string
3969219296aSGreg Roach    {
3979219296aSGreg Roach        return $this->individualRepository->totalFamsWithSources();
3989219296aSGreg Roach    }
3999219296aSGreg Roach
4009219296aSGreg Roach    /**
4010dcd9387SGreg Roach     * @param string|null $color_from
4020dcd9387SGreg Roach     * @param string|null $color_to
4030dcd9387SGreg Roach     *
4040dcd9387SGreg Roach     * @return string
4059219296aSGreg Roach     */
4069219296aSGreg Roach    public function chartFamsWithSources(
4079219296aSGreg Roach        string $color_from = null,
4089219296aSGreg Roach        string $color_to = null
40998afcacfSGreg Roach    ): string {
41088de55fdSRico Sonntag        return $this->individualRepository->chartFamsWithSources($color_from, $color_to);
4119219296aSGreg Roach    }
4129219296aSGreg Roach
4139219296aSGreg Roach    /**
4140dcd9387SGreg Roach     * @return string
4159219296aSGreg Roach     */
4169219296aSGreg Roach    public function totalSources(): string
4179219296aSGreg Roach    {
4189219296aSGreg Roach        return $this->individualRepository->totalSources();
4199219296aSGreg Roach    }
4209219296aSGreg Roach
4219219296aSGreg Roach    /**
4220dcd9387SGreg Roach     * @return string
4239219296aSGreg Roach     */
4249219296aSGreg Roach    public function totalSourcesPercentage(): string
4259219296aSGreg Roach    {
4269219296aSGreg Roach        return $this->individualRepository->totalSourcesPercentage();
4279219296aSGreg Roach    }
4289219296aSGreg Roach
4299219296aSGreg Roach    /**
4300dcd9387SGreg Roach     * @return string
4319219296aSGreg Roach     */
4329219296aSGreg Roach    public function totalNotes(): string
4339219296aSGreg Roach    {
4349219296aSGreg Roach        return $this->individualRepository->totalNotes();
4359219296aSGreg Roach    }
4369219296aSGreg Roach
4379219296aSGreg Roach    /**
4380dcd9387SGreg Roach     * @return string
4399219296aSGreg Roach     */
4409219296aSGreg Roach    public function totalNotesPercentage(): string
4419219296aSGreg Roach    {
4429219296aSGreg Roach        return $this->individualRepository->totalNotesPercentage();
4439219296aSGreg Roach    }
4449219296aSGreg Roach
4459219296aSGreg Roach    /**
4460dcd9387SGreg Roach     * @return string
4479219296aSGreg Roach     */
4489219296aSGreg Roach    public function totalRepositories(): string
4499219296aSGreg Roach    {
4509219296aSGreg Roach        return $this->individualRepository->totalRepositories();
4519219296aSGreg Roach    }
4529219296aSGreg Roach
4539219296aSGreg Roach    /**
4540dcd9387SGreg Roach     * @return string
4559219296aSGreg Roach     */
4569219296aSGreg Roach    public function totalRepositoriesPercentage(): string
4579219296aSGreg Roach    {
4589219296aSGreg Roach        return $this->individualRepository->totalRepositoriesPercentage();
4599219296aSGreg Roach    }
4609219296aSGreg Roach
4619219296aSGreg Roach    /**
462320f6a24SGreg Roach     * @param string[] ...$params
463320f6a24SGreg Roach     *
464320f6a24SGreg Roach     * @return string
4659219296aSGreg Roach     */
4669219296aSGreg Roach    public function totalSurnames(...$params): string
4679219296aSGreg Roach    {
4689219296aSGreg Roach        return $this->individualRepository->totalSurnames(...$params);
4699219296aSGreg Roach    }
4709219296aSGreg Roach
4719219296aSGreg Roach    /**
472320f6a24SGreg Roach     * @param string[] ...$params
473320f6a24SGreg Roach     *
474320f6a24SGreg Roach     * @return string
4759219296aSGreg Roach     */
4769219296aSGreg Roach    public function totalGivennames(...$params): string
4779219296aSGreg Roach    {
4789219296aSGreg Roach        return $this->individualRepository->totalGivennames(...$params);
4799219296aSGreg Roach    }
4809219296aSGreg Roach
4819219296aSGreg Roach    /**
482c9a927ceSGreg Roach     * @param string[] $events
4830dcd9387SGreg Roach     *
4840dcd9387SGreg Roach     * @return string
4859219296aSGreg Roach     */
4869219296aSGreg Roach    public function totalEvents(array $events = []): string
4879219296aSGreg Roach    {
4889219296aSGreg Roach        return $this->eventRepository->totalEvents($events);
4899219296aSGreg Roach    }
4909219296aSGreg Roach
4919219296aSGreg Roach    /**
4920dcd9387SGreg Roach     * @return string
4939219296aSGreg Roach     */
4949219296aSGreg Roach    public function totalEventsBirth(): string
4959219296aSGreg Roach    {
4969219296aSGreg Roach        return $this->eventRepository->totalEventsBirth();
4979219296aSGreg Roach    }
4989219296aSGreg Roach
4999219296aSGreg Roach    /**
5000dcd9387SGreg Roach     * @return string
5019219296aSGreg Roach     */
5029219296aSGreg Roach    public function totalBirths(): string
5039219296aSGreg Roach    {
5049219296aSGreg Roach        return $this->eventRepository->totalBirths();
5059219296aSGreg Roach    }
5069219296aSGreg Roach
5079219296aSGreg Roach    /**
5080dcd9387SGreg Roach     * @return string
5099219296aSGreg Roach     */
5109219296aSGreg Roach    public function totalEventsDeath(): string
5119219296aSGreg Roach    {
5129219296aSGreg Roach        return $this->eventRepository->totalEventsDeath();
5139219296aSGreg Roach    }
5149219296aSGreg Roach
5159219296aSGreg Roach    /**
5160dcd9387SGreg Roach     * @return string
5179219296aSGreg Roach     */
5189219296aSGreg Roach    public function totalDeaths(): string
5199219296aSGreg Roach    {
5209219296aSGreg Roach        return $this->eventRepository->totalDeaths();
5219219296aSGreg Roach    }
5229219296aSGreg Roach
5239219296aSGreg Roach    /**
5240dcd9387SGreg Roach     * @return string
5259219296aSGreg Roach     */
5269219296aSGreg Roach    public function totalEventsMarriage(): string
5279219296aSGreg Roach    {
5289219296aSGreg Roach        return $this->eventRepository->totalEventsMarriage();
5299219296aSGreg Roach    }
5309219296aSGreg Roach
5319219296aSGreg Roach    /**
5320dcd9387SGreg Roach     * @return string
5339219296aSGreg Roach     */
5349219296aSGreg Roach    public function totalMarriages(): string
5359219296aSGreg Roach    {
5369219296aSGreg Roach        return $this->eventRepository->totalMarriages();
5379219296aSGreg Roach    }
5389219296aSGreg Roach
5399219296aSGreg Roach    /**
5400dcd9387SGreg Roach     * @return string
5419219296aSGreg Roach     */
5429219296aSGreg Roach    public function totalEventsDivorce(): string
5439219296aSGreg Roach    {
5449219296aSGreg Roach        return $this->eventRepository->totalEventsDivorce();
5459219296aSGreg Roach    }
5469219296aSGreg Roach
5479219296aSGreg Roach    /**
5480dcd9387SGreg Roach     * @return string
5499219296aSGreg Roach     */
5509219296aSGreg Roach    public function totalDivorces(): string
5519219296aSGreg Roach    {
5529219296aSGreg Roach        return $this->eventRepository->totalDivorces();
5539219296aSGreg Roach    }
5549219296aSGreg Roach
5559219296aSGreg Roach    /**
5560dcd9387SGreg Roach     * @return string
5579219296aSGreg Roach     */
5589219296aSGreg Roach    public function totalEventsOther(): string
5599219296aSGreg Roach    {
5609219296aSGreg Roach        return $this->eventRepository->totalEventsOther();
5619219296aSGreg Roach    }
5629219296aSGreg Roach
5639219296aSGreg Roach    /**
5640dcd9387SGreg Roach     * @return string
5659219296aSGreg Roach     */
5669219296aSGreg Roach    public function totalSexMales(): string
5679219296aSGreg Roach    {
5689219296aSGreg Roach        return $this->individualRepository->totalSexMales();
5699219296aSGreg Roach    }
5709219296aSGreg Roach
5719219296aSGreg Roach    /**
5720dcd9387SGreg Roach     * @return string
5739219296aSGreg Roach     */
5749219296aSGreg Roach    public function totalSexMalesPercentage(): string
5759219296aSGreg Roach    {
5769219296aSGreg Roach        return $this->individualRepository->totalSexMalesPercentage();
5779219296aSGreg Roach    }
5789219296aSGreg Roach
5799219296aSGreg Roach    /**
5800dcd9387SGreg Roach     * @return string
5819219296aSGreg Roach     */
5829219296aSGreg Roach    public function totalSexFemales(): string
5839219296aSGreg Roach    {
5849219296aSGreg Roach        return $this->individualRepository->totalSexFemales();
5859219296aSGreg Roach    }
5869219296aSGreg Roach
5879219296aSGreg Roach    /**
5880dcd9387SGreg Roach     * @return string
5899219296aSGreg Roach     */
5909219296aSGreg Roach    public function totalSexFemalesPercentage(): string
5919219296aSGreg Roach    {
5929219296aSGreg Roach        return $this->individualRepository->totalSexFemalesPercentage();
5939219296aSGreg Roach    }
5949219296aSGreg Roach
5959219296aSGreg Roach    /**
5960dcd9387SGreg Roach     * @return string
5979219296aSGreg Roach     */
5989219296aSGreg Roach    public function totalSexUnknown(): string
5999219296aSGreg Roach    {
6009219296aSGreg Roach        return $this->individualRepository->totalSexUnknown();
6019219296aSGreg Roach    }
6029219296aSGreg Roach
6039219296aSGreg Roach    /**
6040dcd9387SGreg Roach     * @return string
6059219296aSGreg Roach     */
6069219296aSGreg Roach    public function totalSexUnknownPercentage(): string
6079219296aSGreg Roach    {
6089219296aSGreg Roach        return $this->individualRepository->totalSexUnknownPercentage();
6099219296aSGreg Roach    }
6109219296aSGreg Roach
6119219296aSGreg Roach    /**
6120dcd9387SGreg Roach     * @param string|null $color_female
6130dcd9387SGreg Roach     * @param string|null $color_male
6140dcd9387SGreg Roach     * @param string|null $color_unknown
6150dcd9387SGreg Roach     *
6160dcd9387SGreg Roach     * @return string
6179219296aSGreg Roach     */
6189219296aSGreg Roach    public function chartSex(
6199219296aSGreg Roach        string $color_female = null,
6209219296aSGreg Roach        string $color_male = null,
6219219296aSGreg Roach        string $color_unknown = null
62298afcacfSGreg Roach    ): string {
62388de55fdSRico Sonntag        return $this->individualRepository->chartSex($color_female, $color_male, $color_unknown);
6249219296aSGreg Roach    }
6259219296aSGreg Roach
6269219296aSGreg Roach    /**
6270dcd9387SGreg Roach     * @return string
6289219296aSGreg Roach     */
6299219296aSGreg Roach    public function totalLiving(): string
6309219296aSGreg Roach    {
6319219296aSGreg Roach        return $this->individualRepository->totalLiving();
6329219296aSGreg Roach    }
6339219296aSGreg Roach
6349219296aSGreg Roach    /**
6350dcd9387SGreg Roach     * @return string
6369219296aSGreg Roach     */
6379219296aSGreg Roach    public function totalLivingPercentage(): string
6389219296aSGreg Roach    {
6399219296aSGreg Roach        return $this->individualRepository->totalLivingPercentage();
6409219296aSGreg Roach    }
6419219296aSGreg Roach
6429219296aSGreg Roach    /**
6430dcd9387SGreg Roach     * @return string
6449219296aSGreg Roach     */
6459219296aSGreg Roach    public function totalDeceased(): string
6469219296aSGreg Roach    {
6479219296aSGreg Roach        return $this->individualRepository->totalDeceased();
6489219296aSGreg Roach    }
6499219296aSGreg Roach
6509219296aSGreg Roach    /**
6510dcd9387SGreg Roach     * @return string
6529219296aSGreg Roach     */
6539219296aSGreg Roach    public function totalDeceasedPercentage(): string
6549219296aSGreg Roach    {
6559219296aSGreg Roach        return $this->individualRepository->totalDeceasedPercentage();
6569219296aSGreg Roach    }
6579219296aSGreg Roach
6589219296aSGreg Roach    /**
6590dcd9387SGreg Roach     * @param string|null $color_living
6600dcd9387SGreg Roach     * @param string|null $color_dead
6610dcd9387SGreg Roach     *
6620dcd9387SGreg Roach     * @return string
6639219296aSGreg Roach     */
66488de55fdSRico Sonntag    public function chartMortality(string $color_living = null, string $color_dead = null): string
6659219296aSGreg Roach    {
66688de55fdSRico Sonntag        return $this->individualRepository->chartMortality($color_living, $color_dead);
6679219296aSGreg Roach    }
6689219296aSGreg Roach
6699219296aSGreg Roach    /**
6700dcd9387SGreg Roach     * @return string
6719219296aSGreg Roach     */
6729219296aSGreg Roach    public function totalMedia(): string
6739219296aSGreg Roach    {
6749219296aSGreg Roach        return $this->mediaRepository->totalMedia();
6759219296aSGreg Roach    }
6769219296aSGreg Roach
6779219296aSGreg Roach    /**
6780dcd9387SGreg Roach     * @return string
6799219296aSGreg Roach     */
6809219296aSGreg Roach    public function totalMediaAudio(): string
6819219296aSGreg Roach    {
6829219296aSGreg Roach        return $this->mediaRepository->totalMediaAudio();
6839219296aSGreg Roach    }
6849219296aSGreg Roach
6859219296aSGreg Roach    /**
6860dcd9387SGreg Roach     * @return string
6879219296aSGreg Roach     */
6889219296aSGreg Roach    public function totalMediaBook(): string
6899219296aSGreg Roach    {
6909219296aSGreg Roach        return $this->mediaRepository->totalMediaBook();
6919219296aSGreg Roach    }
6929219296aSGreg Roach
6939219296aSGreg Roach    /**
6940dcd9387SGreg Roach     * @return string
6959219296aSGreg Roach     */
6969219296aSGreg Roach    public function totalMediaCard(): string
6979219296aSGreg Roach    {
6989219296aSGreg Roach        return $this->mediaRepository->totalMediaCard();
6999219296aSGreg Roach    }
7009219296aSGreg Roach
7019219296aSGreg Roach    /**
7020dcd9387SGreg Roach     * @return string
7039219296aSGreg Roach     */
7049219296aSGreg Roach    public function totalMediaCertificate(): string
7059219296aSGreg Roach    {
7069219296aSGreg Roach        return $this->mediaRepository->totalMediaCertificate();
7079219296aSGreg Roach    }
7089219296aSGreg Roach
7099219296aSGreg Roach    /**
7100dcd9387SGreg Roach     * @return string
7119219296aSGreg Roach     */
7129219296aSGreg Roach    public function totalMediaCoatOfArms(): string
7139219296aSGreg Roach    {
7149219296aSGreg Roach        return $this->mediaRepository->totalMediaCoatOfArms();
7159219296aSGreg Roach    }
7169219296aSGreg Roach
7179219296aSGreg Roach    /**
7180dcd9387SGreg Roach     * @return string
7199219296aSGreg Roach     */
7209219296aSGreg Roach    public function totalMediaDocument(): string
7219219296aSGreg Roach    {
7229219296aSGreg Roach        return $this->mediaRepository->totalMediaDocument();
7239219296aSGreg Roach    }
7249219296aSGreg Roach
7259219296aSGreg Roach    /**
7260dcd9387SGreg Roach     * @return string
7279219296aSGreg Roach     */
7289219296aSGreg Roach    public function totalMediaElectronic(): string
7299219296aSGreg Roach    {
7309219296aSGreg Roach        return $this->mediaRepository->totalMediaElectronic();
7319219296aSGreg Roach    }
7329219296aSGreg Roach
7339219296aSGreg Roach    /**
7340dcd9387SGreg Roach     * @return string
7359219296aSGreg Roach     */
7369219296aSGreg Roach    public function totalMediaMagazine(): string
7379219296aSGreg Roach    {
7389219296aSGreg Roach        return $this->mediaRepository->totalMediaMagazine();
7399219296aSGreg Roach    }
7409219296aSGreg Roach
7419219296aSGreg Roach    /**
7420dcd9387SGreg Roach     * @return string
7439219296aSGreg Roach     */
7449219296aSGreg Roach    public function totalMediaManuscript(): string
7459219296aSGreg Roach    {
7469219296aSGreg Roach        return $this->mediaRepository->totalMediaManuscript();
7479219296aSGreg Roach    }
7489219296aSGreg Roach
7499219296aSGreg Roach    /**
7500dcd9387SGreg Roach     * @return string
7519219296aSGreg Roach     */
7529219296aSGreg Roach    public function totalMediaMap(): string
7539219296aSGreg Roach    {
7549219296aSGreg Roach        return $this->mediaRepository->totalMediaMap();
7559219296aSGreg Roach    }
7569219296aSGreg Roach
7579219296aSGreg Roach    /**
7580dcd9387SGreg Roach     * @return string
7599219296aSGreg Roach     */
7609219296aSGreg Roach    public function totalMediaFiche(): string
7619219296aSGreg Roach    {
7629219296aSGreg Roach        return $this->mediaRepository->totalMediaFiche();
7639219296aSGreg Roach    }
7649219296aSGreg Roach
7659219296aSGreg Roach    /**
7660dcd9387SGreg Roach     * @return string
7679219296aSGreg Roach     */
7689219296aSGreg Roach    public function totalMediaFilm(): string
7699219296aSGreg Roach    {
7709219296aSGreg Roach        return $this->mediaRepository->totalMediaFilm();
7719219296aSGreg Roach    }
7729219296aSGreg Roach
7739219296aSGreg Roach    /**
7740dcd9387SGreg Roach     * @return string
7759219296aSGreg Roach     */
7769219296aSGreg Roach    public function totalMediaNewspaper(): string
7779219296aSGreg Roach    {
7789219296aSGreg Roach        return $this->mediaRepository->totalMediaNewspaper();
7799219296aSGreg Roach    }
7809219296aSGreg Roach
7819219296aSGreg Roach    /**
7820dcd9387SGreg Roach     * @return string
7839219296aSGreg Roach     */
7849219296aSGreg Roach    public function totalMediaPainting(): string
7859219296aSGreg Roach    {
7869219296aSGreg Roach        return $this->mediaRepository->totalMediaPainting();
7879219296aSGreg Roach    }
7889219296aSGreg Roach
7899219296aSGreg Roach    /**
7900dcd9387SGreg Roach     * @return string
7919219296aSGreg Roach     */
7929219296aSGreg Roach    public function totalMediaPhoto(): string
7939219296aSGreg Roach    {
7949219296aSGreg Roach        return $this->mediaRepository->totalMediaPhoto();
7959219296aSGreg Roach    }
7969219296aSGreg Roach
7979219296aSGreg Roach    /**
7980dcd9387SGreg Roach     * @return string
7999219296aSGreg Roach     */
8009219296aSGreg Roach    public function totalMediaTombstone(): string
8019219296aSGreg Roach    {
8029219296aSGreg Roach        return $this->mediaRepository->totalMediaTombstone();
8039219296aSGreg Roach    }
8049219296aSGreg Roach
8059219296aSGreg Roach    /**
8060dcd9387SGreg Roach     * @return string
8079219296aSGreg Roach     */
8089219296aSGreg Roach    public function totalMediaVideo(): string
8099219296aSGreg Roach    {
8109219296aSGreg Roach        return $this->mediaRepository->totalMediaVideo();
8119219296aSGreg Roach    }
8129219296aSGreg Roach
8139219296aSGreg Roach    /**
8140dcd9387SGreg Roach     * @return string
8159219296aSGreg Roach     */
8169219296aSGreg Roach    public function totalMediaOther(): string
8179219296aSGreg Roach    {
8189219296aSGreg Roach        return $this->mediaRepository->totalMediaOther();
8199219296aSGreg Roach    }
8209219296aSGreg Roach
8219219296aSGreg Roach    /**
8220dcd9387SGreg Roach     * @return string
8239219296aSGreg Roach     */
8249219296aSGreg Roach    public function totalMediaUnknown(): string
8259219296aSGreg Roach    {
8269219296aSGreg Roach        return $this->mediaRepository->totalMediaUnknown();
8279219296aSGreg Roach    }
8289219296aSGreg Roach
8299219296aSGreg Roach    /**
8300dcd9387SGreg Roach     * @param string|null $color_from
8310dcd9387SGreg Roach     * @param string|null $color_to
8320dcd9387SGreg Roach     *
8330dcd9387SGreg Roach     * @return string
8349219296aSGreg Roach     */
83588de55fdSRico Sonntag    public function chartMedia(string $color_from = null, string $color_to = null): string
8369219296aSGreg Roach    {
83788de55fdSRico Sonntag        return $this->mediaRepository->chartMedia($color_from, $color_to);
8389219296aSGreg Roach    }
8399219296aSGreg Roach
8409219296aSGreg Roach    /**
8410dcd9387SGreg Roach     * @param string $what
8420dcd9387SGreg Roach     * @param string $fact
8430dcd9387SGreg Roach     * @param int    $parent
8440dcd9387SGreg Roach     * @param bool   $country
8450dcd9387SGreg Roach     *
8463e5f5a4cSGreg Roach     * @return stdClass[]
8479219296aSGreg Roach     */
8489219296aSGreg Roach    public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent = 0, bool $country = false): array
8499219296aSGreg Roach    {
8509219296aSGreg Roach        return $this->placeRepository->statsPlaces($what, $fact, $parent, $country);
8519219296aSGreg Roach    }
8529219296aSGreg Roach
8539219296aSGreg Roach    /**
8540dcd9387SGreg Roach     * @return string
8559219296aSGreg Roach     */
8569219296aSGreg Roach    public function totalPlaces(): string
8579219296aSGreg Roach    {
8589219296aSGreg Roach        return $this->placeRepository->totalPlaces();
8599219296aSGreg Roach    }
8609219296aSGreg Roach
8619219296aSGreg Roach    /**
8620dcd9387SGreg Roach     * @param string $chart_shows
8630dcd9387SGreg Roach     * @param string $chart_type
8640dcd9387SGreg Roach     * @param string $surname
8650dcd9387SGreg Roach     *
8660dcd9387SGreg Roach     * @return string
8679219296aSGreg Roach     */
8689219296aSGreg Roach    public function chartDistribution(
8699219296aSGreg Roach        string $chart_shows = 'world',
8709219296aSGreg Roach        string $chart_type = '',
8719219296aSGreg Roach        string $surname = ''
87298afcacfSGreg Roach    ): string {
8739219296aSGreg Roach        return $this->placeRepository->chartDistribution($chart_shows, $chart_type, $surname);
8749219296aSGreg Roach    }
8759219296aSGreg Roach
8769219296aSGreg Roach    /**
8770dcd9387SGreg Roach     * @return string
8789219296aSGreg Roach     */
8799219296aSGreg Roach    public function commonCountriesList(): string
8809219296aSGreg Roach    {
8819219296aSGreg Roach        return $this->placeRepository->commonCountriesList();
8829219296aSGreg Roach    }
8839219296aSGreg Roach
8849219296aSGreg Roach    /**
8850dcd9387SGreg Roach     * @return string
8869219296aSGreg Roach     */
8879219296aSGreg Roach    public function commonBirthPlacesList(): string
8889219296aSGreg Roach    {
8899219296aSGreg Roach        return $this->placeRepository->commonBirthPlacesList();
8909219296aSGreg Roach    }
8919219296aSGreg Roach
8929219296aSGreg Roach    /**
8930dcd9387SGreg Roach     * @return string
8949219296aSGreg Roach     */
8959219296aSGreg Roach    public function commonDeathPlacesList(): string
8969219296aSGreg Roach    {
8979219296aSGreg Roach        return $this->placeRepository->commonDeathPlacesList();
8989219296aSGreg Roach    }
8999219296aSGreg Roach
9009219296aSGreg Roach    /**
9010dcd9387SGreg Roach     * @return string
9029219296aSGreg Roach     */
9039219296aSGreg Roach    public function commonMarriagePlacesList(): string
9049219296aSGreg Roach    {
9059219296aSGreg Roach        return $this->placeRepository->commonMarriagePlacesList();
9069219296aSGreg Roach    }
9079219296aSGreg Roach
9089219296aSGreg Roach    /**
9090dcd9387SGreg Roach     * @return string
9109219296aSGreg Roach     */
9119219296aSGreg Roach    public function firstBirth(): string
9129219296aSGreg Roach    {
9139219296aSGreg Roach        return $this->familyDatesRepository->firstBirth();
9149219296aSGreg Roach    }
9159219296aSGreg Roach
9169219296aSGreg Roach    /**
9170dcd9387SGreg Roach     * @return string
9189219296aSGreg Roach     */
9199219296aSGreg Roach    public function firstBirthYear(): string
9209219296aSGreg Roach    {
9219219296aSGreg Roach        return $this->familyDatesRepository->firstBirthYear();
9229219296aSGreg Roach    }
9239219296aSGreg Roach
9249219296aSGreg Roach    /**
9250dcd9387SGreg Roach     * @return string
9269219296aSGreg Roach     */
9279219296aSGreg Roach    public function firstBirthName(): string
9289219296aSGreg Roach    {
9299219296aSGreg Roach        return $this->familyDatesRepository->firstBirthName();
9309219296aSGreg Roach    }
9319219296aSGreg Roach
9329219296aSGreg Roach    /**
9330dcd9387SGreg Roach     * @return string
9349219296aSGreg Roach     */
9359219296aSGreg Roach    public function firstBirthPlace(): string
9369219296aSGreg Roach    {
9379219296aSGreg Roach        return $this->familyDatesRepository->firstBirthPlace();
9389219296aSGreg Roach    }
9399219296aSGreg Roach
9409219296aSGreg Roach    /**
9410dcd9387SGreg Roach     * @return string
9429219296aSGreg Roach     */
9439219296aSGreg Roach    public function lastBirth(): string
9449219296aSGreg Roach    {
9459219296aSGreg Roach        return $this->familyDatesRepository->lastBirth();
9469219296aSGreg Roach    }
9479219296aSGreg Roach
9489219296aSGreg Roach    /**
9490dcd9387SGreg Roach     * @return string
9509219296aSGreg Roach     */
9519219296aSGreg Roach    public function lastBirthYear(): string
9529219296aSGreg Roach    {
9539219296aSGreg Roach        return $this->familyDatesRepository->lastBirthYear();
9549219296aSGreg Roach    }
9559219296aSGreg Roach
9569219296aSGreg Roach    /**
9570dcd9387SGreg Roach     * @return string
9589219296aSGreg Roach     */
9599219296aSGreg Roach    public function lastBirthName(): string
9609219296aSGreg Roach    {
9619219296aSGreg Roach        return $this->familyDatesRepository->lastBirthName();
9629219296aSGreg Roach    }
9639219296aSGreg Roach
9649219296aSGreg Roach    /**
9650dcd9387SGreg Roach     * @return string
9669219296aSGreg Roach     */
9679219296aSGreg Roach    public function lastBirthPlace(): string
9689219296aSGreg Roach    {
9699219296aSGreg Roach        return $this->familyDatesRepository->lastBirthPlace();
9709219296aSGreg Roach    }
9719219296aSGreg Roach
9729219296aSGreg Roach    /**
9730dcd9387SGreg Roach     * @param int $year1
9740dcd9387SGreg Roach     * @param int $year2
9750dcd9387SGreg Roach     *
9760dcd9387SGreg Roach     * @return Builder
9779219296aSGreg Roach     */
978cde1d378SGreg Roach    public function statsBirthQuery(int $year1 = -1, int $year2 = -1): Builder
9799219296aSGreg Roach    {
980cde1d378SGreg Roach        return $this->individualRepository->statsBirthQuery($year1, $year2);
981cde1d378SGreg Roach    }
982cde1d378SGreg Roach
983cde1d378SGreg Roach    /**
9840dcd9387SGreg Roach     * @param int $year1
9850dcd9387SGreg Roach     * @param int $year2
9860dcd9387SGreg Roach     *
9870dcd9387SGreg Roach     * @return Builder
988cde1d378SGreg Roach     */
989cde1d378SGreg Roach    public function statsBirthBySexQuery(int $year1 = -1, int $year2 = -1): Builder
990cde1d378SGreg Roach    {
991cde1d378SGreg Roach        return $this->individualRepository->statsBirthBySexQuery($year1, $year2);
9929219296aSGreg Roach    }
9939219296aSGreg Roach
9949219296aSGreg Roach    /**
9950dcd9387SGreg Roach     * @param string|null $color_from
9960dcd9387SGreg Roach     * @param string|null $color_to
9970dcd9387SGreg Roach     *
9980dcd9387SGreg Roach     * @return string
9999219296aSGreg Roach     */
100088de55fdSRico Sonntag    public function statsBirth(string $color_from = null, string $color_to = null): string
10019219296aSGreg Roach    {
100288de55fdSRico Sonntag        return $this->individualRepository->statsBirth($color_from, $color_to);
10039219296aSGreg Roach    }
10049219296aSGreg Roach
10059219296aSGreg Roach    /**
10060dcd9387SGreg Roach     * @return string
10079219296aSGreg Roach     */
10089219296aSGreg Roach    public function firstDeath(): string
10099219296aSGreg Roach    {
10109219296aSGreg Roach        return $this->familyDatesRepository->firstDeath();
10119219296aSGreg Roach    }
10129219296aSGreg Roach
10139219296aSGreg Roach    /**
10140dcd9387SGreg Roach     * @return string
10159219296aSGreg Roach     */
10169219296aSGreg Roach    public function firstDeathYear(): string
10179219296aSGreg Roach    {
10189219296aSGreg Roach        return $this->familyDatesRepository->firstDeathYear();
10199219296aSGreg Roach    }
10209219296aSGreg Roach
10219219296aSGreg Roach    /**
10220dcd9387SGreg Roach     * @return string
10239219296aSGreg Roach     */
10249219296aSGreg Roach    public function firstDeathName(): string
10259219296aSGreg Roach    {
10269219296aSGreg Roach        return $this->familyDatesRepository->firstDeathName();
10279219296aSGreg Roach    }
10289219296aSGreg Roach
10299219296aSGreg Roach    /**
10300dcd9387SGreg Roach     * @return string
10319219296aSGreg Roach     */
10329219296aSGreg Roach    public function firstDeathPlace(): string
10339219296aSGreg Roach    {
10349219296aSGreg Roach        return $this->familyDatesRepository->firstDeathPlace();
10359219296aSGreg Roach    }
10369219296aSGreg Roach
10379219296aSGreg Roach    /**
10380dcd9387SGreg Roach     * @return string
10399219296aSGreg Roach     */
10409219296aSGreg Roach    public function lastDeath(): string
10419219296aSGreg Roach    {
10429219296aSGreg Roach        return $this->familyDatesRepository->lastDeath();
10439219296aSGreg Roach    }
10449219296aSGreg Roach
10459219296aSGreg Roach    /**
10460dcd9387SGreg Roach     * @return string
10479219296aSGreg Roach     */
10489219296aSGreg Roach    public function lastDeathYear(): string
10499219296aSGreg Roach    {
10509219296aSGreg Roach        return $this->familyDatesRepository->lastDeathYear();
10519219296aSGreg Roach    }
10529219296aSGreg Roach
10539219296aSGreg Roach    /**
10540dcd9387SGreg Roach     * @return string
10559219296aSGreg Roach     */
10569219296aSGreg Roach    public function lastDeathName(): string
10579219296aSGreg Roach    {
10589219296aSGreg Roach        return $this->familyDatesRepository->lastDeathName();
10599219296aSGreg Roach    }
10609219296aSGreg Roach
10619219296aSGreg Roach    /**
10620dcd9387SGreg Roach     * @return string
10639219296aSGreg Roach     */
10649219296aSGreg Roach    public function lastDeathPlace(): string
10659219296aSGreg Roach    {
10669219296aSGreg Roach        return $this->familyDatesRepository->lastDeathPlace();
10679219296aSGreg Roach    }
10689219296aSGreg Roach
10699219296aSGreg Roach    /**
10700dcd9387SGreg Roach     * @param int $year1
10710dcd9387SGreg Roach     * @param int $year2
10720dcd9387SGreg Roach     *
10730dcd9387SGreg Roach     * @return Builder
10749219296aSGreg Roach     */
1075cde1d378SGreg Roach    public function statsDeathQuery(int $year1 = -1, int $year2 = -1): Builder
10769219296aSGreg Roach    {
1077cde1d378SGreg Roach        return $this->individualRepository->statsDeathQuery($year1, $year2);
1078cde1d378SGreg Roach    }
1079cde1d378SGreg Roach
1080cde1d378SGreg Roach    /**
10810dcd9387SGreg Roach     * @param int $year1
10820dcd9387SGreg Roach     * @param int $year2
10830dcd9387SGreg Roach     *
10840dcd9387SGreg Roach     * @return Builder
1085cde1d378SGreg Roach     */
1086cde1d378SGreg Roach    public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder
1087cde1d378SGreg Roach    {
1088cde1d378SGreg Roach        return $this->individualRepository->statsDeathBySexQuery($year1, $year2);
10899219296aSGreg Roach    }
10909219296aSGreg Roach
10919219296aSGreg Roach    /**
10920dcd9387SGreg Roach     * @param string|null $color_from
10930dcd9387SGreg Roach     * @param string|null $color_to
10940dcd9387SGreg Roach     *
10950dcd9387SGreg Roach     * @return string
10969219296aSGreg Roach     */
109788de55fdSRico Sonntag    public function statsDeath(string $color_from = null, string $color_to = null): string
10989219296aSGreg Roach    {
109988de55fdSRico Sonntag        return $this->individualRepository->statsDeath($color_from, $color_to);
11009219296aSGreg Roach    }
11019219296aSGreg Roach
11029219296aSGreg Roach    /**
1103320f6a24SGreg Roach     * General query on ages.
1104320f6a24SGreg Roach     *
1105320f6a24SGreg Roach     * @param string $related
1106320f6a24SGreg Roach     * @param string $sex
1107320f6a24SGreg Roach     * @param int    $year1
1108320f6a24SGreg Roach     * @param int    $year2
1109320f6a24SGreg Roach     *
1110320f6a24SGreg Roach     * @return array|string
11119219296aSGreg Roach     */
11129219296aSGreg Roach    public function statsAgeQuery(string $related = 'BIRT', string $sex = 'BOTH', int $year1 = -1, int $year2 = -1)
11139219296aSGreg Roach    {
11149219296aSGreg Roach        return $this->individualRepository->statsAgeQuery($related, $sex, $year1, $year2);
11159219296aSGreg Roach    }
11169219296aSGreg Roach
11179219296aSGreg Roach    /**
11180dcd9387SGreg Roach     * @return string
11199219296aSGreg Roach     */
112088de55fdSRico Sonntag    public function statsAge(): string
11219219296aSGreg Roach    {
112288de55fdSRico Sonntag        return $this->individualRepository->statsAge();
11239219296aSGreg Roach    }
11249219296aSGreg Roach
11259219296aSGreg Roach    /**
11260dcd9387SGreg Roach     * @return string
11279219296aSGreg Roach     */
11289219296aSGreg Roach    public function longestLife(): string
11299219296aSGreg Roach    {
11309219296aSGreg Roach        return $this->individualRepository->longestLife();
11319219296aSGreg Roach    }
11329219296aSGreg Roach
11339219296aSGreg Roach    /**
11340dcd9387SGreg Roach     * @return string
11359219296aSGreg Roach     */
11369219296aSGreg Roach    public function longestLifeAge(): string
11379219296aSGreg Roach    {
11389219296aSGreg Roach        return $this->individualRepository->longestLifeAge();
11399219296aSGreg Roach    }
11409219296aSGreg Roach
11419219296aSGreg Roach    /**
11420dcd9387SGreg Roach     * @return string
11439219296aSGreg Roach     */
11449219296aSGreg Roach    public function longestLifeName(): string
11459219296aSGreg Roach    {
11469219296aSGreg Roach        return $this->individualRepository->longestLifeName();
11479219296aSGreg Roach    }
11489219296aSGreg Roach
11499219296aSGreg Roach    /**
11500dcd9387SGreg Roach     * @return string
11519219296aSGreg Roach     */
11529219296aSGreg Roach    public function longestLifeFemale(): string
11539219296aSGreg Roach    {
11549219296aSGreg Roach        return $this->individualRepository->longestLifeFemale();
11559219296aSGreg Roach    }
11569219296aSGreg Roach
11579219296aSGreg Roach    /**
11580dcd9387SGreg Roach     * @return string
11599219296aSGreg Roach     */
11609219296aSGreg Roach    public function longestLifeFemaleAge(): string
11619219296aSGreg Roach    {
11629219296aSGreg Roach        return $this->individualRepository->longestLifeFemaleAge();
11639219296aSGreg Roach    }
11649219296aSGreg Roach
11659219296aSGreg Roach    /**
11660dcd9387SGreg Roach     * @return string
11679219296aSGreg Roach     */
11689219296aSGreg Roach    public function longestLifeFemaleName(): string
11699219296aSGreg Roach    {
11709219296aSGreg Roach        return $this->individualRepository->longestLifeFemaleName();
11719219296aSGreg Roach    }
11729219296aSGreg Roach
11739219296aSGreg Roach    /**
11740dcd9387SGreg Roach     * @return string
11759219296aSGreg Roach     */
11769219296aSGreg Roach    public function longestLifeMale(): string
11779219296aSGreg Roach    {
11789219296aSGreg Roach        return $this->individualRepository->longestLifeMale();
11799219296aSGreg Roach    }
11809219296aSGreg Roach
11819219296aSGreg Roach    /**
11820dcd9387SGreg Roach     * @return string
11839219296aSGreg Roach     */
11849219296aSGreg Roach    public function longestLifeMaleAge(): string
11859219296aSGreg Roach    {
11869219296aSGreg Roach        return $this->individualRepository->longestLifeMaleAge();
11879219296aSGreg Roach    }
11889219296aSGreg Roach
11899219296aSGreg Roach    /**
11900dcd9387SGreg Roach     * @return string
11919219296aSGreg Roach     */
11929219296aSGreg Roach    public function longestLifeMaleName(): string
11939219296aSGreg Roach    {
11949219296aSGreg Roach        return $this->individualRepository->longestLifeMaleName();
11959219296aSGreg Roach    }
11969219296aSGreg Roach
11979219296aSGreg Roach    /**
11980dcd9387SGreg Roach     * @param string $total
11990dcd9387SGreg Roach     *
12000dcd9387SGreg Roach     * @return string
12019219296aSGreg Roach     */
12029219296aSGreg Roach    public function topTenOldest(string $total = '10'): string
12039219296aSGreg Roach    {
12049219296aSGreg Roach        return $this->individualRepository->topTenOldest((int) $total);
12059219296aSGreg Roach    }
12069219296aSGreg Roach
12079219296aSGreg Roach    /**
12080dcd9387SGreg Roach     * @param string $total
12090dcd9387SGreg Roach     *
12100dcd9387SGreg Roach     * @return string
12119219296aSGreg Roach     */
12129219296aSGreg Roach    public function topTenOldestList(string $total = '10'): string
12139219296aSGreg Roach    {
12149219296aSGreg Roach        return $this->individualRepository->topTenOldestList((int) $total);
12159219296aSGreg Roach    }
12169219296aSGreg Roach
12179219296aSGreg Roach    /**
12180dcd9387SGreg Roach     * @param string $total
12190dcd9387SGreg Roach     *
12200dcd9387SGreg Roach     * @return string
12219219296aSGreg Roach     */
12229219296aSGreg Roach    public function topTenOldestFemale(string $total = '10'): string
12239219296aSGreg Roach    {
12249219296aSGreg Roach        return $this->individualRepository->topTenOldestFemale((int) $total);
12259219296aSGreg Roach    }
12269219296aSGreg Roach
12279219296aSGreg Roach    /**
12280dcd9387SGreg Roach     * @param string $total
12290dcd9387SGreg Roach     *
12300dcd9387SGreg Roach     * @return string
12319219296aSGreg Roach     */
12329219296aSGreg Roach    public function topTenOldestFemaleList(string $total = '10'): string
12339219296aSGreg Roach    {
12349219296aSGreg Roach        return $this->individualRepository->topTenOldestFemaleList((int) $total);
12359219296aSGreg Roach    }
12369219296aSGreg Roach
12379219296aSGreg Roach    /**
12380dcd9387SGreg Roach     * @param string $total
12390dcd9387SGreg Roach     *
12400dcd9387SGreg Roach     * @return string
12419219296aSGreg Roach     */
12429219296aSGreg Roach    public function topTenOldestMale(string $total = '10'): string
12439219296aSGreg Roach    {
12449219296aSGreg Roach        return $this->individualRepository->topTenOldestMale((int) $total);
12459219296aSGreg Roach    }
12469219296aSGreg Roach
12479219296aSGreg Roach    /**
12480dcd9387SGreg Roach     * @param string $total
12490dcd9387SGreg Roach     *
12500dcd9387SGreg Roach     * @return string
12519219296aSGreg Roach     */
12529219296aSGreg Roach    public function topTenOldestMaleList(string $total = '10'): string
12539219296aSGreg Roach    {
12549219296aSGreg Roach        return $this->individualRepository->topTenOldestMaleList((int) $total);
12559219296aSGreg Roach    }
12569219296aSGreg Roach
12579219296aSGreg Roach    /**
12580dcd9387SGreg Roach     * @param string $total
12590dcd9387SGreg Roach     *
12600dcd9387SGreg Roach     * @return string
12619219296aSGreg Roach     */
12629219296aSGreg Roach    public function topTenOldestAlive(string $total = '10'): string
12639219296aSGreg Roach    {
12649219296aSGreg Roach        return $this->individualRepository->topTenOldestAlive((int) $total);
12659219296aSGreg Roach    }
12669219296aSGreg Roach
12679219296aSGreg Roach    /**
12680dcd9387SGreg Roach     * @param string $total
12690dcd9387SGreg Roach     *
12700dcd9387SGreg Roach     * @return string
12719219296aSGreg Roach     */
12729219296aSGreg Roach    public function topTenOldestListAlive(string $total = '10'): string
12739219296aSGreg Roach    {
12749219296aSGreg Roach        return $this->individualRepository->topTenOldestListAlive((int) $total);
12759219296aSGreg Roach    }
12769219296aSGreg Roach
12779219296aSGreg Roach    /**
12780dcd9387SGreg Roach     * @param string $total
12790dcd9387SGreg Roach     *
12800dcd9387SGreg Roach     * @return string
12819219296aSGreg Roach     */
12829219296aSGreg Roach    public function topTenOldestFemaleAlive(string $total = '10'): string
12839219296aSGreg Roach    {
12849219296aSGreg Roach        return $this->individualRepository->topTenOldestFemaleAlive((int) $total);
12859219296aSGreg Roach    }
12869219296aSGreg Roach
12879219296aSGreg Roach    /**
12880dcd9387SGreg Roach     * @param string $total
12890dcd9387SGreg Roach     *
12900dcd9387SGreg Roach     * @return string
12919219296aSGreg Roach     */
12929219296aSGreg Roach    public function topTenOldestFemaleListAlive(string $total = '10'): string
12939219296aSGreg Roach    {
12949219296aSGreg Roach        return $this->individualRepository->topTenOldestFemaleListAlive((int) $total);
12959219296aSGreg Roach    }
12969219296aSGreg Roach
12979219296aSGreg Roach    /**
12980dcd9387SGreg Roach     * @param string $total
12990dcd9387SGreg Roach     *
13000dcd9387SGreg Roach     * @return string
13019219296aSGreg Roach     */
13029219296aSGreg Roach    public function topTenOldestMaleAlive(string $total = '10'): string
13039219296aSGreg Roach    {
13049219296aSGreg Roach        return $this->individualRepository->topTenOldestMaleAlive((int) $total);
13059219296aSGreg Roach    }
13069219296aSGreg Roach
13079219296aSGreg Roach    /**
13080dcd9387SGreg Roach     * @param string $total
13090dcd9387SGreg Roach     *
13100dcd9387SGreg Roach     * @return string
13119219296aSGreg Roach     */
13129219296aSGreg Roach    public function topTenOldestMaleListAlive(string $total = '10'): string
13139219296aSGreg Roach    {
13149219296aSGreg Roach        return $this->individualRepository->topTenOldestMaleListAlive((int) $total);
13159219296aSGreg Roach    }
13169219296aSGreg Roach
13179219296aSGreg Roach    /**
13180dcd9387SGreg Roach     * @param bool $show_years
13190dcd9387SGreg Roach     *
13200dcd9387SGreg Roach     * @return string
13219219296aSGreg Roach     */
13229219296aSGreg Roach    public function averageLifespan(bool $show_years = false): string
13239219296aSGreg Roach    {
13249219296aSGreg Roach        return $this->individualRepository->averageLifespan($show_years);
13259219296aSGreg Roach    }
13269219296aSGreg Roach
13279219296aSGreg Roach    /**
13280dcd9387SGreg Roach     * @param bool $show_years
13290dcd9387SGreg Roach     *
13300dcd9387SGreg Roach     * @return string
13319219296aSGreg Roach     */
13329219296aSGreg Roach    public function averageLifespanFemale(bool $show_years = false): string
13339219296aSGreg Roach    {
13349219296aSGreg Roach        return $this->individualRepository->averageLifespanFemale($show_years);
13359219296aSGreg Roach    }
13369219296aSGreg Roach
13379219296aSGreg Roach    /**
13380dcd9387SGreg Roach     * @param bool $show_years
13390dcd9387SGreg Roach     *
13400dcd9387SGreg Roach     * @return string
13419219296aSGreg Roach     */
13429219296aSGreg Roach    public function averageLifespanMale(bool $show_years = false): string
13439219296aSGreg Roach    {
13449219296aSGreg Roach        return $this->individualRepository->averageLifespanMale($show_years);
13459219296aSGreg Roach    }
13469219296aSGreg Roach
13479219296aSGreg Roach    /**
13480dcd9387SGreg Roach     * @return string
13499219296aSGreg Roach     */
13509219296aSGreg Roach    public function firstEvent(): string
13519219296aSGreg Roach    {
13529219296aSGreg Roach        return $this->eventRepository->firstEvent();
13539219296aSGreg Roach    }
13549219296aSGreg Roach
13559219296aSGreg Roach    /**
13560dcd9387SGreg Roach     * @return string
13579219296aSGreg Roach     */
13589219296aSGreg Roach    public function firstEventYear(): string
13599219296aSGreg Roach    {
13609219296aSGreg Roach        return $this->eventRepository->firstEventYear();
13619219296aSGreg Roach    }
13629219296aSGreg Roach
13639219296aSGreg Roach    /**
13640dcd9387SGreg Roach     * @return string
13659219296aSGreg Roach     */
13669219296aSGreg Roach    public function firstEventType(): string
13679219296aSGreg Roach    {
13689219296aSGreg Roach        return $this->eventRepository->firstEventType();
13699219296aSGreg Roach    }
13709219296aSGreg Roach
13719219296aSGreg Roach    /**
13720dcd9387SGreg Roach     * @return string
13739219296aSGreg Roach     */
13749219296aSGreg Roach    public function firstEventName(): string
13759219296aSGreg Roach    {
13769219296aSGreg Roach        return $this->eventRepository->firstEventName();
13779219296aSGreg Roach    }
13789219296aSGreg Roach
13799219296aSGreg Roach    /**
13800dcd9387SGreg Roach     * @return string
13819219296aSGreg Roach     */
13829219296aSGreg Roach    public function firstEventPlace(): string
13839219296aSGreg Roach    {
13849219296aSGreg Roach        return $this->eventRepository->firstEventPlace();
13859219296aSGreg Roach    }
13869219296aSGreg Roach
13879219296aSGreg Roach    /**
13880dcd9387SGreg Roach     * @return string
13899219296aSGreg Roach     */
13909219296aSGreg Roach    public function lastEvent(): string
13919219296aSGreg Roach    {
13929219296aSGreg Roach        return $this->eventRepository->lastEvent();
13939219296aSGreg Roach    }
13949219296aSGreg Roach
13959219296aSGreg Roach    /**
13960dcd9387SGreg Roach     * @return string
13979219296aSGreg Roach     */
13989219296aSGreg Roach    public function lastEventYear(): string
13999219296aSGreg Roach    {
14009219296aSGreg Roach        return $this->eventRepository->lastEventYear();
14019219296aSGreg Roach    }
14029219296aSGreg Roach
14039219296aSGreg Roach    /**
14040dcd9387SGreg Roach     * @return string
14059219296aSGreg Roach     */
14069219296aSGreg Roach    public function lastEventType(): string
14079219296aSGreg Roach    {
14089219296aSGreg Roach        return $this->eventRepository->lastEventType();
14099219296aSGreg Roach    }
14109219296aSGreg Roach
14119219296aSGreg Roach    /**
14120dcd9387SGreg Roach     * @return string
14139219296aSGreg Roach     */
14149219296aSGreg Roach    public function lastEventName(): string
14159219296aSGreg Roach    {
14169219296aSGreg Roach        return $this->eventRepository->lastEventName();
14179219296aSGreg Roach    }
14189219296aSGreg Roach
14199219296aSGreg Roach    /**
14200dcd9387SGreg Roach     * @return string
14219219296aSGreg Roach     */
14229219296aSGreg Roach    public function lastEventPlace(): string
14239219296aSGreg Roach    {
14249219296aSGreg Roach        return $this->eventRepository->lastEventType();
14259219296aSGreg Roach    }
14269219296aSGreg Roach
14279219296aSGreg Roach    /**
14280dcd9387SGreg Roach     * @return string
14299219296aSGreg Roach     */
14309219296aSGreg Roach    public function firstMarriage(): string
14319219296aSGreg Roach    {
14329219296aSGreg Roach        return $this->familyDatesRepository->firstMarriage();
14339219296aSGreg Roach    }
14349219296aSGreg Roach
14359219296aSGreg Roach    /**
14360dcd9387SGreg Roach     * @return string
14379219296aSGreg Roach     */
14389219296aSGreg Roach    public function firstMarriageYear(): string
14399219296aSGreg Roach    {
14409219296aSGreg Roach        return $this->familyDatesRepository->firstMarriageYear();
14419219296aSGreg Roach    }
14429219296aSGreg Roach
14439219296aSGreg Roach    /**
14440dcd9387SGreg Roach     * @return string
14459219296aSGreg Roach     */
14469219296aSGreg Roach    public function firstMarriageName(): string
14479219296aSGreg Roach    {
14489219296aSGreg Roach        return $this->familyDatesRepository->firstMarriageName();
14499219296aSGreg Roach    }
14509219296aSGreg Roach
14519219296aSGreg Roach    /**
14520dcd9387SGreg Roach     * @return string
14539219296aSGreg Roach     */
14549219296aSGreg Roach    public function firstMarriagePlace(): string
14559219296aSGreg Roach    {
14569219296aSGreg Roach        return $this->familyDatesRepository->firstMarriagePlace();
14579219296aSGreg Roach    }
14589219296aSGreg Roach
14599219296aSGreg Roach    /**
14600dcd9387SGreg Roach     * @return string
14619219296aSGreg Roach     */
14629219296aSGreg Roach    public function lastMarriage(): string
14639219296aSGreg Roach    {
14649219296aSGreg Roach        return $this->familyDatesRepository->lastMarriage();
14659219296aSGreg Roach    }
14669219296aSGreg Roach
14679219296aSGreg Roach    /**
14680dcd9387SGreg Roach     * @return string
14699219296aSGreg Roach     */
14709219296aSGreg Roach    public function lastMarriageYear(): string
14719219296aSGreg Roach    {
14729219296aSGreg Roach        return $this->familyDatesRepository->lastMarriageYear();
14739219296aSGreg Roach    }
14749219296aSGreg Roach
14759219296aSGreg Roach    /**
14760dcd9387SGreg Roach     * @return string
14779219296aSGreg Roach     */
14789219296aSGreg Roach    public function lastMarriageName(): string
14799219296aSGreg Roach    {
14809219296aSGreg Roach        return $this->familyDatesRepository->lastMarriageName();
14819219296aSGreg Roach    }
14829219296aSGreg Roach
14839219296aSGreg Roach    /**
14840dcd9387SGreg Roach     * @return string
14859219296aSGreg Roach     */
14869219296aSGreg Roach    public function lastMarriagePlace(): string
14879219296aSGreg Roach    {
14889219296aSGreg Roach        return $this->familyDatesRepository->lastMarriagePlace();
14899219296aSGreg Roach    }
14909219296aSGreg Roach
14919219296aSGreg Roach    /**
14920dcd9387SGreg Roach     * @param int $year1
14930dcd9387SGreg Roach     * @param int $year2
14940dcd9387SGreg Roach     *
14950dcd9387SGreg Roach     * @return Builder
14969219296aSGreg Roach     */
1497e6f3d5e2SGreg Roach    public function statsMarriageQuery(int $year1 = -1, int $year2 = -1): Builder
14989219296aSGreg Roach    {
1499e6f3d5e2SGreg Roach        return $this->familyRepository->statsMarriageQuery($year1, $year2);
1500e6f3d5e2SGreg Roach    }
1501e6f3d5e2SGreg Roach
1502e6f3d5e2SGreg Roach    /**
15030dcd9387SGreg Roach     * @param int $year1
15040dcd9387SGreg Roach     * @param int $year2
15050dcd9387SGreg Roach     *
15060dcd9387SGreg Roach     * @return Builder
1507e6f3d5e2SGreg Roach     */
1508e6f3d5e2SGreg Roach    public function statsFirstMarriageQuery(int $year1 = -1, int $year2 = -1): Builder
1509e6f3d5e2SGreg Roach    {
1510e6f3d5e2SGreg Roach        return $this->familyRepository->statsFirstMarriageQuery($year1, $year2);
15119219296aSGreg Roach    }
15129219296aSGreg Roach
15139219296aSGreg Roach    /**
15140dcd9387SGreg Roach     * @param string|null $color_from
15150dcd9387SGreg Roach     * @param string|null $color_to
15160dcd9387SGreg Roach     *
15170dcd9387SGreg Roach     * @return string
15189219296aSGreg Roach     */
151988de55fdSRico Sonntag    public function statsMarr(string $color_from = null, string $color_to = null): string
15209219296aSGreg Roach    {
152188de55fdSRico Sonntag        return $this->familyRepository->statsMarr($color_from, $color_to);
15229219296aSGreg Roach    }
15239219296aSGreg Roach
15249219296aSGreg Roach    /**
15250dcd9387SGreg Roach     * @return string
15269219296aSGreg Roach     */
15279219296aSGreg Roach    public function firstDivorce(): string
15289219296aSGreg Roach    {
15299219296aSGreg Roach        return $this->familyDatesRepository->firstDivorce();
15309219296aSGreg Roach    }
15319219296aSGreg Roach
15329219296aSGreg Roach    /**
15330dcd9387SGreg Roach     * @return string
15349219296aSGreg Roach     */
15359219296aSGreg Roach    public function firstDivorceYear(): string
15369219296aSGreg Roach    {
15379219296aSGreg Roach        return $this->familyDatesRepository->firstDivorceYear();
15389219296aSGreg Roach    }
15399219296aSGreg Roach
15409219296aSGreg Roach    /**
15410dcd9387SGreg Roach     * @return string
15429219296aSGreg Roach     */
15439219296aSGreg Roach    public function firstDivorceName(): string
15449219296aSGreg Roach    {
15459219296aSGreg Roach        return $this->familyDatesRepository->firstDivorceName();
15469219296aSGreg Roach    }
15479219296aSGreg Roach
15489219296aSGreg Roach    /**
15490dcd9387SGreg Roach     * @return string
15509219296aSGreg Roach     */
15519219296aSGreg Roach    public function firstDivorcePlace(): string
15529219296aSGreg Roach    {
15539219296aSGreg Roach        return $this->familyDatesRepository->firstDivorcePlace();
15549219296aSGreg Roach    }
15559219296aSGreg Roach
15569219296aSGreg Roach    /**
15570dcd9387SGreg Roach     * @return string
15589219296aSGreg Roach     */
15599219296aSGreg Roach    public function lastDivorce(): string
15609219296aSGreg Roach    {
15619219296aSGreg Roach        return $this->familyDatesRepository->lastDivorce();
15629219296aSGreg Roach    }
15639219296aSGreg Roach
15649219296aSGreg Roach    /**
15650dcd9387SGreg Roach     * @return string
15669219296aSGreg Roach     */
15679219296aSGreg Roach    public function lastDivorceYear(): string
15689219296aSGreg Roach    {
15699219296aSGreg Roach        return $this->familyDatesRepository->lastDivorceYear();
15709219296aSGreg Roach    }
15719219296aSGreg Roach
15729219296aSGreg Roach    /**
15730dcd9387SGreg Roach     * @return string
15749219296aSGreg Roach     */
15759219296aSGreg Roach    public function lastDivorceName(): string
15769219296aSGreg Roach    {
15779219296aSGreg Roach        return $this->familyDatesRepository->lastDivorceName();
15789219296aSGreg Roach    }
15799219296aSGreg Roach
15809219296aSGreg Roach    /**
15810dcd9387SGreg Roach     * @return string
15829219296aSGreg Roach     */
15839219296aSGreg Roach    public function lastDivorcePlace(): string
15849219296aSGreg Roach    {
15859219296aSGreg Roach        return $this->familyDatesRepository->lastDivorcePlace();
15869219296aSGreg Roach    }
15879219296aSGreg Roach
15889219296aSGreg Roach    /**
15890dcd9387SGreg Roach     * @param string|null $color_from
15900dcd9387SGreg Roach     * @param string|null $color_to
15910dcd9387SGreg Roach     *
15920dcd9387SGreg Roach     * @return string
15939219296aSGreg Roach     */
159488de55fdSRico Sonntag    public function statsDiv(string $color_from = null, string $color_to = null): string
15959219296aSGreg Roach    {
159688de55fdSRico Sonntag        return $this->familyRepository->statsDiv($color_from, $color_to);
15979219296aSGreg Roach    }
15989219296aSGreg Roach
15999219296aSGreg Roach    /**
16000dcd9387SGreg Roach     * @return string
16019219296aSGreg Roach     */
16029219296aSGreg Roach    public function youngestMarriageFemale(): string
16039219296aSGreg Roach    {
16049219296aSGreg Roach        return $this->familyRepository->youngestMarriageFemale();
16059219296aSGreg Roach    }
16069219296aSGreg Roach
16079219296aSGreg Roach    /**
16080dcd9387SGreg Roach     * @return string
16099219296aSGreg Roach     */
16109219296aSGreg Roach    public function youngestMarriageFemaleName(): string
16119219296aSGreg Roach    {
16129219296aSGreg Roach        return $this->familyRepository->youngestMarriageFemaleName();
16139219296aSGreg Roach    }
16149219296aSGreg Roach
16159219296aSGreg Roach    /**
16160dcd9387SGreg Roach     * @param string $show_years
16170dcd9387SGreg Roach     *
16180dcd9387SGreg Roach     * @return string
16199219296aSGreg Roach     */
16209219296aSGreg Roach    public function youngestMarriageFemaleAge(string $show_years = ''): string
16219219296aSGreg Roach    {
16229219296aSGreg Roach        return $this->familyRepository->youngestMarriageFemaleAge($show_years);
16239219296aSGreg Roach    }
16249219296aSGreg Roach
16259219296aSGreg Roach    /**
16260dcd9387SGreg Roach     * @return string
16279219296aSGreg Roach     */
16289219296aSGreg Roach    public function oldestMarriageFemale(): string
16299219296aSGreg Roach    {
16309219296aSGreg Roach        return $this->familyRepository->oldestMarriageFemale();
16319219296aSGreg Roach    }
16329219296aSGreg Roach
16339219296aSGreg Roach    /**
16340dcd9387SGreg Roach     * @return string
16359219296aSGreg Roach     */
16369219296aSGreg Roach    public function oldestMarriageFemaleName(): string
16379219296aSGreg Roach    {
16389219296aSGreg Roach        return $this->familyRepository->oldestMarriageFemaleName();
16399219296aSGreg Roach    }
16409219296aSGreg Roach
16419219296aSGreg Roach    /**
16420dcd9387SGreg Roach     * @param string $show_years
16430dcd9387SGreg Roach     *
16440dcd9387SGreg Roach     * @return string
16459219296aSGreg Roach     */
16469219296aSGreg Roach    public function oldestMarriageFemaleAge(string $show_years = ''): string
16479219296aSGreg Roach    {
16489219296aSGreg Roach        return $this->familyRepository->oldestMarriageFemaleAge($show_years);
16499219296aSGreg Roach    }
16509219296aSGreg Roach
16519219296aSGreg Roach    /**
16520dcd9387SGreg Roach     * @return string
16539219296aSGreg Roach     */
16549219296aSGreg Roach    public function youngestMarriageMale(): string
16559219296aSGreg Roach    {
16569219296aSGreg Roach        return $this->familyRepository->youngestMarriageMale();
16579219296aSGreg Roach    }
16589219296aSGreg Roach
16599219296aSGreg Roach    /**
16600dcd9387SGreg Roach     * @return string
16619219296aSGreg Roach     */
16629219296aSGreg Roach    public function youngestMarriageMaleName(): string
16639219296aSGreg Roach    {
16649219296aSGreg Roach        return $this->familyRepository->youngestMarriageMaleName();
16659219296aSGreg Roach    }
16669219296aSGreg Roach
16679219296aSGreg Roach    /**
16680dcd9387SGreg Roach     * @param string $show_years
16690dcd9387SGreg Roach     *
16700dcd9387SGreg Roach     * @return string
16719219296aSGreg Roach     */
16729219296aSGreg Roach    public function youngestMarriageMaleAge(string $show_years = ''): string
16739219296aSGreg Roach    {
16749219296aSGreg Roach        return $this->familyRepository->youngestMarriageMaleAge($show_years);
16759219296aSGreg Roach    }
16769219296aSGreg Roach
16779219296aSGreg Roach    /**
16780dcd9387SGreg Roach     * @return string
16799219296aSGreg Roach     */
16809219296aSGreg Roach    public function oldestMarriageMale(): string
16819219296aSGreg Roach    {
16829219296aSGreg Roach        return $this->familyRepository->oldestMarriageMale();
16839219296aSGreg Roach    }
16849219296aSGreg Roach
16859219296aSGreg Roach    /**
16860dcd9387SGreg Roach     * @return string
16879219296aSGreg Roach     */
16889219296aSGreg Roach    public function oldestMarriageMaleName(): string
16899219296aSGreg Roach    {
16909219296aSGreg Roach        return $this->familyRepository->oldestMarriageMaleName();
16919219296aSGreg Roach    }
16929219296aSGreg Roach
16939219296aSGreg Roach    /**
16940dcd9387SGreg Roach     * @param string $show_years
16950dcd9387SGreg Roach     *
16960dcd9387SGreg Roach     * @return string
16979219296aSGreg Roach     */
16989219296aSGreg Roach    public function oldestMarriageMaleAge(string $show_years = ''): string
16999219296aSGreg Roach    {
17009219296aSGreg Roach        return $this->familyRepository->oldestMarriageMaleAge($show_years);
17019219296aSGreg Roach    }
17029219296aSGreg Roach
17039219296aSGreg Roach    /**
17040dcd9387SGreg Roach     * @param string $sex
17050dcd9387SGreg Roach     * @param int    $year1
17060dcd9387SGreg Roach     * @param int    $year2
17070dcd9387SGreg Roach     *
17080dcd9387SGreg Roach     * @return array
17099219296aSGreg Roach     */
1710afa8d404SGreg Roach    public function statsMarrAgeQuery(string $sex, int $year1 = -1, int $year2 = -1): array
17119219296aSGreg Roach    {
17129219296aSGreg Roach        return $this->familyRepository->statsMarrAgeQuery($sex, $year1, $year2);
17139219296aSGreg Roach    }
17149219296aSGreg Roach
17159219296aSGreg Roach    /**
17160dcd9387SGreg Roach     * @return string
17179219296aSGreg Roach     */
171888de55fdSRico Sonntag    public function statsMarrAge(): string
17199219296aSGreg Roach    {
172088de55fdSRico Sonntag        return $this->familyRepository->statsMarrAge();
17219219296aSGreg Roach    }
17229219296aSGreg Roach
17239219296aSGreg Roach    /**
17240dcd9387SGreg Roach     * @param string $total
17250dcd9387SGreg Roach     *
17260dcd9387SGreg Roach     * @return string
17279219296aSGreg Roach     */
17289219296aSGreg Roach    public function ageBetweenSpousesMF(string $total = '10'): string
17299219296aSGreg Roach    {
17309219296aSGreg Roach        return $this->familyRepository->ageBetweenSpousesMF((int) $total);
17319219296aSGreg Roach    }
17329219296aSGreg Roach
17339219296aSGreg Roach    /**
17340dcd9387SGreg Roach     * @param string $total
17350dcd9387SGreg Roach     *
17360dcd9387SGreg Roach     * @return string
17379219296aSGreg Roach     */
17389219296aSGreg Roach    public function ageBetweenSpousesMFList(string $total = '10'): string
17399219296aSGreg Roach    {
17409219296aSGreg Roach        return $this->familyRepository->ageBetweenSpousesMFList((int) $total);
17419219296aSGreg Roach    }
17429219296aSGreg Roach
17439219296aSGreg Roach    /**
17440dcd9387SGreg Roach     * @param string $total
17450dcd9387SGreg Roach     *
17460dcd9387SGreg Roach     * @return string
17479219296aSGreg Roach     */
17489219296aSGreg Roach    public function ageBetweenSpousesFM(string $total = '10'): string
17499219296aSGreg Roach    {
17509219296aSGreg Roach        return $this->familyRepository->ageBetweenSpousesFM((int) $total);
17519219296aSGreg Roach    }
17529219296aSGreg Roach
17539219296aSGreg Roach    /**
17540dcd9387SGreg Roach     * @param string $total
17550dcd9387SGreg Roach     *
17560dcd9387SGreg Roach     * @return string
17579219296aSGreg Roach     */
17589219296aSGreg Roach    public function ageBetweenSpousesFMList(string $total = '10'): string
17599219296aSGreg Roach    {
17609219296aSGreg Roach        return $this->familyRepository->ageBetweenSpousesFMList((int) $total);
17619219296aSGreg Roach    }
17629219296aSGreg Roach
17639219296aSGreg Roach    /**
17640dcd9387SGreg Roach     * @return string
17659219296aSGreg Roach     */
17669219296aSGreg Roach    public function topAgeOfMarriageFamily(): string
17679219296aSGreg Roach    {
17689219296aSGreg Roach        return $this->familyRepository->topAgeOfMarriageFamily();
17699219296aSGreg Roach    }
17709219296aSGreg Roach
17719219296aSGreg Roach    /**
17720dcd9387SGreg Roach     * @return string
17739219296aSGreg Roach     */
17749219296aSGreg Roach    public function topAgeOfMarriage(): string
17759219296aSGreg Roach    {
17769219296aSGreg Roach        return $this->familyRepository->topAgeOfMarriage();
17779219296aSGreg Roach    }
17789219296aSGreg Roach
17799219296aSGreg Roach    /**
17800dcd9387SGreg Roach     * @param string $total
17810dcd9387SGreg Roach     *
17820dcd9387SGreg Roach     * @return string
17839219296aSGreg Roach     */
17849219296aSGreg Roach    public function topAgeOfMarriageFamilies(string $total = '10'): string
17859219296aSGreg Roach    {
17869219296aSGreg Roach        return $this->familyRepository->topAgeOfMarriageFamilies((int) $total);
17879219296aSGreg Roach    }
17889219296aSGreg Roach
17899219296aSGreg Roach    /**
17900dcd9387SGreg Roach     * @param string $total
17910dcd9387SGreg Roach     *
17920dcd9387SGreg Roach     * @return string
17939219296aSGreg Roach     */
17949219296aSGreg Roach    public function topAgeOfMarriageFamiliesList(string $total = '10'): string
17959219296aSGreg Roach    {
17969219296aSGreg Roach        return $this->familyRepository->topAgeOfMarriageFamiliesList((int) $total);
17979219296aSGreg Roach    }
17989219296aSGreg Roach
17999219296aSGreg Roach    /**
18000dcd9387SGreg Roach     * @return string
18019219296aSGreg Roach     */
18029219296aSGreg Roach    public function minAgeOfMarriageFamily(): string
18039219296aSGreg Roach    {
18049219296aSGreg Roach        return $this->familyRepository->minAgeOfMarriageFamily();
18059219296aSGreg Roach    }
18069219296aSGreg Roach
18079219296aSGreg Roach    /**
18080dcd9387SGreg Roach     * @return string
18099219296aSGreg Roach     */
18109219296aSGreg Roach    public function minAgeOfMarriage(): string
18119219296aSGreg Roach    {
18129219296aSGreg Roach        return $this->familyRepository->minAgeOfMarriage();
18139219296aSGreg Roach    }
18149219296aSGreg Roach
18159219296aSGreg Roach    /**
18160dcd9387SGreg Roach     * @param string $total
18170dcd9387SGreg Roach     *
18180dcd9387SGreg Roach     * @return string
18199219296aSGreg Roach     */
18209219296aSGreg Roach    public function minAgeOfMarriageFamilies(string $total = '10'): string
18219219296aSGreg Roach    {
18229219296aSGreg Roach        return $this->familyRepository->minAgeOfMarriageFamilies((int) $total);
18239219296aSGreg Roach    }
18249219296aSGreg Roach
18259219296aSGreg Roach    /**
18260dcd9387SGreg Roach     * @param string $total
18270dcd9387SGreg Roach     *
18280dcd9387SGreg Roach     * @return string
18299219296aSGreg Roach     */
18309219296aSGreg Roach    public function minAgeOfMarriageFamiliesList(string $total = '10'): string
18319219296aSGreg Roach    {
18329219296aSGreg Roach        return $this->familyRepository->minAgeOfMarriageFamiliesList((int) $total);
18339219296aSGreg Roach    }
18349219296aSGreg Roach
18359219296aSGreg Roach    /**
18360dcd9387SGreg Roach     * @return string
18379219296aSGreg Roach     */
18389219296aSGreg Roach    public function youngestMother(): string
18399219296aSGreg Roach    {
18409219296aSGreg Roach        return $this->familyRepository->youngestMother();
18419219296aSGreg Roach    }
18429219296aSGreg Roach
18439219296aSGreg Roach    /**
18440dcd9387SGreg Roach     * @return string
18459219296aSGreg Roach     */
18469219296aSGreg Roach    public function youngestMotherName(): string
18479219296aSGreg Roach    {
18489219296aSGreg Roach        return $this->familyRepository->youngestMotherName();
18499219296aSGreg Roach    }
18509219296aSGreg Roach
18519219296aSGreg Roach    /**
18520dcd9387SGreg Roach     * @param string $show_years
18530dcd9387SGreg Roach     *
18540dcd9387SGreg Roach     * @return string
18559219296aSGreg Roach     */
18569219296aSGreg Roach    public function youngestMotherAge(string $show_years = ''): string
18579219296aSGreg Roach    {
18589219296aSGreg Roach        return $this->familyRepository->youngestMotherAge($show_years);
18599219296aSGreg Roach    }
18609219296aSGreg Roach
18619219296aSGreg Roach    /**
18620dcd9387SGreg Roach     * @return string
18639219296aSGreg Roach     */
18649219296aSGreg Roach    public function oldestMother(): string
18659219296aSGreg Roach    {
18669219296aSGreg Roach        return $this->familyRepository->oldestMother();
18679219296aSGreg Roach    }
18689219296aSGreg Roach
18699219296aSGreg Roach    /**
18700dcd9387SGreg Roach     * @return string
18719219296aSGreg Roach     */
18729219296aSGreg Roach    public function oldestMotherName(): string
18739219296aSGreg Roach    {
18749219296aSGreg Roach        return $this->familyRepository->oldestMotherName();
18759219296aSGreg Roach    }
18769219296aSGreg Roach
18779219296aSGreg Roach    /**
18780dcd9387SGreg Roach     * @param string $show_years
18790dcd9387SGreg Roach     *
18800dcd9387SGreg Roach     * @return string
18819219296aSGreg Roach     */
18829219296aSGreg Roach    public function oldestMotherAge(string $show_years = ''): string
18839219296aSGreg Roach    {
18849219296aSGreg Roach        return $this->familyRepository->oldestMotherAge($show_years);
18859219296aSGreg Roach    }
18869219296aSGreg Roach
18879219296aSGreg Roach    /**
18880dcd9387SGreg Roach     * @return string
18899219296aSGreg Roach     */
18909219296aSGreg Roach    public function youngestFather(): string
18919219296aSGreg Roach    {
18929219296aSGreg Roach        return $this->familyRepository->youngestFather();
18939219296aSGreg Roach    }
18949219296aSGreg Roach
18959219296aSGreg Roach    /**
18960dcd9387SGreg Roach     * @return string
18979219296aSGreg Roach     */
18989219296aSGreg Roach    public function youngestFatherName(): string
18999219296aSGreg Roach    {
19009219296aSGreg Roach        return $this->familyRepository->youngestFatherName();
19019219296aSGreg Roach    }
19029219296aSGreg Roach
19039219296aSGreg Roach    /**
19040dcd9387SGreg Roach     * @param string $show_years
19050dcd9387SGreg Roach     *
19060dcd9387SGreg Roach     * @return string
19079219296aSGreg Roach     */
19089219296aSGreg Roach    public function youngestFatherAge(string $show_years = ''): string
19099219296aSGreg Roach    {
19109219296aSGreg Roach        return $this->familyRepository->youngestFatherAge($show_years);
19119219296aSGreg Roach    }
19129219296aSGreg Roach
19139219296aSGreg Roach    /**
19140dcd9387SGreg Roach     * @return string
19159219296aSGreg Roach     */
19169219296aSGreg Roach    public function oldestFather(): string
19179219296aSGreg Roach    {
19189219296aSGreg Roach        return $this->familyRepository->oldestFather();
19199219296aSGreg Roach    }
19209219296aSGreg Roach
19219219296aSGreg Roach    /**
19220dcd9387SGreg Roach     * @return string
19239219296aSGreg Roach     */
19249219296aSGreg Roach    public function oldestFatherName(): string
19259219296aSGreg Roach    {
19269219296aSGreg Roach        return $this->familyRepository->oldestFatherName();
19279219296aSGreg Roach    }
19289219296aSGreg Roach
19299219296aSGreg Roach    /**
19300dcd9387SGreg Roach     * @param string $show_years
19310dcd9387SGreg Roach     *
19320dcd9387SGreg Roach     * @return string
19339219296aSGreg Roach     */
19349219296aSGreg Roach    public function oldestFatherAge(string $show_years = ''): string
19359219296aSGreg Roach    {
19369219296aSGreg Roach        return $this->familyRepository->oldestFatherAge($show_years);
19379219296aSGreg Roach    }
19389219296aSGreg Roach
19399219296aSGreg Roach    /**
19400dcd9387SGreg Roach     * @return string
19419219296aSGreg Roach     */
19429219296aSGreg Roach    public function totalMarriedMales(): string
19439219296aSGreg Roach    {
19449219296aSGreg Roach        return $this->familyRepository->totalMarriedMales();
19459219296aSGreg Roach    }
19469219296aSGreg Roach
19479219296aSGreg Roach    /**
19480dcd9387SGreg Roach     * @return string
19499219296aSGreg Roach     */
19509219296aSGreg Roach    public function totalMarriedFemales(): string
19519219296aSGreg Roach    {
19529219296aSGreg Roach        return $this->familyRepository->totalMarriedFemales();
19539219296aSGreg Roach    }
19549219296aSGreg Roach
19559219296aSGreg Roach    /**
19560dcd9387SGreg Roach     * @param int $year1
19570dcd9387SGreg Roach     * @param int $year2
19580dcd9387SGreg Roach     *
19590dcd9387SGreg Roach     * @return Builder
19609219296aSGreg Roach     */
1961999da590SGreg Roach    public function monthFirstChildQuery(int $year1 = -1, int $year2 = -1): Builder
19629219296aSGreg Roach    {
1963999da590SGreg Roach        return $this->familyRepository->monthFirstChildQuery($year1, $year2);
1964999da590SGreg Roach    }
1965999da590SGreg Roach
1966999da590SGreg Roach    /**
19670dcd9387SGreg Roach     * @param int $year1
19680dcd9387SGreg Roach     * @param int $year2
19690dcd9387SGreg Roach     *
19700dcd9387SGreg Roach     * @return Builder
1971999da590SGreg Roach     */
1972999da590SGreg Roach    public function monthFirstChildBySexQuery(int $year1 = -1, int $year2 = -1): Builder
1973999da590SGreg Roach    {
1974999da590SGreg Roach        return $this->familyRepository->monthFirstChildBySexQuery($year1, $year2);
19759219296aSGreg Roach    }
19769219296aSGreg Roach
19779219296aSGreg Roach    /**
19780dcd9387SGreg Roach     * @return string
19799219296aSGreg Roach     */
19809219296aSGreg Roach    public function largestFamily(): string
19819219296aSGreg Roach    {
19829219296aSGreg Roach        return $this->familyRepository->largestFamily();
19839219296aSGreg Roach    }
19849219296aSGreg Roach
19859219296aSGreg Roach    /**
19860dcd9387SGreg Roach     * @return string
19879219296aSGreg Roach     */
19889219296aSGreg Roach    public function largestFamilySize(): string
19899219296aSGreg Roach    {
19909219296aSGreg Roach        return $this->familyRepository->largestFamilySize();
19919219296aSGreg Roach    }
19929219296aSGreg Roach
19939219296aSGreg Roach    /**
19940dcd9387SGreg Roach     * @return string
19959219296aSGreg Roach     */
19969219296aSGreg Roach    public function largestFamilyName(): string
19979219296aSGreg Roach    {
19989219296aSGreg Roach        return $this->familyRepository->largestFamilyName();
19999219296aSGreg Roach    }
20009219296aSGreg Roach
20019219296aSGreg Roach    /**
20020dcd9387SGreg Roach     * @param string $total
20030dcd9387SGreg Roach     *
20040dcd9387SGreg Roach     * @return string
20059219296aSGreg Roach     */
20069219296aSGreg Roach    public function topTenLargestFamily(string $total = '10'): string
20079219296aSGreg Roach    {
20089219296aSGreg Roach        return $this->familyRepository->topTenLargestFamily((int) $total);
20099219296aSGreg Roach    }
20109219296aSGreg Roach
20119219296aSGreg Roach    /**
20120dcd9387SGreg Roach     * @param string $total
20130dcd9387SGreg Roach     *
20140dcd9387SGreg Roach     * @return string
20159219296aSGreg Roach     */
20169219296aSGreg Roach    public function topTenLargestFamilyList(string $total = '10'): string
20179219296aSGreg Roach    {
20189219296aSGreg Roach        return $this->familyRepository->topTenLargestFamilyList((int) $total);
20199219296aSGreg Roach    }
20209219296aSGreg Roach
20219219296aSGreg Roach    /**
20220dcd9387SGreg Roach     * @param string|null $color_from
20230dcd9387SGreg Roach     * @param string|null $color_to
20240dcd9387SGreg Roach     * @param string      $total
20250dcd9387SGreg Roach     *
20260dcd9387SGreg Roach     * @return string
20279219296aSGreg Roach     */
20289219296aSGreg Roach    public function chartLargestFamilies(
20299219296aSGreg Roach        string $color_from = null,
20309219296aSGreg Roach        string $color_to = null,
20319219296aSGreg Roach        string $total = '10'
2032c81b7bf1SGreg Roach    ): string {
203388de55fdSRico Sonntag        return $this->familyRepository->chartLargestFamilies($color_from, $color_to, (int) $total);
20349219296aSGreg Roach    }
20359219296aSGreg Roach
20369219296aSGreg Roach    /**
20370dcd9387SGreg Roach     * @return string
20389219296aSGreg Roach     */
20399219296aSGreg Roach    public function totalChildren(): string
20409219296aSGreg Roach    {
20419219296aSGreg Roach        return $this->familyRepository->totalChildren();
20429219296aSGreg Roach    }
20439219296aSGreg Roach
20449219296aSGreg Roach    /**
20450dcd9387SGreg Roach     * @return string
20469219296aSGreg Roach     */
20479219296aSGreg Roach    public function averageChildren(): string
20489219296aSGreg Roach    {
20499219296aSGreg Roach        return $this->familyRepository->averageChildren();
20509219296aSGreg Roach    }
20519219296aSGreg Roach
20529219296aSGreg Roach    /**
20530dcd9387SGreg Roach     * @param int $year1
20540dcd9387SGreg Roach     * @param int $year2
20550dcd9387SGreg Roach     *
20560dcd9387SGreg Roach     * @return array
20579219296aSGreg Roach     */
2058b1126ab4SGreg Roach    public function statsChildrenQuery(int $year1 = -1, int $year2 = -1): array
20599219296aSGreg Roach    {
2060b1126ab4SGreg Roach        return $this->familyRepository->statsChildrenQuery($year1, $year2);
20619219296aSGreg Roach    }
20629219296aSGreg Roach
20639219296aSGreg Roach    /**
20640dcd9387SGreg Roach     * @return string
20659219296aSGreg Roach     */
2066cde1d378SGreg Roach    public function statsChildren(): string
20679219296aSGreg Roach    {
2068cde1d378SGreg Roach        return $this->familyRepository->statsChildren();
20699219296aSGreg Roach    }
20709219296aSGreg Roach
20719219296aSGreg Roach    /**
20720dcd9387SGreg Roach     * @param string $total
20730dcd9387SGreg Roach     *
20740dcd9387SGreg Roach     * @return string
20759219296aSGreg Roach     */
20769219296aSGreg Roach    public function topAgeBetweenSiblingsName(string $total = '10'): string
20779219296aSGreg Roach    {
20789219296aSGreg Roach        return $this->familyRepository->topAgeBetweenSiblingsName((int) $total);
20799219296aSGreg Roach    }
20809219296aSGreg Roach
20819219296aSGreg Roach    /**
20820dcd9387SGreg Roach     * @param string $total
20830dcd9387SGreg Roach     *
20840dcd9387SGreg Roach     * @return string
20859219296aSGreg Roach     */
20869219296aSGreg Roach    public function topAgeBetweenSiblings(string $total = '10'): string
20879219296aSGreg Roach    {
20889219296aSGreg Roach        return $this->familyRepository->topAgeBetweenSiblings((int) $total);
20899219296aSGreg Roach    }
20909219296aSGreg Roach
20919219296aSGreg Roach    /**
20920dcd9387SGreg Roach     * @param string $total
20930dcd9387SGreg Roach     *
20940dcd9387SGreg Roach     * @return string
20959219296aSGreg Roach     */
20969219296aSGreg Roach    public function topAgeBetweenSiblingsFullName(string $total = '10'): string
20979219296aSGreg Roach    {
20989219296aSGreg Roach        return $this->familyRepository->topAgeBetweenSiblingsFullName((int) $total);
20999219296aSGreg Roach    }
21009219296aSGreg Roach
21019219296aSGreg Roach    /**
21020dcd9387SGreg Roach     * @param string $total
21030dcd9387SGreg Roach     * @param string $one
21040dcd9387SGreg Roach     *
21050dcd9387SGreg Roach     * @return string
21069219296aSGreg Roach     */
21079219296aSGreg Roach    public function topAgeBetweenSiblingsList(string $total = '10', string $one = ''): string
21089219296aSGreg Roach    {
21099219296aSGreg Roach        return $this->familyRepository->topAgeBetweenSiblingsList((int) $total, $one);
21109219296aSGreg Roach    }
21119219296aSGreg Roach
21129219296aSGreg Roach    /**
21130dcd9387SGreg Roach     * @return string
21149219296aSGreg Roach     */
21159219296aSGreg Roach    public function noChildrenFamilies(): string
21169219296aSGreg Roach    {
21179219296aSGreg Roach        return $this->familyRepository->noChildrenFamilies();
21189219296aSGreg Roach    }
21199219296aSGreg Roach
21209219296aSGreg Roach    /**
21210dcd9387SGreg Roach     * @param string $type
21220dcd9387SGreg Roach     *
21230dcd9387SGreg Roach     * @return string
21249219296aSGreg Roach     */
21259219296aSGreg Roach    public function noChildrenFamiliesList(string $type = 'list'): string
21269219296aSGreg Roach    {
21279219296aSGreg Roach        return $this->familyRepository->noChildrenFamiliesList($type);
21289219296aSGreg Roach    }
21299219296aSGreg Roach
21309219296aSGreg Roach    /**
21310dcd9387SGreg Roach     * @param string $year1
21320dcd9387SGreg Roach     * @param string $year2
21330dcd9387SGreg Roach     *
21340dcd9387SGreg Roach     * @return string
21359219296aSGreg Roach     */
21369219296aSGreg Roach    public function chartNoChildrenFamilies(
21379219296aSGreg Roach        string $year1 = '-1',
21389219296aSGreg Roach        string $year2 = '-1'
2139c81b7bf1SGreg Roach    ): string {
214088de55fdSRico Sonntag        return $this->familyRepository->chartNoChildrenFamilies((int) $year1, (int) $year2);
21419219296aSGreg Roach    }
21429219296aSGreg Roach
21439219296aSGreg Roach    /**
21440dcd9387SGreg Roach     * @param string $total
21450dcd9387SGreg Roach     *
21460dcd9387SGreg Roach     * @return string
21479219296aSGreg Roach     */
21489219296aSGreg Roach    public function topTenLargestGrandFamily(string $total = '10'): string
21499219296aSGreg Roach    {
21509219296aSGreg Roach        return $this->familyRepository->topTenLargestGrandFamily((int) $total);
21519219296aSGreg Roach    }
21529219296aSGreg Roach
21539219296aSGreg Roach    /**
21540dcd9387SGreg Roach     * @param string $total
21550dcd9387SGreg Roach     *
21560dcd9387SGreg Roach     * @return string
21579219296aSGreg Roach     */
21589219296aSGreg Roach    public function topTenLargestGrandFamilyList(string $total = '10'): string
21599219296aSGreg Roach    {
21609219296aSGreg Roach        return $this->familyRepository->topTenLargestGrandFamilyList((int) $total);
21619219296aSGreg Roach    }
21629219296aSGreg Roach
21639219296aSGreg Roach    /**
21640dcd9387SGreg Roach     * @return string
21659219296aSGreg Roach     */
21669219296aSGreg Roach    public function getCommonSurname(): string
21679219296aSGreg Roach    {
21689219296aSGreg Roach        return $this->individualRepository->getCommonSurname();
21699219296aSGreg Roach    }
21709219296aSGreg Roach
21719219296aSGreg Roach    /**
21720dcd9387SGreg Roach     * @param string $threshold
21730dcd9387SGreg Roach     * @param string $number_of_surnames
21740dcd9387SGreg Roach     * @param string $sorting
21750dcd9387SGreg Roach     *
21760dcd9387SGreg Roach     * @return string
21779219296aSGreg Roach     */
21789219296aSGreg Roach    public function commonSurnames(
21799219296aSGreg Roach        string $threshold = '1',
21809219296aSGreg Roach        string $number_of_surnames = '10',
21819219296aSGreg Roach        string $sorting = 'alpha'
2182c81b7bf1SGreg Roach    ): string {
21839219296aSGreg Roach        return $this->individualRepository->commonSurnames((int) $threshold, (int) $number_of_surnames, $sorting);
21849219296aSGreg Roach    }
21859219296aSGreg Roach
21869219296aSGreg Roach    /**
21870dcd9387SGreg Roach     * @param string $threshold
21880dcd9387SGreg Roach     * @param string $number_of_surnames
21890dcd9387SGreg Roach     * @param string $sorting
21900dcd9387SGreg Roach     *
21910dcd9387SGreg Roach     * @return string
21929219296aSGreg Roach     */
21939219296aSGreg Roach    public function commonSurnamesTotals(
21949219296aSGreg Roach        string $threshold = '1',
21959219296aSGreg Roach        string $number_of_surnames = '10',
2196*2da2e0a6SGreg Roach        string $sorting = 'count'
2197c81b7bf1SGreg Roach    ): string {
21989219296aSGreg Roach        return $this->individualRepository->commonSurnamesTotals((int) $threshold, (int) $number_of_surnames, $sorting);
21999219296aSGreg Roach    }
22009219296aSGreg Roach
22019219296aSGreg Roach    /**
22020dcd9387SGreg Roach     * @param string $threshold
22030dcd9387SGreg Roach     * @param string $number_of_surnames
22040dcd9387SGreg Roach     * @param string $sorting
22050dcd9387SGreg Roach     *
22060dcd9387SGreg Roach     * @return string
22079219296aSGreg Roach     */
22089219296aSGreg Roach    public function commonSurnamesList(
22099219296aSGreg Roach        string $threshold = '1',
22109219296aSGreg Roach        string $number_of_surnames = '10',
22119219296aSGreg Roach        string $sorting = 'alpha'
2212c81b7bf1SGreg Roach    ): string {
22139219296aSGreg Roach        return $this->individualRepository->commonSurnamesList((int) $threshold, (int) $number_of_surnames, $sorting);
22149219296aSGreg Roach    }
22159219296aSGreg Roach
22169219296aSGreg Roach    /**
22170dcd9387SGreg Roach     * @param string $threshold
22180dcd9387SGreg Roach     * @param string $number_of_surnames
22190dcd9387SGreg Roach     * @param string $sorting
22200dcd9387SGreg Roach     *
22210dcd9387SGreg Roach     * @return string
22229219296aSGreg Roach     */
22239219296aSGreg Roach    public function commonSurnamesListTotals(
22249219296aSGreg Roach        string $threshold = '1',
22259219296aSGreg Roach        string $number_of_surnames = '10',
2226*2da2e0a6SGreg Roach        string $sorting = 'count'
2227c81b7bf1SGreg Roach    ): string {
22289219296aSGreg Roach        return $this->individualRepository
22299219296aSGreg Roach            ->commonSurnamesListTotals((int) $threshold, (int) $number_of_surnames, $sorting);
22309219296aSGreg Roach    }
22319219296aSGreg Roach
22329219296aSGreg Roach    /**
22330dcd9387SGreg Roach     * @param string|null $color_from
22340dcd9387SGreg Roach     * @param string|null $color_to
22350dcd9387SGreg Roach     * @param string      $number_of_surnames
22360dcd9387SGreg Roach     *
22370dcd9387SGreg Roach     * @return string
22389219296aSGreg Roach     */
22399219296aSGreg Roach    public function chartCommonSurnames(
22409219296aSGreg Roach        string $color_from = null,
22419219296aSGreg Roach        string $color_to = null,
22429219296aSGreg Roach        string $number_of_surnames = '10'
2243c81b7bf1SGreg Roach    ): string {
22449219296aSGreg Roach        return $this->individualRepository
224588de55fdSRico Sonntag            ->chartCommonSurnames($color_from, $color_to, (int) $number_of_surnames);
22469219296aSGreg Roach    }
22479219296aSGreg Roach
22489219296aSGreg Roach    /**
22490dcd9387SGreg Roach     * @param string $threshold
22500dcd9387SGreg Roach     * @param string $maxtoshow
22510dcd9387SGreg Roach     *
22520dcd9387SGreg Roach     * @return string
22539219296aSGreg Roach     */
22549219296aSGreg Roach    public function commonGiven(string $threshold = '1', string $maxtoshow = '10'): string
22559219296aSGreg Roach    {
22569219296aSGreg Roach        return $this->individualRepository->commonGiven((int) $threshold, (int) $maxtoshow);
22579219296aSGreg Roach    }
22589219296aSGreg Roach
22599219296aSGreg Roach    /**
22600dcd9387SGreg Roach     * @param string $threshold
22610dcd9387SGreg Roach     * @param string $maxtoshow
22620dcd9387SGreg Roach     *
22630dcd9387SGreg Roach     * @return string
22649219296aSGreg Roach     */
22659219296aSGreg Roach    public function commonGivenTotals(string $threshold = '1', string $maxtoshow = '10'): string
22669219296aSGreg Roach    {
22679219296aSGreg Roach        return $this->individualRepository->commonGivenTotals((int) $threshold, (int) $maxtoshow);
22689219296aSGreg Roach    }
22699219296aSGreg Roach
22709219296aSGreg Roach    /**
22710dcd9387SGreg Roach     * @param string $threshold
22720dcd9387SGreg Roach     * @param string $maxtoshow
22730dcd9387SGreg Roach     *
22740dcd9387SGreg Roach     * @return string
22759219296aSGreg Roach     */
22769219296aSGreg Roach    public function commonGivenList(string $threshold = '1', string $maxtoshow = '10'): string
22779219296aSGreg Roach    {
22789219296aSGreg Roach        return $this->individualRepository->commonGivenList((int) $threshold, (int) $maxtoshow);
22799219296aSGreg Roach    }
22809219296aSGreg Roach
22819219296aSGreg Roach    /**
22820dcd9387SGreg Roach     * @param string $threshold
22830dcd9387SGreg Roach     * @param string $maxtoshow
22840dcd9387SGreg Roach     *
22850dcd9387SGreg Roach     * @return string
22869219296aSGreg Roach     */
22879219296aSGreg Roach    public function commonGivenListTotals(string $threshold = '1', string $maxtoshow = '10'): string
22889219296aSGreg Roach    {
22899219296aSGreg Roach        return $this->individualRepository->commonGivenListTotals((int) $threshold, (int) $maxtoshow);
22909219296aSGreg Roach    }
22919219296aSGreg Roach
22929219296aSGreg Roach    /**
22930dcd9387SGreg Roach     * @param string $threshold
22940dcd9387SGreg Roach     * @param string $maxtoshow
22950dcd9387SGreg Roach     *
22960dcd9387SGreg Roach     * @return string
22979219296aSGreg Roach     */
22989219296aSGreg Roach    public function commonGivenTable(string $threshold = '1', string $maxtoshow = '10'): string
22999219296aSGreg Roach    {
23009219296aSGreg Roach        return $this->individualRepository->commonGivenTable((int) $threshold, (int) $maxtoshow);
23019219296aSGreg Roach    }
23029219296aSGreg Roach
23039219296aSGreg Roach    /**
23040dcd9387SGreg Roach     * @param string $threshold
23050dcd9387SGreg Roach     * @param string $maxtoshow
23060dcd9387SGreg Roach     *
23070dcd9387SGreg Roach     * @return string
23089219296aSGreg Roach     */
23099219296aSGreg Roach    public function commonGivenFemale(string $threshold = '1', string $maxtoshow = '10'): string
23109219296aSGreg Roach    {
23119219296aSGreg Roach        return $this->individualRepository->commonGivenFemale((int) $threshold, (int) $maxtoshow);
23129219296aSGreg Roach    }
23139219296aSGreg Roach
23149219296aSGreg Roach    /**
23150dcd9387SGreg Roach     * @param string $threshold
23160dcd9387SGreg Roach     * @param string $maxtoshow
23170dcd9387SGreg Roach     *
23180dcd9387SGreg Roach     * @return string
23199219296aSGreg Roach     */
23209219296aSGreg Roach    public function commonGivenFemaleTotals(string $threshold = '1', string $maxtoshow = '10'): string
23219219296aSGreg Roach    {
23229219296aSGreg Roach        return $this->individualRepository->commonGivenFemaleTotals((int) $threshold, (int) $maxtoshow);
23239219296aSGreg Roach    }
23249219296aSGreg Roach
23259219296aSGreg Roach    /**
23260dcd9387SGreg Roach     * @param string $threshold
23270dcd9387SGreg Roach     * @param string $maxtoshow
23280dcd9387SGreg Roach     *
23290dcd9387SGreg Roach     * @return string
23309219296aSGreg Roach     */
23319219296aSGreg Roach    public function commonGivenFemaleList(string $threshold = '1', string $maxtoshow = '10'): string
23329219296aSGreg Roach    {
23339219296aSGreg Roach        return $this->individualRepository->commonGivenFemaleList((int) $threshold, (int) $maxtoshow);
23349219296aSGreg Roach    }
23359219296aSGreg Roach
23369219296aSGreg Roach    /**
23370dcd9387SGreg Roach     * @param string $threshold
23380dcd9387SGreg Roach     * @param string $maxtoshow
23390dcd9387SGreg Roach     *
23400dcd9387SGreg Roach     * @return string
23419219296aSGreg Roach     */
23429219296aSGreg Roach    public function commonGivenFemaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string
23439219296aSGreg Roach    {
23449219296aSGreg Roach        return $this->individualRepository->commonGivenFemaleListTotals((int) $threshold, (int) $maxtoshow);
23459219296aSGreg Roach    }
23469219296aSGreg Roach
23479219296aSGreg Roach    /**
23480dcd9387SGreg Roach     * @param string $threshold
23490dcd9387SGreg Roach     * @param string $maxtoshow
23500dcd9387SGreg Roach     *
23510dcd9387SGreg Roach     * @return string
23529219296aSGreg Roach     */
23539219296aSGreg Roach    public function commonGivenFemaleTable(string $threshold = '1', string $maxtoshow = '10'): string
23549219296aSGreg Roach    {
23559219296aSGreg Roach        return $this->individualRepository->commonGivenFemaleTable((int) $threshold, (int) $maxtoshow);
23569219296aSGreg Roach    }
23579219296aSGreg Roach
23589219296aSGreg Roach    /**
23590dcd9387SGreg Roach     * @param string $threshold
23600dcd9387SGreg Roach     * @param string $maxtoshow
23610dcd9387SGreg Roach     *
23620dcd9387SGreg Roach     * @return string
23639219296aSGreg Roach     */
23649219296aSGreg Roach    public function commonGivenMale(string $threshold = '1', string $maxtoshow = '10'): string
23659219296aSGreg Roach    {
23669219296aSGreg Roach        return $this->individualRepository->commonGivenMale((int) $threshold, (int) $maxtoshow);
23679219296aSGreg Roach    }
23689219296aSGreg Roach
23699219296aSGreg Roach    /**
23700dcd9387SGreg Roach     * @param string $threshold
23710dcd9387SGreg Roach     * @param string $maxtoshow
23720dcd9387SGreg Roach     *
23730dcd9387SGreg Roach     * @return string
23749219296aSGreg Roach     */
23759219296aSGreg Roach    public function commonGivenMaleTotals(string $threshold = '1', string $maxtoshow = '10'): string
23769219296aSGreg Roach    {
23779219296aSGreg Roach        return $this->individualRepository->commonGivenMaleTotals((int) $threshold, (int) $maxtoshow);
23789219296aSGreg Roach    }
23799219296aSGreg Roach
23809219296aSGreg Roach    /**
23810dcd9387SGreg Roach     * @param string $threshold
23820dcd9387SGreg Roach     * @param string $maxtoshow
23830dcd9387SGreg Roach     *
23840dcd9387SGreg Roach     * @return string
23859219296aSGreg Roach     */
23869219296aSGreg Roach    public function commonGivenMaleList(string $threshold = '1', string $maxtoshow = '10'): string
23879219296aSGreg Roach    {
23889219296aSGreg Roach        return $this->individualRepository->commonGivenMaleList((int) $threshold, (int) $maxtoshow);
23899219296aSGreg Roach    }
23909219296aSGreg Roach
23919219296aSGreg Roach    /**
23920dcd9387SGreg Roach     * @param string $threshold
23930dcd9387SGreg Roach     * @param string $maxtoshow
23940dcd9387SGreg Roach     *
23950dcd9387SGreg Roach     * @return string
23969219296aSGreg Roach     */
23979219296aSGreg Roach    public function commonGivenMaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string
23989219296aSGreg Roach    {
23999219296aSGreg Roach        return $this->individualRepository->commonGivenMaleListTotals((int) $threshold, (int) $maxtoshow);
24009219296aSGreg Roach    }
24019219296aSGreg Roach
24029219296aSGreg Roach    /**
24030dcd9387SGreg Roach     * @param string $threshold
24040dcd9387SGreg Roach     * @param string $maxtoshow
24050dcd9387SGreg Roach     *
24060dcd9387SGreg Roach     * @return string
24079219296aSGreg Roach     */
24089219296aSGreg Roach    public function commonGivenMaleTable(string $threshold = '1', string $maxtoshow = '10'): string
24099219296aSGreg Roach    {
24109219296aSGreg Roach        return $this->individualRepository->commonGivenMaleTable((int) $threshold, (int) $maxtoshow);
24119219296aSGreg Roach    }
24129219296aSGreg Roach
24139219296aSGreg Roach    /**
24140dcd9387SGreg Roach     * @param string $threshold
24150dcd9387SGreg Roach     * @param string $maxtoshow
24160dcd9387SGreg Roach     *
24170dcd9387SGreg Roach     * @return string
24189219296aSGreg Roach     */
24199219296aSGreg Roach    public function commonGivenUnknown(string $threshold = '1', string $maxtoshow = '10'): string
24209219296aSGreg Roach    {
24219219296aSGreg Roach        return $this->individualRepository->commonGivenUnknown((int) $threshold, (int) $maxtoshow);
24229219296aSGreg Roach    }
24239219296aSGreg Roach
24249219296aSGreg Roach    /**
24250dcd9387SGreg Roach     * @param string $threshold
24260dcd9387SGreg Roach     * @param string $maxtoshow
24270dcd9387SGreg Roach     *
24280dcd9387SGreg Roach     * @return string
24299219296aSGreg Roach     */
24309219296aSGreg Roach    public function commonGivenUnknownTotals(string $threshold = '1', string $maxtoshow = '10'): string
24319219296aSGreg Roach    {
24329219296aSGreg Roach        return $this->individualRepository->commonGivenUnknownTotals((int) $threshold, (int) $maxtoshow);
24339219296aSGreg Roach    }
24349219296aSGreg Roach
24359219296aSGreg Roach    /**
24360dcd9387SGreg Roach     * @param string $threshold
24370dcd9387SGreg Roach     * @param string $maxtoshow
24380dcd9387SGreg Roach     *
24390dcd9387SGreg Roach     * @return string
24409219296aSGreg Roach     */
24419219296aSGreg Roach    public function commonGivenUnknownList(string $threshold = '1', string $maxtoshow = '10'): string
24429219296aSGreg Roach    {
24439219296aSGreg Roach        return $this->individualRepository->commonGivenUnknownList((int) $threshold, (int) $maxtoshow);
24449219296aSGreg Roach    }
24459219296aSGreg Roach
24469219296aSGreg Roach    /**
24470dcd9387SGreg Roach     * @param string $threshold
24480dcd9387SGreg Roach     * @param string $maxtoshow
24490dcd9387SGreg Roach     *
24500dcd9387SGreg Roach     * @return string
24519219296aSGreg Roach     */
24529219296aSGreg Roach    public function commonGivenUnknownListTotals(string $threshold = '1', string $maxtoshow = '10'): string
24539219296aSGreg Roach    {
24549219296aSGreg Roach        return $this->individualRepository->commonGivenUnknownListTotals((int) $threshold, (int) $maxtoshow);
24559219296aSGreg Roach    }
24569219296aSGreg Roach
24579219296aSGreg Roach    /**
24580dcd9387SGreg Roach     * @param string $threshold
24590dcd9387SGreg Roach     * @param string $maxtoshow
24600dcd9387SGreg Roach     *
24610dcd9387SGreg Roach     * @return string
24629219296aSGreg Roach     */
24639219296aSGreg Roach    public function commonGivenUnknownTable(string $threshold = '1', string $maxtoshow = '10'): string
24649219296aSGreg Roach    {
24659219296aSGreg Roach        return $this->individualRepository->commonGivenUnknownTable((int) $threshold, (int) $maxtoshow);
24669219296aSGreg Roach    }
24679219296aSGreg Roach
24689219296aSGreg Roach    /**
24690dcd9387SGreg Roach     * @param string|null $color_from
24700dcd9387SGreg Roach     * @param string|null $color_to
24710dcd9387SGreg Roach     * @param string      $maxtoshow
24720dcd9387SGreg Roach     *
24730dcd9387SGreg Roach     * @return string
24749219296aSGreg Roach     */
24759219296aSGreg Roach    public function chartCommonGiven(
24769219296aSGreg Roach        string $color_from = null,
24779219296aSGreg Roach        string $color_to = null,
24789219296aSGreg Roach        string $maxtoshow = '7'
2479c81b7bf1SGreg Roach    ): string {
248088de55fdSRico Sonntag        return $this->individualRepository->chartCommonGiven($color_from, $color_to, (int) $maxtoshow);
24819219296aSGreg Roach    }
24829219296aSGreg Roach
24839219296aSGreg Roach    /**
24840dcd9387SGreg Roach     * @return string
24859219296aSGreg Roach     */
24869219296aSGreg Roach    public function usersLoggedIn(): string
24879219296aSGreg Roach    {
24889219296aSGreg Roach        return $this->userRepository->usersLoggedIn();
24899219296aSGreg Roach    }
24909219296aSGreg Roach
24919219296aSGreg Roach    /**
24920dcd9387SGreg Roach     * @return string
24939219296aSGreg Roach     */
24949219296aSGreg Roach    public function usersLoggedInList(): string
24959219296aSGreg Roach    {
24969219296aSGreg Roach        return $this->userRepository->usersLoggedInList();
24979219296aSGreg Roach    }
24989219296aSGreg Roach
24999219296aSGreg Roach    /**
25000dcd9387SGreg Roach     * @return int
25019219296aSGreg Roach     */
25029219296aSGreg Roach    public function usersLoggedInTotal(): int
25039219296aSGreg Roach    {
25049219296aSGreg Roach        return $this->userRepository->usersLoggedInTotal();
25059219296aSGreg Roach    }
25069219296aSGreg Roach
25079219296aSGreg Roach    /**
25080dcd9387SGreg Roach     * @return int
25099219296aSGreg Roach     */
25109219296aSGreg Roach    public function usersLoggedInTotalAnon(): int
25119219296aSGreg Roach    {
25129219296aSGreg Roach        return $this->userRepository->usersLoggedInTotalAnon();
25139219296aSGreg Roach    }
25149219296aSGreg Roach
25159219296aSGreg Roach    /**
25160dcd9387SGreg Roach     * @return int
25179219296aSGreg Roach     */
25189219296aSGreg Roach    public function usersLoggedInTotalVisible(): int
25199219296aSGreg Roach    {
25209219296aSGreg Roach        return $this->userRepository->usersLoggedInTotalVisible();
25219219296aSGreg Roach    }
25229219296aSGreg Roach
25239219296aSGreg Roach    /**
25240dcd9387SGreg Roach     * @return string
25259219296aSGreg Roach     */
25269219296aSGreg Roach    public function userId(): string
25279219296aSGreg Roach    {
25289219296aSGreg Roach        return $this->userRepository->userId();
25299219296aSGreg Roach    }
25309219296aSGreg Roach
25319219296aSGreg Roach    /**
25320dcd9387SGreg Roach     * @param string $visitor_text
25330dcd9387SGreg Roach     *
25340dcd9387SGreg Roach     * @return string
25359219296aSGreg Roach     */
25369219296aSGreg Roach    public function userName(string $visitor_text = ''): string
25379219296aSGreg Roach    {
253818483248SGreg Roach        return $this->userRepository->userName($visitor_text);
25399219296aSGreg Roach    }
25409219296aSGreg Roach
25419219296aSGreg Roach    /**
25420dcd9387SGreg Roach     * @return string
25439219296aSGreg Roach     */
25449219296aSGreg Roach    public function userFullName(): string
25459219296aSGreg Roach    {
25469219296aSGreg Roach        return $this->userRepository->userFullName();
25479219296aSGreg Roach    }
25489219296aSGreg Roach
25499219296aSGreg Roach    /**
25500dcd9387SGreg Roach     * @return string
25519219296aSGreg Roach     */
25529219296aSGreg Roach    public function totalUsers(): string
25539219296aSGreg Roach    {
25549219296aSGreg Roach        return $this->userRepository->totalUsers();
25559219296aSGreg Roach    }
25569219296aSGreg Roach
25579219296aSGreg Roach    /**
25580dcd9387SGreg Roach     * @return string
25599219296aSGreg Roach     */
25609219296aSGreg Roach    public function totalAdmins(): string
25619219296aSGreg Roach    {
25629219296aSGreg Roach        return $this->userRepository->totalAdmins();
25639219296aSGreg Roach    }
25649219296aSGreg Roach
25659219296aSGreg Roach    /**
25660dcd9387SGreg Roach     * @return string
25679219296aSGreg Roach     */
25689219296aSGreg Roach    public function totalNonAdmins(): string
25699219296aSGreg Roach    {
25709219296aSGreg Roach        return $this->userRepository->totalNonAdmins();
25719219296aSGreg Roach    }
25729219296aSGreg Roach
25739219296aSGreg Roach    /**
25740dcd9387SGreg Roach     * @return string
25759219296aSGreg Roach     */
25769219296aSGreg Roach    public function latestUserId(): string
25779219296aSGreg Roach    {
25789219296aSGreg Roach        return $this->latestUserRepository->latestUserId();
25799219296aSGreg Roach    }
25809219296aSGreg Roach
25819219296aSGreg Roach    /**
25820dcd9387SGreg Roach     * @return string
25839219296aSGreg Roach     */
25849219296aSGreg Roach    public function latestUserName(): string
25859219296aSGreg Roach    {
25869219296aSGreg Roach        return $this->latestUserRepository->latestUserName();
25879219296aSGreg Roach    }
25889219296aSGreg Roach
25899219296aSGreg Roach    /**
25900dcd9387SGreg Roach     * @return string
25919219296aSGreg Roach     */
25929219296aSGreg Roach    public function latestUserFullName(): string
25939219296aSGreg Roach    {
25949219296aSGreg Roach        return $this->latestUserRepository->latestUserFullName();
25959219296aSGreg Roach    }
25969219296aSGreg Roach
25979219296aSGreg Roach    /**
25980dcd9387SGreg Roach     * @param string|null $format
25990dcd9387SGreg Roach     *
26000dcd9387SGreg Roach     * @return string
26019219296aSGreg Roach     */
26029219296aSGreg Roach    public function latestUserRegDate(string $format = null): string
26039219296aSGreg Roach    {
260418483248SGreg Roach        return $this->latestUserRepository->latestUserRegDate($format);
26059219296aSGreg Roach    }
26069219296aSGreg Roach
26079219296aSGreg Roach    /**
26080dcd9387SGreg Roach     * @param string|null $format
26090dcd9387SGreg Roach     *
26100dcd9387SGreg Roach     * @return string
26119219296aSGreg Roach     */
26129219296aSGreg Roach    public function latestUserRegTime(string $format = null): string
26139219296aSGreg Roach    {
261418483248SGreg Roach        return $this->latestUserRepository->latestUserRegTime($format);
26159219296aSGreg Roach    }
26169219296aSGreg Roach
26179219296aSGreg Roach    /**
26180dcd9387SGreg Roach     * @param string|null $yes
26190dcd9387SGreg Roach     * @param string|null $no
26200dcd9387SGreg Roach     *
26210dcd9387SGreg Roach     * @return string
26229219296aSGreg Roach     */
26239219296aSGreg Roach    public function latestUserLoggedin(string $yes = null, string $no = null): string
26249219296aSGreg Roach    {
262518483248SGreg Roach        return $this->latestUserRepository->latestUserLoggedin($yes, $no);
26269219296aSGreg Roach    }
26279219296aSGreg Roach
26289219296aSGreg Roach    /**
26290dcd9387SGreg Roach     * @return string
26309219296aSGreg Roach     */
26319219296aSGreg Roach    public function contactWebmaster(): string
26329219296aSGreg Roach    {
263371378461SGreg Roach        return $this->contactRepository->contactWebmaster();
26349219296aSGreg Roach    }
26359219296aSGreg Roach
26369219296aSGreg Roach    /**
26370dcd9387SGreg Roach     * @return string
26389219296aSGreg Roach     */
26399219296aSGreg Roach    public function contactGedcom(): string
26409219296aSGreg Roach    {
264171378461SGreg Roach        return $this->contactRepository->contactGedcom();
26429219296aSGreg Roach    }
26439219296aSGreg Roach
26449219296aSGreg Roach    /**
26450dcd9387SGreg Roach     * @return string
26469219296aSGreg Roach     */
26479219296aSGreg Roach    public function serverDate(): string
26489219296aSGreg Roach    {
26499219296aSGreg Roach        return $this->serverRepository->serverDate();
26509219296aSGreg Roach    }
26519219296aSGreg Roach
26529219296aSGreg Roach    /**
26530dcd9387SGreg Roach     * @return string
26549219296aSGreg Roach     */
26559219296aSGreg Roach    public function serverTime(): string
26569219296aSGreg Roach    {
26579219296aSGreg Roach        return $this->serverRepository->serverTime();
26589219296aSGreg Roach    }
26599219296aSGreg Roach
26609219296aSGreg Roach    /**
26610dcd9387SGreg Roach     * @return string
26629219296aSGreg Roach     */
26639219296aSGreg Roach    public function serverTime24(): string
26649219296aSGreg Roach    {
26659219296aSGreg Roach        return $this->serverRepository->serverTime24();
26669219296aSGreg Roach    }
26679219296aSGreg Roach
26689219296aSGreg Roach    /**
26699219296aSGreg Roach     * What is the timezone of the server.
26709219296aSGreg Roach     *
26719219296aSGreg Roach     * @return string
26729219296aSGreg Roach     */
26739219296aSGreg Roach    public function serverTimezone(): string
26749219296aSGreg Roach    {
26759219296aSGreg Roach        return $this->serverRepository->serverTimezone();
26769219296aSGreg Roach    }
26779219296aSGreg Roach
26789219296aSGreg Roach    /**
26790dcd9387SGreg Roach     * @return string
26809219296aSGreg Roach     */
26819219296aSGreg Roach    public function browserDate(): string
26829219296aSGreg Roach    {
26839219296aSGreg Roach        return $this->browserRepository->browserDate();
26849219296aSGreg Roach    }
26859219296aSGreg Roach
26869219296aSGreg Roach    /**
26870dcd9387SGreg Roach     * @return string
26889219296aSGreg Roach     */
26899219296aSGreg Roach    public function browserTime(): string
26909219296aSGreg Roach    {
26919219296aSGreg Roach        return $this->browserRepository->browserTime();
26929219296aSGreg Roach    }
26939219296aSGreg Roach
26949219296aSGreg Roach    /**
26950dcd9387SGreg Roach     * @return string
26969219296aSGreg Roach     */
26979219296aSGreg Roach    public function browserTimezone(): string
26989219296aSGreg Roach    {
26999219296aSGreg Roach        return $this->browserRepository->browserTimezone();
27009219296aSGreg Roach    }
27019219296aSGreg Roach
27029219296aSGreg Roach    /**
27030dcd9387SGreg Roach     * @param string $page_parameter
27040dcd9387SGreg Roach     *
27050dcd9387SGreg Roach     * @return string
27069219296aSGreg Roach     */
27079219296aSGreg Roach    public function hitCount(string $page_parameter = ''): string
27089219296aSGreg Roach    {
27099219296aSGreg Roach        return $this->hitCountRepository->hitCount($page_parameter);
27109219296aSGreg Roach    }
27119219296aSGreg Roach
27129219296aSGreg Roach    /**
27130dcd9387SGreg Roach     * @param string $page_parameter
27140dcd9387SGreg Roach     *
27150dcd9387SGreg Roach     * @return string
27169219296aSGreg Roach     */
27179219296aSGreg Roach    public function hitCountUser(string $page_parameter = ''): string
27189219296aSGreg Roach    {
27199219296aSGreg Roach        return $this->hitCountRepository->hitCountUser($page_parameter);
27209219296aSGreg Roach    }
27219219296aSGreg Roach
27229219296aSGreg Roach    /**
27230dcd9387SGreg Roach     * @param string $page_parameter
27240dcd9387SGreg Roach     *
27250dcd9387SGreg Roach     * @return string
27269219296aSGreg Roach     */
27279219296aSGreg Roach    public function hitCountIndi(string $page_parameter = ''): string
27289219296aSGreg Roach    {
27299219296aSGreg Roach        return $this->hitCountRepository->hitCountIndi($page_parameter);
27309219296aSGreg Roach    }
27319219296aSGreg Roach
27329219296aSGreg Roach    /**
27330dcd9387SGreg Roach     * @param string $page_parameter
27340dcd9387SGreg Roach     *
27350dcd9387SGreg Roach     * @return string
27369219296aSGreg Roach     */
27379219296aSGreg Roach    public function hitCountFam(string $page_parameter = ''): string
27389219296aSGreg Roach    {
27399219296aSGreg Roach        return $this->hitCountRepository->hitCountFam($page_parameter);
27409219296aSGreg Roach    }
27419219296aSGreg Roach
27429219296aSGreg Roach    /**
27430dcd9387SGreg Roach     * @param string $page_parameter
27440dcd9387SGreg Roach     *
27450dcd9387SGreg Roach     * @return string
27469219296aSGreg Roach     */
27479219296aSGreg Roach    public function hitCountSour(string $page_parameter = ''): string
27489219296aSGreg Roach    {
27499219296aSGreg Roach        return $this->hitCountRepository->hitCountSour($page_parameter);
27509219296aSGreg Roach    }
27519219296aSGreg Roach
27529219296aSGreg Roach    /**
27530dcd9387SGreg Roach     * @param string $page_parameter
27540dcd9387SGreg Roach     *
27550dcd9387SGreg Roach     * @return string
27569219296aSGreg Roach     */
27579219296aSGreg Roach    public function hitCountRepo(string $page_parameter = ''): string
27589219296aSGreg Roach    {
27599219296aSGreg Roach        return $this->hitCountRepository->hitCountRepo($page_parameter);
27609219296aSGreg Roach    }
27619219296aSGreg Roach
27629219296aSGreg Roach    /**
27630dcd9387SGreg Roach     * @param string $page_parameter
27640dcd9387SGreg Roach     *
27650dcd9387SGreg Roach     * @return string
27669219296aSGreg Roach     */
27679219296aSGreg Roach    public function hitCountNote(string $page_parameter = ''): string
27689219296aSGreg Roach    {
27699219296aSGreg Roach        return $this->hitCountRepository->hitCountNote($page_parameter);
27709219296aSGreg Roach    }
27719219296aSGreg Roach
27729219296aSGreg Roach    /**
27730dcd9387SGreg Roach     * @param string $page_parameter
27740dcd9387SGreg Roach     *
27750dcd9387SGreg Roach     * @return string
27769219296aSGreg Roach     */
27779219296aSGreg Roach    public function hitCountObje(string $page_parameter = ''): string
27789219296aSGreg Roach    {
27799219296aSGreg Roach        return $this->hitCountRepository->hitCountObje($page_parameter);
27809219296aSGreg Roach    }
27819219296aSGreg Roach
27829219296aSGreg Roach    /**
27830dcd9387SGreg Roach     * @return string
27849219296aSGreg Roach     */
27859219296aSGreg Roach    public function gedcomFavorites(): string
27869219296aSGreg Roach    {
27879219296aSGreg Roach        return $this->favoritesRepository->gedcomFavorites();
27889219296aSGreg Roach    }
27899219296aSGreg Roach
27909219296aSGreg Roach    /**
27910dcd9387SGreg Roach     * @return string
27929219296aSGreg Roach     */
27939219296aSGreg Roach    public function userFavorites(): string
27949219296aSGreg Roach    {
27959219296aSGreg Roach        return $this->favoritesRepository->userFavorites();
27969219296aSGreg Roach    }
27979219296aSGreg Roach
27989219296aSGreg Roach    /**
27990dcd9387SGreg Roach     * @return string
28009219296aSGreg Roach     */
28019219296aSGreg Roach    public function totalGedcomFavorites(): string
28029219296aSGreg Roach    {
28039219296aSGreg Roach        return $this->favoritesRepository->totalGedcomFavorites();
28049219296aSGreg Roach    }
28059219296aSGreg Roach
28069219296aSGreg Roach    /**
28070dcd9387SGreg Roach     * @return string
28089219296aSGreg Roach     */
28099219296aSGreg Roach    public function totalUserFavorites(): string
28109219296aSGreg Roach    {
28119219296aSGreg Roach        return $this->favoritesRepository->totalUserFavorites();
28129219296aSGreg Roach    }
28139219296aSGreg Roach
28149219296aSGreg Roach    /**
28150dcd9387SGreg Roach     * @return string
28169219296aSGreg Roach     */
28179219296aSGreg Roach    public function totalUserMessages(): string
28189219296aSGreg Roach    {
28199219296aSGreg Roach        return $this->messageRepository->totalUserMessages();
28209219296aSGreg Roach    }
28219219296aSGreg Roach
28229219296aSGreg Roach    /**
28230dcd9387SGreg Roach     * @return string
28249219296aSGreg Roach     */
28259219296aSGreg Roach    public function totalUserJournal(): string
28269219296aSGreg Roach    {
28279219296aSGreg Roach        return $this->newsRepository->totalUserJournal();
28289219296aSGreg Roach    }
28299219296aSGreg Roach
28309219296aSGreg Roach    /**
28310dcd9387SGreg Roach     * @return string
28329219296aSGreg Roach     */
28339219296aSGreg Roach    public function totalGedcomNews(): string
28349219296aSGreg Roach    {
28359219296aSGreg Roach        return $this->newsRepository->totalGedcomNews();
28369219296aSGreg Roach    }
28379219296aSGreg Roach
28389219296aSGreg Roach    /**
28399219296aSGreg Roach     * Create any of the other blocks.
28409219296aSGreg Roach     * Use as #callBlock:block_name#
28419219296aSGreg Roach     *
28429219296aSGreg Roach     * @param string $block
28439219296aSGreg Roach     * @param string ...$params
28449219296aSGreg Roach     *
2845e364afe4SGreg Roach     * @return string|null
28469219296aSGreg Roach     */
28479219296aSGreg Roach    public function callBlock(string $block = '', ...$params): ?string
28489219296aSGreg Roach    {
284987cca37cSGreg Roach        /** @var ModuleBlockInterface|null $module */
2850fd9aba47SGreg Roach        $module = $this->module_service
285187cca37cSGreg Roach            ->findByComponent(ModuleBlockInterface::class, $this->tree, Auth::user())
28526c2179e2SGreg Roach            ->first(static function (ModuleInterface $module) use ($block): bool {
28539219296aSGreg Roach                return $module->name() === $block && $module->name() !== 'html';
28540797053bSGreg Roach            });
28559219296aSGreg Roach
28569219296aSGreg Roach        if ($module === null) {
28579219296aSGreg Roach            return '';
28589219296aSGreg Roach        }
28599219296aSGreg Roach
28609219296aSGreg Roach        // Build the config array
28619219296aSGreg Roach        $cfg = [];
28629219296aSGreg Roach        foreach ($params as $config) {
28639219296aSGreg Roach            $bits = explode('=', $config);
28649219296aSGreg Roach
28656ccdf4f0SGreg Roach            if (count($bits) < 2) {
28669219296aSGreg Roach                continue;
28679219296aSGreg Roach            }
28689219296aSGreg Roach
28699219296aSGreg Roach            $v       = array_shift($bits);
28709219296aSGreg Roach            $cfg[$v] = implode('=', $bits);
28719219296aSGreg Roach        }
28729219296aSGreg Roach
28733caaa4d2SGreg Roach        return $module->getBlock($this->tree, 0, ModuleBlockInterface::CONTEXT_EMBED, $cfg);
28749219296aSGreg Roach    }
28759219296aSGreg Roach
28769219296aSGreg Roach    /**
28779219296aSGreg Roach     * What is the current version of webtrees.
28789219296aSGreg Roach     *
28799219296aSGreg Roach     * @return string
28809219296aSGreg Roach     */
28819219296aSGreg Roach    public function webtreesVersion(): string
28829219296aSGreg Roach    {
28839219296aSGreg Roach        return Webtrees::VERSION;
28849219296aSGreg Roach    }
288571378461SGreg Roach
288671378461SGreg Roach    /**
288771378461SGreg Roach     * Get tags and their parsed results.
288871378461SGreg Roach     *
288971378461SGreg Roach     * @param string $text
289071378461SGreg Roach     *
289171378461SGreg Roach     * @return string[]
289271378461SGreg Roach     */
289371378461SGreg Roach    private function getTags(string $text): array
289471378461SGreg Roach    {
289571378461SGreg Roach        $tags    = [];
289671378461SGreg Roach        $matches = [];
289771378461SGreg Roach
2898b25599e6SGreg Roach        preg_match_all('/#([^#\n]+)(?=#)/', $text, $matches, PREG_SET_ORDER);
289971378461SGreg Roach
290071378461SGreg Roach        foreach ($matches as $match) {
290171378461SGreg Roach            $params = explode(':', $match[1]);
290271378461SGreg Roach            $method = array_shift($params);
290371378461SGreg Roach
290471378461SGreg Roach            if (method_exists($this, $method)) {
2905e29653ffSGreg Roach                $tags[$match[0] . '#'] = call_user_func([$this, $method], ...$params);
290671378461SGreg Roach            }
290771378461SGreg Roach        }
290871378461SGreg Roach
290971378461SGreg Roach        return $tags;
291071378461SGreg Roach    }
29119219296aSGreg Roach}
2912