getSlope(1); self::assertEqualsWithDelta($expectedSlope[0], $slope, self::LBF_PRECISION); $slope = $bestFit->getSlope(); self::assertEqualsWithDelta($expectedSlope[1], $slope, self::LBF_PRECISION); $intersect = $bestFit->getIntersect(1); self::assertEqualsWithDelta($expectedIntersect[0], $intersect, self::LBF_PRECISION); $intersect = $bestFit->getIntersect(); self::assertEqualsWithDelta($expectedIntersect[1], $intersect, self::LBF_PRECISION); $equation = $bestFit->getEquation(2); self::assertEquals($expectedEquation, $equation); self::assertSame($expectedGoodnessOfFit[0], $bestFit->getGoodnessOfFit(6)); self::assertSame($expectedGoodnessOfFit[1], $bestFit->getGoodnessOfFit()); } public function providerLinearBestFit(): array { return require 'tests/data/Shared/Trend/LinearBestFit.php'; } }