xref: /webtrees/app/Statistics.php (revision 43f2f523bcb6d4090564d23802872c0679ede6bc)
19219296aSGreg Roach<?php
23976b470SGreg Roach
39219296aSGreg Roach/**
49219296aSGreg Roach * webtrees: online genealogy
52da2e0a6SGreg 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
1589f7189bSGreg Roach * along with this program. If not, see <https://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;
57f78da678SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\CenturyService;
58f78da678SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\ColorService;
594c78e066SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\CountryService;
60e6f3d5e2SGreg Roachuse Illuminate\Database\Query\Builder;
61f021177cSGreg Roachuse Illuminate\Support\Collection;
62f021177cSGreg Roachuse ReflectionClass;
63f021177cSGreg Roachuse ReflectionException;
649219296aSGreg Roachuse ReflectionMethod;
656dd2d083SGreg Roachuse ReflectionNamedType;
669219296aSGreg Roach
67b19e047dSGreg Roachuse function call_user_func;
6871378461SGreg Roachuse function count;
6971378461SGreg Roachuse function in_array;
70dec352c1SGreg Roachuse function str_contains;
7171378461SGreg Roach
729219296aSGreg Roach/**
739219296aSGreg Roach * A selection of pre-formatted statistical queries.
749219296aSGreg Roach * These are primarily used for embedded keywords on HTML blocks, but
759219296aSGreg Roach * are also used elsewhere in the code.
769219296aSGreg Roach */
779219296aSGreg Roachclass Statistics implements
789219296aSGreg Roach    GedcomRepositoryInterface,
799219296aSGreg Roach    IndividualRepositoryInterface,
809219296aSGreg Roach    EventRepositoryInterface,
819219296aSGreg Roach    MediaRepositoryInterface,
829219296aSGreg Roach    UserRepositoryInterface,
839219296aSGreg Roach    ServerRepositoryInterface,
849219296aSGreg Roach    BrowserRepositoryInterface,
859219296aSGreg Roach    HitCountRepositoryInterface,
869219296aSGreg Roach    LatestUserRepositoryInterface,
879219296aSGreg Roach    FavoritesRepositoryInterface,
889219296aSGreg Roach    NewsRepositoryInterface,
899219296aSGreg Roach    MessageRepositoryInterface,
909219296aSGreg Roach    ContactRepositoryInterface,
919219296aSGreg Roach    FamilyDatesRepositoryInterface,
929219296aSGreg Roach    PlaceRepositoryInterface
939219296aSGreg Roach{
94*43f2f523SGreg Roach    private Tree $tree;
959219296aSGreg Roach
96*43f2f523SGreg Roach    private GedcomRepository $gedcom_repository;
979219296aSGreg Roach
98*43f2f523SGreg Roach    private IndividualRepository $individual_repository;
999219296aSGreg Roach
100*43f2f523SGreg Roach    private FamilyRepository $family_repository;
1019219296aSGreg Roach
102*43f2f523SGreg Roach    private MediaRepository $media_repository;
1039219296aSGreg Roach
104*43f2f523SGreg Roach    private EventRepository $event_repository;
1059219296aSGreg Roach
106*43f2f523SGreg Roach    private UserRepository $user_repository;
1079219296aSGreg Roach
108*43f2f523SGreg Roach    private ServerRepository $server_repository;
1099219296aSGreg Roach
110*43f2f523SGreg Roach    private BrowserRepository $browser_repository;
1119219296aSGreg Roach
112*43f2f523SGreg Roach    private HitCountRepository $hit_count_repository;
1139219296aSGreg Roach
114*43f2f523SGreg Roach    private LatestUserRepository $latest_user_repository;
1159219296aSGreg Roach
116*43f2f523SGreg Roach    private FavoritesRepository $favorites_repository;
1179219296aSGreg Roach
118*43f2f523SGreg Roach    private NewsRepository $news_repository;
1199219296aSGreg Roach
120*43f2f523SGreg Roach    private MessageRepository $message_repository;
1219219296aSGreg Roach
122*43f2f523SGreg Roach    private ContactRepository $contact_repository;
1239219296aSGreg Roach
124*43f2f523SGreg Roach    private FamilyDatesRepository $family_dates_repository;
1259219296aSGreg Roach
126*43f2f523SGreg Roach    private PlaceRepository $place_repository;
127*43f2f523SGreg Roach
128*43f2f523SGreg Roach    private ModuleService $module_service;
1299219296aSGreg Roach
1309219296aSGreg Roach    /**
1319219296aSGreg Roach     * Create the statistics for a tree.
1329219296aSGreg Roach     *
133f78da678SGreg Roach     * @param CenturyService $century_service
134f78da678SGreg Roach     * @param ColorService   $color_service
1354c78e066SGreg Roach     * @param CountryService $country_service
1369219296aSGreg Roach     * @param ModuleService  $module_service
1379219296aSGreg Roach     * @param Tree           $tree Generate statistics for this tree
138e5a6b4d4SGreg Roach     * @param UserService    $user_service
1399219296aSGreg Roach     */
1409219296aSGreg Roach    public function __construct(
141f78da678SGreg Roach        CenturyService $century_service,
142f78da678SGreg Roach        ColorService $color_service,
1434c78e066SGreg Roach        CountryService $country_service,
1449219296aSGreg Roach        ModuleService $module_service,
145e5a6b4d4SGreg Roach        Tree $tree,
146e5a6b4d4SGreg Roach        UserService $user_service
14798afcacfSGreg Roach    ) {
1489219296aSGreg Roach        $this->tree                    = $tree;
149f78da678SGreg Roach        $this->gedcom_repository       = new GedcomRepository($tree);
150f78da678SGreg Roach        $this->individual_repository   = new IndividualRepository($century_service, $color_service, $tree);
151f78da678SGreg Roach        $this->family_repository       = new FamilyRepository($century_service, $color_service, $tree);
152f78da678SGreg Roach        $this->family_dates_repository = new FamilyDatesRepository($tree);
153f78da678SGreg Roach        $this->media_repository        = new MediaRepository($color_service, $tree);
154f78da678SGreg Roach        $this->event_repository        = new EventRepository($tree);
155f78da678SGreg Roach        $this->user_repository         = new UserRepository($tree, $user_service);
156f78da678SGreg Roach        $this->server_repository       = new ServerRepository();
157f78da678SGreg Roach        $this->browser_repository      = new BrowserRepository();
158f78da678SGreg Roach        $this->hit_count_repository    = new HitCountRepository($tree, $user_service);
159f78da678SGreg Roach        $this->latest_user_repository  = new LatestUserRepository($user_service);
160f78da678SGreg Roach        $this->favorites_repository    = new FavoritesRepository($tree, $module_service);
161f78da678SGreg Roach        $this->news_repository         = new NewsRepository($tree);
162f78da678SGreg Roach        $this->message_repository      = new MessageRepository();
163f78da678SGreg Roach        $this->contact_repository      = new ContactRepository($tree, $user_service);
164f78da678SGreg Roach        $this->place_repository        = new PlaceRepository($tree, $country_service, $this->individual_repository);
1659219296aSGreg Roach        $this->module_service          = $module_service;
1669219296aSGreg Roach    }
1679219296aSGreg Roach
1689219296aSGreg Roach    /**
1699219296aSGreg Roach     * Return a string of all supported tags and an example of its output in table row form.
1709219296aSGreg Roach     *
1719219296aSGreg Roach     * @return string
1729219296aSGreg Roach     */
1739219296aSGreg Roach    public function getAllTagsTable(): string
1749219296aSGreg Roach    {
175f021177cSGreg Roach        try {
176f021177cSGreg Roach            $class = new ReflectionClass($this);
1779219296aSGreg Roach
178f021177cSGreg Roach            $public_methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
179f021177cSGreg Roach
180f021177cSGreg Roach            $examples = Collection::make($public_methods)
181f021177cSGreg Roach                ->filter(static function (ReflectionMethod $method): bool {
182f021177cSGreg Roach                    return !in_array($method->getName(), ['embedTags', 'getAllTagsTable'], true);
183f021177cSGreg Roach                })
184f021177cSGreg Roach                ->filter(static function (ReflectionMethod $method): bool {
185f021177cSGreg Roach                    $type = $method->getReturnType();
186f021177cSGreg Roach
1876dd2d083SGreg Roach                    return $type instanceof ReflectionNamedType && $type->getName() === 'string';
188f021177cSGreg Roach                })
189f021177cSGreg Roach                ->sort(static function (ReflectionMethod $x, ReflectionMethod $y): int {
190f021177cSGreg Roach                    return $x->getName() <=> $y->getName();
191f021177cSGreg Roach                })
192f021177cSGreg Roach                ->map(function (ReflectionMethod $method): string {
193f021177cSGreg Roach                    $tag = $method->getName();
194f021177cSGreg Roach
195f021177cSGreg Roach                    return '<dt>#' . $tag . '#</dt><dd>' . call_user_func([$this, $tag]) . '</dd>';
196f021177cSGreg Roach                });
197f021177cSGreg Roach
198f021177cSGreg Roach            return '<dl>' . $examples->implode('') . '</dl>';
199f021177cSGreg Roach        } catch (ReflectionException $ex) {
200f021177cSGreg Roach            return $ex->getMessage();
2019219296aSGreg Roach        }
2029219296aSGreg Roach    }
2039219296aSGreg Roach
2049219296aSGreg Roach    /**
2059219296aSGreg Roach     * Embed tags in text
2069219296aSGreg Roach     *
2079219296aSGreg Roach     * @param string $text
2089219296aSGreg Roach     *
2099219296aSGreg Roach     * @return string
2109219296aSGreg Roach     */
2119219296aSGreg Roach    public function embedTags(string $text): string
2129219296aSGreg Roach    {
213dec352c1SGreg Roach        if (str_contains($text, '#')) {
2149219296aSGreg Roach            $text = strtr($text, $this->getTags($text));
2159219296aSGreg Roach        }
2169219296aSGreg Roach
2179219296aSGreg Roach        return $text;
2189219296aSGreg Roach    }
2199219296aSGreg Roach
2209219296aSGreg Roach    /**
2210dcd9387SGreg Roach     * @return string
2229219296aSGreg Roach     */
2239219296aSGreg Roach    public function gedcomFilename(): string
2249219296aSGreg Roach    {
225f78da678SGreg Roach        return $this->gedcom_repository->gedcomFilename();
2269219296aSGreg Roach    }
2279219296aSGreg Roach
2289219296aSGreg Roach    /**
2290dcd9387SGreg Roach     * @return int
2309219296aSGreg Roach     */
2319219296aSGreg Roach    public function gedcomId(): int
2329219296aSGreg Roach    {
233f78da678SGreg Roach        return $this->gedcom_repository->gedcomId();
2349219296aSGreg Roach    }
2359219296aSGreg Roach
2369219296aSGreg Roach    /**
2370dcd9387SGreg Roach     * @return string
2389219296aSGreg Roach     */
2399219296aSGreg Roach    public function gedcomTitle(): string
2409219296aSGreg Roach    {
241f78da678SGreg Roach        return $this->gedcom_repository->gedcomTitle();
2429219296aSGreg Roach    }
2439219296aSGreg Roach
2449219296aSGreg Roach    /**
2450dcd9387SGreg Roach     * @return string
2469219296aSGreg Roach     */
2479219296aSGreg Roach    public function gedcomCreatedSoftware(): string
2489219296aSGreg Roach    {
249f78da678SGreg Roach        return $this->gedcom_repository->gedcomCreatedSoftware();
2509219296aSGreg Roach    }
2519219296aSGreg Roach
2529219296aSGreg Roach    /**
2530dcd9387SGreg Roach     * @return string
2549219296aSGreg Roach     */
2559219296aSGreg Roach    public function gedcomCreatedVersion(): string
2569219296aSGreg Roach    {
257f78da678SGreg Roach        return $this->gedcom_repository->gedcomCreatedVersion();
2589219296aSGreg Roach    }
2599219296aSGreg Roach
2609219296aSGreg Roach    /**
2610dcd9387SGreg Roach     * @return string
2629219296aSGreg Roach     */
2639219296aSGreg Roach    public function gedcomDate(): string
2649219296aSGreg Roach    {
265f78da678SGreg Roach        return $this->gedcom_repository->gedcomDate();
2669219296aSGreg Roach    }
2679219296aSGreg Roach
2689219296aSGreg Roach    /**
2690dcd9387SGreg Roach     * @return string
2709219296aSGreg Roach     */
2719219296aSGreg Roach    public function gedcomUpdated(): string
2729219296aSGreg Roach    {
273f78da678SGreg Roach        return $this->gedcom_repository->gedcomUpdated();
2749219296aSGreg Roach    }
2759219296aSGreg Roach
2769219296aSGreg Roach    /**
2770dcd9387SGreg Roach     * @return string
2789219296aSGreg Roach     */
2799219296aSGreg Roach    public function gedcomRootId(): string
2809219296aSGreg Roach    {
281f78da678SGreg Roach        return $this->gedcom_repository->gedcomRootId();
2829219296aSGreg Roach    }
2839219296aSGreg Roach
2849219296aSGreg Roach    /**
2850dcd9387SGreg Roach     * @return string
2869219296aSGreg Roach     */
2879219296aSGreg Roach    public function totalRecords(): string
2889219296aSGreg Roach    {
289f78da678SGreg Roach        return $this->individual_repository->totalRecords();
2909219296aSGreg Roach    }
2919219296aSGreg Roach
2929219296aSGreg Roach    /**
2930dcd9387SGreg Roach     * @return string
2949219296aSGreg Roach     */
2959219296aSGreg Roach    public function totalIndividuals(): string
2969219296aSGreg Roach    {
297f78da678SGreg Roach        return $this->individual_repository->totalIndividuals();
2989219296aSGreg Roach    }
2999219296aSGreg Roach
3009219296aSGreg Roach    /**
3010dcd9387SGreg Roach     * @return string
3029219296aSGreg Roach     */
3039219296aSGreg Roach    public function totalIndisWithSources(): string
3049219296aSGreg Roach    {
305f78da678SGreg Roach        return $this->individual_repository->totalIndisWithSources();
3069219296aSGreg Roach    }
3079219296aSGreg Roach
3089219296aSGreg Roach    /**
3090dcd9387SGreg Roach     * @param string|null $color_from
3100dcd9387SGreg Roach     * @param string|null $color_to
3110dcd9387SGreg Roach     *
3120dcd9387SGreg Roach     * @return string
3139219296aSGreg Roach     */
3149219296aSGreg Roach    public function chartIndisWithSources(
3159219296aSGreg Roach        string $color_from = null,
3169219296aSGreg Roach        string $color_to = null
31798afcacfSGreg Roach    ): string {
318f78da678SGreg Roach        return $this->individual_repository->chartIndisWithSources($color_from, $color_to);
3199219296aSGreg Roach    }
3209219296aSGreg Roach
3219219296aSGreg Roach    /**
3220dcd9387SGreg Roach     * @return string
3239219296aSGreg Roach     */
3249219296aSGreg Roach    public function totalIndividualsPercentage(): string
3259219296aSGreg Roach    {
326f78da678SGreg Roach        return $this->individual_repository->totalIndividualsPercentage();
3279219296aSGreg Roach    }
3289219296aSGreg Roach
3299219296aSGreg Roach    /**
3300dcd9387SGreg Roach     * @return string
3319219296aSGreg Roach     */
3329219296aSGreg Roach    public function totalFamilies(): string
3339219296aSGreg Roach    {
334f78da678SGreg Roach        return $this->individual_repository->totalFamilies();
3359219296aSGreg Roach    }
3369219296aSGreg Roach
3379219296aSGreg Roach    /**
3380dcd9387SGreg Roach     * @return string
3399219296aSGreg Roach     */
3409219296aSGreg Roach    public function totalFamiliesPercentage(): string
3419219296aSGreg Roach    {
342f78da678SGreg Roach        return $this->individual_repository->totalFamiliesPercentage();
3439219296aSGreg Roach    }
3449219296aSGreg Roach
3459219296aSGreg Roach    /**
3460dcd9387SGreg Roach     * @return string
3479219296aSGreg Roach     */
3489219296aSGreg Roach    public function totalFamsWithSources(): string
3499219296aSGreg Roach    {
350f78da678SGreg Roach        return $this->individual_repository->totalFamsWithSources();
3519219296aSGreg Roach    }
3529219296aSGreg Roach
3539219296aSGreg Roach    /**
3540dcd9387SGreg Roach     * @param string|null $color_from
3550dcd9387SGreg Roach     * @param string|null $color_to
3560dcd9387SGreg Roach     *
3570dcd9387SGreg Roach     * @return string
3589219296aSGreg Roach     */
3599219296aSGreg Roach    public function chartFamsWithSources(
3609219296aSGreg Roach        string $color_from = null,
3619219296aSGreg Roach        string $color_to = null
36298afcacfSGreg Roach    ): string {
363f78da678SGreg Roach        return $this->individual_repository->chartFamsWithSources($color_from, $color_to);
3649219296aSGreg Roach    }
3659219296aSGreg Roach
3669219296aSGreg Roach    /**
3670dcd9387SGreg Roach     * @return string
3689219296aSGreg Roach     */
3699219296aSGreg Roach    public function totalSources(): string
3709219296aSGreg Roach    {
371f78da678SGreg Roach        return $this->individual_repository->totalSources();
3729219296aSGreg Roach    }
3739219296aSGreg Roach
3749219296aSGreg Roach    /**
3750dcd9387SGreg Roach     * @return string
3769219296aSGreg Roach     */
3779219296aSGreg Roach    public function totalSourcesPercentage(): string
3789219296aSGreg Roach    {
379f78da678SGreg Roach        return $this->individual_repository->totalSourcesPercentage();
3809219296aSGreg Roach    }
3819219296aSGreg Roach
3829219296aSGreg Roach    /**
3830dcd9387SGreg Roach     * @return string
3849219296aSGreg Roach     */
3859219296aSGreg Roach    public function totalNotes(): string
3869219296aSGreg Roach    {
387f78da678SGreg Roach        return $this->individual_repository->totalNotes();
3889219296aSGreg Roach    }
3899219296aSGreg Roach
3909219296aSGreg Roach    /**
3910dcd9387SGreg Roach     * @return string
3929219296aSGreg Roach     */
3939219296aSGreg Roach    public function totalNotesPercentage(): string
3949219296aSGreg Roach    {
395f78da678SGreg Roach        return $this->individual_repository->totalNotesPercentage();
3969219296aSGreg Roach    }
3979219296aSGreg Roach
3989219296aSGreg Roach    /**
3990dcd9387SGreg Roach     * @return string
4009219296aSGreg Roach     */
4019219296aSGreg Roach    public function totalRepositories(): string
4029219296aSGreg Roach    {
403f78da678SGreg Roach        return $this->individual_repository->totalRepositories();
4049219296aSGreg Roach    }
4059219296aSGreg Roach
4069219296aSGreg Roach    /**
4070dcd9387SGreg Roach     * @return string
4089219296aSGreg Roach     */
4099219296aSGreg Roach    public function totalRepositoriesPercentage(): string
4109219296aSGreg Roach    {
411f78da678SGreg Roach        return $this->individual_repository->totalRepositoriesPercentage();
4129219296aSGreg Roach    }
4139219296aSGreg Roach
4149219296aSGreg Roach    /**
41509482a55SGreg Roach     * @param array<string> ...$params
416320f6a24SGreg Roach     *
417320f6a24SGreg Roach     * @return string
4189219296aSGreg Roach     */
4199219296aSGreg Roach    public function totalSurnames(...$params): string
4209219296aSGreg Roach    {
421f78da678SGreg Roach        return $this->individual_repository->totalSurnames(...$params);
4229219296aSGreg Roach    }
4239219296aSGreg Roach
4249219296aSGreg Roach    /**
42509482a55SGreg Roach     * @param array<string> ...$params
426320f6a24SGreg Roach     *
427320f6a24SGreg Roach     * @return string
4289219296aSGreg Roach     */
4299219296aSGreg Roach    public function totalGivennames(...$params): string
4309219296aSGreg Roach    {
431f78da678SGreg Roach        return $this->individual_repository->totalGivennames(...$params);
4329219296aSGreg Roach    }
4339219296aSGreg Roach
4349219296aSGreg Roach    /**
43509482a55SGreg Roach     * @param array<string> $events
4360dcd9387SGreg Roach     *
4370dcd9387SGreg Roach     * @return string
4389219296aSGreg Roach     */
4399219296aSGreg Roach    public function totalEvents(array $events = []): string
4409219296aSGreg Roach    {
441f78da678SGreg Roach        return $this->event_repository->totalEvents($events);
4429219296aSGreg Roach    }
4439219296aSGreg Roach
4449219296aSGreg Roach    /**
4450dcd9387SGreg Roach     * @return string
4469219296aSGreg Roach     */
4479219296aSGreg Roach    public function totalEventsBirth(): string
4489219296aSGreg Roach    {
449f78da678SGreg Roach        return $this->event_repository->totalEventsBirth();
4509219296aSGreg Roach    }
4519219296aSGreg Roach
4529219296aSGreg Roach    /**
4530dcd9387SGreg Roach     * @return string
4549219296aSGreg Roach     */
4559219296aSGreg Roach    public function totalBirths(): string
4569219296aSGreg Roach    {
457f78da678SGreg Roach        return $this->event_repository->totalBirths();
4589219296aSGreg Roach    }
4599219296aSGreg Roach
4609219296aSGreg Roach    /**
4610dcd9387SGreg Roach     * @return string
4629219296aSGreg Roach     */
4639219296aSGreg Roach    public function totalEventsDeath(): string
4649219296aSGreg Roach    {
465f78da678SGreg Roach        return $this->event_repository->totalEventsDeath();
4669219296aSGreg Roach    }
4679219296aSGreg Roach
4689219296aSGreg Roach    /**
4690dcd9387SGreg Roach     * @return string
4709219296aSGreg Roach     */
4719219296aSGreg Roach    public function totalDeaths(): string
4729219296aSGreg Roach    {
473f78da678SGreg Roach        return $this->event_repository->totalDeaths();
4749219296aSGreg Roach    }
4759219296aSGreg Roach
4769219296aSGreg Roach    /**
4770dcd9387SGreg Roach     * @return string
4789219296aSGreg Roach     */
4799219296aSGreg Roach    public function totalEventsMarriage(): string
4809219296aSGreg Roach    {
481f78da678SGreg Roach        return $this->event_repository->totalEventsMarriage();
4829219296aSGreg Roach    }
4839219296aSGreg Roach
4849219296aSGreg Roach    /**
4850dcd9387SGreg Roach     * @return string
4869219296aSGreg Roach     */
4879219296aSGreg Roach    public function totalMarriages(): string
4889219296aSGreg Roach    {
489f78da678SGreg Roach        return $this->event_repository->totalMarriages();
4909219296aSGreg Roach    }
4919219296aSGreg Roach
4929219296aSGreg Roach    /**
4930dcd9387SGreg Roach     * @return string
4949219296aSGreg Roach     */
4959219296aSGreg Roach    public function totalEventsDivorce(): string
4969219296aSGreg Roach    {
497f78da678SGreg Roach        return $this->event_repository->totalEventsDivorce();
4989219296aSGreg Roach    }
4999219296aSGreg Roach
5009219296aSGreg Roach    /**
5010dcd9387SGreg Roach     * @return string
5029219296aSGreg Roach     */
5039219296aSGreg Roach    public function totalDivorces(): string
5049219296aSGreg Roach    {
505f78da678SGreg Roach        return $this->event_repository->totalDivorces();
5069219296aSGreg Roach    }
5079219296aSGreg Roach
5089219296aSGreg Roach    /**
5090dcd9387SGreg Roach     * @return string
5109219296aSGreg Roach     */
5119219296aSGreg Roach    public function totalEventsOther(): string
5129219296aSGreg Roach    {
513f78da678SGreg Roach        return $this->event_repository->totalEventsOther();
5149219296aSGreg Roach    }
5159219296aSGreg Roach
5169219296aSGreg Roach    /**
5170dcd9387SGreg Roach     * @return string
5189219296aSGreg Roach     */
5199219296aSGreg Roach    public function totalSexMales(): string
5209219296aSGreg Roach    {
521f78da678SGreg Roach        return $this->individual_repository->totalSexMales();
5229219296aSGreg Roach    }
5239219296aSGreg Roach
5249219296aSGreg Roach    /**
5250dcd9387SGreg Roach     * @return string
5269219296aSGreg Roach     */
5279219296aSGreg Roach    public function totalSexMalesPercentage(): string
5289219296aSGreg Roach    {
529f78da678SGreg Roach        return $this->individual_repository->totalSexMalesPercentage();
5309219296aSGreg Roach    }
5319219296aSGreg Roach
5329219296aSGreg Roach    /**
5330dcd9387SGreg Roach     * @return string
5349219296aSGreg Roach     */
5359219296aSGreg Roach    public function totalSexFemales(): string
5369219296aSGreg Roach    {
537f78da678SGreg Roach        return $this->individual_repository->totalSexFemales();
5389219296aSGreg Roach    }
5399219296aSGreg Roach
5409219296aSGreg Roach    /**
5410dcd9387SGreg Roach     * @return string
5429219296aSGreg Roach     */
5439219296aSGreg Roach    public function totalSexFemalesPercentage(): string
5449219296aSGreg Roach    {
545f78da678SGreg Roach        return $this->individual_repository->totalSexFemalesPercentage();
5469219296aSGreg Roach    }
5479219296aSGreg Roach
5489219296aSGreg Roach    /**
5490dcd9387SGreg Roach     * @return string
5509219296aSGreg Roach     */
5519219296aSGreg Roach    public function totalSexUnknown(): string
5529219296aSGreg Roach    {
553f78da678SGreg Roach        return $this->individual_repository->totalSexUnknown();
5549219296aSGreg Roach    }
5559219296aSGreg Roach
5569219296aSGreg Roach    /**
5570dcd9387SGreg Roach     * @return string
5589219296aSGreg Roach     */
5599219296aSGreg Roach    public function totalSexUnknownPercentage(): string
5609219296aSGreg Roach    {
561f78da678SGreg Roach        return $this->individual_repository->totalSexUnknownPercentage();
5629219296aSGreg Roach    }
5639219296aSGreg Roach
5649219296aSGreg Roach    /**
5650dcd9387SGreg Roach     * @param string|null $color_female
5660dcd9387SGreg Roach     * @param string|null $color_male
5670dcd9387SGreg Roach     * @param string|null $color_unknown
5680dcd9387SGreg Roach     *
5690dcd9387SGreg Roach     * @return string
5709219296aSGreg Roach     */
5719219296aSGreg Roach    public function chartSex(
5729219296aSGreg Roach        string $color_female = null,
5739219296aSGreg Roach        string $color_male = null,
5749219296aSGreg Roach        string $color_unknown = null
57598afcacfSGreg Roach    ): string {
576f78da678SGreg Roach        return $this->individual_repository->chartSex($color_female, $color_male, $color_unknown);
5779219296aSGreg Roach    }
5789219296aSGreg Roach
5799219296aSGreg Roach    /**
5800dcd9387SGreg Roach     * @return string
5819219296aSGreg Roach     */
5829219296aSGreg Roach    public function totalLiving(): string
5839219296aSGreg Roach    {
584f78da678SGreg Roach        return $this->individual_repository->totalLiving();
5859219296aSGreg Roach    }
5869219296aSGreg Roach
5879219296aSGreg Roach    /**
5880dcd9387SGreg Roach     * @return string
5899219296aSGreg Roach     */
5909219296aSGreg Roach    public function totalLivingPercentage(): string
5919219296aSGreg Roach    {
592f78da678SGreg Roach        return $this->individual_repository->totalLivingPercentage();
5939219296aSGreg Roach    }
5949219296aSGreg Roach
5959219296aSGreg Roach    /**
5960dcd9387SGreg Roach     * @return string
5979219296aSGreg Roach     */
5989219296aSGreg Roach    public function totalDeceased(): string
5999219296aSGreg Roach    {
600f78da678SGreg Roach        return $this->individual_repository->totalDeceased();
6019219296aSGreg Roach    }
6029219296aSGreg Roach
6039219296aSGreg Roach    /**
6040dcd9387SGreg Roach     * @return string
6059219296aSGreg Roach     */
6069219296aSGreg Roach    public function totalDeceasedPercentage(): string
6079219296aSGreg Roach    {
608f78da678SGreg Roach        return $this->individual_repository->totalDeceasedPercentage();
6099219296aSGreg Roach    }
6109219296aSGreg Roach
6119219296aSGreg Roach    /**
6120dcd9387SGreg Roach     * @param string|null $color_living
6130dcd9387SGreg Roach     * @param string|null $color_dead
6140dcd9387SGreg Roach     *
6150dcd9387SGreg Roach     * @return string
6169219296aSGreg Roach     */
61788de55fdSRico Sonntag    public function chartMortality(string $color_living = null, string $color_dead = null): string
6189219296aSGreg Roach    {
619f78da678SGreg Roach        return $this->individual_repository->chartMortality($color_living, $color_dead);
6209219296aSGreg Roach    }
6219219296aSGreg Roach
6229219296aSGreg Roach    /**
6230dcd9387SGreg Roach     * @return string
6249219296aSGreg Roach     */
6259219296aSGreg Roach    public function totalMedia(): string
6269219296aSGreg Roach    {
627f78da678SGreg Roach        return $this->media_repository->totalMedia();
6289219296aSGreg Roach    }
6299219296aSGreg Roach
6309219296aSGreg Roach    /**
6310dcd9387SGreg Roach     * @return string
6329219296aSGreg Roach     */
6339219296aSGreg Roach    public function totalMediaAudio(): string
6349219296aSGreg Roach    {
635f78da678SGreg Roach        return $this->media_repository->totalMediaAudio();
6369219296aSGreg Roach    }
6379219296aSGreg Roach
6389219296aSGreg Roach    /**
6390dcd9387SGreg Roach     * @return string
6409219296aSGreg Roach     */
6419219296aSGreg Roach    public function totalMediaBook(): string
6429219296aSGreg Roach    {
643f78da678SGreg Roach        return $this->media_repository->totalMediaBook();
6449219296aSGreg Roach    }
6459219296aSGreg Roach
6469219296aSGreg Roach    /**
6470dcd9387SGreg Roach     * @return string
6489219296aSGreg Roach     */
6499219296aSGreg Roach    public function totalMediaCard(): string
6509219296aSGreg Roach    {
651f78da678SGreg Roach        return $this->media_repository->totalMediaCard();
6529219296aSGreg Roach    }
6539219296aSGreg Roach
6549219296aSGreg Roach    /**
6550dcd9387SGreg Roach     * @return string
6569219296aSGreg Roach     */
6579219296aSGreg Roach    public function totalMediaCertificate(): string
6589219296aSGreg Roach    {
659f78da678SGreg Roach        return $this->media_repository->totalMediaCertificate();
6609219296aSGreg Roach    }
6619219296aSGreg Roach
6629219296aSGreg Roach    /**
6630dcd9387SGreg Roach     * @return string
6649219296aSGreg Roach     */
6659219296aSGreg Roach    public function totalMediaCoatOfArms(): string
6669219296aSGreg Roach    {
667f78da678SGreg Roach        return $this->media_repository->totalMediaCoatOfArms();
6689219296aSGreg Roach    }
6699219296aSGreg Roach
6709219296aSGreg Roach    /**
6710dcd9387SGreg Roach     * @return string
6729219296aSGreg Roach     */
6739219296aSGreg Roach    public function totalMediaDocument(): string
6749219296aSGreg Roach    {
675f78da678SGreg Roach        return $this->media_repository->totalMediaDocument();
6769219296aSGreg Roach    }
6779219296aSGreg Roach
6789219296aSGreg Roach    /**
6790dcd9387SGreg Roach     * @return string
6809219296aSGreg Roach     */
6819219296aSGreg Roach    public function totalMediaElectronic(): string
6829219296aSGreg Roach    {
683f78da678SGreg Roach        return $this->media_repository->totalMediaElectronic();
6849219296aSGreg Roach    }
6859219296aSGreg Roach
6869219296aSGreg Roach    /**
6870dcd9387SGreg Roach     * @return string
6889219296aSGreg Roach     */
6899219296aSGreg Roach    public function totalMediaMagazine(): string
6909219296aSGreg Roach    {
691f78da678SGreg Roach        return $this->media_repository->totalMediaMagazine();
6929219296aSGreg Roach    }
6939219296aSGreg Roach
6949219296aSGreg Roach    /**
6950dcd9387SGreg Roach     * @return string
6969219296aSGreg Roach     */
6979219296aSGreg Roach    public function totalMediaManuscript(): string
6989219296aSGreg Roach    {
699f78da678SGreg Roach        return $this->media_repository->totalMediaManuscript();
7009219296aSGreg Roach    }
7019219296aSGreg Roach
7029219296aSGreg Roach    /**
7030dcd9387SGreg Roach     * @return string
7049219296aSGreg Roach     */
7059219296aSGreg Roach    public function totalMediaMap(): string
7069219296aSGreg Roach    {
707f78da678SGreg Roach        return $this->media_repository->totalMediaMap();
7089219296aSGreg Roach    }
7099219296aSGreg Roach
7109219296aSGreg Roach    /**
7110dcd9387SGreg Roach     * @return string
7129219296aSGreg Roach     */
7139219296aSGreg Roach    public function totalMediaFiche(): string
7149219296aSGreg Roach    {
715f78da678SGreg Roach        return $this->media_repository->totalMediaFiche();
7169219296aSGreg Roach    }
7179219296aSGreg Roach
7189219296aSGreg Roach    /**
7190dcd9387SGreg Roach     * @return string
7209219296aSGreg Roach     */
7219219296aSGreg Roach    public function totalMediaFilm(): string
7229219296aSGreg Roach    {
723f78da678SGreg Roach        return $this->media_repository->totalMediaFilm();
7249219296aSGreg Roach    }
7259219296aSGreg Roach
7269219296aSGreg Roach    /**
7270dcd9387SGreg Roach     * @return string
7289219296aSGreg Roach     */
7299219296aSGreg Roach    public function totalMediaNewspaper(): string
7309219296aSGreg Roach    {
731f78da678SGreg Roach        return $this->media_repository->totalMediaNewspaper();
7329219296aSGreg Roach    }
7339219296aSGreg Roach
7349219296aSGreg Roach    /**
7350dcd9387SGreg Roach     * @return string
7369219296aSGreg Roach     */
7379219296aSGreg Roach    public function totalMediaPainting(): string
7389219296aSGreg Roach    {
739f78da678SGreg Roach        return $this->media_repository->totalMediaPainting();
7409219296aSGreg Roach    }
7419219296aSGreg Roach
7429219296aSGreg Roach    /**
7430dcd9387SGreg Roach     * @return string
7449219296aSGreg Roach     */
7459219296aSGreg Roach    public function totalMediaPhoto(): string
7469219296aSGreg Roach    {
747f78da678SGreg Roach        return $this->media_repository->totalMediaPhoto();
7489219296aSGreg Roach    }
7499219296aSGreg Roach
7509219296aSGreg Roach    /**
7510dcd9387SGreg Roach     * @return string
7529219296aSGreg Roach     */
7539219296aSGreg Roach    public function totalMediaTombstone(): string
7549219296aSGreg Roach    {
755f78da678SGreg Roach        return $this->media_repository->totalMediaTombstone();
7569219296aSGreg Roach    }
7579219296aSGreg Roach
7589219296aSGreg Roach    /**
7590dcd9387SGreg Roach     * @return string
7609219296aSGreg Roach     */
7619219296aSGreg Roach    public function totalMediaVideo(): string
7629219296aSGreg Roach    {
763f78da678SGreg Roach        return $this->media_repository->totalMediaVideo();
7649219296aSGreg Roach    }
7659219296aSGreg Roach
7669219296aSGreg Roach    /**
7670dcd9387SGreg Roach     * @return string
7689219296aSGreg Roach     */
7699219296aSGreg Roach    public function totalMediaOther(): string
7709219296aSGreg Roach    {
771f78da678SGreg Roach        return $this->media_repository->totalMediaOther();
7729219296aSGreg Roach    }
7739219296aSGreg Roach
7749219296aSGreg Roach    /**
7750dcd9387SGreg Roach     * @return string
7769219296aSGreg Roach     */
7779219296aSGreg Roach    public function totalMediaUnknown(): string
7789219296aSGreg Roach    {
779f78da678SGreg Roach        return $this->media_repository->totalMediaUnknown();
7809219296aSGreg Roach    }
7819219296aSGreg Roach
7829219296aSGreg Roach    /**
7830dcd9387SGreg Roach     * @param string|null $color_from
7840dcd9387SGreg Roach     * @param string|null $color_to
7850dcd9387SGreg Roach     *
7860dcd9387SGreg Roach     * @return string
7879219296aSGreg Roach     */
78888de55fdSRico Sonntag    public function chartMedia(string $color_from = null, string $color_to = null): string
7899219296aSGreg Roach    {
790f78da678SGreg Roach        return $this->media_repository->chartMedia($color_from, $color_to);
7919219296aSGreg Roach    }
7929219296aSGreg Roach
7939219296aSGreg Roach    /**
7940dcd9387SGreg Roach     * @param string $what
7950dcd9387SGreg Roach     * @param string $fact
7960dcd9387SGreg Roach     * @param int    $parent
7970dcd9387SGreg Roach     * @param bool   $country
7980dcd9387SGreg Roach     *
799f70bcff5SGreg Roach     * @return array<object>
8009219296aSGreg Roach     */
8019219296aSGreg Roach    public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent = 0, bool $country = false): array
8029219296aSGreg Roach    {
803f78da678SGreg Roach        return $this->place_repository->statsPlaces($what, $fact, $parent, $country);
8049219296aSGreg Roach    }
8059219296aSGreg Roach
8069219296aSGreg Roach    /**
8070dcd9387SGreg Roach     * @return string
8089219296aSGreg Roach     */
8099219296aSGreg Roach    public function totalPlaces(): string
8109219296aSGreg Roach    {
811f78da678SGreg Roach        return $this->place_repository->totalPlaces();
8129219296aSGreg Roach    }
8139219296aSGreg Roach
8149219296aSGreg Roach    /**
8150dcd9387SGreg Roach     * @param string $chart_shows
8160dcd9387SGreg Roach     * @param string $chart_type
8170dcd9387SGreg Roach     * @param string $surname
8180dcd9387SGreg Roach     *
8190dcd9387SGreg Roach     * @return string
8209219296aSGreg Roach     */
8219219296aSGreg Roach    public function chartDistribution(
8229219296aSGreg Roach        string $chart_shows = 'world',
8239219296aSGreg Roach        string $chart_type = '',
8249219296aSGreg Roach        string $surname = ''
82598afcacfSGreg Roach    ): string {
826f78da678SGreg Roach        return $this->place_repository->chartDistribution($chart_shows, $chart_type, $surname);
8279219296aSGreg Roach    }
8289219296aSGreg Roach
8299219296aSGreg Roach    /**
8300dcd9387SGreg Roach     * @return string
8319219296aSGreg Roach     */
8329219296aSGreg Roach    public function commonCountriesList(): string
8339219296aSGreg Roach    {
834f78da678SGreg Roach        return $this->place_repository->commonCountriesList();
8359219296aSGreg Roach    }
8369219296aSGreg Roach
8379219296aSGreg Roach    /**
8380dcd9387SGreg Roach     * @return string
8399219296aSGreg Roach     */
8409219296aSGreg Roach    public function commonBirthPlacesList(): string
8419219296aSGreg Roach    {
842f78da678SGreg Roach        return $this->place_repository->commonBirthPlacesList();
8439219296aSGreg Roach    }
8449219296aSGreg Roach
8459219296aSGreg Roach    /**
8460dcd9387SGreg Roach     * @return string
8479219296aSGreg Roach     */
8489219296aSGreg Roach    public function commonDeathPlacesList(): string
8499219296aSGreg Roach    {
850f78da678SGreg Roach        return $this->place_repository->commonDeathPlacesList();
8519219296aSGreg Roach    }
8529219296aSGreg Roach
8539219296aSGreg Roach    /**
8540dcd9387SGreg Roach     * @return string
8559219296aSGreg Roach     */
8569219296aSGreg Roach    public function commonMarriagePlacesList(): string
8579219296aSGreg Roach    {
858f78da678SGreg Roach        return $this->place_repository->commonMarriagePlacesList();
8599219296aSGreg Roach    }
8609219296aSGreg Roach
8619219296aSGreg Roach    /**
8620dcd9387SGreg Roach     * @return string
8639219296aSGreg Roach     */
8649219296aSGreg Roach    public function firstBirth(): string
8659219296aSGreg Roach    {
866f78da678SGreg Roach        return $this->family_dates_repository->firstBirth();
8679219296aSGreg Roach    }
8689219296aSGreg Roach
8699219296aSGreg Roach    /**
8700dcd9387SGreg Roach     * @return string
8719219296aSGreg Roach     */
8729219296aSGreg Roach    public function firstBirthYear(): string
8739219296aSGreg Roach    {
874f78da678SGreg Roach        return $this->family_dates_repository->firstBirthYear();
8759219296aSGreg Roach    }
8769219296aSGreg Roach
8779219296aSGreg Roach    /**
8780dcd9387SGreg Roach     * @return string
8799219296aSGreg Roach     */
8809219296aSGreg Roach    public function firstBirthName(): string
8819219296aSGreg Roach    {
882f78da678SGreg Roach        return $this->family_dates_repository->firstBirthName();
8839219296aSGreg Roach    }
8849219296aSGreg Roach
8859219296aSGreg Roach    /**
8860dcd9387SGreg Roach     * @return string
8879219296aSGreg Roach     */
8889219296aSGreg Roach    public function firstBirthPlace(): string
8899219296aSGreg Roach    {
890f78da678SGreg Roach        return $this->family_dates_repository->firstBirthPlace();
8919219296aSGreg Roach    }
8929219296aSGreg Roach
8939219296aSGreg Roach    /**
8940dcd9387SGreg Roach     * @return string
8959219296aSGreg Roach     */
8969219296aSGreg Roach    public function lastBirth(): string
8979219296aSGreg Roach    {
898f78da678SGreg Roach        return $this->family_dates_repository->lastBirth();
8999219296aSGreg Roach    }
9009219296aSGreg Roach
9019219296aSGreg Roach    /**
9020dcd9387SGreg Roach     * @return string
9039219296aSGreg Roach     */
9049219296aSGreg Roach    public function lastBirthYear(): string
9059219296aSGreg Roach    {
906f78da678SGreg Roach        return $this->family_dates_repository->lastBirthYear();
9079219296aSGreg Roach    }
9089219296aSGreg Roach
9099219296aSGreg Roach    /**
9100dcd9387SGreg Roach     * @return string
9119219296aSGreg Roach     */
9129219296aSGreg Roach    public function lastBirthName(): string
9139219296aSGreg Roach    {
914f78da678SGreg Roach        return $this->family_dates_repository->lastBirthName();
9159219296aSGreg Roach    }
9169219296aSGreg Roach
9179219296aSGreg Roach    /**
9180dcd9387SGreg Roach     * @return string
9199219296aSGreg Roach     */
9209219296aSGreg Roach    public function lastBirthPlace(): string
9219219296aSGreg Roach    {
922f78da678SGreg Roach        return $this->family_dates_repository->lastBirthPlace();
9239219296aSGreg Roach    }
9249219296aSGreg Roach
9259219296aSGreg Roach    /**
9260dcd9387SGreg Roach     * @param int $year1
9270dcd9387SGreg Roach     * @param int $year2
9280dcd9387SGreg Roach     *
9290dcd9387SGreg Roach     * @return Builder
9309219296aSGreg Roach     */
931cde1d378SGreg Roach    public function statsBirthQuery(int $year1 = -1, int $year2 = -1): Builder
9329219296aSGreg Roach    {
933f78da678SGreg Roach        return $this->individual_repository->statsBirthQuery($year1, $year2);
934cde1d378SGreg Roach    }
935cde1d378SGreg Roach
936cde1d378SGreg Roach    /**
9370dcd9387SGreg Roach     * @param int $year1
9380dcd9387SGreg Roach     * @param int $year2
9390dcd9387SGreg Roach     *
9400dcd9387SGreg Roach     * @return Builder
941cde1d378SGreg Roach     */
942cde1d378SGreg Roach    public function statsBirthBySexQuery(int $year1 = -1, int $year2 = -1): Builder
943cde1d378SGreg Roach    {
944f78da678SGreg Roach        return $this->individual_repository->statsBirthBySexQuery($year1, $year2);
9459219296aSGreg Roach    }
9469219296aSGreg Roach
9479219296aSGreg Roach    /**
9480dcd9387SGreg Roach     * @param string|null $color_from
9490dcd9387SGreg Roach     * @param string|null $color_to
9500dcd9387SGreg Roach     *
9510dcd9387SGreg Roach     * @return string
9529219296aSGreg Roach     */
95388de55fdSRico Sonntag    public function statsBirth(string $color_from = null, string $color_to = null): string
9549219296aSGreg Roach    {
955f78da678SGreg Roach        return $this->individual_repository->statsBirth($color_from, $color_to);
9569219296aSGreg Roach    }
9579219296aSGreg Roach
9589219296aSGreg Roach    /**
9590dcd9387SGreg Roach     * @return string
9609219296aSGreg Roach     */
9619219296aSGreg Roach    public function firstDeath(): string
9629219296aSGreg Roach    {
963f78da678SGreg Roach        return $this->family_dates_repository->firstDeath();
9649219296aSGreg Roach    }
9659219296aSGreg Roach
9669219296aSGreg Roach    /**
9670dcd9387SGreg Roach     * @return string
9689219296aSGreg Roach     */
9699219296aSGreg Roach    public function firstDeathYear(): string
9709219296aSGreg Roach    {
971f78da678SGreg Roach        return $this->family_dates_repository->firstDeathYear();
9729219296aSGreg Roach    }
9739219296aSGreg Roach
9749219296aSGreg Roach    /**
9750dcd9387SGreg Roach     * @return string
9769219296aSGreg Roach     */
9779219296aSGreg Roach    public function firstDeathName(): string
9789219296aSGreg Roach    {
979f78da678SGreg Roach        return $this->family_dates_repository->firstDeathName();
9809219296aSGreg Roach    }
9819219296aSGreg Roach
9829219296aSGreg Roach    /**
9830dcd9387SGreg Roach     * @return string
9849219296aSGreg Roach     */
9859219296aSGreg Roach    public function firstDeathPlace(): string
9869219296aSGreg Roach    {
987f78da678SGreg Roach        return $this->family_dates_repository->firstDeathPlace();
9889219296aSGreg Roach    }
9899219296aSGreg Roach
9909219296aSGreg Roach    /**
9910dcd9387SGreg Roach     * @return string
9929219296aSGreg Roach     */
9939219296aSGreg Roach    public function lastDeath(): string
9949219296aSGreg Roach    {
995f78da678SGreg Roach        return $this->family_dates_repository->lastDeath();
9969219296aSGreg Roach    }
9979219296aSGreg Roach
9989219296aSGreg Roach    /**
9990dcd9387SGreg Roach     * @return string
10009219296aSGreg Roach     */
10019219296aSGreg Roach    public function lastDeathYear(): string
10029219296aSGreg Roach    {
1003f78da678SGreg Roach        return $this->family_dates_repository->lastDeathYear();
10049219296aSGreg Roach    }
10059219296aSGreg Roach
10069219296aSGreg Roach    /**
10070dcd9387SGreg Roach     * @return string
10089219296aSGreg Roach     */
10099219296aSGreg Roach    public function lastDeathName(): string
10109219296aSGreg Roach    {
1011f78da678SGreg Roach        return $this->family_dates_repository->lastDeathName();
10129219296aSGreg Roach    }
10139219296aSGreg Roach
10149219296aSGreg Roach    /**
10150dcd9387SGreg Roach     * @return string
10169219296aSGreg Roach     */
10179219296aSGreg Roach    public function lastDeathPlace(): string
10189219296aSGreg Roach    {
1019f78da678SGreg Roach        return $this->family_dates_repository->lastDeathPlace();
10209219296aSGreg Roach    }
10219219296aSGreg Roach
10229219296aSGreg Roach    /**
10230dcd9387SGreg Roach     * @param int $year1
10240dcd9387SGreg Roach     * @param int $year2
10250dcd9387SGreg Roach     *
10260dcd9387SGreg Roach     * @return Builder
10279219296aSGreg Roach     */
1028cde1d378SGreg Roach    public function statsDeathQuery(int $year1 = -1, int $year2 = -1): Builder
10299219296aSGreg Roach    {
1030f78da678SGreg Roach        return $this->individual_repository->statsDeathQuery($year1, $year2);
1031cde1d378SGreg Roach    }
1032cde1d378SGreg Roach
1033cde1d378SGreg Roach    /**
10340dcd9387SGreg Roach     * @param int $year1
10350dcd9387SGreg Roach     * @param int $year2
10360dcd9387SGreg Roach     *
10370dcd9387SGreg Roach     * @return Builder
1038cde1d378SGreg Roach     */
1039cde1d378SGreg Roach    public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder
1040cde1d378SGreg Roach    {
1041f78da678SGreg Roach        return $this->individual_repository->statsDeathBySexQuery($year1, $year2);
10429219296aSGreg Roach    }
10439219296aSGreg Roach
10449219296aSGreg Roach    /**
10450dcd9387SGreg Roach     * @param string|null $color_from
10460dcd9387SGreg Roach     * @param string|null $color_to
10470dcd9387SGreg Roach     *
10480dcd9387SGreg Roach     * @return string
10499219296aSGreg Roach     */
105088de55fdSRico Sonntag    public function statsDeath(string $color_from = null, string $color_to = null): string
10519219296aSGreg Roach    {
1052f78da678SGreg Roach        return $this->individual_repository->statsDeath($color_from, $color_to);
10539219296aSGreg Roach    }
10549219296aSGreg Roach
10559219296aSGreg Roach    /**
1056320f6a24SGreg Roach     * General query on ages.
1057320f6a24SGreg Roach     *
1058320f6a24SGreg Roach     * @param string $related
1059320f6a24SGreg Roach     * @param string $sex
1060320f6a24SGreg Roach     * @param int    $year1
1061320f6a24SGreg Roach     * @param int    $year2
1062320f6a24SGreg Roach     *
1063320f6a24SGreg Roach     * @return array|string
10649219296aSGreg Roach     */
10659219296aSGreg Roach    public function statsAgeQuery(string $related = 'BIRT', string $sex = 'BOTH', int $year1 = -1, int $year2 = -1)
10669219296aSGreg Roach    {
1067f78da678SGreg Roach        return $this->individual_repository->statsAgeQuery($related, $sex, $year1, $year2);
10689219296aSGreg Roach    }
10699219296aSGreg Roach
10709219296aSGreg Roach    /**
10710dcd9387SGreg Roach     * @return string
10729219296aSGreg Roach     */
107388de55fdSRico Sonntag    public function statsAge(): string
10749219296aSGreg Roach    {
1075f78da678SGreg Roach        return $this->individual_repository->statsAge();
10769219296aSGreg Roach    }
10779219296aSGreg Roach
10789219296aSGreg Roach    /**
10790dcd9387SGreg Roach     * @return string
10809219296aSGreg Roach     */
10819219296aSGreg Roach    public function longestLife(): string
10829219296aSGreg Roach    {
1083f78da678SGreg Roach        return $this->individual_repository->longestLife();
10849219296aSGreg Roach    }
10859219296aSGreg Roach
10869219296aSGreg Roach    /**
10870dcd9387SGreg Roach     * @return string
10889219296aSGreg Roach     */
10899219296aSGreg Roach    public function longestLifeAge(): string
10909219296aSGreg Roach    {
1091f78da678SGreg Roach        return $this->individual_repository->longestLifeAge();
10929219296aSGreg Roach    }
10939219296aSGreg Roach
10949219296aSGreg Roach    /**
10950dcd9387SGreg Roach     * @return string
10969219296aSGreg Roach     */
10979219296aSGreg Roach    public function longestLifeName(): string
10989219296aSGreg Roach    {
1099f78da678SGreg Roach        return $this->individual_repository->longestLifeName();
11009219296aSGreg Roach    }
11019219296aSGreg Roach
11029219296aSGreg Roach    /**
11030dcd9387SGreg Roach     * @return string
11049219296aSGreg Roach     */
11059219296aSGreg Roach    public function longestLifeFemale(): string
11069219296aSGreg Roach    {
1107f78da678SGreg Roach        return $this->individual_repository->longestLifeFemale();
11089219296aSGreg Roach    }
11099219296aSGreg Roach
11109219296aSGreg Roach    /**
11110dcd9387SGreg Roach     * @return string
11129219296aSGreg Roach     */
11139219296aSGreg Roach    public function longestLifeFemaleAge(): string
11149219296aSGreg Roach    {
1115f78da678SGreg Roach        return $this->individual_repository->longestLifeFemaleAge();
11169219296aSGreg Roach    }
11179219296aSGreg Roach
11189219296aSGreg Roach    /**
11190dcd9387SGreg Roach     * @return string
11209219296aSGreg Roach     */
11219219296aSGreg Roach    public function longestLifeFemaleName(): string
11229219296aSGreg Roach    {
1123f78da678SGreg Roach        return $this->individual_repository->longestLifeFemaleName();
11249219296aSGreg Roach    }
11259219296aSGreg Roach
11269219296aSGreg Roach    /**
11270dcd9387SGreg Roach     * @return string
11289219296aSGreg Roach     */
11299219296aSGreg Roach    public function longestLifeMale(): string
11309219296aSGreg Roach    {
1131f78da678SGreg Roach        return $this->individual_repository->longestLifeMale();
11329219296aSGreg Roach    }
11339219296aSGreg Roach
11349219296aSGreg Roach    /**
11350dcd9387SGreg Roach     * @return string
11369219296aSGreg Roach     */
11379219296aSGreg Roach    public function longestLifeMaleAge(): string
11389219296aSGreg Roach    {
1139f78da678SGreg Roach        return $this->individual_repository->longestLifeMaleAge();
11409219296aSGreg Roach    }
11419219296aSGreg Roach
11429219296aSGreg Roach    /**
11430dcd9387SGreg Roach     * @return string
11449219296aSGreg Roach     */
11459219296aSGreg Roach    public function longestLifeMaleName(): string
11469219296aSGreg Roach    {
1147f78da678SGreg Roach        return $this->individual_repository->longestLifeMaleName();
11489219296aSGreg Roach    }
11499219296aSGreg Roach
11509219296aSGreg Roach    /**
11510dcd9387SGreg Roach     * @param string $total
11520dcd9387SGreg Roach     *
11530dcd9387SGreg Roach     * @return string
11549219296aSGreg Roach     */
11559219296aSGreg Roach    public function topTenOldest(string $total = '10'): string
11569219296aSGreg Roach    {
1157f78da678SGreg Roach        return $this->individual_repository->topTenOldest((int) $total);
11589219296aSGreg Roach    }
11599219296aSGreg Roach
11609219296aSGreg Roach    /**
11610dcd9387SGreg Roach     * @param string $total
11620dcd9387SGreg Roach     *
11630dcd9387SGreg Roach     * @return string
11649219296aSGreg Roach     */
11659219296aSGreg Roach    public function topTenOldestList(string $total = '10'): string
11669219296aSGreg Roach    {
1167f78da678SGreg Roach        return $this->individual_repository->topTenOldestList((int) $total);
11689219296aSGreg Roach    }
11699219296aSGreg Roach
11709219296aSGreg Roach    /**
11710dcd9387SGreg Roach     * @param string $total
11720dcd9387SGreg Roach     *
11730dcd9387SGreg Roach     * @return string
11749219296aSGreg Roach     */
11759219296aSGreg Roach    public function topTenOldestFemale(string $total = '10'): string
11769219296aSGreg Roach    {
1177f78da678SGreg Roach        return $this->individual_repository->topTenOldestFemale((int) $total);
11789219296aSGreg Roach    }
11799219296aSGreg Roach
11809219296aSGreg Roach    /**
11810dcd9387SGreg Roach     * @param string $total
11820dcd9387SGreg Roach     *
11830dcd9387SGreg Roach     * @return string
11849219296aSGreg Roach     */
11859219296aSGreg Roach    public function topTenOldestFemaleList(string $total = '10'): string
11869219296aSGreg Roach    {
1187f78da678SGreg Roach        return $this->individual_repository->topTenOldestFemaleList((int) $total);
11889219296aSGreg Roach    }
11899219296aSGreg Roach
11909219296aSGreg Roach    /**
11910dcd9387SGreg Roach     * @param string $total
11920dcd9387SGreg Roach     *
11930dcd9387SGreg Roach     * @return string
11949219296aSGreg Roach     */
11959219296aSGreg Roach    public function topTenOldestMale(string $total = '10'): string
11969219296aSGreg Roach    {
1197f78da678SGreg Roach        return $this->individual_repository->topTenOldestMale((int) $total);
11989219296aSGreg Roach    }
11999219296aSGreg Roach
12009219296aSGreg Roach    /**
12010dcd9387SGreg Roach     * @param string $total
12020dcd9387SGreg Roach     *
12030dcd9387SGreg Roach     * @return string
12049219296aSGreg Roach     */
12059219296aSGreg Roach    public function topTenOldestMaleList(string $total = '10'): string
12069219296aSGreg Roach    {
1207f78da678SGreg Roach        return $this->individual_repository->topTenOldestMaleList((int) $total);
12089219296aSGreg Roach    }
12099219296aSGreg Roach
12109219296aSGreg Roach    /**
12110dcd9387SGreg Roach     * @param string $total
12120dcd9387SGreg Roach     *
12130dcd9387SGreg Roach     * @return string
12149219296aSGreg Roach     */
12159219296aSGreg Roach    public function topTenOldestAlive(string $total = '10'): string
12169219296aSGreg Roach    {
1217f78da678SGreg Roach        return $this->individual_repository->topTenOldestAlive((int) $total);
12189219296aSGreg Roach    }
12199219296aSGreg Roach
12209219296aSGreg Roach    /**
12210dcd9387SGreg Roach     * @param string $total
12220dcd9387SGreg Roach     *
12230dcd9387SGreg Roach     * @return string
12249219296aSGreg Roach     */
12259219296aSGreg Roach    public function topTenOldestListAlive(string $total = '10'): string
12269219296aSGreg Roach    {
1227f78da678SGreg Roach        return $this->individual_repository->topTenOldestListAlive((int) $total);
12289219296aSGreg Roach    }
12299219296aSGreg Roach
12309219296aSGreg Roach    /**
12310dcd9387SGreg Roach     * @param string $total
12320dcd9387SGreg Roach     *
12330dcd9387SGreg Roach     * @return string
12349219296aSGreg Roach     */
12359219296aSGreg Roach    public function topTenOldestFemaleAlive(string $total = '10'): string
12369219296aSGreg Roach    {
1237f78da678SGreg Roach        return $this->individual_repository->topTenOldestFemaleAlive((int) $total);
12389219296aSGreg Roach    }
12399219296aSGreg Roach
12409219296aSGreg Roach    /**
12410dcd9387SGreg Roach     * @param string $total
12420dcd9387SGreg Roach     *
12430dcd9387SGreg Roach     * @return string
12449219296aSGreg Roach     */
12459219296aSGreg Roach    public function topTenOldestFemaleListAlive(string $total = '10'): string
12469219296aSGreg Roach    {
1247f78da678SGreg Roach        return $this->individual_repository->topTenOldestFemaleListAlive((int) $total);
12489219296aSGreg Roach    }
12499219296aSGreg Roach
12509219296aSGreg Roach    /**
12510dcd9387SGreg Roach     * @param string $total
12520dcd9387SGreg Roach     *
12530dcd9387SGreg Roach     * @return string
12549219296aSGreg Roach     */
12559219296aSGreg Roach    public function topTenOldestMaleAlive(string $total = '10'): string
12569219296aSGreg Roach    {
1257f78da678SGreg Roach        return $this->individual_repository->topTenOldestMaleAlive((int) $total);
12589219296aSGreg Roach    }
12599219296aSGreg Roach
12609219296aSGreg Roach    /**
12610dcd9387SGreg Roach     * @param string $total
12620dcd9387SGreg Roach     *
12630dcd9387SGreg Roach     * @return string
12649219296aSGreg Roach     */
12659219296aSGreg Roach    public function topTenOldestMaleListAlive(string $total = '10'): string
12669219296aSGreg Roach    {
1267f78da678SGreg Roach        return $this->individual_repository->topTenOldestMaleListAlive((int) $total);
12689219296aSGreg Roach    }
12699219296aSGreg Roach
12709219296aSGreg Roach    /**
12710dcd9387SGreg Roach     * @param bool $show_years
12720dcd9387SGreg Roach     *
12730dcd9387SGreg Roach     * @return string
12749219296aSGreg Roach     */
12759219296aSGreg Roach    public function averageLifespan(bool $show_years = false): string
12769219296aSGreg Roach    {
1277f78da678SGreg Roach        return $this->individual_repository->averageLifespan($show_years);
12789219296aSGreg Roach    }
12799219296aSGreg Roach
12809219296aSGreg Roach    /**
12810dcd9387SGreg Roach     * @param bool $show_years
12820dcd9387SGreg Roach     *
12830dcd9387SGreg Roach     * @return string
12849219296aSGreg Roach     */
12859219296aSGreg Roach    public function averageLifespanFemale(bool $show_years = false): string
12869219296aSGreg Roach    {
1287f78da678SGreg Roach        return $this->individual_repository->averageLifespanFemale($show_years);
12889219296aSGreg Roach    }
12899219296aSGreg Roach
12909219296aSGreg Roach    /**
12910dcd9387SGreg Roach     * @param bool $show_years
12920dcd9387SGreg Roach     *
12930dcd9387SGreg Roach     * @return string
12949219296aSGreg Roach     */
12959219296aSGreg Roach    public function averageLifespanMale(bool $show_years = false): string
12969219296aSGreg Roach    {
1297f78da678SGreg Roach        return $this->individual_repository->averageLifespanMale($show_years);
12989219296aSGreg Roach    }
12999219296aSGreg Roach
13009219296aSGreg Roach    /**
13010dcd9387SGreg Roach     * @return string
13029219296aSGreg Roach     */
13039219296aSGreg Roach    public function firstEvent(): string
13049219296aSGreg Roach    {
1305f78da678SGreg Roach        return $this->event_repository->firstEvent();
13069219296aSGreg Roach    }
13079219296aSGreg Roach
13089219296aSGreg Roach    /**
13090dcd9387SGreg Roach     * @return string
13109219296aSGreg Roach     */
13119219296aSGreg Roach    public function firstEventYear(): string
13129219296aSGreg Roach    {
1313f78da678SGreg Roach        return $this->event_repository->firstEventYear();
13149219296aSGreg Roach    }
13159219296aSGreg Roach
13169219296aSGreg Roach    /**
13170dcd9387SGreg Roach     * @return string
13189219296aSGreg Roach     */
13199219296aSGreg Roach    public function firstEventType(): string
13209219296aSGreg Roach    {
1321f78da678SGreg Roach        return $this->event_repository->firstEventType();
13229219296aSGreg Roach    }
13239219296aSGreg Roach
13249219296aSGreg Roach    /**
13250dcd9387SGreg Roach     * @return string
13269219296aSGreg Roach     */
13279219296aSGreg Roach    public function firstEventName(): string
13289219296aSGreg Roach    {
1329f78da678SGreg Roach        return $this->event_repository->firstEventName();
13309219296aSGreg Roach    }
13319219296aSGreg Roach
13329219296aSGreg Roach    /**
13330dcd9387SGreg Roach     * @return string
13349219296aSGreg Roach     */
13359219296aSGreg Roach    public function firstEventPlace(): string
13369219296aSGreg Roach    {
1337f78da678SGreg Roach        return $this->event_repository->firstEventPlace();
13389219296aSGreg Roach    }
13399219296aSGreg Roach
13409219296aSGreg Roach    /**
13410dcd9387SGreg Roach     * @return string
13429219296aSGreg Roach     */
13439219296aSGreg Roach    public function lastEvent(): string
13449219296aSGreg Roach    {
1345f78da678SGreg Roach        return $this->event_repository->lastEvent();
13469219296aSGreg Roach    }
13479219296aSGreg Roach
13489219296aSGreg Roach    /**
13490dcd9387SGreg Roach     * @return string
13509219296aSGreg Roach     */
13519219296aSGreg Roach    public function lastEventYear(): string
13529219296aSGreg Roach    {
1353f78da678SGreg Roach        return $this->event_repository->lastEventYear();
13549219296aSGreg Roach    }
13559219296aSGreg Roach
13569219296aSGreg Roach    /**
13570dcd9387SGreg Roach     * @return string
13589219296aSGreg Roach     */
13599219296aSGreg Roach    public function lastEventType(): string
13609219296aSGreg Roach    {
1361f78da678SGreg Roach        return $this->event_repository->lastEventType();
13629219296aSGreg Roach    }
13639219296aSGreg Roach
13649219296aSGreg Roach    /**
13650dcd9387SGreg Roach     * @return string
13669219296aSGreg Roach     */
13679219296aSGreg Roach    public function lastEventName(): string
13689219296aSGreg Roach    {
1369f78da678SGreg Roach        return $this->event_repository->lastEventName();
13709219296aSGreg Roach    }
13719219296aSGreg Roach
13729219296aSGreg Roach    /**
13730dcd9387SGreg Roach     * @return string
13749219296aSGreg Roach     */
13759219296aSGreg Roach    public function lastEventPlace(): string
13769219296aSGreg Roach    {
1377f78da678SGreg Roach        return $this->event_repository->lastEventType();
13789219296aSGreg Roach    }
13799219296aSGreg Roach
13809219296aSGreg Roach    /**
13810dcd9387SGreg Roach     * @return string
13829219296aSGreg Roach     */
13839219296aSGreg Roach    public function firstMarriage(): string
13849219296aSGreg Roach    {
1385f78da678SGreg Roach        return $this->family_dates_repository->firstMarriage();
13869219296aSGreg Roach    }
13879219296aSGreg Roach
13889219296aSGreg Roach    /**
13890dcd9387SGreg Roach     * @return string
13909219296aSGreg Roach     */
13919219296aSGreg Roach    public function firstMarriageYear(): string
13929219296aSGreg Roach    {
1393f78da678SGreg Roach        return $this->family_dates_repository->firstMarriageYear();
13949219296aSGreg Roach    }
13959219296aSGreg Roach
13969219296aSGreg Roach    /**
13970dcd9387SGreg Roach     * @return string
13989219296aSGreg Roach     */
13999219296aSGreg Roach    public function firstMarriageName(): string
14009219296aSGreg Roach    {
1401f78da678SGreg Roach        return $this->family_dates_repository->firstMarriageName();
14029219296aSGreg Roach    }
14039219296aSGreg Roach
14049219296aSGreg Roach    /**
14050dcd9387SGreg Roach     * @return string
14069219296aSGreg Roach     */
14079219296aSGreg Roach    public function firstMarriagePlace(): string
14089219296aSGreg Roach    {
1409f78da678SGreg Roach        return $this->family_dates_repository->firstMarriagePlace();
14109219296aSGreg Roach    }
14119219296aSGreg Roach
14129219296aSGreg Roach    /**
14130dcd9387SGreg Roach     * @return string
14149219296aSGreg Roach     */
14159219296aSGreg Roach    public function lastMarriage(): string
14169219296aSGreg Roach    {
1417f78da678SGreg Roach        return $this->family_dates_repository->lastMarriage();
14189219296aSGreg Roach    }
14199219296aSGreg Roach
14209219296aSGreg Roach    /**
14210dcd9387SGreg Roach     * @return string
14229219296aSGreg Roach     */
14239219296aSGreg Roach    public function lastMarriageYear(): string
14249219296aSGreg Roach    {
1425f78da678SGreg Roach        return $this->family_dates_repository->lastMarriageYear();
14269219296aSGreg Roach    }
14279219296aSGreg Roach
14289219296aSGreg Roach    /**
14290dcd9387SGreg Roach     * @return string
14309219296aSGreg Roach     */
14319219296aSGreg Roach    public function lastMarriageName(): string
14329219296aSGreg Roach    {
1433f78da678SGreg Roach        return $this->family_dates_repository->lastMarriageName();
14349219296aSGreg Roach    }
14359219296aSGreg Roach
14369219296aSGreg Roach    /**
14370dcd9387SGreg Roach     * @return string
14389219296aSGreg Roach     */
14399219296aSGreg Roach    public function lastMarriagePlace(): string
14409219296aSGreg Roach    {
1441f78da678SGreg Roach        return $this->family_dates_repository->lastMarriagePlace();
14429219296aSGreg Roach    }
14439219296aSGreg Roach
14449219296aSGreg Roach    /**
14450dcd9387SGreg Roach     * @param int $year1
14460dcd9387SGreg Roach     * @param int $year2
14470dcd9387SGreg Roach     *
14480dcd9387SGreg Roach     * @return Builder
14499219296aSGreg Roach     */
1450e6f3d5e2SGreg Roach    public function statsMarriageQuery(int $year1 = -1, int $year2 = -1): Builder
14519219296aSGreg Roach    {
1452f78da678SGreg Roach        return $this->family_repository->statsMarriageQuery($year1, $year2);
1453e6f3d5e2SGreg Roach    }
1454e6f3d5e2SGreg Roach
1455e6f3d5e2SGreg Roach    /**
14560dcd9387SGreg Roach     * @param int $year1
14570dcd9387SGreg Roach     * @param int $year2
14580dcd9387SGreg Roach     *
14590dcd9387SGreg Roach     * @return Builder
1460e6f3d5e2SGreg Roach     */
1461e6f3d5e2SGreg Roach    public function statsFirstMarriageQuery(int $year1 = -1, int $year2 = -1): Builder
1462e6f3d5e2SGreg Roach    {
1463f78da678SGreg Roach        return $this->family_repository->statsFirstMarriageQuery($year1, $year2);
14649219296aSGreg Roach    }
14659219296aSGreg Roach
14669219296aSGreg Roach    /**
14670dcd9387SGreg Roach     * @param string|null $color_from
14680dcd9387SGreg Roach     * @param string|null $color_to
14690dcd9387SGreg Roach     *
14700dcd9387SGreg Roach     * @return string
14719219296aSGreg Roach     */
147288de55fdSRico Sonntag    public function statsMarr(string $color_from = null, string $color_to = null): string
14739219296aSGreg Roach    {
1474f78da678SGreg Roach        return $this->family_repository->statsMarr($color_from, $color_to);
14759219296aSGreg Roach    }
14769219296aSGreg Roach
14779219296aSGreg Roach    /**
14780dcd9387SGreg Roach     * @return string
14799219296aSGreg Roach     */
14809219296aSGreg Roach    public function firstDivorce(): string
14819219296aSGreg Roach    {
1482f78da678SGreg Roach        return $this->family_dates_repository->firstDivorce();
14839219296aSGreg Roach    }
14849219296aSGreg Roach
14859219296aSGreg Roach    /**
14860dcd9387SGreg Roach     * @return string
14879219296aSGreg Roach     */
14889219296aSGreg Roach    public function firstDivorceYear(): string
14899219296aSGreg Roach    {
1490f78da678SGreg Roach        return $this->family_dates_repository->firstDivorceYear();
14919219296aSGreg Roach    }
14929219296aSGreg Roach
14939219296aSGreg Roach    /**
14940dcd9387SGreg Roach     * @return string
14959219296aSGreg Roach     */
14969219296aSGreg Roach    public function firstDivorceName(): string
14979219296aSGreg Roach    {
1498f78da678SGreg Roach        return $this->family_dates_repository->firstDivorceName();
14999219296aSGreg Roach    }
15009219296aSGreg Roach
15019219296aSGreg Roach    /**
15020dcd9387SGreg Roach     * @return string
15039219296aSGreg Roach     */
15049219296aSGreg Roach    public function firstDivorcePlace(): string
15059219296aSGreg Roach    {
1506f78da678SGreg Roach        return $this->family_dates_repository->firstDivorcePlace();
15079219296aSGreg Roach    }
15089219296aSGreg Roach
15099219296aSGreg Roach    /**
15100dcd9387SGreg Roach     * @return string
15119219296aSGreg Roach     */
15129219296aSGreg Roach    public function lastDivorce(): string
15139219296aSGreg Roach    {
1514f78da678SGreg Roach        return $this->family_dates_repository->lastDivorce();
15159219296aSGreg Roach    }
15169219296aSGreg Roach
15179219296aSGreg Roach    /**
15180dcd9387SGreg Roach     * @return string
15199219296aSGreg Roach     */
15209219296aSGreg Roach    public function lastDivorceYear(): string
15219219296aSGreg Roach    {
1522f78da678SGreg Roach        return $this->family_dates_repository->lastDivorceYear();
15239219296aSGreg Roach    }
15249219296aSGreg Roach
15259219296aSGreg Roach    /**
15260dcd9387SGreg Roach     * @return string
15279219296aSGreg Roach     */
15289219296aSGreg Roach    public function lastDivorceName(): string
15299219296aSGreg Roach    {
1530f78da678SGreg Roach        return $this->family_dates_repository->lastDivorceName();
15319219296aSGreg Roach    }
15329219296aSGreg Roach
15339219296aSGreg Roach    /**
15340dcd9387SGreg Roach     * @return string
15359219296aSGreg Roach     */
15369219296aSGreg Roach    public function lastDivorcePlace(): string
15379219296aSGreg Roach    {
1538f78da678SGreg Roach        return $this->family_dates_repository->lastDivorcePlace();
15399219296aSGreg Roach    }
15409219296aSGreg Roach
15419219296aSGreg Roach    /**
15420dcd9387SGreg Roach     * @param string|null $color_from
15430dcd9387SGreg Roach     * @param string|null $color_to
15440dcd9387SGreg Roach     *
15450dcd9387SGreg Roach     * @return string
15469219296aSGreg Roach     */
154788de55fdSRico Sonntag    public function statsDiv(string $color_from = null, string $color_to = null): string
15489219296aSGreg Roach    {
1549f78da678SGreg Roach        return $this->family_repository->statsDiv($color_from, $color_to);
15509219296aSGreg Roach    }
15519219296aSGreg Roach
15529219296aSGreg Roach    /**
15530dcd9387SGreg Roach     * @return string
15549219296aSGreg Roach     */
15559219296aSGreg Roach    public function youngestMarriageFemale(): string
15569219296aSGreg Roach    {
1557f78da678SGreg Roach        return $this->family_repository->youngestMarriageFemale();
15589219296aSGreg Roach    }
15599219296aSGreg Roach
15609219296aSGreg Roach    /**
15610dcd9387SGreg Roach     * @return string
15629219296aSGreg Roach     */
15639219296aSGreg Roach    public function youngestMarriageFemaleName(): string
15649219296aSGreg Roach    {
1565f78da678SGreg Roach        return $this->family_repository->youngestMarriageFemaleName();
15669219296aSGreg Roach    }
15679219296aSGreg Roach
15689219296aSGreg Roach    /**
15690dcd9387SGreg Roach     * @param string $show_years
15700dcd9387SGreg Roach     *
15710dcd9387SGreg Roach     * @return string
15729219296aSGreg Roach     */
15739219296aSGreg Roach    public function youngestMarriageFemaleAge(string $show_years = ''): string
15749219296aSGreg Roach    {
1575f78da678SGreg Roach        return $this->family_repository->youngestMarriageFemaleAge($show_years);
15769219296aSGreg Roach    }
15779219296aSGreg Roach
15789219296aSGreg Roach    /**
15790dcd9387SGreg Roach     * @return string
15809219296aSGreg Roach     */
15819219296aSGreg Roach    public function oldestMarriageFemale(): string
15829219296aSGreg Roach    {
1583f78da678SGreg Roach        return $this->family_repository->oldestMarriageFemale();
15849219296aSGreg Roach    }
15859219296aSGreg Roach
15869219296aSGreg Roach    /**
15870dcd9387SGreg Roach     * @return string
15889219296aSGreg Roach     */
15899219296aSGreg Roach    public function oldestMarriageFemaleName(): string
15909219296aSGreg Roach    {
1591f78da678SGreg Roach        return $this->family_repository->oldestMarriageFemaleName();
15929219296aSGreg Roach    }
15939219296aSGreg Roach
15949219296aSGreg Roach    /**
15950dcd9387SGreg Roach     * @param string $show_years
15960dcd9387SGreg Roach     *
15970dcd9387SGreg Roach     * @return string
15989219296aSGreg Roach     */
15999219296aSGreg Roach    public function oldestMarriageFemaleAge(string $show_years = ''): string
16009219296aSGreg Roach    {
1601f78da678SGreg Roach        return $this->family_repository->oldestMarriageFemaleAge($show_years);
16029219296aSGreg Roach    }
16039219296aSGreg Roach
16049219296aSGreg Roach    /**
16050dcd9387SGreg Roach     * @return string
16069219296aSGreg Roach     */
16079219296aSGreg Roach    public function youngestMarriageMale(): string
16089219296aSGreg Roach    {
1609f78da678SGreg Roach        return $this->family_repository->youngestMarriageMale();
16109219296aSGreg Roach    }
16119219296aSGreg Roach
16129219296aSGreg Roach    /**
16130dcd9387SGreg Roach     * @return string
16149219296aSGreg Roach     */
16159219296aSGreg Roach    public function youngestMarriageMaleName(): string
16169219296aSGreg Roach    {
1617f78da678SGreg Roach        return $this->family_repository->youngestMarriageMaleName();
16189219296aSGreg Roach    }
16199219296aSGreg Roach
16209219296aSGreg Roach    /**
16210dcd9387SGreg Roach     * @param string $show_years
16220dcd9387SGreg Roach     *
16230dcd9387SGreg Roach     * @return string
16249219296aSGreg Roach     */
16259219296aSGreg Roach    public function youngestMarriageMaleAge(string $show_years = ''): string
16269219296aSGreg Roach    {
1627f78da678SGreg Roach        return $this->family_repository->youngestMarriageMaleAge($show_years);
16289219296aSGreg Roach    }
16299219296aSGreg Roach
16309219296aSGreg Roach    /**
16310dcd9387SGreg Roach     * @return string
16329219296aSGreg Roach     */
16339219296aSGreg Roach    public function oldestMarriageMale(): string
16349219296aSGreg Roach    {
1635f78da678SGreg Roach        return $this->family_repository->oldestMarriageMale();
16369219296aSGreg Roach    }
16379219296aSGreg Roach
16389219296aSGreg Roach    /**
16390dcd9387SGreg Roach     * @return string
16409219296aSGreg Roach     */
16419219296aSGreg Roach    public function oldestMarriageMaleName(): string
16429219296aSGreg Roach    {
1643f78da678SGreg Roach        return $this->family_repository->oldestMarriageMaleName();
16449219296aSGreg Roach    }
16459219296aSGreg Roach
16469219296aSGreg Roach    /**
16470dcd9387SGreg Roach     * @param string $show_years
16480dcd9387SGreg Roach     *
16490dcd9387SGreg Roach     * @return string
16509219296aSGreg Roach     */
16519219296aSGreg Roach    public function oldestMarriageMaleAge(string $show_years = ''): string
16529219296aSGreg Roach    {
1653f78da678SGreg Roach        return $this->family_repository->oldestMarriageMaleAge($show_years);
16549219296aSGreg Roach    }
16559219296aSGreg Roach
16569219296aSGreg Roach    /**
16570dcd9387SGreg Roach     * @param string $sex
16580dcd9387SGreg Roach     * @param int    $year1
16590dcd9387SGreg Roach     * @param int    $year2
16600dcd9387SGreg Roach     *
16610dcd9387SGreg Roach     * @return array
16629219296aSGreg Roach     */
1663afa8d404SGreg Roach    public function statsMarrAgeQuery(string $sex, int $year1 = -1, int $year2 = -1): array
16649219296aSGreg Roach    {
1665f78da678SGreg Roach        return $this->family_repository->statsMarrAgeQuery($sex, $year1, $year2);
16669219296aSGreg Roach    }
16679219296aSGreg Roach
16689219296aSGreg Roach    /**
16690dcd9387SGreg Roach     * @return string
16709219296aSGreg Roach     */
167188de55fdSRico Sonntag    public function statsMarrAge(): string
16729219296aSGreg Roach    {
1673f78da678SGreg Roach        return $this->family_repository->statsMarrAge();
16749219296aSGreg Roach    }
16759219296aSGreg Roach
16769219296aSGreg Roach    /**
16770dcd9387SGreg Roach     * @param string $total
16780dcd9387SGreg Roach     *
16790dcd9387SGreg Roach     * @return string
16809219296aSGreg Roach     */
16819219296aSGreg Roach    public function ageBetweenSpousesMF(string $total = '10'): string
16829219296aSGreg Roach    {
1683f78da678SGreg Roach        return $this->family_repository->ageBetweenSpousesMF((int) $total);
16849219296aSGreg Roach    }
16859219296aSGreg Roach
16869219296aSGreg Roach    /**
16870dcd9387SGreg Roach     * @param string $total
16880dcd9387SGreg Roach     *
16890dcd9387SGreg Roach     * @return string
16909219296aSGreg Roach     */
16919219296aSGreg Roach    public function ageBetweenSpousesMFList(string $total = '10'): string
16929219296aSGreg Roach    {
1693f78da678SGreg Roach        return $this->family_repository->ageBetweenSpousesMFList((int) $total);
16949219296aSGreg Roach    }
16959219296aSGreg Roach
16969219296aSGreg Roach    /**
16970dcd9387SGreg Roach     * @param string $total
16980dcd9387SGreg Roach     *
16990dcd9387SGreg Roach     * @return string
17009219296aSGreg Roach     */
17019219296aSGreg Roach    public function ageBetweenSpousesFM(string $total = '10'): string
17029219296aSGreg Roach    {
1703f78da678SGreg Roach        return $this->family_repository->ageBetweenSpousesFM((int) $total);
17049219296aSGreg Roach    }
17059219296aSGreg Roach
17069219296aSGreg Roach    /**
17070dcd9387SGreg Roach     * @param string $total
17080dcd9387SGreg Roach     *
17090dcd9387SGreg Roach     * @return string
17109219296aSGreg Roach     */
17119219296aSGreg Roach    public function ageBetweenSpousesFMList(string $total = '10'): string
17129219296aSGreg Roach    {
1713f78da678SGreg Roach        return $this->family_repository->ageBetweenSpousesFMList((int) $total);
17149219296aSGreg Roach    }
17159219296aSGreg Roach
17169219296aSGreg Roach    /**
17170dcd9387SGreg Roach     * @return string
17189219296aSGreg Roach     */
17199219296aSGreg Roach    public function topAgeOfMarriageFamily(): string
17209219296aSGreg Roach    {
1721f78da678SGreg Roach        return $this->family_repository->topAgeOfMarriageFamily();
17229219296aSGreg Roach    }
17239219296aSGreg Roach
17249219296aSGreg Roach    /**
17250dcd9387SGreg Roach     * @return string
17269219296aSGreg Roach     */
17279219296aSGreg Roach    public function topAgeOfMarriage(): string
17289219296aSGreg Roach    {
1729f78da678SGreg Roach        return $this->family_repository->topAgeOfMarriage();
17309219296aSGreg Roach    }
17319219296aSGreg Roach
17329219296aSGreg Roach    /**
17330dcd9387SGreg Roach     * @param string $total
17340dcd9387SGreg Roach     *
17350dcd9387SGreg Roach     * @return string
17369219296aSGreg Roach     */
17379219296aSGreg Roach    public function topAgeOfMarriageFamilies(string $total = '10'): string
17389219296aSGreg Roach    {
1739f78da678SGreg Roach        return $this->family_repository->topAgeOfMarriageFamilies((int) $total);
17409219296aSGreg Roach    }
17419219296aSGreg Roach
17429219296aSGreg Roach    /**
17430dcd9387SGreg Roach     * @param string $total
17440dcd9387SGreg Roach     *
17450dcd9387SGreg Roach     * @return string
17469219296aSGreg Roach     */
17479219296aSGreg Roach    public function topAgeOfMarriageFamiliesList(string $total = '10'): string
17489219296aSGreg Roach    {
1749f78da678SGreg Roach        return $this->family_repository->topAgeOfMarriageFamiliesList((int) $total);
17509219296aSGreg Roach    }
17519219296aSGreg Roach
17529219296aSGreg Roach    /**
17530dcd9387SGreg Roach     * @return string
17549219296aSGreg Roach     */
17559219296aSGreg Roach    public function minAgeOfMarriageFamily(): string
17569219296aSGreg Roach    {
1757f78da678SGreg Roach        return $this->family_repository->minAgeOfMarriageFamily();
17589219296aSGreg Roach    }
17599219296aSGreg Roach
17609219296aSGreg Roach    /**
17610dcd9387SGreg Roach     * @return string
17629219296aSGreg Roach     */
17639219296aSGreg Roach    public function minAgeOfMarriage(): string
17649219296aSGreg Roach    {
1765f78da678SGreg Roach        return $this->family_repository->minAgeOfMarriage();
17669219296aSGreg Roach    }
17679219296aSGreg Roach
17689219296aSGreg Roach    /**
17690dcd9387SGreg Roach     * @param string $total
17700dcd9387SGreg Roach     *
17710dcd9387SGreg Roach     * @return string
17729219296aSGreg Roach     */
17739219296aSGreg Roach    public function minAgeOfMarriageFamilies(string $total = '10'): string
17749219296aSGreg Roach    {
1775f78da678SGreg Roach        return $this->family_repository->minAgeOfMarriageFamilies((int) $total);
17769219296aSGreg Roach    }
17779219296aSGreg Roach
17789219296aSGreg Roach    /**
17790dcd9387SGreg Roach     * @param string $total
17800dcd9387SGreg Roach     *
17810dcd9387SGreg Roach     * @return string
17829219296aSGreg Roach     */
17839219296aSGreg Roach    public function minAgeOfMarriageFamiliesList(string $total = '10'): string
17849219296aSGreg Roach    {
1785f78da678SGreg Roach        return $this->family_repository->minAgeOfMarriageFamiliesList((int) $total);
17869219296aSGreg Roach    }
17879219296aSGreg Roach
17889219296aSGreg Roach    /**
17890dcd9387SGreg Roach     * @return string
17909219296aSGreg Roach     */
17919219296aSGreg Roach    public function youngestMother(): string
17929219296aSGreg Roach    {
1793f78da678SGreg Roach        return $this->family_repository->youngestMother();
17949219296aSGreg Roach    }
17959219296aSGreg Roach
17969219296aSGreg Roach    /**
17970dcd9387SGreg Roach     * @return string
17989219296aSGreg Roach     */
17999219296aSGreg Roach    public function youngestMotherName(): string
18009219296aSGreg Roach    {
1801f78da678SGreg Roach        return $this->family_repository->youngestMotherName();
18029219296aSGreg Roach    }
18039219296aSGreg Roach
18049219296aSGreg Roach    /**
18050dcd9387SGreg Roach     * @param string $show_years
18060dcd9387SGreg Roach     *
18070dcd9387SGreg Roach     * @return string
18089219296aSGreg Roach     */
18099219296aSGreg Roach    public function youngestMotherAge(string $show_years = ''): string
18109219296aSGreg Roach    {
1811f78da678SGreg Roach        return $this->family_repository->youngestMotherAge($show_years);
18129219296aSGreg Roach    }
18139219296aSGreg Roach
18149219296aSGreg Roach    /**
18150dcd9387SGreg Roach     * @return string
18169219296aSGreg Roach     */
18179219296aSGreg Roach    public function oldestMother(): string
18189219296aSGreg Roach    {
1819f78da678SGreg Roach        return $this->family_repository->oldestMother();
18209219296aSGreg Roach    }
18219219296aSGreg Roach
18229219296aSGreg Roach    /**
18230dcd9387SGreg Roach     * @return string
18249219296aSGreg Roach     */
18259219296aSGreg Roach    public function oldestMotherName(): string
18269219296aSGreg Roach    {
1827f78da678SGreg Roach        return $this->family_repository->oldestMotherName();
18289219296aSGreg Roach    }
18299219296aSGreg Roach
18309219296aSGreg Roach    /**
18310dcd9387SGreg Roach     * @param string $show_years
18320dcd9387SGreg Roach     *
18330dcd9387SGreg Roach     * @return string
18349219296aSGreg Roach     */
18359219296aSGreg Roach    public function oldestMotherAge(string $show_years = ''): string
18369219296aSGreg Roach    {
1837f78da678SGreg Roach        return $this->family_repository->oldestMotherAge($show_years);
18389219296aSGreg Roach    }
18399219296aSGreg Roach
18409219296aSGreg Roach    /**
18410dcd9387SGreg Roach     * @return string
18429219296aSGreg Roach     */
18439219296aSGreg Roach    public function youngestFather(): string
18449219296aSGreg Roach    {
1845f78da678SGreg Roach        return $this->family_repository->youngestFather();
18469219296aSGreg Roach    }
18479219296aSGreg Roach
18489219296aSGreg Roach    /**
18490dcd9387SGreg Roach     * @return string
18509219296aSGreg Roach     */
18519219296aSGreg Roach    public function youngestFatherName(): string
18529219296aSGreg Roach    {
1853f78da678SGreg Roach        return $this->family_repository->youngestFatherName();
18549219296aSGreg Roach    }
18559219296aSGreg Roach
18569219296aSGreg Roach    /**
18570dcd9387SGreg Roach     * @param string $show_years
18580dcd9387SGreg Roach     *
18590dcd9387SGreg Roach     * @return string
18609219296aSGreg Roach     */
18619219296aSGreg Roach    public function youngestFatherAge(string $show_years = ''): string
18629219296aSGreg Roach    {
1863f78da678SGreg Roach        return $this->family_repository->youngestFatherAge($show_years);
18649219296aSGreg Roach    }
18659219296aSGreg Roach
18669219296aSGreg Roach    /**
18670dcd9387SGreg Roach     * @return string
18689219296aSGreg Roach     */
18699219296aSGreg Roach    public function oldestFather(): string
18709219296aSGreg Roach    {
1871f78da678SGreg Roach        return $this->family_repository->oldestFather();
18729219296aSGreg Roach    }
18739219296aSGreg Roach
18749219296aSGreg Roach    /**
18750dcd9387SGreg Roach     * @return string
18769219296aSGreg Roach     */
18779219296aSGreg Roach    public function oldestFatherName(): string
18789219296aSGreg Roach    {
1879f78da678SGreg Roach        return $this->family_repository->oldestFatherName();
18809219296aSGreg Roach    }
18819219296aSGreg Roach
18829219296aSGreg Roach    /**
18830dcd9387SGreg Roach     * @param string $show_years
18840dcd9387SGreg Roach     *
18850dcd9387SGreg Roach     * @return string
18869219296aSGreg Roach     */
18879219296aSGreg Roach    public function oldestFatherAge(string $show_years = ''): string
18889219296aSGreg Roach    {
1889f78da678SGreg Roach        return $this->family_repository->oldestFatherAge($show_years);
18909219296aSGreg Roach    }
18919219296aSGreg Roach
18929219296aSGreg Roach    /**
18930dcd9387SGreg Roach     * @return string
18949219296aSGreg Roach     */
18959219296aSGreg Roach    public function totalMarriedMales(): string
18969219296aSGreg Roach    {
1897f78da678SGreg Roach        return $this->family_repository->totalMarriedMales();
18989219296aSGreg Roach    }
18999219296aSGreg Roach
19009219296aSGreg Roach    /**
19010dcd9387SGreg Roach     * @return string
19029219296aSGreg Roach     */
19039219296aSGreg Roach    public function totalMarriedFemales(): string
19049219296aSGreg Roach    {
1905f78da678SGreg Roach        return $this->family_repository->totalMarriedFemales();
19069219296aSGreg Roach    }
19079219296aSGreg Roach
19089219296aSGreg Roach    /**
19090dcd9387SGreg Roach     * @param int $year1
19100dcd9387SGreg Roach     * @param int $year2
19110dcd9387SGreg Roach     *
19120dcd9387SGreg Roach     * @return Builder
19139219296aSGreg Roach     */
1914999da590SGreg Roach    public function monthFirstChildQuery(int $year1 = -1, int $year2 = -1): Builder
19159219296aSGreg Roach    {
1916f78da678SGreg Roach        return $this->family_repository->monthFirstChildQuery($year1, $year2);
1917999da590SGreg Roach    }
1918999da590SGreg Roach
1919999da590SGreg Roach    /**
19200dcd9387SGreg Roach     * @param int $year1
19210dcd9387SGreg Roach     * @param int $year2
19220dcd9387SGreg Roach     *
19230dcd9387SGreg Roach     * @return Builder
1924999da590SGreg Roach     */
1925999da590SGreg Roach    public function monthFirstChildBySexQuery(int $year1 = -1, int $year2 = -1): Builder
1926999da590SGreg Roach    {
1927f78da678SGreg Roach        return $this->family_repository->monthFirstChildBySexQuery($year1, $year2);
19289219296aSGreg Roach    }
19299219296aSGreg Roach
19309219296aSGreg Roach    /**
19310dcd9387SGreg Roach     * @return string
19329219296aSGreg Roach     */
19339219296aSGreg Roach    public function largestFamily(): string
19349219296aSGreg Roach    {
1935f78da678SGreg Roach        return $this->family_repository->largestFamily();
19369219296aSGreg Roach    }
19379219296aSGreg Roach
19389219296aSGreg Roach    /**
19390dcd9387SGreg Roach     * @return string
19409219296aSGreg Roach     */
19419219296aSGreg Roach    public function largestFamilySize(): string
19429219296aSGreg Roach    {
1943f78da678SGreg Roach        return $this->family_repository->largestFamilySize();
19449219296aSGreg Roach    }
19459219296aSGreg Roach
19469219296aSGreg Roach    /**
19470dcd9387SGreg Roach     * @return string
19489219296aSGreg Roach     */
19499219296aSGreg Roach    public function largestFamilyName(): string
19509219296aSGreg Roach    {
1951f78da678SGreg Roach        return $this->family_repository->largestFamilyName();
19529219296aSGreg Roach    }
19539219296aSGreg Roach
19549219296aSGreg Roach    /**
19550dcd9387SGreg Roach     * @param string $total
19560dcd9387SGreg Roach     *
19570dcd9387SGreg Roach     * @return string
19589219296aSGreg Roach     */
19599219296aSGreg Roach    public function topTenLargestFamily(string $total = '10'): string
19609219296aSGreg Roach    {
1961f78da678SGreg Roach        return $this->family_repository->topTenLargestFamily((int) $total);
19629219296aSGreg Roach    }
19639219296aSGreg Roach
19649219296aSGreg Roach    /**
19650dcd9387SGreg Roach     * @param string $total
19660dcd9387SGreg Roach     *
19670dcd9387SGreg Roach     * @return string
19689219296aSGreg Roach     */
19699219296aSGreg Roach    public function topTenLargestFamilyList(string $total = '10'): string
19709219296aSGreg Roach    {
1971f78da678SGreg Roach        return $this->family_repository->topTenLargestFamilyList((int) $total);
19729219296aSGreg Roach    }
19739219296aSGreg Roach
19749219296aSGreg Roach    /**
19750dcd9387SGreg Roach     * @param string|null $color_from
19760dcd9387SGreg Roach     * @param string|null $color_to
19770dcd9387SGreg Roach     * @param string      $total
19780dcd9387SGreg Roach     *
19790dcd9387SGreg Roach     * @return string
19809219296aSGreg Roach     */
19819219296aSGreg Roach    public function chartLargestFamilies(
19829219296aSGreg Roach        string $color_from = null,
19839219296aSGreg Roach        string $color_to = null,
19849219296aSGreg Roach        string $total = '10'
1985c81b7bf1SGreg Roach    ): string {
1986f78da678SGreg Roach        return $this->family_repository->chartLargestFamilies($color_from, $color_to, (int) $total);
19879219296aSGreg Roach    }
19889219296aSGreg Roach
19899219296aSGreg Roach    /**
19900dcd9387SGreg Roach     * @return string
19919219296aSGreg Roach     */
19929219296aSGreg Roach    public function totalChildren(): string
19939219296aSGreg Roach    {
1994f78da678SGreg Roach        return $this->family_repository->totalChildren();
19959219296aSGreg Roach    }
19969219296aSGreg Roach
19979219296aSGreg Roach    /**
19980dcd9387SGreg Roach     * @return string
19999219296aSGreg Roach     */
20009219296aSGreg Roach    public function averageChildren(): string
20019219296aSGreg Roach    {
2002f78da678SGreg Roach        return $this->family_repository->averageChildren();
20039219296aSGreg Roach    }
20049219296aSGreg Roach
20059219296aSGreg Roach    /**
20060dcd9387SGreg Roach     * @param int $year1
20070dcd9387SGreg Roach     * @param int $year2
20080dcd9387SGreg Roach     *
20090dcd9387SGreg Roach     * @return array
20109219296aSGreg Roach     */
2011b1126ab4SGreg Roach    public function statsChildrenQuery(int $year1 = -1, int $year2 = -1): array
20129219296aSGreg Roach    {
2013f78da678SGreg Roach        return $this->family_repository->statsChildrenQuery($year1, $year2);
20149219296aSGreg Roach    }
20159219296aSGreg Roach
20169219296aSGreg Roach    /**
20170dcd9387SGreg Roach     * @return string
20189219296aSGreg Roach     */
2019cde1d378SGreg Roach    public function statsChildren(): string
20209219296aSGreg Roach    {
2021f78da678SGreg Roach        return $this->family_repository->statsChildren();
20229219296aSGreg Roach    }
20239219296aSGreg Roach
20249219296aSGreg Roach    /**
20250dcd9387SGreg Roach     * @param string $total
20260dcd9387SGreg Roach     *
20270dcd9387SGreg Roach     * @return string
20289219296aSGreg Roach     */
20299219296aSGreg Roach    public function topAgeBetweenSiblingsName(string $total = '10'): string
20309219296aSGreg Roach    {
2031f78da678SGreg Roach        return $this->family_repository->topAgeBetweenSiblingsName((int) $total);
20329219296aSGreg Roach    }
20339219296aSGreg Roach
20349219296aSGreg Roach    /**
20350dcd9387SGreg Roach     * @param string $total
20360dcd9387SGreg Roach     *
20370dcd9387SGreg Roach     * @return string
20389219296aSGreg Roach     */
20399219296aSGreg Roach    public function topAgeBetweenSiblings(string $total = '10'): string
20409219296aSGreg Roach    {
2041f78da678SGreg Roach        return $this->family_repository->topAgeBetweenSiblings((int) $total);
20429219296aSGreg Roach    }
20439219296aSGreg Roach
20449219296aSGreg Roach    /**
20450dcd9387SGreg Roach     * @param string $total
20460dcd9387SGreg Roach     *
20470dcd9387SGreg Roach     * @return string
20489219296aSGreg Roach     */
20499219296aSGreg Roach    public function topAgeBetweenSiblingsFullName(string $total = '10'): string
20509219296aSGreg Roach    {
2051f78da678SGreg Roach        return $this->family_repository->topAgeBetweenSiblingsFullName((int) $total);
20529219296aSGreg Roach    }
20539219296aSGreg Roach
20549219296aSGreg Roach    /**
20550dcd9387SGreg Roach     * @param string $total
20560dcd9387SGreg Roach     * @param string $one
20570dcd9387SGreg Roach     *
20580dcd9387SGreg Roach     * @return string
20599219296aSGreg Roach     */
20609219296aSGreg Roach    public function topAgeBetweenSiblingsList(string $total = '10', string $one = ''): string
20619219296aSGreg Roach    {
2062f78da678SGreg Roach        return $this->family_repository->topAgeBetweenSiblingsList((int) $total, $one);
20639219296aSGreg Roach    }
20649219296aSGreg Roach
20659219296aSGreg Roach    /**
20660dcd9387SGreg Roach     * @return string
20679219296aSGreg Roach     */
20689219296aSGreg Roach    public function noChildrenFamilies(): string
20699219296aSGreg Roach    {
2070f78da678SGreg Roach        return $this->family_repository->noChildrenFamilies();
20719219296aSGreg Roach    }
20729219296aSGreg Roach
20739219296aSGreg Roach    /**
20740dcd9387SGreg Roach     * @param string $type
20750dcd9387SGreg Roach     *
20760dcd9387SGreg Roach     * @return string
20779219296aSGreg Roach     */
20789219296aSGreg Roach    public function noChildrenFamiliesList(string $type = 'list'): string
20799219296aSGreg Roach    {
2080f78da678SGreg Roach        return $this->family_repository->noChildrenFamiliesList($type);
20819219296aSGreg Roach    }
20829219296aSGreg Roach
20839219296aSGreg Roach    /**
20840dcd9387SGreg Roach     * @param string $year1
20850dcd9387SGreg Roach     * @param string $year2
20860dcd9387SGreg Roach     *
20870dcd9387SGreg Roach     * @return string
20889219296aSGreg Roach     */
20899219296aSGreg Roach    public function chartNoChildrenFamilies(
20909219296aSGreg Roach        string $year1 = '-1',
20919219296aSGreg Roach        string $year2 = '-1'
2092c81b7bf1SGreg Roach    ): string {
2093f78da678SGreg Roach        return $this->family_repository->chartNoChildrenFamilies((int) $year1, (int) $year2);
20949219296aSGreg Roach    }
20959219296aSGreg Roach
20969219296aSGreg Roach    /**
20970dcd9387SGreg Roach     * @param string $total
20980dcd9387SGreg Roach     *
20990dcd9387SGreg Roach     * @return string
21009219296aSGreg Roach     */
21019219296aSGreg Roach    public function topTenLargestGrandFamily(string $total = '10'): string
21029219296aSGreg Roach    {
2103f78da678SGreg Roach        return $this->family_repository->topTenLargestGrandFamily((int) $total);
21049219296aSGreg Roach    }
21059219296aSGreg Roach
21069219296aSGreg Roach    /**
21070dcd9387SGreg Roach     * @param string $total
21080dcd9387SGreg Roach     *
21090dcd9387SGreg Roach     * @return string
21109219296aSGreg Roach     */
21119219296aSGreg Roach    public function topTenLargestGrandFamilyList(string $total = '10'): string
21129219296aSGreg Roach    {
2113f78da678SGreg Roach        return $this->family_repository->topTenLargestGrandFamilyList((int) $total);
21149219296aSGreg Roach    }
21159219296aSGreg Roach
21169219296aSGreg Roach    /**
21170dcd9387SGreg Roach     * @return string
21189219296aSGreg Roach     */
21199219296aSGreg Roach    public function getCommonSurname(): string
21209219296aSGreg Roach    {
2121f78da678SGreg Roach        return $this->individual_repository->getCommonSurname();
21229219296aSGreg Roach    }
21239219296aSGreg Roach
21249219296aSGreg Roach    /**
21250dcd9387SGreg Roach     * @param string $threshold
21260dcd9387SGreg Roach     * @param string $number_of_surnames
21270dcd9387SGreg Roach     * @param string $sorting
21280dcd9387SGreg Roach     *
21290dcd9387SGreg Roach     * @return string
21309219296aSGreg Roach     */
21319219296aSGreg Roach    public function commonSurnames(
21329219296aSGreg Roach        string $threshold = '1',
21339219296aSGreg Roach        string $number_of_surnames = '10',
21349219296aSGreg Roach        string $sorting = 'alpha'
2135c81b7bf1SGreg Roach    ): string {
2136f78da678SGreg Roach        return $this->individual_repository->commonSurnames((int) $threshold, (int) $number_of_surnames, $sorting);
21379219296aSGreg Roach    }
21389219296aSGreg Roach
21399219296aSGreg Roach    /**
21400dcd9387SGreg Roach     * @param string $threshold
21410dcd9387SGreg Roach     * @param string $number_of_surnames
21420dcd9387SGreg Roach     * @param string $sorting
21430dcd9387SGreg Roach     *
21440dcd9387SGreg Roach     * @return string
21459219296aSGreg Roach     */
21469219296aSGreg Roach    public function commonSurnamesTotals(
21479219296aSGreg Roach        string $threshold = '1',
21489219296aSGreg Roach        string $number_of_surnames = '10',
21492da2e0a6SGreg Roach        string $sorting = 'count'
2150c81b7bf1SGreg Roach    ): string {
2151f78da678SGreg Roach        return $this->individual_repository->commonSurnamesTotals((int) $threshold, (int) $number_of_surnames, $sorting);
21529219296aSGreg Roach    }
21539219296aSGreg Roach
21549219296aSGreg Roach    /**
21550dcd9387SGreg Roach     * @param string $threshold
21560dcd9387SGreg Roach     * @param string $number_of_surnames
21570dcd9387SGreg Roach     * @param string $sorting
21580dcd9387SGreg Roach     *
21590dcd9387SGreg Roach     * @return string
21609219296aSGreg Roach     */
21619219296aSGreg Roach    public function commonSurnamesList(
21629219296aSGreg Roach        string $threshold = '1',
21639219296aSGreg Roach        string $number_of_surnames = '10',
21649219296aSGreg Roach        string $sorting = 'alpha'
2165c81b7bf1SGreg Roach    ): string {
2166f78da678SGreg Roach        return $this->individual_repository->commonSurnamesList((int) $threshold, (int) $number_of_surnames, $sorting);
21679219296aSGreg Roach    }
21689219296aSGreg Roach
21699219296aSGreg Roach    /**
21700dcd9387SGreg Roach     * @param string $threshold
21710dcd9387SGreg Roach     * @param string $number_of_surnames
21720dcd9387SGreg Roach     * @param string $sorting
21730dcd9387SGreg Roach     *
21740dcd9387SGreg Roach     * @return string
21759219296aSGreg Roach     */
21769219296aSGreg Roach    public function commonSurnamesListTotals(
21779219296aSGreg Roach        string $threshold = '1',
21789219296aSGreg Roach        string $number_of_surnames = '10',
21792da2e0a6SGreg Roach        string $sorting = 'count'
2180c81b7bf1SGreg Roach    ): string {
2181f78da678SGreg Roach        return $this->individual_repository
21829219296aSGreg Roach            ->commonSurnamesListTotals((int) $threshold, (int) $number_of_surnames, $sorting);
21839219296aSGreg Roach    }
21849219296aSGreg Roach
21859219296aSGreg Roach    /**
21860dcd9387SGreg Roach     * @param string|null $color_from
21870dcd9387SGreg Roach     * @param string|null $color_to
21880dcd9387SGreg Roach     * @param string      $number_of_surnames
21890dcd9387SGreg Roach     *
21900dcd9387SGreg Roach     * @return string
21919219296aSGreg Roach     */
21929219296aSGreg Roach    public function chartCommonSurnames(
21939219296aSGreg Roach        string $color_from = null,
21949219296aSGreg Roach        string $color_to = null,
21959219296aSGreg Roach        string $number_of_surnames = '10'
2196c81b7bf1SGreg Roach    ): string {
2197f78da678SGreg Roach        return $this->individual_repository
219888de55fdSRico Sonntag            ->chartCommonSurnames($color_from, $color_to, (int) $number_of_surnames);
21999219296aSGreg Roach    }
22009219296aSGreg Roach
22019219296aSGreg Roach    /**
22020dcd9387SGreg Roach     * @param string $threshold
22030dcd9387SGreg Roach     * @param string $maxtoshow
22040dcd9387SGreg Roach     *
22050dcd9387SGreg Roach     * @return string
22069219296aSGreg Roach     */
22079219296aSGreg Roach    public function commonGiven(string $threshold = '1', string $maxtoshow = '10'): string
22089219296aSGreg Roach    {
2209f78da678SGreg Roach        return $this->individual_repository->commonGiven((int) $threshold, (int) $maxtoshow);
22109219296aSGreg Roach    }
22119219296aSGreg Roach
22129219296aSGreg Roach    /**
22130dcd9387SGreg Roach     * @param string $threshold
22140dcd9387SGreg Roach     * @param string $maxtoshow
22150dcd9387SGreg Roach     *
22160dcd9387SGreg Roach     * @return string
22179219296aSGreg Roach     */
22189219296aSGreg Roach    public function commonGivenTotals(string $threshold = '1', string $maxtoshow = '10'): string
22199219296aSGreg Roach    {
2220f78da678SGreg Roach        return $this->individual_repository->commonGivenTotals((int) $threshold, (int) $maxtoshow);
22219219296aSGreg Roach    }
22229219296aSGreg Roach
22239219296aSGreg Roach    /**
22240dcd9387SGreg Roach     * @param string $threshold
22250dcd9387SGreg Roach     * @param string $maxtoshow
22260dcd9387SGreg Roach     *
22270dcd9387SGreg Roach     * @return string
22289219296aSGreg Roach     */
22299219296aSGreg Roach    public function commonGivenList(string $threshold = '1', string $maxtoshow = '10'): string
22309219296aSGreg Roach    {
2231f78da678SGreg Roach        return $this->individual_repository->commonGivenList((int) $threshold, (int) $maxtoshow);
22329219296aSGreg Roach    }
22339219296aSGreg Roach
22349219296aSGreg Roach    /**
22350dcd9387SGreg Roach     * @param string $threshold
22360dcd9387SGreg Roach     * @param string $maxtoshow
22370dcd9387SGreg Roach     *
22380dcd9387SGreg Roach     * @return string
22399219296aSGreg Roach     */
22409219296aSGreg Roach    public function commonGivenListTotals(string $threshold = '1', string $maxtoshow = '10'): string
22419219296aSGreg Roach    {
2242f78da678SGreg Roach        return $this->individual_repository->commonGivenListTotals((int) $threshold, (int) $maxtoshow);
22439219296aSGreg Roach    }
22449219296aSGreg Roach
22459219296aSGreg Roach    /**
22460dcd9387SGreg Roach     * @param string $threshold
22470dcd9387SGreg Roach     * @param string $maxtoshow
22480dcd9387SGreg Roach     *
22490dcd9387SGreg Roach     * @return string
22509219296aSGreg Roach     */
22519219296aSGreg Roach    public function commonGivenTable(string $threshold = '1', string $maxtoshow = '10'): string
22529219296aSGreg Roach    {
2253f78da678SGreg Roach        return $this->individual_repository->commonGivenTable((int) $threshold, (int) $maxtoshow);
22549219296aSGreg Roach    }
22559219296aSGreg Roach
22569219296aSGreg Roach    /**
22570dcd9387SGreg Roach     * @param string $threshold
22580dcd9387SGreg Roach     * @param string $maxtoshow
22590dcd9387SGreg Roach     *
22600dcd9387SGreg Roach     * @return string
22619219296aSGreg Roach     */
22629219296aSGreg Roach    public function commonGivenFemale(string $threshold = '1', string $maxtoshow = '10'): string
22639219296aSGreg Roach    {
2264f78da678SGreg Roach        return $this->individual_repository->commonGivenFemale((int) $threshold, (int) $maxtoshow);
22659219296aSGreg Roach    }
22669219296aSGreg Roach
22679219296aSGreg Roach    /**
22680dcd9387SGreg Roach     * @param string $threshold
22690dcd9387SGreg Roach     * @param string $maxtoshow
22700dcd9387SGreg Roach     *
22710dcd9387SGreg Roach     * @return string
22729219296aSGreg Roach     */
22739219296aSGreg Roach    public function commonGivenFemaleTotals(string $threshold = '1', string $maxtoshow = '10'): string
22749219296aSGreg Roach    {
2275f78da678SGreg Roach        return $this->individual_repository->commonGivenFemaleTotals((int) $threshold, (int) $maxtoshow);
22769219296aSGreg Roach    }
22779219296aSGreg Roach
22789219296aSGreg Roach    /**
22790dcd9387SGreg Roach     * @param string $threshold
22800dcd9387SGreg Roach     * @param string $maxtoshow
22810dcd9387SGreg Roach     *
22820dcd9387SGreg Roach     * @return string
22839219296aSGreg Roach     */
22849219296aSGreg Roach    public function commonGivenFemaleList(string $threshold = '1', string $maxtoshow = '10'): string
22859219296aSGreg Roach    {
2286f78da678SGreg Roach        return $this->individual_repository->commonGivenFemaleList((int) $threshold, (int) $maxtoshow);
22879219296aSGreg Roach    }
22889219296aSGreg Roach
22899219296aSGreg Roach    /**
22900dcd9387SGreg Roach     * @param string $threshold
22910dcd9387SGreg Roach     * @param string $maxtoshow
22920dcd9387SGreg Roach     *
22930dcd9387SGreg Roach     * @return string
22949219296aSGreg Roach     */
22959219296aSGreg Roach    public function commonGivenFemaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string
22969219296aSGreg Roach    {
2297f78da678SGreg Roach        return $this->individual_repository->commonGivenFemaleListTotals((int) $threshold, (int) $maxtoshow);
22989219296aSGreg Roach    }
22999219296aSGreg Roach
23009219296aSGreg Roach    /**
23010dcd9387SGreg Roach     * @param string $threshold
23020dcd9387SGreg Roach     * @param string $maxtoshow
23030dcd9387SGreg Roach     *
23040dcd9387SGreg Roach     * @return string
23059219296aSGreg Roach     */
23069219296aSGreg Roach    public function commonGivenFemaleTable(string $threshold = '1', string $maxtoshow = '10'): string
23079219296aSGreg Roach    {
2308f78da678SGreg Roach        return $this->individual_repository->commonGivenFemaleTable((int) $threshold, (int) $maxtoshow);
23099219296aSGreg Roach    }
23109219296aSGreg Roach
23119219296aSGreg Roach    /**
23120dcd9387SGreg Roach     * @param string $threshold
23130dcd9387SGreg Roach     * @param string $maxtoshow
23140dcd9387SGreg Roach     *
23150dcd9387SGreg Roach     * @return string
23169219296aSGreg Roach     */
23179219296aSGreg Roach    public function commonGivenMale(string $threshold = '1', string $maxtoshow = '10'): string
23189219296aSGreg Roach    {
2319f78da678SGreg Roach        return $this->individual_repository->commonGivenMale((int) $threshold, (int) $maxtoshow);
23209219296aSGreg Roach    }
23219219296aSGreg Roach
23229219296aSGreg Roach    /**
23230dcd9387SGreg Roach     * @param string $threshold
23240dcd9387SGreg Roach     * @param string $maxtoshow
23250dcd9387SGreg Roach     *
23260dcd9387SGreg Roach     * @return string
23279219296aSGreg Roach     */
23289219296aSGreg Roach    public function commonGivenMaleTotals(string $threshold = '1', string $maxtoshow = '10'): string
23299219296aSGreg Roach    {
2330f78da678SGreg Roach        return $this->individual_repository->commonGivenMaleTotals((int) $threshold, (int) $maxtoshow);
23319219296aSGreg Roach    }
23329219296aSGreg Roach
23339219296aSGreg Roach    /**
23340dcd9387SGreg Roach     * @param string $threshold
23350dcd9387SGreg Roach     * @param string $maxtoshow
23360dcd9387SGreg Roach     *
23370dcd9387SGreg Roach     * @return string
23389219296aSGreg Roach     */
23399219296aSGreg Roach    public function commonGivenMaleList(string $threshold = '1', string $maxtoshow = '10'): string
23409219296aSGreg Roach    {
2341f78da678SGreg Roach        return $this->individual_repository->commonGivenMaleList((int) $threshold, (int) $maxtoshow);
23429219296aSGreg Roach    }
23439219296aSGreg Roach
23449219296aSGreg Roach    /**
23450dcd9387SGreg Roach     * @param string $threshold
23460dcd9387SGreg Roach     * @param string $maxtoshow
23470dcd9387SGreg Roach     *
23480dcd9387SGreg Roach     * @return string
23499219296aSGreg Roach     */
23509219296aSGreg Roach    public function commonGivenMaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string
23519219296aSGreg Roach    {
2352f78da678SGreg Roach        return $this->individual_repository->commonGivenMaleListTotals((int) $threshold, (int) $maxtoshow);
23539219296aSGreg Roach    }
23549219296aSGreg Roach
23559219296aSGreg Roach    /**
23560dcd9387SGreg Roach     * @param string $threshold
23570dcd9387SGreg Roach     * @param string $maxtoshow
23580dcd9387SGreg Roach     *
23590dcd9387SGreg Roach     * @return string
23609219296aSGreg Roach     */
23619219296aSGreg Roach    public function commonGivenMaleTable(string $threshold = '1', string $maxtoshow = '10'): string
23629219296aSGreg Roach    {
2363f78da678SGreg Roach        return $this->individual_repository->commonGivenMaleTable((int) $threshold, (int) $maxtoshow);
23649219296aSGreg Roach    }
23659219296aSGreg Roach
23669219296aSGreg Roach    /**
23670dcd9387SGreg Roach     * @param string $threshold
23680dcd9387SGreg Roach     * @param string $maxtoshow
23690dcd9387SGreg Roach     *
23700dcd9387SGreg Roach     * @return string
23719219296aSGreg Roach     */
23729219296aSGreg Roach    public function commonGivenUnknown(string $threshold = '1', string $maxtoshow = '10'): string
23739219296aSGreg Roach    {
2374f78da678SGreg Roach        return $this->individual_repository->commonGivenUnknown((int) $threshold, (int) $maxtoshow);
23759219296aSGreg Roach    }
23769219296aSGreg Roach
23779219296aSGreg Roach    /**
23780dcd9387SGreg Roach     * @param string $threshold
23790dcd9387SGreg Roach     * @param string $maxtoshow
23800dcd9387SGreg Roach     *
23810dcd9387SGreg Roach     * @return string
23829219296aSGreg Roach     */
23839219296aSGreg Roach    public function commonGivenUnknownTotals(string $threshold = '1', string $maxtoshow = '10'): string
23849219296aSGreg Roach    {
2385f78da678SGreg Roach        return $this->individual_repository->commonGivenUnknownTotals((int) $threshold, (int) $maxtoshow);
23869219296aSGreg Roach    }
23879219296aSGreg Roach
23889219296aSGreg Roach    /**
23890dcd9387SGreg Roach     * @param string $threshold
23900dcd9387SGreg Roach     * @param string $maxtoshow
23910dcd9387SGreg Roach     *
23920dcd9387SGreg Roach     * @return string
23939219296aSGreg Roach     */
23949219296aSGreg Roach    public function commonGivenUnknownList(string $threshold = '1', string $maxtoshow = '10'): string
23959219296aSGreg Roach    {
2396f78da678SGreg Roach        return $this->individual_repository->commonGivenUnknownList((int) $threshold, (int) $maxtoshow);
23979219296aSGreg Roach    }
23989219296aSGreg Roach
23999219296aSGreg Roach    /**
24000dcd9387SGreg Roach     * @param string $threshold
24010dcd9387SGreg Roach     * @param string $maxtoshow
24020dcd9387SGreg Roach     *
24030dcd9387SGreg Roach     * @return string
24049219296aSGreg Roach     */
24059219296aSGreg Roach    public function commonGivenUnknownListTotals(string $threshold = '1', string $maxtoshow = '10'): string
24069219296aSGreg Roach    {
2407f78da678SGreg Roach        return $this->individual_repository->commonGivenUnknownListTotals((int) $threshold, (int) $maxtoshow);
24089219296aSGreg Roach    }
24099219296aSGreg Roach
24109219296aSGreg Roach    /**
24110dcd9387SGreg Roach     * @param string $threshold
24120dcd9387SGreg Roach     * @param string $maxtoshow
24130dcd9387SGreg Roach     *
24140dcd9387SGreg Roach     * @return string
24159219296aSGreg Roach     */
24169219296aSGreg Roach    public function commonGivenUnknownTable(string $threshold = '1', string $maxtoshow = '10'): string
24179219296aSGreg Roach    {
2418f78da678SGreg Roach        return $this->individual_repository->commonGivenUnknownTable((int) $threshold, (int) $maxtoshow);
24199219296aSGreg Roach    }
24209219296aSGreg Roach
24219219296aSGreg Roach    /**
24220dcd9387SGreg Roach     * @param string|null $color_from
24230dcd9387SGreg Roach     * @param string|null $color_to
24240dcd9387SGreg Roach     * @param string      $maxtoshow
24250dcd9387SGreg Roach     *
24260dcd9387SGreg Roach     * @return string
24279219296aSGreg Roach     */
24289219296aSGreg Roach    public function chartCommonGiven(
24299219296aSGreg Roach        string $color_from = null,
24309219296aSGreg Roach        string $color_to = null,
24319219296aSGreg Roach        string $maxtoshow = '7'
2432c81b7bf1SGreg Roach    ): string {
2433f78da678SGreg Roach        return $this->individual_repository->chartCommonGiven($color_from, $color_to, (int) $maxtoshow);
24349219296aSGreg Roach    }
24359219296aSGreg Roach
24369219296aSGreg Roach    /**
24370dcd9387SGreg Roach     * @return string
24389219296aSGreg Roach     */
24399219296aSGreg Roach    public function usersLoggedIn(): string
24409219296aSGreg Roach    {
2441f78da678SGreg Roach        return $this->user_repository->usersLoggedIn();
24429219296aSGreg Roach    }
24439219296aSGreg Roach
24449219296aSGreg Roach    /**
24450dcd9387SGreg Roach     * @return string
24469219296aSGreg Roach     */
24479219296aSGreg Roach    public function usersLoggedInList(): string
24489219296aSGreg Roach    {
2449f78da678SGreg Roach        return $this->user_repository->usersLoggedInList();
24509219296aSGreg Roach    }
24519219296aSGreg Roach
24529219296aSGreg Roach    /**
24530dcd9387SGreg Roach     * @return int
24549219296aSGreg Roach     */
24559219296aSGreg Roach    public function usersLoggedInTotal(): int
24569219296aSGreg Roach    {
2457f78da678SGreg Roach        return $this->user_repository->usersLoggedInTotal();
24589219296aSGreg Roach    }
24599219296aSGreg Roach
24609219296aSGreg Roach    /**
24610dcd9387SGreg Roach     * @return int
24629219296aSGreg Roach     */
24639219296aSGreg Roach    public function usersLoggedInTotalAnon(): int
24649219296aSGreg Roach    {
2465f78da678SGreg Roach        return $this->user_repository->usersLoggedInTotalAnon();
24669219296aSGreg Roach    }
24679219296aSGreg Roach
24689219296aSGreg Roach    /**
24690dcd9387SGreg Roach     * @return int
24709219296aSGreg Roach     */
24719219296aSGreg Roach    public function usersLoggedInTotalVisible(): int
24729219296aSGreg Roach    {
2473f78da678SGreg Roach        return $this->user_repository->usersLoggedInTotalVisible();
24749219296aSGreg Roach    }
24759219296aSGreg Roach
24769219296aSGreg Roach    /**
24770dcd9387SGreg Roach     * @return string
24789219296aSGreg Roach     */
24799219296aSGreg Roach    public function userId(): string
24809219296aSGreg Roach    {
2481f78da678SGreg Roach        return $this->user_repository->userId();
24829219296aSGreg Roach    }
24839219296aSGreg Roach
24849219296aSGreg Roach    /**
24850dcd9387SGreg Roach     * @param string $visitor_text
24860dcd9387SGreg Roach     *
24870dcd9387SGreg Roach     * @return string
24889219296aSGreg Roach     */
24899219296aSGreg Roach    public function userName(string $visitor_text = ''): string
24909219296aSGreg Roach    {
2491f78da678SGreg Roach        return $this->user_repository->userName($visitor_text);
24929219296aSGreg Roach    }
24939219296aSGreg Roach
24949219296aSGreg Roach    /**
24950dcd9387SGreg Roach     * @return string
24969219296aSGreg Roach     */
24979219296aSGreg Roach    public function userFullName(): string
24989219296aSGreg Roach    {
2499f78da678SGreg Roach        return $this->user_repository->userFullName();
25009219296aSGreg Roach    }
25019219296aSGreg Roach
25029219296aSGreg Roach    /**
25030dcd9387SGreg Roach     * @return string
25049219296aSGreg Roach     */
25059219296aSGreg Roach    public function totalUsers(): string
25069219296aSGreg Roach    {
2507f78da678SGreg Roach        return $this->user_repository->totalUsers();
25089219296aSGreg Roach    }
25099219296aSGreg Roach
25109219296aSGreg Roach    /**
25110dcd9387SGreg Roach     * @return string
25129219296aSGreg Roach     */
25139219296aSGreg Roach    public function totalAdmins(): string
25149219296aSGreg Roach    {
2515f78da678SGreg Roach        return $this->user_repository->totalAdmins();
25169219296aSGreg Roach    }
25179219296aSGreg Roach
25189219296aSGreg Roach    /**
25190dcd9387SGreg Roach     * @return string
25209219296aSGreg Roach     */
25219219296aSGreg Roach    public function totalNonAdmins(): string
25229219296aSGreg Roach    {
2523f78da678SGreg Roach        return $this->user_repository->totalNonAdmins();
25249219296aSGreg Roach    }
25259219296aSGreg Roach
25269219296aSGreg Roach    /**
25270dcd9387SGreg Roach     * @return string
25289219296aSGreg Roach     */
25299219296aSGreg Roach    public function latestUserId(): string
25309219296aSGreg Roach    {
2531f78da678SGreg Roach        return $this->latest_user_repository->latestUserId();
25329219296aSGreg Roach    }
25339219296aSGreg Roach
25349219296aSGreg Roach    /**
25350dcd9387SGreg Roach     * @return string
25369219296aSGreg Roach     */
25379219296aSGreg Roach    public function latestUserName(): string
25389219296aSGreg Roach    {
2539f78da678SGreg Roach        return $this->latest_user_repository->latestUserName();
25409219296aSGreg Roach    }
25419219296aSGreg Roach
25429219296aSGreg Roach    /**
25430dcd9387SGreg Roach     * @return string
25449219296aSGreg Roach     */
25459219296aSGreg Roach    public function latestUserFullName(): string
25469219296aSGreg Roach    {
2547f78da678SGreg Roach        return $this->latest_user_repository->latestUserFullName();
25489219296aSGreg Roach    }
25499219296aSGreg Roach
25509219296aSGreg Roach    /**
25510dcd9387SGreg Roach     * @param string|null $format
25520dcd9387SGreg Roach     *
25530dcd9387SGreg Roach     * @return string
25549219296aSGreg Roach     */
25559219296aSGreg Roach    public function latestUserRegDate(string $format = null): string
25569219296aSGreg Roach    {
2557f78da678SGreg Roach        return $this->latest_user_repository->latestUserRegDate($format);
25589219296aSGreg Roach    }
25599219296aSGreg Roach
25609219296aSGreg Roach    /**
25610dcd9387SGreg Roach     * @param string|null $format
25620dcd9387SGreg Roach     *
25630dcd9387SGreg Roach     * @return string
25649219296aSGreg Roach     */
25659219296aSGreg Roach    public function latestUserRegTime(string $format = null): string
25669219296aSGreg Roach    {
2567f78da678SGreg Roach        return $this->latest_user_repository->latestUserRegTime($format);
25689219296aSGreg Roach    }
25699219296aSGreg Roach
25709219296aSGreg Roach    /**
25710dcd9387SGreg Roach     * @param string|null $yes
25720dcd9387SGreg Roach     * @param string|null $no
25730dcd9387SGreg Roach     *
25740dcd9387SGreg Roach     * @return string
25759219296aSGreg Roach     */
25769219296aSGreg Roach    public function latestUserLoggedin(string $yes = null, string $no = null): string
25779219296aSGreg Roach    {
2578f78da678SGreg Roach        return $this->latest_user_repository->latestUserLoggedin($yes, $no);
25799219296aSGreg Roach    }
25809219296aSGreg Roach
25819219296aSGreg Roach    /**
25820dcd9387SGreg Roach     * @return string
25839219296aSGreg Roach     */
25849219296aSGreg Roach    public function contactWebmaster(): string
25859219296aSGreg Roach    {
2586f78da678SGreg Roach        return $this->contact_repository->contactWebmaster();
25879219296aSGreg Roach    }
25889219296aSGreg Roach
25899219296aSGreg Roach    /**
25900dcd9387SGreg Roach     * @return string
25919219296aSGreg Roach     */
25929219296aSGreg Roach    public function contactGedcom(): string
25939219296aSGreg Roach    {
2594f78da678SGreg Roach        return $this->contact_repository->contactGedcom();
25959219296aSGreg Roach    }
25969219296aSGreg Roach
25979219296aSGreg Roach    /**
25980dcd9387SGreg Roach     * @return string
25999219296aSGreg Roach     */
26009219296aSGreg Roach    public function serverDate(): string
26019219296aSGreg Roach    {
2602f78da678SGreg Roach        return $this->server_repository->serverDate();
26039219296aSGreg Roach    }
26049219296aSGreg Roach
26059219296aSGreg Roach    /**
26060dcd9387SGreg Roach     * @return string
26079219296aSGreg Roach     */
26089219296aSGreg Roach    public function serverTime(): string
26099219296aSGreg Roach    {
2610f78da678SGreg Roach        return $this->server_repository->serverTime();
26119219296aSGreg Roach    }
26129219296aSGreg Roach
26139219296aSGreg Roach    /**
26140dcd9387SGreg Roach     * @return string
26159219296aSGreg Roach     */
26169219296aSGreg Roach    public function serverTime24(): string
26179219296aSGreg Roach    {
2618f78da678SGreg Roach        return $this->server_repository->serverTime24();
26199219296aSGreg Roach    }
26209219296aSGreg Roach
26219219296aSGreg Roach    /**
26229219296aSGreg Roach     * What is the timezone of the server.
26239219296aSGreg Roach     *
26249219296aSGreg Roach     * @return string
26259219296aSGreg Roach     */
26269219296aSGreg Roach    public function serverTimezone(): string
26279219296aSGreg Roach    {
2628f78da678SGreg Roach        return $this->server_repository->serverTimezone();
26299219296aSGreg Roach    }
26309219296aSGreg Roach
26319219296aSGreg Roach    /**
26320dcd9387SGreg Roach     * @return string
26339219296aSGreg Roach     */
26349219296aSGreg Roach    public function browserDate(): string
26359219296aSGreg Roach    {
2636f78da678SGreg Roach        return $this->browser_repository->browserDate();
26379219296aSGreg Roach    }
26389219296aSGreg Roach
26399219296aSGreg Roach    /**
26400dcd9387SGreg Roach     * @return string
26419219296aSGreg Roach     */
26429219296aSGreg Roach    public function browserTime(): string
26439219296aSGreg Roach    {
2644f78da678SGreg Roach        return $this->browser_repository->browserTime();
26459219296aSGreg Roach    }
26469219296aSGreg Roach
26479219296aSGreg Roach    /**
26480dcd9387SGreg Roach     * @return string
26499219296aSGreg Roach     */
26509219296aSGreg Roach    public function browserTimezone(): string
26519219296aSGreg Roach    {
2652f78da678SGreg Roach        return $this->browser_repository->browserTimezone();
26539219296aSGreg Roach    }
26549219296aSGreg Roach
26559219296aSGreg Roach    /**
26560dcd9387SGreg Roach     * @param string $page_parameter
26570dcd9387SGreg Roach     *
26580dcd9387SGreg Roach     * @return string
26599219296aSGreg Roach     */
26609219296aSGreg Roach    public function hitCount(string $page_parameter = ''): string
26619219296aSGreg Roach    {
2662f78da678SGreg Roach        return $this->hit_count_repository->hitCount($page_parameter);
26639219296aSGreg Roach    }
26649219296aSGreg Roach
26659219296aSGreg Roach    /**
26660dcd9387SGreg Roach     * @param string $page_parameter
26670dcd9387SGreg Roach     *
26680dcd9387SGreg Roach     * @return string
26699219296aSGreg Roach     */
26709219296aSGreg Roach    public function hitCountUser(string $page_parameter = ''): string
26719219296aSGreg Roach    {
2672f78da678SGreg Roach        return $this->hit_count_repository->hitCountUser($page_parameter);
26739219296aSGreg Roach    }
26749219296aSGreg Roach
26759219296aSGreg Roach    /**
26760dcd9387SGreg Roach     * @param string $page_parameter
26770dcd9387SGreg Roach     *
26780dcd9387SGreg Roach     * @return string
26799219296aSGreg Roach     */
26809219296aSGreg Roach    public function hitCountIndi(string $page_parameter = ''): string
26819219296aSGreg Roach    {
2682f78da678SGreg Roach        return $this->hit_count_repository->hitCountIndi($page_parameter);
26839219296aSGreg Roach    }
26849219296aSGreg Roach
26859219296aSGreg Roach    /**
26860dcd9387SGreg Roach     * @param string $page_parameter
26870dcd9387SGreg Roach     *
26880dcd9387SGreg Roach     * @return string
26899219296aSGreg Roach     */
26909219296aSGreg Roach    public function hitCountFam(string $page_parameter = ''): string
26919219296aSGreg Roach    {
2692f78da678SGreg Roach        return $this->hit_count_repository->hitCountFam($page_parameter);
26939219296aSGreg Roach    }
26949219296aSGreg Roach
26959219296aSGreg Roach    /**
26960dcd9387SGreg Roach     * @param string $page_parameter
26970dcd9387SGreg Roach     *
26980dcd9387SGreg Roach     * @return string
26999219296aSGreg Roach     */
27009219296aSGreg Roach    public function hitCountSour(string $page_parameter = ''): string
27019219296aSGreg Roach    {
2702f78da678SGreg Roach        return $this->hit_count_repository->hitCountSour($page_parameter);
27039219296aSGreg Roach    }
27049219296aSGreg Roach
27059219296aSGreg Roach    /**
27060dcd9387SGreg Roach     * @param string $page_parameter
27070dcd9387SGreg Roach     *
27080dcd9387SGreg Roach     * @return string
27099219296aSGreg Roach     */
27109219296aSGreg Roach    public function hitCountRepo(string $page_parameter = ''): string
27119219296aSGreg Roach    {
2712f78da678SGreg Roach        return $this->hit_count_repository->hitCountRepo($page_parameter);
27139219296aSGreg Roach    }
27149219296aSGreg Roach
27159219296aSGreg Roach    /**
27160dcd9387SGreg Roach     * @param string $page_parameter
27170dcd9387SGreg Roach     *
27180dcd9387SGreg Roach     * @return string
27199219296aSGreg Roach     */
27209219296aSGreg Roach    public function hitCountNote(string $page_parameter = ''): string
27219219296aSGreg Roach    {
2722f78da678SGreg Roach        return $this->hit_count_repository->hitCountNote($page_parameter);
27239219296aSGreg Roach    }
27249219296aSGreg Roach
27259219296aSGreg Roach    /**
27260dcd9387SGreg Roach     * @param string $page_parameter
27270dcd9387SGreg Roach     *
27280dcd9387SGreg Roach     * @return string
27299219296aSGreg Roach     */
27309219296aSGreg Roach    public function hitCountObje(string $page_parameter = ''): string
27319219296aSGreg Roach    {
2732f78da678SGreg Roach        return $this->hit_count_repository->hitCountObje($page_parameter);
27339219296aSGreg Roach    }
27349219296aSGreg Roach
27359219296aSGreg Roach    /**
27360dcd9387SGreg Roach     * @return string
27379219296aSGreg Roach     */
27389219296aSGreg Roach    public function gedcomFavorites(): string
27399219296aSGreg Roach    {
2740f78da678SGreg Roach        return $this->favorites_repository->gedcomFavorites();
27419219296aSGreg Roach    }
27429219296aSGreg Roach
27439219296aSGreg Roach    /**
27440dcd9387SGreg Roach     * @return string
27459219296aSGreg Roach     */
27469219296aSGreg Roach    public function userFavorites(): string
27479219296aSGreg Roach    {
2748f78da678SGreg Roach        return $this->favorites_repository->userFavorites();
27499219296aSGreg Roach    }
27509219296aSGreg Roach
27519219296aSGreg Roach    /**
27520dcd9387SGreg Roach     * @return string
27539219296aSGreg Roach     */
27549219296aSGreg Roach    public function totalGedcomFavorites(): string
27559219296aSGreg Roach    {
2756f78da678SGreg Roach        return $this->favorites_repository->totalGedcomFavorites();
27579219296aSGreg Roach    }
27589219296aSGreg Roach
27599219296aSGreg Roach    /**
27600dcd9387SGreg Roach     * @return string
27619219296aSGreg Roach     */
27629219296aSGreg Roach    public function totalUserFavorites(): string
27639219296aSGreg Roach    {
2764f78da678SGreg Roach        return $this->favorites_repository->totalUserFavorites();
27659219296aSGreg Roach    }
27669219296aSGreg Roach
27679219296aSGreg Roach    /**
27680dcd9387SGreg Roach     * @return string
27699219296aSGreg Roach     */
27709219296aSGreg Roach    public function totalUserMessages(): string
27719219296aSGreg Roach    {
2772f78da678SGreg Roach        return $this->message_repository->totalUserMessages();
27739219296aSGreg Roach    }
27749219296aSGreg Roach
27759219296aSGreg Roach    /**
27760dcd9387SGreg Roach     * @return string
27779219296aSGreg Roach     */
27789219296aSGreg Roach    public function totalUserJournal(): string
27799219296aSGreg Roach    {
2780f78da678SGreg Roach        return $this->news_repository->totalUserJournal();
27819219296aSGreg Roach    }
27829219296aSGreg Roach
27839219296aSGreg Roach    /**
27840dcd9387SGreg Roach     * @return string
27859219296aSGreg Roach     */
27869219296aSGreg Roach    public function totalGedcomNews(): string
27879219296aSGreg Roach    {
2788f78da678SGreg Roach        return $this->news_repository->totalGedcomNews();
27899219296aSGreg Roach    }
27909219296aSGreg Roach
27919219296aSGreg Roach    /**
27929219296aSGreg Roach     * Create any of the other blocks.
27939219296aSGreg Roach     * Use as #callBlock:block_name#
27949219296aSGreg Roach     *
27959219296aSGreg Roach     * @param string $block
27969219296aSGreg Roach     * @param string ...$params
27979219296aSGreg Roach     *
2798e364afe4SGreg Roach     * @return string|null
27999219296aSGreg Roach     */
28009219296aSGreg Roach    public function callBlock(string $block = '', ...$params): ?string
28019219296aSGreg Roach    {
280287cca37cSGreg Roach        /** @var ModuleBlockInterface|null $module */
2803fd9aba47SGreg Roach        $module = $this->module_service
280487cca37cSGreg Roach            ->findByComponent(ModuleBlockInterface::class, $this->tree, Auth::user())
28056c2179e2SGreg Roach            ->first(static function (ModuleInterface $module) use ($block): bool {
28069219296aSGreg Roach                return $module->name() === $block && $module->name() !== 'html';
28070797053bSGreg Roach            });
28089219296aSGreg Roach
28099219296aSGreg Roach        if ($module === null) {
28109219296aSGreg Roach            return '';
28119219296aSGreg Roach        }
28129219296aSGreg Roach
28139219296aSGreg Roach        // Build the config array
28149219296aSGreg Roach        $cfg = [];
28159219296aSGreg Roach        foreach ($params as $config) {
28169219296aSGreg Roach            $bits = explode('=', $config);
28179219296aSGreg Roach
28186ccdf4f0SGreg Roach            if (count($bits) < 2) {
28199219296aSGreg Roach                continue;
28209219296aSGreg Roach            }
28219219296aSGreg Roach
28229219296aSGreg Roach            $v       = array_shift($bits);
28239219296aSGreg Roach            $cfg[$v] = implode('=', $bits);
28249219296aSGreg Roach        }
28259219296aSGreg Roach
28263caaa4d2SGreg Roach        return $module->getBlock($this->tree, 0, ModuleBlockInterface::CONTEXT_EMBED, $cfg);
28279219296aSGreg Roach    }
28289219296aSGreg Roach
28299219296aSGreg Roach    /**
28309219296aSGreg Roach     * What is the current version of webtrees.
28319219296aSGreg Roach     *
28329219296aSGreg Roach     * @return string
28339219296aSGreg Roach     */
28349219296aSGreg Roach    public function webtreesVersion(): string
28359219296aSGreg Roach    {
28369219296aSGreg Roach        return Webtrees::VERSION;
28379219296aSGreg Roach    }
283871378461SGreg Roach
283971378461SGreg Roach    /**
284071378461SGreg Roach     * Get tags and their parsed results.
284171378461SGreg Roach     *
284271378461SGreg Roach     * @param string $text
284371378461SGreg Roach     *
284424f2a3afSGreg Roach     * @return array<string>
284571378461SGreg Roach     */
284671378461SGreg Roach    private function getTags(string $text): array
284771378461SGreg Roach    {
284871378461SGreg Roach        $tags    = [];
284971378461SGreg Roach        $matches = [];
285071378461SGreg Roach
2851b25599e6SGreg Roach        preg_match_all('/#([^#\n]+)(?=#)/', $text, $matches, PREG_SET_ORDER);
285271378461SGreg Roach
285371378461SGreg Roach        foreach ($matches as $match) {
285471378461SGreg Roach            $params = explode(':', $match[1]);
285571378461SGreg Roach            $method = array_shift($params);
285671378461SGreg Roach
285771378461SGreg Roach            if (method_exists($this, $method)) {
2858e29653ffSGreg Roach                $tags[$match[0] . '#'] = call_user_func([$this, $method], ...$params);
285971378461SGreg Roach            }
286071378461SGreg Roach        }
286171378461SGreg Roach
286271378461SGreg Roach        return $tags;
286371378461SGreg Roach    }
28649219296aSGreg Roach}
2865