fix(psalm): Fix psalm issue

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr
2025-04-09 13:31:14 +02:00
parent 973193d1cf
commit b0d4ea8610
2 changed files with 1 additions and 2 deletions

View File

@ -179,7 +179,7 @@ final class MrdBallTree extends BallTree {
}
if ($this->kernel instanceof SquaredDistance) {
$longestDistance = (float) min($longestDistance, (2.0 * sqrt($queryNode->radius()) + sqrt($shortestDistance)) ** 2.0);
$longestDistance = min($longestDistance, (2.0 * sqrt($queryNode->radius()) + sqrt($shortestDistance)) ** 2.0);
} else {
$longestDistance = (float) min($longestDistance, 2.0 * $queryNode->radius() + $shortestDistance);
}

View File

@ -492,7 +492,6 @@
<code><![CDATA[$this->coreNeighborDistances]]></code>
</PropertyTypeCoercion>
<RedundantCastGivenDocblockType>
<code><![CDATA[(float) min($longestDistance, (2.0* sqrt($queryNode->radius()) + sqrt($shortestDistance)) ** 2.0)]]></code>
<code><![CDATA[(float) min($longestDistance, 2.0 * $queryNode->radius() + $shortestDistance)]]></code>
</RedundantCastGivenDocblockType>
<RedundantFunctionCallGivenDocblockType>