@@ -52,8 +52,8 @@ |
||
52 | 52 | */ |
53 | 53 | public function chartMedia( |
54 | 54 | array $media, |
55 | - string|null $color_from = null, |
|
56 | - string|null $color_to = null |
|
55 | + string | null $color_from = null, |
|
56 | + string | null $color_to = null |
|
57 | 57 | ): string { |
58 | 58 | $color_from ??= 'ffffff'; |
59 | 59 | $color_to ??= '84beff'; |
@@ -53,8 +53,8 @@ |
||
53 | 53 | public function chartMortality( |
54 | 54 | int $tot_l, |
55 | 55 | int $tot_d, |
56 | - string|null $color_living = null, |
|
57 | - string|null $color_dead = null |
|
56 | + string | null $color_living = null, |
|
57 | + string | null $color_dead = null |
|
58 | 58 | ): string { |
59 | 59 | $color_living ??= '#ffffff'; |
60 | 60 | $color_dead ??= '#cccccc'; |
@@ -53,8 +53,8 @@ |
||
53 | 53 | public function chartCommonGiven( |
54 | 54 | int $tot_indi, |
55 | 55 | array $given, |
56 | - string|null $color_from = null, |
|
57 | - string|null $color_to = null |
|
56 | + string | null $color_from = null, |
|
57 | + string | null $color_to = null |
|
58 | 58 | ): string { |
59 | 59 | $color_from ??= 'ffffff'; |
60 | 60 | $color_to ??= '84beff'; |
@@ -42,9 +42,9 @@ |
||
42 | 42 | int $tot_m, |
43 | 43 | int $tot_f, |
44 | 44 | int $tot_u, |
45 | - string|null $color_female = null, |
|
46 | - string|null $color_male = null, |
|
47 | - string|null $color_unknown = null |
|
45 | + string | null $color_female = null, |
|
46 | + string | null $color_male = null, |
|
47 | + string | null $color_unknown = null |
|
48 | 48 | ): string { |
49 | 49 | $color_female ??= '#ffd1dc'; |
50 | 50 | $color_male ??= '#84beff'; |
@@ -53,8 +53,8 @@ |
||
53 | 53 | public function chartFamsWithSources( |
54 | 54 | int $tot_fam, |
55 | 55 | int $tot_fam_source, |
56 | - string|null $color_from = null, |
|
57 | - string|null $color_to = null |
|
56 | + string | null $color_from = null, |
|
57 | + string | null $color_to = null |
|
58 | 58 | ): string { |
59 | 59 | $color_from ??= 'ffffff'; |
60 | 60 | $color_to ??= '84beff'; |
@@ -188,8 +188,8 @@ |
||
188 | 188 | * @return string |
189 | 189 | */ |
190 | 190 | public function chartSex( |
191 | - string|null $color_female = null, |
|
192 | - string|null $color_male = null, |
|
193 | - string|null $color_unknown = null |
|
191 | + string | null $color_female = null, |
|
192 | + string | null $color_male = null, |
|
193 | + string | null $color_unknown = null |
|
194 | 194 | ): string; |
195 | 195 | } |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | * |
725 | 725 | * @return string |
726 | 726 | */ |
727 | - public function statsBirth(string|null $color_from = null, string|null $color_to = null): string |
|
727 | + public function statsBirth(string | null $color_from = null, string | null $color_to = null): string |
|
728 | 728 | { |
729 | 729 | return (new ChartBirth($this->century_service, $this->color_service, $this->tree)) |
730 | 730 | ->chartBirth($color_from, $color_to); |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | * |
783 | 783 | * @return string |
784 | 784 | */ |
785 | - public function statsDeath(string|null $color_from = null, string|null $color_to = null): string |
|
785 | + public function statsDeath(string | null $color_from = null, string | null $color_to = null): string |
|
786 | 786 | { |
787 | 787 | return (new ChartDeath($this->century_service, $this->color_service, $this->tree)) |
788 | 788 | ->chartDeath($color_from, $color_to); |
@@ -1815,8 +1815,8 @@ discard block |
||
1815 | 1815 | * @return string |
1816 | 1816 | */ |
1817 | 1817 | public function chartCommonGiven( |
1818 | - string|null $color_from = null, |
|
1819 | - string|null $color_to = null, |
|
1818 | + string | null $color_from = null, |
|
1819 | + string | null $color_to = null, |
|
1820 | 1820 | int $maxtoshow = 7 |
1821 | 1821 | ): string { |
1822 | 1822 | $tot_indi = $this->totalIndividualsQuery(); |
@@ -1840,8 +1840,8 @@ discard block |
||
1840 | 1840 | * @return string |
1841 | 1841 | */ |
1842 | 1842 | public function chartCommonSurnames( |
1843 | - string|null $color_from = null, |
|
1844 | - string|null $color_to = null, |
|
1843 | + string | null $color_from = null, |
|
1844 | + string | null $color_to = null, |
|
1845 | 1845 | int $number_of_surnames = 10 |
1846 | 1846 | ): string { |
1847 | 1847 | $tot_indi = $this->totalIndividualsQuery(); |
@@ -1866,7 +1866,7 @@ discard block |
||
1866 | 1866 | * |
1867 | 1867 | * @return string |
1868 | 1868 | */ |
1869 | - public function chartMortality(string|null $color_living = null, string|null $color_dead = null): string |
|
1869 | + public function chartMortality(string | null $color_living = null, string | null $color_dead = null): string |
|
1870 | 1870 | { |
1871 | 1871 | $tot_l = $this->totalLivingQuery(); |
1872 | 1872 | $tot_d = $this->totalDeceasedQuery(); |
@@ -1884,8 +1884,8 @@ discard block |
||
1884 | 1884 | * @return string |
1885 | 1885 | */ |
1886 | 1886 | public function chartIndisWithSources( |
1887 | - string|null $color_from = null, |
|
1888 | - string|null $color_to = null |
|
1887 | + string | null $color_from = null, |
|
1888 | + string | null $color_to = null |
|
1889 | 1889 | ): string { |
1890 | 1890 | $tot_indi = $this->totalIndividualsQuery(); |
1891 | 1891 | $tot_indi_source = $this->totalIndisWithSourcesQuery(); |
@@ -1903,8 +1903,8 @@ discard block |
||
1903 | 1903 | * @return string |
1904 | 1904 | */ |
1905 | 1905 | public function chartFamsWithSources( |
1906 | - string|null $color_from = null, |
|
1907 | - string|null $color_to = null |
|
1906 | + string | null $color_from = null, |
|
1907 | + string | null $color_to = null |
|
1908 | 1908 | ): string { |
1909 | 1909 | $tot_fam = $this->totalFamiliesQuery(); |
1910 | 1910 | $tot_fam_source = $this->totalFamsWithSourcesQuery(); |
@@ -1921,9 +1921,9 @@ discard block |
||
1921 | 1921 | * @return string |
1922 | 1922 | */ |
1923 | 1923 | public function chartSex( |
1924 | - string|null $color_female = null, |
|
1925 | - string|null $color_male = null, |
|
1926 | - string|null $color_unknown = null |
|
1924 | + string | null $color_female = null, |
|
1925 | + string | null $color_male = null, |
|
1926 | + string | null $color_unknown = null |
|
1927 | 1927 | ): string { |
1928 | 1928 | $tot_m = $this->totalSexMalesQuery(); |
1929 | 1929 | $tot_f = $this->totalSexFemalesQuery(); |
@@ -385,7 +385,7 @@ |
||
385 | 385 | */ |
386 | 386 | private function filterActiveBlocks(Collection $blocks, Collection $active_blocks): Collection |
387 | 387 | { |
388 | - return $blocks->map(static fn (string $block_name): ModuleBlockInterface|null => $active_blocks->filter(static fn (ModuleInterface $block): bool => $block->name() === $block_name)->first()) |
|
388 | + return $blocks->map(static fn (string $block_name): ModuleBlockInterface | null => $active_blocks->filter(static fn (ModuleInterface $block): bool => $block->name() === $block_name)->first()) |
|
389 | 389 | ->filter(); |
390 | 390 | } |
391 | 391 | } |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | |
697 | 697 | return strlen($module_name) <= 30; |
698 | 698 | }) |
699 | - ->map(static function (string $filename): ModuleCustomInterface|null { |
|
699 | + ->map(static function (string $filename): ModuleCustomInterface | null { |
|
700 | 700 | $module = self::load($filename); |
701 | 701 | |
702 | 702 | if ($module instanceof ModuleCustomInterface) { |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | /** |
715 | 715 | * Load a custom module in a static scope, to prevent it from modifying local or object variables. |
716 | 716 | */ |
717 | - private static function load(string $filename): ModuleInterface|null |
|
717 | + private static function load(string $filename): ModuleInterface | null |
|
718 | 718 | { |
719 | 719 | try { |
720 | 720 | return include $filename; |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | /** |
827 | 827 | * Find a specified module, if it is currently active. |
828 | 828 | */ |
829 | - public function findByName(string $module_name, bool $include_disabled = false): ModuleInterface|null |
|
829 | + public function findByName(string $module_name, bool $include_disabled = false): ModuleInterface | null |
|
830 | 830 | { |
831 | 831 | return $this->all($include_disabled) |
832 | 832 | ->first(static fn (ModuleInterface $module): bool => $module->name() === $module_name); |