Skip to content

Commit 42aa25f

Browse files
committed
Adapt for Composer v2.0
1 parent 600ce6e commit 42aa25f

File tree

7 files changed

+15
-33
lines changed

7 files changed

+15
-33
lines changed

Classes/PHPExcel/Shared/Trend/BestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/BestFit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPExcelBestFit
4+
* BestFit
55
*
66
* Copyright (c) 2006 - 2015 PHPExcel
77
*
@@ -25,7 +25,7 @@
2525
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2626
* @version ##VERSION##, ##DATE##
2727
*/
28-
class PHPExcelBestFit
28+
class BestFit
2929
{
3030
/**
3131
* Indicator flag for a calculation error

Classes/PHPExcel/Shared/Trend/ExponentialBestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/ExponentialBestFit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
2-
3-
require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/BestFitClass.php');
4-
52
/**
6-
* PHPExcelExponentialBestFit
3+
* ExponentialBestFit
74
*
85
* Copyright (c) 2006 - 2015 PHPExcel
96
*
@@ -27,7 +24,7 @@
2724
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2825
* @version ##VERSION##, ##DATE##
2926
*/
30-
class PHPExcelExponentialBestFit extends PHPExcelBestFit
27+
class ExponentialBestFit extends BestFit
3128
{
3229
/**
3330
* Algorithm type to use for best-fit

Classes/PHPExcel/Shared/Trend/LinearBestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/LinearBestFit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
2-
3-
require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/BestFitClass.php');
4-
52
/**
6-
* PHPExcelLinearBestFit
3+
* LinearBestFit
74
*
85
* Copyright (c) 2006 - 2015 PHPExcel
96
*
@@ -27,7 +24,7 @@
2724
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2825
* @version ##VERSION##, ##DATE##
2926
*/
30-
class PHPExcelLinearBestFit extends PHPExcelBestFit
27+
class LinearBestFit extends BestFit
3128
{
3229
/**
3330
* Algorithm type to use for best-fit

Classes/PHPExcel/Shared/Trend/LogarithmicBestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/LogarithmicBestFit.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?php
2-
3-
require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/BestFitClass.php');
4-
52
/**
6-
* PHPExcelLogarithmicBestFit
3+
* LogarithmicBestFit
74
*
85
* Copyright (c) 2006 - 2015 PHPExcel
96
*
@@ -27,7 +24,7 @@
2724
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2825
* @version ##VERSION##, ##DATE##
2926
*/
30-
class PHPExcelLogarithmicBestFit extends PHPExcelBestFit
27+
class LogarithmicBestFit extends BestFit
3128
{
3229
/**
3330
* Algorithm type to use for best-fit

Classes/PHPExcel/Shared/Trend/PolynomialBestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/PolynomialBestFit.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?php
22

3-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/BestFitClass.php';
43
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/JAMA/Matrix.php';
54

65
/**
7-
* PHPExcelPolynomialBestFit
6+
* PolynomialBestFit
87
*
98
* Copyright (c) 2006 - 2015 PHPExcel
109
*
@@ -28,7 +27,7 @@
2827
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2928
* @version ##VERSION##, ##DATE##
3029
*/
31-
class PHPExcelPolynomialBestFit extends PHPExcelBestFit
30+
class PolynomialBestFit extends BestFit
3231
{
3332
/**
3433
* Algorithm type to use for best-fit

Classes/PHPExcel/Shared/Trend/PowerBestFitClass.php renamed to Classes/PHPExcel/Shared/Trend/PowerBestFit.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/BestFitClass.php';
4-
53
/**
6-
* PHPExcelPowerBestFit
4+
* PowerBestFit
75
*
86
* Copyright (c) 2006 - 2015 PHPExcel
97
*
@@ -27,7 +25,7 @@
2725
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
2826
* @version ##VERSION##, ##DATE##
2927
*/
30-
class PHPExcelPowerBestFit extends PHPExcelBestFit
28+
class PowerBestFit extends BestFit
3129
{
3230
/**
3331
* Algorithm type to use for best-fit

Classes/PHPExcel/Shared/Trend/TrendClass.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
<?php
22

3-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/LinearBestFitClass.php';
4-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/LogarithmicBestFitClass.php';
5-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/ExponentialBestFitClass.php';
6-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/PowerBestFitClass.php';
7-
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/Trend/PolynomialBestFitClass.php';
8-
93
/**
104
* PHPExcel_TrendClass
115
*
@@ -73,7 +67,7 @@ class TrendClass
7367
/**
7468
* Cached results for each method when trying to identify which provides the best fit
7569
*
76-
* @var PHPExcelBestFit[]
70+
* @var BestFit[]
7771
**/
7872
private static $trendCache = array();
7973

@@ -113,7 +107,7 @@ public static function calculate($trendType = self::TREND_BEST_FIT, $yValues, $x
113107
case self::TREND_POLYNOMIAL_6:
114108
if (!isset(self::$trendCache[$key])) {
115109
$order = substr($trendType, -1);
116-
self::$trendCache[$key] = new PHPExcelPolynomialBestFit($order, $yValues, $xValues, $const);
110+
self::$trendCache[$key] = new PolynomialBestFit($order, $yValues, $xValues, $const);
117111
}
118112
return self::$trendCache[$key];
119113
case self::TREND_BEST_FIT:
@@ -128,7 +122,7 @@ public static function calculate($trendType = self::TREND_BEST_FIT, $yValues, $x
128122
if ($trendType != self::TREND_BEST_FIT_NO_POLY) {
129123
foreach (self::$trendTypePolynomialOrders as $trendMethod) {
130124
$order = substr($trendMethod, -1);
131-
$bestFit[$trendMethod] = new PHPExcelPolynomialBestFit($order, $yValues, $xValues, $const);
125+
$bestFit[$trendMethod] = new PolynomialBestFit($order, $yValues, $xValues, $const);
132126
if ($bestFit[$trendMethod]->getError()) {
133127
unset($bestFit[$trendMethod]);
134128
} else {

0 commit comments

Comments
 (0)