From 8542e787bd2d8321441795be8ffd1e6e66e39dbc Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 19 Oct 2026 22:35:07 +0200 Subject: [PATCH] Fix PHPStan --- api/config/config-test.php | 6 ++++++ phpstan-baseline.neon | 10 ---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/api/config/config-test.php b/api/config/config-test.php index 5145a18..0d01d06 100644 --- a/api/config/config-test.php +++ b/api/config/config-test.php @@ -27,6 +27,9 @@ return [ ), ]), common\components\SkinsSystemApi::class => fn(): common\components\SkinsSystemApi => new class('http://chrly.ely.by') extends common\components\SkinsSystemApi { + /** + * @return array|null + */ public function textures(string $username): ?array { return [ 'SKIN' => [ @@ -35,6 +38,9 @@ return [ ]; } + /** + * @return array|null + */ public function profile(string $username, bool $signed = false, ?string $fallbackUuid = null): ?array { if ($username === 'NotSynchronized') { if ($fallbackUuid === null) { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bb39796..c7dc284 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -60,16 +60,6 @@ parameters: count: 1 path: api/components/User/LegacyOAuth2Identity.php - - - message: "#^Method class@anonymous/api/config/config\\-test\\.php\\:19\\:\\:profile\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: api/config/config-test.php - - - - message: "#^Method class@anonymous/api/config/config\\-test\\.php\\:19\\:\\:textures\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: api/config/config-test.php - - message: "#^Parameter \\#1 \\$string of function base64_encode expects string, string\\|false given\\.$#" count: 2