Add type hints for Laravel 10

This commit is contained in:
Shift
2024-02-16 21:13:13 +00:00
parent 8725493fcf
commit 2cb837e4b5
44 changed files with 82 additions and 79 deletions

View File

@@ -12,7 +12,7 @@ class SettingsSeederTest extends TestCase
*
* @return void
*/
public function test_returns_a_jsonmap_with_same_amount_of_items_as_language_directories_present()
public function test_returns_a_jsonmap_with_same_amount_of_items_as_language_directories_present(): void
{
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');

View File

@@ -9,7 +9,7 @@ class IsImageTest extends TestCase
/**
* @return void
*/
public function test_returns_true_when_file_is_image()
public function test_returns_true_when_file_is_image(): void
{
$file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png');
@@ -21,7 +21,7 @@ class IsImageTest extends TestCase
/**
* @return void
*/
public function test_returns_false_when_file_extension_is_image_but_content_is_not()
public function test_returns_false_when_file_extension_is_image_but_content_is_not(): void
{
$actual = isImage("<?php ?>", "png");
@@ -31,7 +31,7 @@ class IsImageTest extends TestCase
/**
* @return void
*/
public function test_returns_false_when_file_extension_is_not_image_but_content_is()
public function test_returns_false_when_file_extension_is_not_image_but_content_is(): void
{
$file = file_get_contents(__DIR__ . '/fixtures/heimdall-icon-small.png');

View File

@@ -9,7 +9,7 @@ class SlugTest extends TestCase
/**
* @return void
*/
public function test_slug_returns_valid_tag_for_cn_characters_when_language_is_set_to_en_US()
public function test_slug_returns_valid_tag_for_cn_characters_when_language_is_set_to_en_US(): void
{
$tag = str_slug('中文測試', '-', 'en_US');

View File

@@ -11,7 +11,7 @@ class LangTest extends TestCase
*
* @return void
*/
public function test_all_language_keys_are_defined()
public function test_all_language_keys_are_defined(): void
{
$this->markTestSkipped('2022-11-14 Lot of keys missing. Enable this test to see them all.');
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');