phpcs fixes

This commit is contained in:
Dennis Eichhorn 2019-10-19 18:50:53 +02:00
parent a714359ea9
commit f6fb7f4747
6 changed files with 9 additions and 11 deletions

View File

@ -144,7 +144,6 @@ class Path
$coord1 = $reverse[$i + 1]; $coord1 = $reverse[$i + 1];
$interpolated = $this->interpolate($coord0, $coord1); $interpolated = $this->interpolate($coord0, $coord1);
$expanded = \array_merge($expanded, $interpolated); $expanded = \array_merge($expanded, $interpolated);
} }

View File

@ -80,11 +80,10 @@ final class CubicSplineInterpolation implements InterpolationInterface
$this->points = $points; $this->points = $points;
$n = \count($this->points); $n = \count($this->points);
$b = []; $b = [];
$matrix = new Matrix($n, $n); $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 - 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, 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'])); $matrix->set($i, $i + 1, 1.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i]['x']));