mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Fixed PHPUnit deprecation warnings
This commit is contained in:
@ -30,7 +30,7 @@ final class CloningRegistryTraitTest extends TestCase{
|
||||
/**
|
||||
* @phpstan-return \Generator<int, array{\Closure() : \stdClass}, void, void>
|
||||
*/
|
||||
public function cloningRegistryMembersProvider() : \Generator{
|
||||
public static function cloningRegistryMembersProvider() : \Generator{
|
||||
yield [function() : \stdClass{ return TestCloningRegistry::TEST1(); }];
|
||||
yield [function() : \stdClass{ return TestCloningRegistry::TEST2(); }];
|
||||
yield [function() : \stdClass{ return TestCloningRegistry::TEST3(); }];
|
||||
|
@ -32,7 +32,7 @@ class ConfigTest extends TestCase{
|
||||
* @return \Generator|mixed[][]
|
||||
* @phpstan-return \Generator<int, array{string, mixed[]}, void, void>
|
||||
*/
|
||||
public function fixYamlIndexesProvider() : \Generator{
|
||||
public static function fixYamlIndexesProvider() : \Generator{
|
||||
yield ["x: 1\ny: 2\nz: 3\n", [
|
||||
"x" => 1,
|
||||
"y" => 2,
|
||||
|
@ -44,7 +44,7 @@ class UtilsTest extends TestCase{
|
||||
* @return string[][]
|
||||
* @phpstan-return list<array{string}>
|
||||
*/
|
||||
public function parseDocCommentNewlineProvider() : array{
|
||||
public static function parseDocCommentNewlineProvider() : array{
|
||||
return [
|
||||
["\t/**\r\n\t * @param PlayerJoinEvent \$event\r\n\t * @priority HIGHEST\r\n\t * @notHandler\r\n\t */"],
|
||||
["\t/**\n\t * @param PlayerJoinEvent \$event\n\t * @priority HIGHEST\n\t * @notHandler\n\t */"],
|
||||
@ -68,7 +68,7 @@ class UtilsTest extends TestCase{
|
||||
* @return string[][]
|
||||
* @phpstan-return list<array{string}>
|
||||
*/
|
||||
public function parseDocCommentOneLineProvider() : array{
|
||||
public static function parseDocCommentOneLineProvider() : array{
|
||||
return [
|
||||
["/** @ignoreCancelled true dummy */"],
|
||||
["/**@ignoreCancelled true dummy*/"],
|
||||
@ -105,7 +105,7 @@ class UtilsTest extends TestCase{
|
||||
* @return string[][]
|
||||
* @return list<array{class-string, class-string}>
|
||||
*/
|
||||
public function validInstanceProvider() : array{
|
||||
public static function validInstanceProvider() : array{
|
||||
return [
|
||||
//direct instance / implement / extend
|
||||
[TestInstantiableClass::class, TestInstantiableClass::class],
|
||||
@ -133,7 +133,7 @@ class UtilsTest extends TestCase{
|
||||
* @return string[][]
|
||||
* @return list<array{string, string}>
|
||||
*/
|
||||
public function validInstanceInvalidCombinationsProvider() : array{
|
||||
public static function validInstanceInvalidCombinationsProvider() : array{
|
||||
return [
|
||||
["iDontExist abc", TestInstantiableClass::class],
|
||||
[TestInstantiableClass::class, "iDon'tExist abc"],
|
||||
|
Reference in New Issue
Block a user