diff --git a/Algorithm/PathFinding/AStar.php b/Algorithm/PathFinding/AStar.php index e5aa81b61..3c990b2c2 100644 --- a/Algorithm/PathFinding/AStar.php +++ b/Algorithm/PathFinding/AStar.php @@ -63,6 +63,7 @@ final class AStar implements PathFinderInterface break; } + /** @var AStarNode[] $neighbors */ $neighbors = $grid->getNeighbors($node, $movement); $neighborsLength = \count($neighbors); for ($i = 0; $i < $neighborsLength; ++$i) { diff --git a/Algorithm/PathFinding/Grid.php b/Algorithm/PathFinding/Grid.php index 99901f8d9..dae9861b0 100644 --- a/Algorithm/PathFinding/Grid.php +++ b/Algorithm/PathFinding/Grid.php @@ -175,6 +175,7 @@ class Grid } if ($movement === MovementType::STRAIGHT) { + /** @var Node[] $neighbors */ return $neighbors; } @@ -211,6 +212,7 @@ class Grid $neighbors[] = $this->getNode($x - 1, $y + 1); } + /** @var Node[] $neighbors */ return $neighbors; } } diff --git a/Algorithm/PathFinding/JumpPointSearch.php b/Algorithm/PathFinding/JumpPointSearch.php index 7e7eba3be..3a45b0922 100644 --- a/Algorithm/PathFinding/JumpPointSearch.php +++ b/Algorithm/PathFinding/JumpPointSearch.php @@ -92,6 +92,7 @@ final class JumpPointSearch implements PathFinderInterface */ public static function identifySuccessors(JumpPointNode $node, Grid $grid, int $heuristic, int $movement, JumpPointNode $endNode, Heap $openList) : Heap { + /** @var JumpPointNode[] $neighbors */ $neighbors = self::findNeighbors($node, $movement, $grid); $neighborsLength = \count($neighbors); @@ -207,6 +208,7 @@ final class JumpPointSearch implements PathFinderInterface } } + /** @var JumpPointNode[] $neighbors */ return $neighbors; } @@ -284,6 +286,7 @@ final class JumpPointSearch implements PathFinderInterface } } + /** @var JumpPointNode[] $neighbors */ return $neighbors; } @@ -357,6 +360,7 @@ final class JumpPointSearch implements PathFinderInterface } } + /** @var JumpPointNode[] $neighbors */ return $neighbors; } @@ -448,6 +452,7 @@ final class JumpPointSearch implements PathFinderInterface } } + /** @var JumpPointNode[] $neighbors */ return $neighbors; } diff --git a/Math/Parser/Evaluator.php b/Math/Parser/Evaluator.php index df3c06b6d..4544ad6f1 100644 --- a/Math/Parser/Evaluator.php +++ b/Math/Parser/Evaluator.php @@ -29,7 +29,7 @@ final class Evaluator * * @param string $equation Formula to evaluate * - * @return float + * @return null|float * * @throws \Exception * diff --git a/Math/Statistic/Forecast/Error.php b/Math/Statistic/Forecast/Error.php index f5d605b52..0ef885653 100644 --- a/Math/Statistic/Forecast/Error.php +++ b/Math/Statistic/Forecast/Error.php @@ -326,7 +326,7 @@ final class Error $deviation = MeasureOfDispersion::meanDeviation($observed); foreach ($errors as $error) { - $error[] = $error / $deviation; + $scaled[] = $error / $deviation; } return $scaled; diff --git a/Math/Topology/Metrics2D.php b/Math/Topology/Metrics2D.php index 5622d6b5a..92ecc7d1e 100644 --- a/Math/Topology/Metrics2D.php +++ b/Math/Topology/Metrics2D.php @@ -196,8 +196,8 @@ final class Metrics2D * * @latex d(p, q) = \sum_{n=1}^N{|p_i - q_i|} * - * @param array $a 2-D array with x and y coordinate - * @param array $b 2-D array with x and y coordinate + * @param array $a 2-D array with x and y coordinate + * @param array $b 2-D array with x and y coordinate * * @return int * @@ -226,8 +226,8 @@ final class Metrics2D * * In order to use this with objects the objects would have to implement some kind of value representation for comparison. * - * @param array $a Array with elements - * @param array $b Array with same elements but different order + * @param array $a Array with elements + * @param array $b Array with same elements but different order * * @return int *