diff --git a/Algorithm/Clustering/Kmeans.php b/Algorithm/Clustering/Kmeans.php index b9849ac8f..afd245879 100644 --- a/Algorithm/Clustering/Kmeans.php +++ b/Algorithm/Clustering/Kmeans.php @@ -243,4 +243,4 @@ final class Kmeans return $clusters; } -} \ No newline at end of file +} diff --git a/Algorithm/Clustering/Point.php b/Algorithm/Clustering/Point.php index bd1546c9c..07c3eb833 100644 --- a/Algorithm/Clustering/Point.php +++ b/Algorithm/Clustering/Point.php @@ -117,4 +117,4 @@ class Point implements PointInterface { return $this->name; } -} \ No newline at end of file +} diff --git a/Algorithm/Knapsack/Bounded.php b/Algorithm/Knapsack/Bounded.php index 71afc5455..6893d3d1c 100644 --- a/Algorithm/Knapsack/Bounded.php +++ b/Algorithm/Knapsack/Bounded.php @@ -94,4 +94,4 @@ final class Bounded return $backpack; } -} \ No newline at end of file +} diff --git a/Algorithm/Knapsack/Continuous.php b/Algorithm/Knapsack/Continuous.php index f66666df8..0c7f105c2 100644 --- a/Algorithm/Knapsack/Continuous.php +++ b/Algorithm/Knapsack/Continuous.php @@ -68,4 +68,4 @@ final class Continuous return $backpack; } -} \ No newline at end of file +} diff --git a/Algorithm/PathFinding/Path.php b/Algorithm/PathFinding/Path.php index c29f37720..983d74418 100644 --- a/Algorithm/PathFinding/Path.php +++ b/Algorithm/PathFinding/Path.php @@ -144,11 +144,10 @@ class Path $coord1 = $reverse[$i + 1]; $interpolated = $this->interpolate($coord0, $coord1); - - $expanded = \array_merge($expanded, $interpolated); + $expanded = \array_merge($expanded, $interpolated); } - $expanded[] = $reverse[$length - 1]; + $expanded[] = $reverse[$length - 1]; $this->expandedNodes = $expanded; } diff --git a/Math/Numerics/Interpolation/CubicSplineInterpolation.php b/Math/Numerics/Interpolation/CubicSplineInterpolation.php index 32fac36b6..682a1d4dc 100644 --- a/Math/Numerics/Interpolation/CubicSplineInterpolation.php +++ b/Math/Numerics/Interpolation/CubicSplineInterpolation.php @@ -79,12 +79,11 @@ final class CubicSplineInterpolation implements InterpolationInterface ) { $this->points = $points; - $n = \count($this->points); - - $b = []; + $n = \count($this->points); + $b = []; $matrix = new Matrix($n, $n); - for($i = 1; $i < $n - 1; ++$i) { + for ($i = 1; $i < $n - 1; ++$i) { $matrix->set($i, $i - 1, 1.0 / 3.0 * ($this->points[$i]['x'] - $this->points[$i - 1]['x'])); $matrix->set($i, $i, 2.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i - 1]['x'])); $matrix->set($i, $i + 1, 1.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i]['x']));