Skip to content

Commit

Permalink
Analyze using PHPStan level 9
Browse files Browse the repository at this point in the history
with some ignoreErrors in CompoundTag because it's currently not possible to address the types returned by getTagValue()
  • Loading branch information
dktapps committed Dec 7, 2021
1 parent 629f34d commit f6de897
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
3 changes: 2 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
includes:
- tests/phpstan/configs/impossible-mixed.neon
- tests/phpstan/configs/phpstan-bugs.neon

parameters:
level: 8
level: 9
treatPhpDocTypesAsCertain: false
paths:
- src
47 changes: 47 additions & 0 deletions tests/phpstan/configs/impossible-mixed.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
parameters:
ignoreErrors:
-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getByte\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getByteArray\\(\\) should return string but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getDouble\\(\\) should return float but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getFloat\\(\\) should return float but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getInt\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getIntArray\\(\\) should return array\\<int\\> but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getLong\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getShort\\(\\) should return int but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

-
message: "#^Method pocketmine\\\\nbt\\\\tag\\\\CompoundTag\\:\\:getString\\(\\) should return string but returns mixed\\.$#"
count: 1
path: ../../../src/tag/CompoundTag.php

0 comments on commit f6de897

Please sign in to comment.