diff --git a/Classes/PHPExcel/Worksheet.php b/Classes/PHPExcel/Worksheet.php index 5c6d3ed6..0946c7cb 100644 --- a/Classes/PHPExcel/Worksheet.php +++ b/Classes/PHPExcel/Worksheet.php @@ -391,7 +391,7 @@ class PHPExcel_Worksheet implements PHPExcel_IComparable * Code to execute when this worksheet is unset() * */ - function __destruct() + public function __destruct() { PHPExcel_Calculation::getInstance($this->_parent)->clearCalculationCacheForWorksheet($this->_title); diff --git a/unitTests/Classes/PHPExcel/AutoloaderTest.php b/unitTests/Classes/PHPExcel/AutoloaderTest.php index 286ef627..f53015c6 100644 --- a/unitTests/Classes/PHPExcel/AutoloaderTest.php +++ b/unitTests/Classes/PHPExcel/AutoloaderTest.php @@ -6,8 +6,7 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -52,5 +51,4 @@ class AutoloaderTest extends PHPUnit_Framework_TestCase // ... of the correct type $this->assertTrue(is_a($result,'PHPExcel_Calculation_Function')); } - -} \ No newline at end of file +} diff --git a/unitTests/Classes/PHPExcel/Calculation/DateTimeTest.php b/unitTests/Classes/PHPExcel/Calculation/DateTimeTest.php index 50cdec99..8b28f2fa 100644 --- a/unitTests/Classes/PHPExcel/Calculation/DateTimeTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/DateTimeTest.php @@ -8,8 +8,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -24,7 +23,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -77,7 +76,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEVALUE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -114,7 +113,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEAR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -130,7 +129,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MONTHOFYEAR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -146,7 +145,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WEEKOFYEAR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -162,7 +161,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFWEEK'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -178,7 +177,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYOFMONTH'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -194,7 +193,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIME'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -231,7 +230,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','TIMEVALUE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -268,7 +267,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','HOUROFDAY'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -284,7 +283,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','MINUTEOFHOUR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -300,7 +299,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','SECONDOFMINUTE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -316,7 +315,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','NETWORKDAYS'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -332,7 +331,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','WORKDAY'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -348,7 +347,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EDATE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -385,7 +384,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','EOMONTH'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -422,7 +421,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DATEDIF'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -438,7 +437,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','DAYS360'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -454,7 +453,7 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_DateTime','YEARFRAC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -462,5 +461,4 @@ class DateTimeTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/DateTime/YEARFRAC.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/EngineeringTest.php b/unitTests/Classes/PHPExcel/Calculation/EngineeringTest.php index c5a82961..08448f55 100644 --- a/unitTests/Classes/PHPExcel/Calculation/EngineeringTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/EngineeringTest.php @@ -12,8 +12,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -28,7 +27,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELI'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -44,7 +43,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELJ'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -60,7 +59,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELK'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -76,7 +75,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BESSELY'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -92,7 +91,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','COMPLEX'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','COMPLEX'), $args); $this->assertEquals($expectedResult, $result); } @@ -108,7 +107,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMAGINARY'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -124,7 +123,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMREAL'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -140,7 +139,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMABS'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -156,7 +155,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMARGUMENT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -172,10 +171,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCONJUGATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCONJUGATE'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMCONJUGATE() @@ -190,10 +188,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCOS'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMCOS'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMCOS() @@ -208,10 +205,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMDIV'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMDIV'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMDIV() @@ -226,10 +222,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMEXP'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMEXP'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMEXP() @@ -244,10 +239,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLN'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMLN() @@ -262,10 +256,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG2'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG2'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMLOG2() @@ -280,10 +273,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG10'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMLOG10'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMLOG10() @@ -298,10 +290,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPOWER'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPOWER'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMPOWER() @@ -316,10 +307,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPRODUCT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMPRODUCT'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMPRODUCT() @@ -334,10 +324,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSIN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSIN'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMSIN() @@ -352,10 +341,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSQRT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSQRT'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMSQRT() @@ -370,10 +358,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUB'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUB'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMSUB() @@ -388,10 +375,9 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','IMSUM'), $args); $complexAssert = new complexAssert(); - $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), - $complexAssert->getErrorMessage()); + $this->assertTrue($complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $complexAssert->getErrorMessage()); } public function providerIMSUM() @@ -406,7 +392,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERF'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -422,7 +408,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','ERFC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -438,7 +424,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTODEC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTODEC'), $args); $this->assertEquals($expectedResult, $result); } @@ -454,7 +440,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOHEX'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOHEX'), $args); $this->assertEquals($expectedResult, $result); } @@ -470,7 +456,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOOCT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','BINTOOCT'), $args); $this->assertEquals($expectedResult, $result); } @@ -486,7 +472,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOBIN'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -502,7 +488,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOHEX'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -518,7 +504,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DECTOOCT'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -534,7 +520,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOBIN'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -550,7 +536,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTODEC'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -566,7 +552,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','HEXTOOCT'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -582,7 +568,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOBIN'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -598,7 +584,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTODEC'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -614,7 +600,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','OCTTOHEX'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -630,7 +616,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','DELTA'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -646,7 +632,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','GESTEP'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -686,7 +672,7 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Engineering','CONVERTUOM'), $args); $this->assertEquals($expectedResult, $result, null); } @@ -694,5 +680,4 @@ class EngineeringTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/Engineering/CONVERTUOM.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/FinancialTest.php b/unitTests/Classes/PHPExcel/Calculation/FinancialTest.php index efaa60e5..f6e39814 100644 --- a/unitTests/Classes/PHPExcel/Calculation/FinancialTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/FinancialTest.php @@ -8,8 +8,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -24,7 +23,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -40,7 +39,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ACCRINTM'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -56,7 +55,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORDEGRC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -72,7 +71,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','AMORLINC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -88,7 +87,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYBS'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -104,7 +103,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYS'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -120,7 +119,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPDAYSNC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -136,7 +135,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNCD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -152,7 +151,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPNUM'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -168,7 +167,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','COUPPCD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -184,7 +183,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMIPMT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -200,7 +199,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','CUMPRINC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -216,7 +215,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DB'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -232,7 +231,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DDB'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -248,7 +247,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DISC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -264,7 +263,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARDE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -280,7 +279,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','DOLLARFR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -296,7 +295,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','EFFECT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -312,7 +311,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FV'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -328,7 +327,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','FVSCHEDULE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -344,7 +343,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','INTRATE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -360,7 +359,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IPMT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -376,7 +375,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','IRR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -392,7 +391,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','ISPMT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -408,7 +407,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','MIRR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -424,7 +423,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NOMINAL'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -440,7 +439,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPER'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -456,7 +455,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','NPV'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -472,7 +471,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','PRICE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -488,7 +487,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','RATE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -504,7 +503,7 @@ class FinancialTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Financial','XIRR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -512,5 +511,4 @@ class FinancialTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/Financial/XIRR.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/FunctionsTest.php b/unitTests/Classes/PHPExcel/Calculation/FunctionsTest.php index 0e9fb50d..61c48205 100644 --- a/unitTests/Classes/PHPExcel/Calculation/FunctionsTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/FunctionsTest.php @@ -8,8 +8,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -72,7 +71,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_BLANK'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -88,7 +87,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -104,7 +103,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ERROR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -120,7 +119,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','ERROR_TYPE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -136,7 +135,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_LOGICAL'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -152,7 +151,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NA'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -168,7 +167,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NUMBER'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -184,7 +183,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_TEXT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -200,7 +199,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_NONTEXT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -216,7 +215,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_EVEN'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -232,7 +231,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','IS_ODD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -248,7 +247,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','TYPE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -264,7 +263,7 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Functions','N'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -272,5 +271,4 @@ class FunctionsTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/Functions/N.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/LogicalTest.php b/unitTests/Classes/PHPExcel/Calculation/LogicalTest.php index 21d49772..e475c30f 100644 --- a/unitTests/Classes/PHPExcel/Calculation/LogicalTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/LogicalTest.php @@ -8,8 +8,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -36,7 +35,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_AND'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_AND'), $args); $this->assertEquals($expectedResult, $result); } @@ -52,7 +51,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_OR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Logical','LOGICAL_OR'), $args); $this->assertEquals($expectedResult, $result); } @@ -68,7 +67,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Logical','NOT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Logical','NOT'), $args); $this->assertEquals($expectedResult, $result); } @@ -84,7 +83,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Logical','STATEMENT_IF'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Logical','STATEMENT_IF'), $args); $this->assertEquals($expectedResult, $result); } @@ -100,7 +99,7 @@ class LogicalTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_Logical','IFERROR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_Logical','IFERROR'), $args); $this->assertEquals($expectedResult, $result); } @@ -108,5 +107,4 @@ class LogicalTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/Logical/IFERROR.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/LookupRefTest.php b/unitTests/Classes/PHPExcel/Calculation/LookupRefTest.php index ed4d6ee0..1408b73b 100644 --- a/unitTests/Classes/PHPExcel/Calculation/LookupRefTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/LookupRefTest.php @@ -8,8 +8,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -24,7 +23,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','HLOOKUP'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','HLOOKUP'), $args); $this->assertEquals($expectedResult, $result); } @@ -40,7 +39,7 @@ class LookupRefTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','VLOOKUP'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_LookupRef','VLOOKUP'), $args); $this->assertEquals($expectedResult, $result); } @@ -48,5 +47,4 @@ class LookupRefTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/LookupRef/VLOOKUP.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/MathTrigTest.php b/unitTests/Classes/PHPExcel/Calculation/MathTrigTest.php index 9772a7e7..40d1c505 100644 --- a/unitTests/Classes/PHPExcel/Calculation/MathTrigTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/MathTrigTest.php @@ -8,8 +8,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -24,7 +23,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ATAN2'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -40,7 +39,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','CEILING'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -56,7 +55,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','COMBIN'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -72,7 +71,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','EVEN'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -88,7 +87,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ODD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -104,7 +103,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -120,7 +119,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FACTDOUBLE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -136,7 +135,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','FLOOR'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -152,7 +151,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','GCD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -168,7 +167,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LCM'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -184,7 +183,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','INT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','INT'), $args); $this->assertEquals($expectedResult, $result); } @@ -200,7 +199,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SIGN'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -216,7 +215,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','POWER'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -232,7 +231,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','LOG_BASE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -248,7 +247,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MOD'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -264,7 +263,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MDETERM'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -280,7 +279,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MINVERSE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -296,7 +295,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MMULT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -312,7 +311,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MULTINOMIAL'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -329,7 +328,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','MROUND'), $args); PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_ARRAY); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -346,7 +345,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','PRODUCT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -362,7 +361,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','QUOTIENT'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -378,7 +377,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDUP'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -394,7 +393,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROUNDDOWN'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -410,7 +409,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SERIESSUM'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -426,7 +425,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SUMSQ'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -442,7 +441,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','TRUNC'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -458,7 +457,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROMAN'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','ROMAN'), $args); $this->assertEquals($expectedResult, $result); } @@ -474,7 +473,7 @@ class MathTrigTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_MathTrig','SQRTPI'), $args); $this->assertEquals($expectedResult, $result, null, 1E-12); } @@ -556,5 +555,4 @@ class MathTrigTest extends PHPUnit_Framework_TestCase ), ); } - } diff --git a/unitTests/Classes/PHPExcel/Calculation/TextDataTest.php b/unitTests/Classes/PHPExcel/Calculation/TextDataTest.php index c7ed3b57..604c7a11 100644 --- a/unitTests/Classes/PHPExcel/Calculation/TextDataTest.php +++ b/unitTests/Classes/PHPExcel/Calculation/TextDataTest.php @@ -8,8 +8,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -24,7 +23,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CHARACTER'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CHARACTER'), $args); $this->assertEquals($expectedResult, $result); } @@ -40,7 +39,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','ASCIICODE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','ASCIICODE'), $args); $this->assertEquals($expectedResult, $result); } @@ -56,7 +55,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CONCATENATE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','CONCATENATE'), $args); $this->assertEquals($expectedResult, $result); } @@ -72,7 +71,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LEFT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LEFT'), $args); $this->assertEquals($expectedResult, $result); } @@ -88,7 +87,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','MID'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','MID'), $args); $this->assertEquals($expectedResult, $result); } @@ -104,7 +103,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RIGHT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RIGHT'), $args); $this->assertEquals($expectedResult, $result); } @@ -120,7 +119,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LOWERCASE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','LOWERCASE'), $args); $this->assertEquals($expectedResult, $result); } @@ -136,7 +135,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','UPPERCASE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','UPPERCASE'), $args); $this->assertEquals($expectedResult, $result); } @@ -152,7 +151,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','PROPERCASE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','PROPERCASE'), $args); $this->assertEquals($expectedResult, $result); } @@ -168,7 +167,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','STRINGLENGTH'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','STRINGLENGTH'), $args); $this->assertEquals($expectedResult, $result); } @@ -184,7 +183,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHINSENSITIVE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHINSENSITIVE'), $args); $this->assertEquals($expectedResult, $result); } @@ -200,7 +199,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SEARCHSENSITIVE'), $args); $this->assertEquals($expectedResult, $result); } @@ -216,7 +215,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','REPLACE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','REPLACE'), $args); $this->assertEquals($expectedResult, $result); } @@ -232,7 +231,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SUBSTITUTE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','SUBSTITUTE'), $args); $this->assertEquals($expectedResult, $result); } @@ -248,7 +247,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMSPACES'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMSPACES'), $args); $this->assertEquals($expectedResult, $result); } @@ -264,7 +263,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMNONPRINTABLE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TRIMNONPRINTABLE'), $args); $this->assertEquals($expectedResult, $result); } @@ -280,7 +279,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','DOLLAR'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','DOLLAR'), $args); $this->assertEquals($expectedResult, $result); } @@ -296,7 +295,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','FIXEDFORMAT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','FIXEDFORMAT'), $args); $this->assertEquals($expectedResult, $result); } @@ -312,7 +311,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RETURNSTRING'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','RETURNSTRING'), $args); $this->assertEquals($expectedResult, $result); } @@ -333,7 +332,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TEXTFORMAT'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','TEXTFORMAT'), $args); $this->assertEquals($expectedResult, $result); } @@ -353,7 +352,7 @@ class TextDataTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'),$args); + $result = call_user_func_array(array('PHPExcel_Calculation_TextData','VALUE'), $args); $this->assertEquals($expectedResult, $result, null, 1E-8); } @@ -361,5 +360,4 @@ class TextDataTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Calculation/TextData/VALUE.data'); } - } diff --git a/unitTests/Classes/PHPExcel/CalculationTest.php b/unitTests/Classes/PHPExcel/CalculationTest.php index 1de827ca..bc221ce2 100644 --- a/unitTests/Classes/PHPExcel/CalculationTest.php +++ b/unitTests/Classes/PHPExcel/CalculationTest.php @@ -4,7 +4,6 @@ require_once 'testDataFileIterator.php'; class CalculationTest extends PHPUnit_Framework_TestCase { - public function setUp() { if (!defined('PHPEXCEL_ROOT')) { @@ -33,5 +32,4 @@ class CalculationTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/CalculationBinaryComparisonOperation.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Cell/AdvancedValueBinderTest.php b/unitTests/Classes/PHPExcel/Cell/AdvancedValueBinderTest.php index b9b74d2a..0a55ba73 100644 --- a/unitTests/Classes/PHPExcel/Cell/AdvancedValueBinderTest.php +++ b/unitTests/Classes/PHPExcel/Cell/AdvancedValueBinderTest.php @@ -13,20 +13,20 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase public function provider() { if (!class_exists('PHPExcel_Style_NumberFormat')) { - $this->setUp(); + $this->setUp(); } $currencyUSD = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE; $currencyEURO = str_replace('$', '€', PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); return array( - array('10%', 0.1, PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00, ',', '.', '$'), - array('$10.11', 10.11, $currencyUSD, ',', '.', '$'), - array('$1,010.12', 1010.12, $currencyUSD, ',', '.', '$'), - array('$20,20', 20.2, $currencyUSD, '.', ',', '$'), - array('$2.020,20', 2020.2, $currencyUSD, '.', ',', '$'), - array('€2.020,20', 2020.2, $currencyEURO, '.', ',', '€'), - array('€ 2.020,20', 2020.2, $currencyEURO, '.', ',', '€'), - array('€2,020.22', 2020.22, $currencyEURO, ',', '.', '€'), + array('10%', 0.1, PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00, ',', '.', '$'), + array('$10.11', 10.11, $currencyUSD, ',', '.', '$'), + array('$1,010.12', 1010.12, $currencyUSD, ',', '.', '$'), + array('$20,20', 20.2, $currencyUSD, '.', ',', '$'), + array('$2.020,20', 2020.2, $currencyUSD, '.', ',', '$'), + array('€2.020,20', 2020.2, $currencyEURO, '.', ',', '€'), + array('€ 2.020,20', 2020.2, $currencyEURO, '.', ',', '€'), + array('€2,020.22', 2020.22, $currencyEURO, ',', '.', '€'), ); } @@ -70,4 +70,4 @@ class AdvancedValueBinderTest extends PHPUnit_Framework_TestCase $binder->bindValue($cell, $value); $this->assertEquals($valueBinded, $cell->getValue()); } -} \ No newline at end of file +} diff --git a/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php b/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php index 00d965f1..1180c9d6 100644 --- a/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php +++ b/unitTests/Classes/PHPExcel/Cell/DataTypeTest.php @@ -6,8 +6,7 @@ class DataTypeTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -20,5 +19,4 @@ class DataTypeTest extends PHPUnit_Framework_TestCase $this->assertGreaterThan(0, count($result)); $this->assertArrayHasKey('#NULL!', $result); } - } diff --git a/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php b/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php index a2326126..37287b1f 100644 --- a/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php +++ b/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php @@ -8,8 +8,7 @@ class DefaultValueBinderTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); diff --git a/unitTests/Classes/PHPExcel/Cell/HyperlinkTest.php b/unitTests/Classes/PHPExcel/Cell/HyperlinkTest.php index 9fbbb5a3..42dff6a5 100644 --- a/unitTests/Classes/PHPExcel/Cell/HyperlinkTest.php +++ b/unitTests/Classes/PHPExcel/Cell/HyperlinkTest.php @@ -6,8 +6,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -20,7 +19,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase $testInstance = new PHPExcel_Cell_Hyperlink($urlValue); $result = $testInstance->getUrl(); - $this->assertEquals($urlValue,$result); + $this->assertEquals($urlValue, $result); } public function testSetUrl() @@ -33,7 +32,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase $this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink); $result = $testInstance->getUrl(); - $this->assertEquals($newUrlValue,$result); + $this->assertEquals($newUrlValue, $result); } public function testGetTooltip() @@ -43,7 +42,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase $testInstance = new PHPExcel_Cell_Hyperlink(null, $tooltipValue); $result = $testInstance->getTooltip(); - $this->assertEquals($tooltipValue,$result); + $this->assertEquals($tooltipValue, $result); } public function testSetTooltip() @@ -56,7 +55,7 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase $this->assertTrue($result instanceof PHPExcel_Cell_Hyperlink); $result = $testInstance->getTooltip(); - $this->assertEquals($newTooltipValue,$result); + $this->assertEquals($newTooltipValue, $result); } public function testIsInternal() @@ -82,7 +81,6 @@ class HyperlinkTest extends PHPUnit_Framework_TestCase $testInstance = new PHPExcel_Cell_Hyperlink($urlValue, $tooltipValue); $result = $testInstance->getHashCode(); - $this->assertEquals($initialExpectedHash,$result); + $this->assertEquals($initialExpectedHash, $result); } - } diff --git a/unitTests/Classes/PHPExcel/CellTest.php b/unitTests/Classes/PHPExcel/CellTest.php index 2d8567e9..9680294a 100644 --- a/unitTests/Classes/PHPExcel/CellTest.php +++ b/unitTests/Classes/PHPExcel/CellTest.php @@ -21,7 +21,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','columnIndexFromString'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','columnIndexFromString'), $args); $this->assertEquals($expectedResult, $result); } @@ -34,7 +34,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = 'ABCD'; try { - $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters'); return; @@ -46,7 +46,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = ''; try { - $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','columnIndexFromString'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Column string index can not be empty'); return; @@ -61,7 +61,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','stringFromColumnIndex'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','stringFromColumnIndex'), $args); $this->assertEquals($expectedResult, $result); } @@ -77,7 +77,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','coordinateFromString'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','coordinateFromString'), $args); $this->assertEquals($expectedResult, $result); } @@ -90,7 +90,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); return; @@ -102,7 +102,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = ''; try { - $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string'); return; @@ -114,7 +114,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = 'AI'; try { - $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','coordinateFromString'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Invalid cell coordinate '.$cellAddress); return; @@ -129,7 +129,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','absoluteCoordinate'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','absoluteCoordinate'), $args); $this->assertEquals($expectedResult, $result); } @@ -142,7 +142,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func(array('PHPExcel_Cell','absoluteCoordinate'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','absoluteCoordinate'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); return; @@ -157,7 +157,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','absoluteReference'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','absoluteReference'), $args); $this->assertEquals($expectedResult, $result); } @@ -170,7 +170,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func(array('PHPExcel_Cell','absoluteReference'),$cellAddress); + $result = call_user_func(array('PHPExcel_Cell','absoluteReference'), $cellAddress); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); return; @@ -185,7 +185,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','splitRange'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','splitRange'), $args); foreach ($result as $key => $split) { if (!is_array($expectedResult[$key])) { $this->assertEquals($expectedResult[$key], $split[0]); @@ -207,7 +207,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','buildRange'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','buildRange'), $args); $this->assertEquals($expectedResult, $result); } @@ -220,7 +220,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $cellRange = ''; try { - $result = call_user_func(array('PHPExcel_Cell','buildRange'),$cellRange); + $result = call_user_func(array('PHPExcel_Cell','buildRange'), $cellRange); } catch (PHPExcel_Exception $e) { $this->assertEquals($e->getMessage(), 'Range does not contain any information'); return; @@ -235,7 +235,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','rangeBoundaries'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','rangeBoundaries'), $args); $this->assertEquals($expectedResult, $result); } @@ -251,7 +251,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','rangeDimension'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','rangeDimension'), $args); $this->assertEquals($expectedResult, $result); } @@ -267,7 +267,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','getRangeBoundaries'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','getRangeBoundaries'), $args); $this->assertEquals($expectedResult, $result); } @@ -283,7 +283,7 @@ class CellTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Cell','extractAllCellReferencesInRange'),$args); + $result = call_user_func_array(array('PHPExcel_Cell','extractAllCellReferencesInRange'), $args); $this->assertEquals($expectedResult, $result); } @@ -291,5 +291,4 @@ class CellTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/CellExtractAllCellReferencesInRange.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Chart/DataSeriesValuesTest.php b/unitTests/Classes/PHPExcel/Chart/DataSeriesValuesTest.php index 78ca67d7..5bb527cd 100644 --- a/unitTests/Classes/PHPExcel/Chart/DataSeriesValuesTest.php +++ b/unitTests/Classes/PHPExcel/Chart/DataSeriesValuesTest.php @@ -6,8 +6,7 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -49,7 +48,6 @@ class DataSeriesValuesTest extends PHPUnit_Framework_TestCase $setValue = $testInstance->setDataType($dataTypeValue); $result = $testInstance->getDataType(); - $this->assertEquals($dataTypeValue,$result); + $this->assertEquals($dataTypeValue, $result); } - } diff --git a/unitTests/Classes/PHPExcel/Chart/LayoutTest.php b/unitTests/Classes/PHPExcel/Chart/LayoutTest.php index 457b8551..a06b09b4 100644 --- a/unitTests/Classes/PHPExcel/Chart/LayoutTest.php +++ b/unitTests/Classes/PHPExcel/Chart/LayoutTest.php @@ -6,8 +6,7 @@ class LayoutTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -31,7 +30,6 @@ class LayoutTest extends PHPUnit_Framework_TestCase $setValue = $testInstance->setLayoutTarget($LayoutTargetValue); $result = $testInstance->getLayoutTarget(); - $this->assertEquals($LayoutTargetValue,$result); + $this->assertEquals($LayoutTargetValue, $result); } - } diff --git a/unitTests/Classes/PHPExcel/Chart/LegendTest.php b/unitTests/Classes/PHPExcel/Chart/LegendTest.php index 47af687b..462fbdc9 100644 --- a/unitTests/Classes/PHPExcel/Chart/LegendTest.php +++ b/unitTests/Classes/PHPExcel/Chart/LegendTest.php @@ -6,8 +6,7 @@ class LegendTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -39,7 +38,7 @@ class LegendTest extends PHPUnit_Framework_TestCase $this->assertFalse($result); // Ensure that value is unchanged $result = $testInstance->getPosition(); - $this->assertEquals(PHPExcel_Chart_Legend::POSITION_RIGHT,$result); + $this->assertEquals(PHPExcel_Chart_Legend::POSITION_RIGHT, $result); } public function testGetPosition() @@ -50,7 +49,7 @@ class LegendTest extends PHPUnit_Framework_TestCase $setValue = $testInstance->setPosition($PositionValue); $result = $testInstance->getPosition(); - $this->assertEquals($PositionValue,$result); + $this->assertEquals($PositionValue, $result); } public function testSetPositionXL() @@ -80,7 +79,7 @@ class LegendTest extends PHPUnit_Framework_TestCase $this->assertFalse($result); // Ensure that value is unchanged $result = $testInstance->getPositionXL(); - $this->assertEquals(PHPExcel_Chart_Legend::xlLegendPositionRight,$result); + $this->assertEquals(PHPExcel_Chart_Legend::xlLegendPositionRight, $result); } public function testGetPositionXL() @@ -91,7 +90,7 @@ class LegendTest extends PHPUnit_Framework_TestCase $setValue = $testInstance->setPositionXL($PositionValue); $result = $testInstance->getPositionXL(); - $this->assertEquals($PositionValue,$result); + $this->assertEquals($PositionValue, $result); } public function testSetOverlay() @@ -128,7 +127,7 @@ class LegendTest extends PHPUnit_Framework_TestCase $setValue = $testInstance->setOverlay($OverlayValue); $result = $testInstance->getOverlay(); - $this->assertEquals($OverlayValue,$result); + $this->assertEquals($OverlayValue, $result); } } diff --git a/unitTests/Classes/PHPExcel/Reader/XEEValidatorTest.php b/unitTests/Classes/PHPExcel/Reader/XEEValidatorTest.php index 47ad1f5d..e781f71e 100644 --- a/unitTests/Classes/PHPExcel/Reader/XEEValidatorTest.php +++ b/unitTests/Classes/PHPExcel/Reader/XEEValidatorTest.php @@ -51,5 +51,4 @@ class XEEValidatorTest extends PHPUnit_Framework_TestCase } return $tests; } - } diff --git a/unitTests/Classes/PHPExcel/ReferenceHelperTest.php b/unitTests/Classes/PHPExcel/ReferenceHelperTest.php index 35c4a50c..cf40f73a 100644 --- a/unitTests/Classes/PHPExcel/ReferenceHelperTest.php +++ b/unitTests/Classes/PHPExcel/ReferenceHelperTest.php @@ -54,5 +54,4 @@ class ReferenceHelperTest extends PHPUnit_Framework_TestCase $this->assertEquals($columnExpectedResult[$key], $value); } } - } diff --git a/unitTests/Classes/PHPExcel/Shared/CodePageTest.php b/unitTests/Classes/PHPExcel/Shared/CodePageTest.php index 5463e858..d434694e 100644 --- a/unitTests/Classes/PHPExcel/Shared/CodePageTest.php +++ b/unitTests/Classes/PHPExcel/Shared/CodePageTest.php @@ -21,7 +21,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_CodePage','NumberToName'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_CodePage','NumberToName'), $args); $this->assertEquals($expectedResult, $result); } @@ -34,7 +34,7 @@ class CodePageTest extends PHPUnit_Framework_TestCase { $invalidCodePage = 12345; try { - $result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'),$invalidCodePage); + $result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'), $invalidCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Unknown codepage: 12345'); return; @@ -46,12 +46,11 @@ class CodePageTest extends PHPUnit_Framework_TestCase { $unsupportedCodePage = 720; try { - $result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'),$unsupportedCodePage); + $result = call_user_func(array('PHPExcel_Shared_CodePage','NumberToName'), $unsupportedCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Code page 720 not supported.'); return; } $this->fail('An expected exception has not been raised.'); } - } diff --git a/unitTests/Classes/PHPExcel/Shared/DateTest.php b/unitTests/Classes/PHPExcel/Shared/DateTest.php index ffac7095..50049f6e 100644 --- a/unitTests/Classes/PHPExcel/Shared/DateTest.php +++ b/unitTests/Classes/PHPExcel/Shared/DateTest.php @@ -22,7 +22,7 @@ class DateTest extends PHPUnit_Framework_TestCase ); foreach ($calendarValues as $calendarValue) { - $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$calendarValue); + $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'), $calendarValue); $this->assertTrue($result); } } @@ -30,7 +30,7 @@ class DateTest extends PHPUnit_Framework_TestCase public function testSetExcelCalendarWithInvalidValue() { $unsupportedCalendar = '2012'; - $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'),$unsupportedCalendar); + $result = call_user_func(array('PHPExcel_Shared_Date','setExcelCalendar'), $unsupportedCalendar); $this->assertFalse($result); } @@ -49,7 +49,7 @@ class DateTest extends PHPUnit_Framework_TestCase if ($args[0] < 1) { $expectedResult += gmmktime(0,0,0); } - $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args); $this->assertEquals($expectedResult, $result); } @@ -70,7 +70,7 @@ class DateTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'), $args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -91,7 +91,7 @@ class DateTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','FormattedPHPToExcel'), $args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -115,7 +115,7 @@ class DateTest extends PHPUnit_Framework_TestCase if ($args[0] < 1) { $expectedResult += gmmktime(0,0,0); } - $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args); $this->assertEquals($expectedResult, $result); } @@ -136,7 +136,7 @@ class DateTest extends PHPUnit_Framework_TestCase $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','PHPToExcel'), $args); $this->assertEquals($expectedResult, $result, null, 1E-5); } @@ -152,7 +152,7 @@ class DateTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Date','isDateTimeFormatCode'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','isDateTimeFormatCode'), $args); $this->assertEquals($expectedResult, $result); } @@ -176,7 +176,7 @@ class DateTest extends PHPUnit_Framework_TestCase if ($args[0] < 1) { $expectedResult += gmmktime(0,0,0); } - $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Date','ExcelToPHP'), $args); $this->assertEquals($expectedResult, $result); } @@ -184,5 +184,4 @@ class DateTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Shared/DateTimeExcelToPHP1900Timezone.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Shared/FileTest.php b/unitTests/Classes/PHPExcel/Shared/FileTest.php index e7b288af..6f6696c5 100644 --- a/unitTests/Classes/PHPExcel/Shared/FileTest.php +++ b/unitTests/Classes/PHPExcel/Shared/FileTest.php @@ -16,7 +16,7 @@ class FileTest extends PHPUnit_Framework_TestCase public function testGetUseUploadTempDirectory() { - $expectedResult = FALSE; + $expectedResult = false; $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory')); $this->assertEquals($expectedResult, $result); @@ -30,7 +30,7 @@ class FileTest extends PHPUnit_Framework_TestCase ); foreach ($useUploadTempDirectoryValues as $useUploadTempDirectoryValue) { - call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'),$useUploadTempDirectoryValue); + call_user_func(array('PHPExcel_Shared_File','setUseUploadTempDirectory'), $useUploadTempDirectoryValue); $result = call_user_func(array('PHPExcel_Shared_File','getUseUploadTempDirectory')); $this->assertEquals($useUploadTempDirectoryValue, $result); diff --git a/unitTests/Classes/PHPExcel/Shared/FontTest.php b/unitTests/Classes/PHPExcel/Shared/FontTest.php index cf11fcca..eecd69de 100644 --- a/unitTests/Classes/PHPExcel/Shared/FontTest.php +++ b/unitTests/Classes/PHPExcel/Shared/FontTest.php @@ -30,7 +30,7 @@ class FontTest extends PHPUnit_Framework_TestCase ); foreach ($autosizeMethodValues as $autosizeMethodValue) { - $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$autosizeMethodValue); + $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'), $autosizeMethodValue); $this->assertTrue($result); } } @@ -39,7 +39,7 @@ class FontTest extends PHPUnit_Framework_TestCase { $unsupportedAutosizeMethod = 'guess'; - $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'),$unsupportedAutosizeMethod); + $result = call_user_func(array('PHPExcel_Shared_Font','setAutoSizeMethod'), $unsupportedAutosizeMethod); $this->assertFalse($result); } @@ -50,7 +50,7 @@ class FontTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Font','fontSizeToPixels'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Font','fontSizeToPixels'), $args); $this->assertEquals($expectedResult, $result); } @@ -66,7 +66,7 @@ class FontTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Font','inchSizeToPixels'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Font','inchSizeToPixels'), $args); $this->assertEquals($expectedResult, $result); } @@ -82,7 +82,7 @@ class FontTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_Font','centimeterSizeToPixels'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_Font','centimeterSizeToPixels'), $args); $this->assertEquals($expectedResult, $result); } @@ -90,5 +90,4 @@ class FontTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Shared/CentimeterSizeToPixels.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Shared/PasswordHasherTest.php b/unitTests/Classes/PHPExcel/Shared/PasswordHasherTest.php index 20bf8b94..620acb98 100644 --- a/unitTests/Classes/PHPExcel/Shared/PasswordHasherTest.php +++ b/unitTests/Classes/PHPExcel/Shared/PasswordHasherTest.php @@ -21,7 +21,7 @@ class PasswordHasherTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Shared_PasswordHasher','hashPassword'),$args); + $result = call_user_func_array(array('PHPExcel_Shared_PasswordHasher','hashPassword'), $args); $this->assertEquals($expectedResult, $result); } @@ -29,5 +29,4 @@ class PasswordHasherTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Shared/PasswordHashes.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Shared/StringTest.php b/unitTests/Classes/PHPExcel/Shared/StringTest.php index 4de1a628..9955d816 100644 --- a/unitTests/Classes/PHPExcel/Shared/StringTest.php +++ b/unitTests/Classes/PHPExcel/Shared/StringTest.php @@ -38,7 +38,7 @@ class StringTest extends PHPUnit_Framework_TestCase public function testSetDecimalSeparator() { $expectedResult = ','; - $result = call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'),$expectedResult); + $result = call_user_func(array('PHPExcel_Shared_String','setDecimalSeparator'), $expectedResult); $result = call_user_func(array('PHPExcel_Shared_String','getDecimalSeparator')); $this->assertEquals($expectedResult, $result); @@ -56,7 +56,7 @@ class StringTest extends PHPUnit_Framework_TestCase public function testSetThousandsSeparator() { $expectedResult = ' '; - $result = call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'),$expectedResult); + $result = call_user_func(array('PHPExcel_Shared_String','setThousandsSeparator'), $expectedResult); $result = call_user_func(array('PHPExcel_Shared_String','getThousandsSeparator')); $this->assertEquals($expectedResult, $result); @@ -74,10 +74,9 @@ class StringTest extends PHPUnit_Framework_TestCase public function testSetCurrencyCode() { $expectedResult = '£'; - $result = call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'),$expectedResult); + $result = call_user_func(array('PHPExcel_Shared_String','setCurrencyCode'), $expectedResult); $result = call_user_func(array('PHPExcel_Shared_String','getCurrencyCode')); $this->assertEquals($expectedResult, $result); } - } diff --git a/unitTests/Classes/PHPExcel/Shared/TimeZoneTest.php b/unitTests/Classes/PHPExcel/Shared/TimeZoneTest.php index 79ac9716..25484267 100644 --- a/unitTests/Classes/PHPExcel/Shared/TimeZoneTest.php +++ b/unitTests/Classes/PHPExcel/Shared/TimeZoneTest.php @@ -23,7 +23,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase ); foreach ($timezoneValues as $timezoneValue) { - $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$timezoneValue); + $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'), $timezoneValue); $this->assertTrue($result); } @@ -32,8 +32,7 @@ class TimeZoneTest extends PHPUnit_Framework_TestCase public function testSetTimezoneWithInvalidValue() { $unsupportedTimezone = 'Etc/GMT+10'; - $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$unsupportedTimezone); + $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'), $unsupportedTimezone); $this->assertFalse($result); } - } diff --git a/unitTests/Classes/PHPExcel/Style/ColorTest.php b/unitTests/Classes/PHPExcel/Style/ColorTest.php index 8b0bd541..2d9188ef 100644 --- a/unitTests/Classes/PHPExcel/Style/ColorTest.php +++ b/unitTests/Classes/PHPExcel/Style/ColorTest.php @@ -21,7 +21,7 @@ class ColorTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_Color','getRed'),$args); + $result = call_user_func_array(array('PHPExcel_Style_Color','getRed'), $args); $this->assertEquals($expectedResult, $result); } @@ -37,7 +37,7 @@ class ColorTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_Color','getGreen'),$args); + $result = call_user_func_array(array('PHPExcel_Style_Color','getGreen'), $args); $this->assertEquals($expectedResult, $result); } @@ -53,7 +53,7 @@ class ColorTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_Color','getBlue'),$args); + $result = call_user_func_array(array('PHPExcel_Style_Color','getBlue'), $args); $this->assertEquals($expectedResult, $result); } @@ -69,7 +69,7 @@ class ColorTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_Color','changeBrightness'),$args); + $result = call_user_func_array(array('PHPExcel_Style_Color','changeBrightness'), $args); $this->assertEquals($expectedResult, $result); } @@ -77,5 +77,4 @@ class ColorTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Style/ColorChangeBrightness.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Style/NumberFormatTest.php b/unitTests/Classes/PHPExcel/Style/NumberFormatTest.php index 4d89d929..08c2f024 100644 --- a/unitTests/Classes/PHPExcel/Style/NumberFormatTest.php +++ b/unitTests/Classes/PHPExcel/Style/NumberFormatTest.php @@ -24,7 +24,7 @@ class NumberFormatTest extends PHPUnit_Framework_TestCase { $args = func_get_args(); $expectedResult = array_pop($args); - $result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'),$args); + $result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'), $args); $this->assertEquals($expectedResult, $result); } @@ -32,5 +32,4 @@ class NumberFormatTest extends PHPUnit_Framework_TestCase { return new testDataFileIterator('rawTestData/Style/NumberFormat.data'); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/Column/RuleTest.php b/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/Column/RuleTest.php index 6a818f78..0c39c683 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/Column/RuleTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/Column/RuleTest.php @@ -105,5 +105,4 @@ class RuleTest extends PHPUnit_Framework_TestCase $result = clone $this->_testAutoFilterRuleObject; $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column_Rule', $result); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/ColumnTest.php b/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/ColumnTest.php index 9b49f810..da6eef53 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/ColumnTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/AutoFilter/ColumnTest.php @@ -143,7 +143,7 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase foreach ($attributeSet as $attributeName => $attributeValue) { // Setters return the instance to implement the fluent interface - $result = $this->_testAutoFilterColumnObject->setAttribute($attributeName,$attributeValue); + $result = $this->_testAutoFilterColumnObject->setAttribute($attributeName, $attributeValue); $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result); } } @@ -169,5 +169,4 @@ class AutofilterColumnTest extends PHPUnit_Framework_TestCase $result = clone $this->_testAutoFilterColumnObject; $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php b/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php index 2ea396c9..519810d3 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/AutoFilterTest.php @@ -148,7 +148,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase // objects for each column we set indexed by the column ID $this->assertInternalType('array', $result); $this->assertEquals(1, count($result)); - $this->assertArrayHasKey($expectedResult,$result); + $this->assertArrayHasKey($expectedResult, $result); $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]); } @@ -176,7 +176,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase // objects for each column we set indexed by the column ID $this->assertInternalType('array', $result); $this->assertEquals(1, count($result)); - $this->assertArrayHasKey($expectedResult,$result); + $this->assertArrayHasKey($expectedResult, $result); $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$expectedResult]); } @@ -216,7 +216,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase $this->assertInternalType('array', $result); $this->assertEquals(count($columnIndexes), count($result)); foreach ($columnIndexes as $columnIndex) { - $this->assertArrayHasKey($columnIndex,$result); + $this->assertArrayHasKey($columnIndex, $result); $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result[$columnIndex]); } } @@ -249,7 +249,7 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase foreach ($columnIndexes as $columnIndex => $columnID) { $result = $this->_testAutoFilterObject->getColumnByOffset($columnIndex); $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter_Column', $result); - $this->assertEquals($result->getColumnIndex(),$columnID); + $this->assertEquals($result->getColumnIndex(), $columnID); } } @@ -336,5 +336,4 @@ class AutoFilterTest extends PHPUnit_Framework_TestCase $result = clone $this->_testAutoFilterObject; $this->assertInstanceOf('PHPExcel_Worksheet_AutoFilter', $result); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/CellCollectionTest.php b/unitTests/Classes/PHPExcel/Worksheet/CellCollectionTest.php index c117ef8f..95dd2cec 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/CellCollectionTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/CellCollectionTest.php @@ -5,8 +5,7 @@ class CellCollectionTest extends PHPUnit_Framework_TestCase public function setUp() { - if (!defined('PHPEXCEL_ROOT')) - { + if (!defined('PHPEXCEL_ROOT')) { define('PHPEXCEL_ROOT', APPLICATION_PATH . '/'); } require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); @@ -27,5 +26,4 @@ class CellCollectionTest extends PHPUnit_Framework_TestCase PHPExcel_CachedObjectStorageFactory::finalize(); } } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/ColumnIteratorTest.php b/unitTests/Classes/PHPExcel/Worksheet/ColumnIteratorTest.php index 83d3b111..f87a545f 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/ColumnIteratorTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/ColumnIteratorTest.php @@ -61,7 +61,7 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase $iterator->seek('D'); $this->assertEquals($columnIndexResult, $iterator->key()); - for($i = 1; $i < array_search($columnIndexResult, $ranges); $i++) { + for ($i = 1; $i < array_search($columnIndexResult, $ranges); $i++) { $iterator->prev(); $expectedResult = $ranges[array_search($columnIndexResult, $ranges) - $i]; $this->assertEquals($expectedResult, $iterator->key()); @@ -85,5 +85,4 @@ class ColumnIteratorTest extends PHPUnit_Framework_TestCase $iterator = new PHPExcel_Worksheet_ColumnIterator($this->mockWorksheet, 'B', 'D'); $iterator->prev(); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/RowCellIteratorTest.php b/unitTests/Classes/PHPExcel/Worksheet/RowCellIteratorTest.php index 7fd425fb..d2d36499 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/RowCellIteratorTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/RowCellIteratorTest.php @@ -61,7 +61,7 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase $iterator->seek('D'); $this->assertEquals($RowCellIndexResult, $iterator->key()); - for($i = 1; $i < array_search($RowCellIndexResult, $ranges); $i++) { + for ($i = 1; $i < array_search($RowCellIndexResult, $ranges); $i++) { $iterator->prev(); $expectedResult = $ranges[array_search($RowCellIndexResult, $ranges) - $i]; $this->assertEquals($expectedResult, $iterator->key()); @@ -85,5 +85,4 @@ class RowCellIteratorTest extends PHPUnit_Framework_TestCase $iterator = new PHPExcel_Worksheet_RowCellIterator($this->mockWorksheet, 2, 'B', 'D'); $iterator->prev(); } - } diff --git a/unitTests/Classes/PHPExcel/Worksheet/RowIteratorTest.php b/unitTests/Classes/PHPExcel/Worksheet/RowIteratorTest.php index b6098936..ec0b2796 100644 --- a/unitTests/Classes/PHPExcel/Worksheet/RowIteratorTest.php +++ b/unitTests/Classes/PHPExcel/Worksheet/RowIteratorTest.php @@ -60,7 +60,7 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase $iterator->seek(4); $this->assertEquals($columnIndexResult, $iterator->key()); - for($i = 1; $i < $columnIndexResult-1; $i++) { + for ($i = 1; $i < $columnIndexResult-1; $i++) { $iterator->prev(); $this->assertEquals($columnIndexResult - $i, $iterator->key()); } @@ -83,5 +83,4 @@ class RowIteratorTest extends PHPUnit_Framework_TestCase $iterator = new PHPExcel_Worksheet_RowIterator($this->mockWorksheet, 2, 4); $iterator->prev(); } - } diff --git a/unitTests/custom/Complex.php b/unitTests/custom/Complex.php index 182e1401..0b22ddfd 100644 --- a/unitTests/custom/Complex.php +++ b/unitTests/custom/Complex.php @@ -66,7 +66,7 @@ class Complex if (is_array($realPart)) { // We have an array of (potentially) real and imaginary parts, and any suffix list ($realPart, $imaginaryPart, $suffix) = array_values($realPart) + array(0.0, 0.0, 'i'); - } elseif((is_string($realPart)) || (is_numeric($realPart))) { + } elseif ((is_string($realPart)) || (is_numeric($realPart))) { // We've been given a string to parse to extract the real and imaginary parts, and any suffix list ($realPart, $imaginaryPart, $suffix) = self::_parseComplex($realPart); } @@ -93,7 +93,8 @@ class Complex return $this->suffix; } - public function __toString() { + public function __toString() + { $str = ""; if ($this->imaginaryPart != 0.0) { if (abs($this->imaginaryPart) != 1.0) { @@ -103,13 +104,14 @@ class Complex } } if ($this->realPart != 0.0) { - if (($str) && ($this->imaginaryPart > 0.0)) + if (($str) && ($this->imaginaryPart > 0.0)) { $str = "+" . $str; + } $str = $this->realPart . $str; } - if (!$str) + if (!$str) { $str = "0.0"; + } return $str; } - } diff --git a/unitTests/testDataFileIterator.php b/unitTests/testDataFileIterator.php index ee417e59..69ff6edc 100644 --- a/unitTests/testDataFileIterator.php +++ b/unitTests/testDataFileIterator.php @@ -90,17 +90,17 @@ class testDataFileIterator implements Iterator $dataValue = trim($dataValue); // test for the required datatype and convert accordingly if (!is_numeric($dataValue)) { - if($dataValue == '') { + if ($dataValue == '') { $dataValue = null; - } elseif($dataValue == '""') { + } elseif ($dataValue == '""') { $dataValue = ''; - } elseif(($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) { - $dataValue = substr($dataValue,1,-1); - } elseif(($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) { - $dataValue = explode(';',substr($dataValue,1,-1)); + } elseif (($dataValue[0] == '"') && ($dataValue[strlen($dataValue)-1] == '"')) { + $dataValue = substr($dataValue, 1, -1); + } elseif (($dataValue[0] == '{') && ($dataValue[strlen($dataValue)-1] == '}')) { + $dataValue = explode(';',substr($dataValue, 1, -1)); foreach ($dataValue as &$dataRow) { - if (strpos($dataRow,'|') !== false) { - $dataRow = explode('|',$dataRow); + if (strpos($dataRow, '|') !== false) { + $dataRow = explode('|', $dataRow); foreach ($dataRow as &$dataCell) { $dataCell = $this->_parseDataValue($dataCell); } @@ -124,7 +124,7 @@ class testDataFileIterator implements Iterator } } } else { - if (strpos($dataValue,'.') !== false) { + if (strpos($dataValue, '.') !== false) { $dataValue = (float) $dataValue; } else { $dataValue = (int) $dataValue;