summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2024-03-26 13:50:49 +0000
committerGreg Roach <greg@subaqua.co.uk>2024-03-31 17:33:19 +0100
commitb50dba3a86d260384d07c30bedf82d8e78ab49f7 (patch)
tree08d09731059dce1e80a1c6e5016fd79520605334
parentd63ebb6fbc1a881a0fa67833b6abac71c67a31c5 (diff)
downloadwebtrees-b50dba3a86d260384d07c30bedf82d8e78ab49f7.tar.gz
webtrees-b50dba3a86d260384d07c30bedf82d8e78ab49f7.tar.bz2
webtrees-b50dba3a86d260384d07c30bedf82d8e78ab49f7.zip
PHP 8.4 compatibility
-rw-r--r--app/Statistics.php6
-rw-r--r--app/Statistics/Google/ChartCommonGiven.php2
-rw-r--r--app/Statistics/Google/ChartCommonSurname.php2
-rw-r--r--app/Statistics/Google/ChartFamilyWithSources.php2
-rw-r--r--app/Statistics/Google/ChartIndividualWithSources.php2
-rw-r--r--app/Statistics/Google/ChartMedia.php2
-rw-r--r--app/Statistics/Google/ChartMortality.php2
-rw-r--r--app/Statistics/Google/ChartSex.php2
-rw-r--r--app/Statistics/Repository/IndividualRepository.php6
-rw-r--r--app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php2
-rw-r--r--tests/app/Http/RequestHandlers/MapDataImportActionTest.php1
-rw-r--r--tests/app/Module/AhnentafelReportModuleTest.php1
-rw-r--r--tests/app/Module/BirthReportModuleTest.php1
-rw-r--r--tests/app/Module/CemeteryReportModuleTest.php1
-rw-r--r--tests/app/Module/ChangeReportModuleTest.php1
-rw-r--r--tests/app/Module/DeathReportModuleTest.php1
-rw-r--r--tests/app/Module/DescendancyReportModuleTest.php1
-rw-r--r--tests/app/Module/FactSourcesReportModuleTest.php1
-rw-r--r--tests/app/Module/FamilyGroupReportModuleTest.php1
-rw-r--r--tests/app/Module/IndividualFamiliesReportModuleTest.php1
-rw-r--r--tests/app/Services/EmailServiceTest.php2
-rw-r--r--tests/app/Services/RateLimitServiceTest.php1
-rw-r--r--tests/app/WebtreesTest.php2
-rw-r--r--tests/feature/IndividualListTest.php1
-rw-r--r--tests/feature/RelationshipNamesTest.php1
25 files changed, 14 insertions, 31 deletions
diff --git a/app/Statistics.php b/app/Statistics.php
index 8117d8ddc2..813c33724b 100644
--- a/app/Statistics.php
+++ b/app/Statistics.php
@@ -317,7 +317,7 @@ class Statistics implements
*/
public function chartIndisWithSources(
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
return $this->individual_repository->chartIndisWithSources($color_from, $color_to);
}
@@ -370,7 +370,7 @@ class Statistics implements
*/
public function chartFamsWithSources(
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
return $this->individual_repository->chartFamsWithSources($color_from, $color_to);
}
@@ -583,7 +583,7 @@ class Statistics implements
public function chartSex(
string|null $color_female = null,
string|null $color_male = null,
- string $color_unknown = null
+ string|null $color_unknown = null
): string {
return $this->individual_repository->chartSex($color_female, $color_male, $color_unknown);
}
diff --git a/app/Statistics/Google/ChartCommonGiven.php b/app/Statistics/Google/ChartCommonGiven.php
index 3e032b6617..728867ffa7 100644
--- a/app/Statistics/Google/ChartCommonGiven.php
+++ b/app/Statistics/Google/ChartCommonGiven.php
@@ -54,7 +54,7 @@ class ChartCommonGiven
int $tot_indi,
array $given,
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$color_from ??= 'ffffff';
$color_to ??= '84beff';
diff --git a/app/Statistics/Google/ChartCommonSurname.php b/app/Statistics/Google/ChartCommonSurname.php
index 69566aa620..9797a34249 100644
--- a/app/Statistics/Google/ChartCommonSurname.php
+++ b/app/Statistics/Google/ChartCommonSurname.php
@@ -112,7 +112,7 @@ class ChartCommonSurname
int $tot_indi,
array $all_surnames,
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$color_from ??= 'ffffff';
$color_to ??= '84beff';
diff --git a/app/Statistics/Google/ChartFamilyWithSources.php b/app/Statistics/Google/ChartFamilyWithSources.php
index 09683e5cd4..306de9b0e7 100644
--- a/app/Statistics/Google/ChartFamilyWithSources.php
+++ b/app/Statistics/Google/ChartFamilyWithSources.php
@@ -54,7 +54,7 @@ class ChartFamilyWithSources
int $tot_fam,
int $tot_fam_source,
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$color_from ??= 'ffffff';
$color_to ??= '84beff';
diff --git a/app/Statistics/Google/ChartIndividualWithSources.php b/app/Statistics/Google/ChartIndividualWithSources.php
index a3f0da9d79..2b1f459d46 100644
--- a/app/Statistics/Google/ChartIndividualWithSources.php
+++ b/app/Statistics/Google/ChartIndividualWithSources.php
@@ -54,7 +54,7 @@ class ChartIndividualWithSources
int $tot_indi,
int $tot_indi_source,
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$color_from ??= 'ffffff';
$color_to ??= '84beff';
diff --git a/app/Statistics/Google/ChartMedia.php b/app/Statistics/Google/ChartMedia.php
index 0f1570cdd5..087c979770 100644
--- a/app/Statistics/Google/ChartMedia.php
+++ b/app/Statistics/Google/ChartMedia.php
@@ -53,7 +53,7 @@ class ChartMedia
public function chartMedia(
array $media,
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$color_from ??= 'ffffff';
$color_to ??= '84beff';
diff --git a/app/Statistics/Google/ChartMortality.php b/app/Statistics/Google/ChartMortality.php
index 5763a3d272..2ce4acecb4 100644
--- a/app/Statistics/Google/ChartMortality.php
+++ b/app/Statistics/Google/ChartMortality.php
@@ -54,7 +54,7 @@ class ChartMortality
int $tot_l,
int $tot_d,
string|null $color_living = null,
- string $color_dead = null
+ string|null $color_dead = null
): string {
$color_living ??= '#ffffff';
$color_dead ??= '#cccccc';
diff --git a/app/Statistics/Google/ChartSex.php b/app/Statistics/Google/ChartSex.php
index a92ee9c66e..3599b3e467 100644
--- a/app/Statistics/Google/ChartSex.php
+++ b/app/Statistics/Google/ChartSex.php
@@ -44,7 +44,7 @@ class ChartSex
int $tot_u,
string|null $color_female = null,
string|null $color_male = null,
- string $color_unknown = null
+ string|null $color_unknown = null
): string {
$color_female ??= '#ffd1dc';
$color_male ??= '#84beff';
diff --git a/app/Statistics/Repository/IndividualRepository.php b/app/Statistics/Repository/IndividualRepository.php
index 9507310437..8cf7e04e7d 100644
--- a/app/Statistics/Repository/IndividualRepository.php
+++ b/app/Statistics/Repository/IndividualRepository.php
@@ -1885,7 +1885,7 @@ class IndividualRepository implements IndividualRepositoryInterface
*/
public function chartIndisWithSources(
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$tot_indi = $this->totalIndividualsQuery();
$tot_indi_source = $this->totalIndisWithSourcesQuery();
@@ -1904,7 +1904,7 @@ class IndividualRepository implements IndividualRepositoryInterface
*/
public function chartFamsWithSources(
string|null $color_from = null,
- string $color_to = null
+ string|null $color_to = null
): string {
$tot_fam = $this->totalFamiliesQuery();
$tot_fam_source = $this->totalFamsWithSourcesQuery();
@@ -1923,7 +1923,7 @@ class IndividualRepository implements IndividualRepositoryInterface
public function chartSex(
string|null $color_female = null,
string|null $color_male = null,
- string $color_unknown = null
+ string|null $color_unknown = null
): string {
$tot_m = $this->totalSexMalesQuery();
$tot_f = $this->totalSexFemalesQuery();
diff --git a/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php b/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php
index 1fc49d097f..48120b751f 100644
--- a/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php
+++ b/app/Statistics/Repository/Interfaces/IndividualRepositoryInterface.php
@@ -190,6 +190,6 @@ interface IndividualRepositoryInterface
public function chartSex(
string|null $color_female = null,
string|null $color_male = null,
- string $color_unknown = null
+ string|null $color_unknown = null
): string;
}
diff --git a/tests/app/Http/RequestHandlers/MapDataImportActionTest.php b/tests/app/Http/RequestHandlers/MapDataImportActionTest.php
index f945830fbd..38f0d91151 100644
--- a/tests/app/Http/RequestHandlers/MapDataImportActionTest.php
+++ b/tests/app/Http/RequestHandlers/MapDataImportActionTest.php
@@ -23,7 +23,6 @@ use Fig\Http\Message\RequestMethodInterface;
use Fig\Http\Message\StatusCodeInterface;
use Fisharebest\Webtrees\TestCase;
use Nyholm\Psr7\Factory\Psr17Factory;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function dirname;
diff --git a/tests/app/Module/AhnentafelReportModuleTest.php b/tests/app/Module/AhnentafelReportModuleTest.php
index f920125395..77bd42139e 100644
--- a/tests/app/Module/AhnentafelReportModuleTest.php
+++ b/tests/app/Module/AhnentafelReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/BirthReportModuleTest.php b/tests/app/Module/BirthReportModuleTest.php
index 8d47508144..f9330900b3 100644
--- a/tests/app/Module/BirthReportModuleTest.php
+++ b/tests/app/Module/BirthReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/CemeteryReportModuleTest.php b/tests/app/Module/CemeteryReportModuleTest.php
index 2020217df3..746de28eef 100644
--- a/tests/app/Module/CemeteryReportModuleTest.php
+++ b/tests/app/Module/CemeteryReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/ChangeReportModuleTest.php b/tests/app/Module/ChangeReportModuleTest.php
index c13fae1286..9e32b0c3e4 100644
--- a/tests/app/Module/ChangeReportModuleTest.php
+++ b/tests/app/Module/ChangeReportModuleTest.php
@@ -51,7 +51,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/DeathReportModuleTest.php b/tests/app/Module/DeathReportModuleTest.php
index 99b7e30fce..71eb72875a 100644
--- a/tests/app/Module/DeathReportModuleTest.php
+++ b/tests/app/Module/DeathReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php
index fbcb003fe3..6909aa5a42 100644
--- a/tests/app/Module/DescendancyReportModuleTest.php
+++ b/tests/app/Module/DescendancyReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/FactSourcesReportModuleTest.php b/tests/app/Module/FactSourcesReportModuleTest.php
index 140962c3a4..9c2b790757 100644
--- a/tests/app/Module/FactSourcesReportModuleTest.php
+++ b/tests/app/Module/FactSourcesReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/FamilyGroupReportModuleTest.php b/tests/app/Module/FamilyGroupReportModuleTest.php
index 84e71166f9..7781ce89c3 100644
--- a/tests/app/Module/FamilyGroupReportModuleTest.php
+++ b/tests/app/Module/FamilyGroupReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Module/IndividualFamiliesReportModuleTest.php b/tests/app/Module/IndividualFamiliesReportModuleTest.php
index e61b59777f..d1f6b91a47 100644
--- a/tests/app/Module/IndividualFamiliesReportModuleTest.php
+++ b/tests/app/Module/IndividualFamiliesReportModuleTest.php
@@ -50,7 +50,6 @@ use Fisharebest\Webtrees\Report\ReportPdfTextBox;
use Fisharebest\Webtrees\Report\TcpdfWrapper;
use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function ob_get_clean;
diff --git a/tests/app/Services/EmailServiceTest.php b/tests/app/Services/EmailServiceTest.php
index 55704439f9..304b87d862 100644
--- a/tests/app/Services/EmailServiceTest.php
+++ b/tests/app/Services/EmailServiceTest.php
@@ -22,9 +22,7 @@ namespace Fisharebest\Webtrees\Services;
use Fisharebest\Webtrees\Contracts\UserInterface;
use Fisharebest\Webtrees\Site;
use Fisharebest\Webtrees\TestCase;
-
use PHPUnit\Framework\Attributes\CoversClass;
-
use PHPUnit\Framework\Attributes\DataProvider;
use function function_exists;
diff --git a/tests/app/Services/RateLimitServiceTest.php b/tests/app/Services/RateLimitServiceTest.php
index 708b6a01b7..ee73cf78e6 100644
--- a/tests/app/Services/RateLimitServiceTest.php
+++ b/tests/app/Services/RateLimitServiceTest.php
@@ -23,7 +23,6 @@ use Fisharebest\Webtrees\GuestUser;
use Fisharebest\Webtrees\Http\Exceptions\HttpTooManyRequestsException;
use Fisharebest\Webtrees\TestCase;
use LogicException;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function explode;
diff --git a/tests/app/WebtreesTest.php b/tests/app/WebtreesTest.php
index d99d46a936..83b3d242f0 100644
--- a/tests/app/WebtreesTest.php
+++ b/tests/app/WebtreesTest.php
@@ -19,8 +19,6 @@ declare(strict_types=1);
namespace Fisharebest\Webtrees;
-use ErrorException;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function error_reporting;
diff --git a/tests/feature/IndividualListTest.php b/tests/feature/IndividualListTest.php
index 962cc5fbe9..dc1865d5fa 100644
--- a/tests/feature/IndividualListTest.php
+++ b/tests/feature/IndividualListTest.php
@@ -26,7 +26,6 @@ use Fisharebest\Webtrees\Module\IndividualListModule;
use Fisharebest\Webtrees\Services\GedcomImportService;
use Fisharebest\Webtrees\Services\TreeService;
use Fisharebest\Webtrees\Services\UserService;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function array_map;
diff --git a/tests/feature/RelationshipNamesTest.php b/tests/feature/RelationshipNamesTest.php
index 76913ca169..715e37f923 100644
--- a/tests/feature/RelationshipNamesTest.php
+++ b/tests/feature/RelationshipNamesTest.php
@@ -29,7 +29,6 @@ use Fisharebest\Webtrees\Module\LanguageSlovakian;
use Fisharebest\Webtrees\Module\ModuleLanguageInterface;
use Fisharebest\Webtrees\Module\ModuleLanguageTrait;
use Fisharebest\Webtrees\Services\RelationshipService;
-
use PHPUnit\Framework\Attributes\CoversClass;
use function array_reverse;