Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
LevelLevelRegression
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getSlope
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getElasticity
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3 * Jingga
4 *
5 * PHP Version 8.1
6 *
7 * @package   phpOMS\Math\Statistic\Forecast\Regression
8 * @copyright Dennis Eichhorn
9 * @license   OMS License 2.0
10 * @version   1.0.0
11 * @link      https://jingga.app
12 */
13declare(strict_types=1);
14
15namespace phpOMS\Math\Statistic\Forecast\Regression;
16
17/**
18 * Regression class.
19 *
20 * @package phpOMS\Math\Statistic\Forecast\Regression
21 * @license OMS License 2.0
22 * @link    https://jingga.app
23 * @since   1.0.0
24 */
25final class LevelLevelRegression extends RegressionAbstract
26{
27    /**
28     * {@inheritdoc}
29     */
30    public static function getSlope(float $b1, float $y, float $x) : float
31    {
32        return $b1;
33    }
34
35    /**
36     * {@inheritdoc}
37     */
38    public static function getElasticity(float $b1, float $y, float $x) : float
39    {
40        return $b1 * $x / $y;
41    }
42}