diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2024-11-22 23:58:56 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2024-11-22 23:58:56 +0000 |
| commit | e873f434551745f888937263ff89e80db3b0f785 (patch) | |
| tree | c2ccdc2f7e9eb84a336dedcb75f4953fd46a6745 /tests | |
| parent | 95a8620a270e22e753770d980faee3cdf53d5566 (diff) | |
| download | webtrees-e873f434551745f888937263ff89e80db3b0f785.tar.gz webtrees-e873f434551745f888937263ff89e80db3b0f785.tar.bz2 webtrees-e873f434551745f888937263ff89e80db3b0f785.zip | |
PHP 8.3 allows class constants to have type hints
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/app/Elements/AbstractElementTestCase.php | 4 | ||||
| -rw-r--r-- | tests/app/Encodings/AnselTest.php | 6 | ||||
| -rw-r--r-- | tests/views/AbstractViewTest.php | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/app/Elements/AbstractElementTestCase.php b/tests/app/Elements/AbstractElementTestCase.php index 9db3ce4c20..2cc04be9e8 100644 --- a/tests/app/Elements/AbstractElementTestCase.php +++ b/tests/app/Elements/AbstractElementTestCase.php @@ -25,8 +25,8 @@ use Fisharebest\Webtrees\Tree; abstract class AbstractElementTestCase extends TestCase { - private const EVIL_VALUE = '<script>evil()</script>'; - private const TEST_VALUE = '01 JAN 1970'; + private const string EVIL_VALUE = '<script>evil()</script>'; + private const string TEST_VALUE = '01 JAN 1970'; protected static ElementInterface $element; diff --git a/tests/app/Encodings/AnselTest.php b/tests/app/Encodings/AnselTest.php index f788b8868c..a9be6e4bc0 100644 --- a/tests/app/Encodings/AnselTest.php +++ b/tests/app/Encodings/AnselTest.php @@ -42,7 +42,7 @@ use const PREG_SPLIT_NO_EMPTY; #[CoversClass(UTF8::class)] class AnselTest extends TestCase { - private const TEST_DATA = [ + private const array TEST_DATA = [ "\x00\x01\x02\x03\x04\x05\x06\x07" => "\x00\x01\x02\x03\x04\x05\x06\x07", "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" => "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", "\x10\x11\x12\x13\x14\x15\x16\x17" => "\x10\x11\x12\x13\x14\x15\x16\x17", @@ -78,7 +78,7 @@ class AnselTest extends TestCase 'Ȫ' => "\xE8\xE5O", ]; - private const UNPRINTABLE = [ + private const array UNPRINTABLE = [ "\x80\x81\x82\x83\x84\x85\x86\x87", "\x8A\x8B\x8C\x8F", "\x90\x91\x92\x93\x94\x95\x96\x97", @@ -92,7 +92,7 @@ class AnselTest extends TestCase "\xFC\xFD", ]; - private const MULTIPART_DIACRITIC = ["\xEC", "\xFB"]; + private const array MULTIPART_DIACRITIC = ["\xEC", "\xFB"]; public function testPreComposedCharacters(): void { diff --git a/tests/views/AbstractViewTest.php b/tests/views/AbstractViewTest.php index 07caa8cef5..2bf5331d92 100644 --- a/tests/views/AbstractViewTest.php +++ b/tests/views/AbstractViewTest.php @@ -27,7 +27,7 @@ use const LIBXML_PEDANTIC; abstract class AbstractViewTest extends TestCase { - protected const EVIL_VALUE = '<script>evil()</script>'; + protected const string EVIL_VALUE = '<script>evil()</script>'; /** * Check the view runs without error and generates valid HTML |
