mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
Liquid: mark getSmallestFlowDecay() as impure
this fixes two bogus PHPStan warnings.
This commit is contained in:
parent
fcfd51dfc7
commit
fac2bd3379
@ -418,6 +418,9 @@ abstract class Liquid extends Transparent{
|
|||||||
return $isOptimalFlowDirection;
|
return $isOptimalFlowDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @phpstan-impure This function modifies the adjacent sources count (premature optimisation)
|
||||||
|
*/
|
||||||
private function getSmallestFlowDecay(Block $block, int $decay) : int{
|
private function getSmallestFlowDecay(Block $block, int $decay) : int{
|
||||||
$blockDecay = $this->getFlowDecay($block);
|
$blockDecay = $this->getFlowDecay($block);
|
||||||
|
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
parameters:
|
parameters:
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
-
|
|
||||||
message: "#^Comparison operation \"\\>\\=\" between 0 and 2 is always false\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/pocketmine/block/Liquid.php
|
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^If condition is always false\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: ../../../src/pocketmine/block/Liquid.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#"
|
||||||
count: 3
|
count: 3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user