Merge remote-tracking branch 'origin/stable'

This commit is contained in:
Dylan K. Taylor
2021-07-26 20:14:33 +01:00
15 changed files with 141 additions and 241 deletions

View File

@ -41,7 +41,7 @@ parameters:
path: ../../../src/ServerConfigGroup.php
-
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#"
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#"
count: 1
path: ../../../src/ServerConfigGroup.php
@ -196,12 +196,12 @@ parameters:
path: ../../../src/timings/TimingsHandler.php
-
message: "#^Parameter \\#2 \\$start of function substr expects int, mixed given\\.$#"
message: "#^Parameter \\#2 \\$offset of function substr expects int, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#3 \\$length of function substr expects int, mixed given\\.$#"
message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
@ -226,7 +226,7 @@ parameters:
path: ../../../src/utils/Utils.php
-
message: "#^Parameter \\#2 \\$input1 of function array_map expects array, mixed given\\.$#"
message: "#^Parameter \\#2 \\$array of function array_map expects array, mixed given\\.$#"
count: 1
path: ../../../src/utils/Utils.php
@ -245,28 +245,3 @@ parameters:
count: 2
path: ../../../src/world/format/io/region/RegionWorldProvider.php
-
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../phpunit/block/BlockTest.php
-
message: "#^Cannot access offset \\(int\\|string\\) on mixed\\.$#"
count: 1
path: ../../phpunit/block/BlockTest.php
-
message: "#^Parameter \\#2 \\$array of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertArrayHasKey\\(\\) expects array\\|ArrayAccess, mixed given\\.$#"
count: 1
path: ../../phpunit/block/BlockTest.php
-
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
count: 1
path: ../../phpunit/block/regenerate_consistency_check.php
-
message: "#^Cannot access offset \\(int\\|string\\) on mixed\\.$#"
count: 3
path: ../../phpunit/block/regenerate_consistency_check.php

View File

@ -16,12 +16,12 @@ parameters:
path: ../../../build/server-phar.php
-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
-
message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
@ -65,11 +65,6 @@ parameters:
count: 1
path: ../../../src/Server.php
-
message: "#^Cannot cast array\\<int, mixed\\>\\|string\\|false to int\\.$#"
count: 1
path: ../../../src/ServerConfigGroup.php
-
message: "#^Cannot cast array\\<int, mixed\\>\\|string\\|false to string\\.$#"
count: 1
@ -451,22 +446,22 @@ parameters:
path: ../../../src/command/defaults/PardonIpCommand.php
-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
count: 2
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$fp of function fseek expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function fseek expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$source of function stream_get_contents expects resource, resource\\|false given\\.$#"
message: "#^Parameter \\#1 \\$stream of function stream_get_contents expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
@ -561,7 +556,7 @@ parameters:
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Parameter \\#1 \\$argument of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
count: 1
path: ../../../src/event/HandlerListManager.php
@ -576,7 +571,7 @@ parameters:
path: ../../../src/item/Item.php
-
message: "#^Parameter \\#2 \\$input1 of function array_map expects array, array\\|false given\\.$#"
message: "#^Parameter \\#2 \\$array of function array_map expects array, array\\|false given\\.$#"
count: 1
path: ../../../src/lang/Language.php
@ -691,7 +686,12 @@ parameters:
path: ../../../src/utils/Timezone.php
-
message: "#^Parameter \\#1 \\$timezone_identifier of function date_default_timezone_set expects string, string\\|false given\\.$#"
message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Parameter \\#1 \\$timezoneId of function date_default_timezone_set expects string, string\\|false given\\.$#"
count: 1
path: ../../../src/utils/Timezone.php

View File

@ -0,0 +1,67 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
-
message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
-
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#"
count: 1
path: ../../../src/ServerConfigGroup.php
-
message: "#^Parameter \\#1 \\$fp of function fclose expects resource, resource\\|false given\\.$#"
count: 2
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$fp of function fseek expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$fp of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$source of function stream_get_contents expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$argument of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
count: 1
path: ../../../src/event/HandlerListManager.php
-
message: "#^Parameter \\#2 \\$input1 of function array_map expects array, array\\|false given\\.$#"
count: 1
path: ../../../src/lang/Language.php
-
message: "#^Parameter \\#2 \\$start of function substr expects int, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#3 \\$length of function substr expects int, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#1 \\$timezone_identifier of function date_default_timezone_set expects string, string\\|false given\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Parameter \\#2 \\$input1 of function array_map expects array, mixed given\\.$#"
count: 1
path: ../../../src/utils/Utils.php

View File

@ -0,0 +1,12 @@
parameters:
ignoreErrors:
-
message: "#^Strict comparison using \\=\\=\\= between array\\<string, mixed\\> and false will always evaluate to false\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Strict comparison using \\=\\=\\= between array and false will always evaluate to false\\.$#"
count: 1
path: ../../../src/utils/Utils.php

View File

@ -1,182 +0,0 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
-
message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/MemoryManager.php
-
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#"
count: 1
path: ../../../src/ServerConfigGroup.php
-
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#"
count: 2
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$stream of function fseek expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$stream of function fwrite expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$stream of function stream_get_contents expects resource, resource\\|false given\\.$#"
count: 1
path: ../../../src/command/defaults/TimingsCommand.php
-
message: "#^Parameter \\#1 \\$objectOrClass of class ReflectionClass constructor expects class\\-string\\<T of object\\>\\|T of object, string given\\.$#"
count: 1
path: ../../../src/event/HandlerListManager.php
-
message: "#^Parameter \\#2 \\$array of function array_map expects array, array\\|false given\\.$#"
count: 1
path: ../../../src/lang/Language.php
-
message: "#^Method pocketmine\\\\network\\\\mcpe\\\\JwtUtils\\:\\:parseDerPublicKey\\(\\) should return resource but returns OpenSSLAsymmetricKey\\.$#"
count: 1
path: ../../../src/network/mcpe/JwtUtils.php
-
message: "#^Parameter \\#1 \\$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/JwtUtils.php
-
message: "#^Parameter \\#3 \\$private_key of function openssl_sign expects array\\|OpenSSLAsymmetricKey\\|OpenSSLCertificate\\|string, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/JwtUtils.php
-
message: "#^Parameter \\#3 \\$public_key of function openssl_verify expects array\\|OpenSSLAsymmetricKey\\|OpenSSLCertificate\\|string, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/JwtUtils.php
-
message: "#^Parameter \\#1 \\$key of function openssl_free_key expects OpenSSLAsymmetricKey, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/auth/ProcessLoginTask.php
-
message: "#^Parameter \\#1 \\$public_key of function openssl_pkey_derive expects array\\|OpenSSLAsymmetricKey\\|OpenSSLCertificate\\|string, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/EncryptionUtils.php
-
message: "#^Parameter \\#2 \\$private_key of function openssl_pkey_derive expects array\\|OpenSSLAsymmetricKey\\|OpenSSLCertificate\\|string, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/EncryptionUtils.php
-
message: "#^Parameter \\#1 \\$key of function openssl_free_key expects OpenSSLAsymmetricKey, resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
-
message: "#^Parameter \\#1 \\$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey\\|resource given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
-
message: "#^Parameter \\#1 \\$localPriv of static method pocketmine\\\\network\\\\mcpe\\\\encryption\\\\EncryptionUtils\\:\\:generateSharedSecret\\(\\) expects resource, OpenSSLAsymmetricKey given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
-
message: "#^Parameter \\#1 \\$serverPriv of static method pocketmine\\\\network\\\\mcpe\\\\encryption\\\\EncryptionUtils\\:\\:generateServerHandshakeJwt\\(\\) expects resource, OpenSSLAsymmetricKey given\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
-
message: "#^Static property pocketmine\\\\network\\\\mcpe\\\\encryption\\\\PrepareEncryptionTask\\:\\:\\$SERVER_PRIVATE_KEY \\(resource\\|null\\) does not accept OpenSSLAsymmetricKey\\.$#"
count: 1
path: ../../../src/network/mcpe/encryption/PrepareEncryptionTask.php
-
message: "#^Parameter \\#1 \\$socket of function socket_bind expects Socket, resource given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$socket of function socket_close expects Socket, resource given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$socket of function socket_last_error expects Socket\\|null, resource given\\.$#"
count: 3
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$socket of function socket_recvfrom expects Socket, resource given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$socket of function socket_sendto expects Socket, resource given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$socket of function socket_set_nonblock expects Socket, resource given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Property pocketmine\\\\network\\\\query\\\\DedicatedQueryNetworkInterface\\:\\:\\$socket \\(resource\\) does not accept Socket\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$ of closure expects resource, CurlHandle given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#2 \\$offset of function substr expects int, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#3 \\$length of function substr expects int\\|null, mixed given\\.$#"
count: 1
path: ../../../src/utils/Internet.php
-
message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|false given\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Parameter \\#1 \\$timezoneId of function date_default_timezone_set expects string, string\\|false given\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Strict comparison using \\=\\=\\= between array\\<string, mixed\\> and false will always evaluate to false\\.$#"
count: 1
path: ../../../src/utils/Timezone.php
-
message: "#^Parameter \\#2 \\$array of function array_map expects array, mixed given\\.$#"
count: 1
path: ../../../src/utils/Utils.php
-
message: "#^Strict comparison using \\=\\=\\= between array and false will always evaluate to false\\.$#"
count: 1
path: ../../../src/utils/Utils.php

View File

@ -30,6 +30,11 @@ parameters:
count: 1
path: ../../../src/entity/projectile/Projectile.php
-
message: "#^Parameter \\#1 \\$read of function socket_select expects array\\<resource\\>\\|null, array\\<int, Socket\\> given\\.$#"
count: 1
path: ../../../src/network/query/DedicatedQueryNetworkInterface.php
-
message: "#^Parameter \\#1 \\$ of closure expects TValue, TValue given\\.$#"
count: 2