mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Rail: specify type for local static variable
fixes a phpstan level 7 error phpstan doesn't make any assumptions about local static variable types because analysing them would require too much work, apparently.
This commit is contained in:
parent
62ea7c93a9
commit
04191ec44a
@ -71,6 +71,7 @@ class Rail extends BaseRail{
|
||||
}
|
||||
|
||||
protected function getPossibleConnectionDirectionsOneConstraint(int $constraint) : array{
|
||||
/** @var int[] $horizontal */
|
||||
static $horizontal = [
|
||||
Vector3::SIDE_NORTH,
|
||||
Vector3::SIDE_SOUTH,
|
||||
|
@ -275,11 +275,6 @@ parameters:
|
||||
count: 3
|
||||
path: ../../../src/pocketmine/block/Mycelium.php
|
||||
|
||||
-
|
||||
message: "#^Method pocketmine\\\\block\\\\Rail\\:\\:getPossibleConnectionDirectionsOneConstraint\\(\\) should return array\\<int, true\\> but returns array\\<int\\|string, true\\>\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/block/Rail.php
|
||||
|
||||
-
|
||||
message: "#^Parameter \\#2 \\$x of static method pocketmine\\\\level\\\\generator\\\\object\\\\Tree\\:\\:growTree\\(\\) expects int, float\\|int given\\.$#"
|
||||
count: 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user