@@ -10,18 +10,18 @@ |
||
| 10 | 10 | interface InterfaceRegression |
| 11 | 11 | { |
| 12 | 12 | |
| 13 | - public function calculate(); |
|
| 13 | + public function calculate(); |
|
| 14 | 14 | |
| 15 | - /** |
|
| 16 | - * @param array $data |
|
| 17 | - * |
|
| 18 | - * @return array |
|
| 19 | - */ |
|
| 20 | - public function setSourceSequence(array $data); |
|
| 15 | + /** |
|
| 16 | + * @param array $data |
|
| 17 | + * |
|
| 18 | + * @return array |
|
| 19 | + */ |
|
| 20 | + public function setSourceSequence(array $data); |
|
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * @return RegressionModel |
|
| 24 | - */ |
|
| 25 | - public function getRegressionModel(): RegressionModel; |
|
| 22 | + /** |
|
| 23 | + * @return RegressionModel |
|
| 24 | + */ |
|
| 25 | + public function getRegressionModel(): RegressionModel; |
|
| 26 | 26 | |
| 27 | 27 | } |
| 28 | 28 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | spl_autoload_register( |
| 4 | - function($className) { |
|
| 5 | - $className = ltrim($className, '\\'); |
|
| 6 | - $fileName = ''; |
|
| 7 | - if ($lastNsPos = strripos($className, '\\')) { |
|
| 8 | - $namespace = substr($className, 0, $lastNsPos); |
|
| 9 | - $className = substr($className, $lastNsPos + 1); |
|
| 10 | - $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 11 | - } |
|
| 12 | - $fileName = __DIR__ . DIRECTORY_SEPARATOR . $fileName . $className . '.php'; |
|
| 13 | - if (file_exists($fileName)) { |
|
| 14 | - include $fileName; |
|
| 15 | - return true; |
|
| 16 | - } |
|
| 17 | - return false; |
|
| 18 | - } |
|
| 4 | + function($className) { |
|
| 5 | + $className = ltrim($className, '\\'); |
|
| 6 | + $fileName = ''; |
|
| 7 | + if ($lastNsPos = strripos($className, '\\')) { |
|
| 8 | + $namespace = substr($className, 0, $lastNsPos); |
|
| 9 | + $className = substr($className, $lastNsPos + 1); |
|
| 10 | + $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; |
|
| 11 | + } |
|
| 12 | + $fileName = __DIR__ . DIRECTORY_SEPARATOR . $fileName . $className . '.php'; |
|
| 13 | + if (file_exists($fileName)) { |
|
| 14 | + include $fileName; |
|
| 15 | + return true; |
|
| 16 | + } |
|
| 17 | + return false; |
|
| 18 | + } |
|
| 19 | 19 | ); |
| 20 | 20 | |
| 21 | 21 | ?> |
| 22 | 22 | \ No newline at end of file |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $this->resultSequence[] = $coordinate; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $this->equation = 'y = ' . round($A, 2) . '+ x^' . round($B, 2); |
|
| 57 | + $this->equation = 'y = ' . round($A, 2) . '+ x^' . round($B, 2); |
|
| 58 | 58 | |
| 59 | 59 | $this->push(); |
| 60 | 60 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $this->resultSequence[] = $coordinate; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $this->equation = 'y = ' . round($gradient, 1) . 'x + ' . round($intercept, 1); |
|
| 59 | + $this->equation = 'y = ' . round($gradient, 1) . 'x + ' . round($intercept, 1); |
|
| 60 | 60 | |
| 61 | 61 | $this->push(); |
| 62 | 62 | } |