From d4e7026c95631fe232f609830b3c44344d1a5652 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sat, 27 Apr 2013 23:36:39 +0100 Subject: [PATCH] docblocks --- Classes/PHPExcel/CalcEngine/Logger.php | 2 +- Classes/PHPExcel/Calculation.php | 46 ++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/Classes/PHPExcel/CalcEngine/Logger.php b/Classes/PHPExcel/CalcEngine/Logger.php index a34a5689..627788f6 100644 --- a/Classes/PHPExcel/CalcEngine/Logger.php +++ b/Classes/PHPExcel/CalcEngine/Logger.php @@ -26,7 +26,7 @@ */ /** - * PHPExcel_Calculation_Logger + * PHPExcel_CalcEngine_Logger * * @category PHPExcel * @package PHPExcel_Calculation diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index 93f77d74..ab474a3b 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -1701,6 +1701,8 @@ class PHPExcel_Calculation { * Get an instance of this class * * @access public + * @param PHPExcel $workbook Injected workbook for working with a PHPExcel object, + * or NULL to create a standalone claculation engine * @return PHPExcel_Calculation */ public static function getInstance(PHPExcel $workbook = NULL) { @@ -1718,6 +1720,12 @@ class PHPExcel_Calculation { return self::$_instance; } // function getInstance() + /** + * Unset an instance of this class + * + * @access public + * @param PHPExcel $workbook Injected workbook identifying the instance to unset + */ public static function unsetInstance(PHPExcel $workbook = NULL) { if ($workbook !== NULL) { if (isset(self::$_workbookSets[$workbook->getID()])) { @@ -1738,6 +1746,12 @@ class PHPExcel_Calculation { } // function flushInstance() + /** + * Get the debuglog for this claculation engine instance + * + * @access public + * @return PHPExcel_CalcEngine_Logger + */ public function getDebugLog() { return $this->_debugLog; } @@ -1849,6 +1863,8 @@ class PHPExcel_Calculation { /** * Clear calculation cache for a specified worksheet + * + * @param string $worksheetName */ public function clearCalculationCacheForWorksheet($worksheetName) { if (isset($this->_calculationCache[$worksheetName])) { @@ -1858,6 +1874,9 @@ class PHPExcel_Calculation { /** * Rename calculation cache for a specified worksheet + * + * @param string $fromWorksheetName + * @param string $toWorksheetName */ public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksheetName) { if (isset($this->_calculationCache[$fromWorksheetName])) { @@ -1880,9 +1899,10 @@ class PHPExcel_Calculation { /** * Set the locale code * + * @param string $locale The locale to use for formula translation * @return boolean */ - public function setLocale($locale='en_us') { + public function setLocale($locale = 'en_us') { // Identify our locale and language $language = $locale = strtolower($locale); if (strpos($locale,'_') !== FALSE) { @@ -2229,7 +2249,9 @@ class PHPExcel_Calculation { /** * Calculate the value of a formula * - * @param string $formula Formula to parse + * @param string $formula Formula to parse + * @param string $cellID Address of the cell to calculate + * @param PHPExcel_Cell $pCell Cell to calculate * @return mixed * @throws PHPExcel_Calculation_Exception */ @@ -2405,8 +2427,12 @@ class PHPExcel_Calculation { /** * Ensure that paired matrix operands are both matrices of the same size * - * @param mixed &$matrix1 First matrix operand - * @param mixed &$matrix2 Second matrix operand + * @param mixed &$matrix1 First matrix operand + * @param mixed &$matrix2 Second matrix operand + * @param integer $matrix1Rows Row size of first matrix operand + * @param integer $matrix1Columns Column size of first matrix operand + * @param integer $matrix2Rows Row size of second matrix operand + * @param integer $matrix2Columns Column size of second matrix operand */ private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { @@ -2446,6 +2472,10 @@ class PHPExcel_Calculation { * * @param mixed &$matrix1 First matrix operand * @param mixed &$matrix2 Second matrix operand + * @param integer $matrix1Rows Row size of first matrix operand + * @param integer $matrix1Columns Column size of first matrix operand + * @param integer $matrix2Rows Row size of second matrix operand + * @param integer $matrix2Columns Column size of second matrix operand */ private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) { if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { @@ -3594,12 +3624,13 @@ class PHPExcel_Calculation { /** * Extract range values * - * @param string &$pRange String based range representation + * @param string &$pRange String based range representation * @param PHPExcel_Worksheet $pSheet Worksheet + * @param boolean $resetLog Flag indicating whether calculation log should be reset or not * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. * @throws PHPExcel_Calculation_Exception */ - public function extractCellRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = NULL, $resetLog=TRUE) { + public function extractCellRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = NULL, $resetLog = TRUE) { // Return value $returnValue = array (); @@ -3654,9 +3685,10 @@ class PHPExcel_Calculation { * @param string &$pRange String based range representation * @param PHPExcel_Worksheet $pSheet Worksheet * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. + * @param boolean $resetLog Flag indicating whether calculation log should be reset or not * @throws PHPExcel_Calculation_Exception */ - public function extractNamedRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = NULL, $resetLog=TRUE) { + public function extractNamedRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = NULL, $resetLog = TRUE) { // Return value $returnValue = array ();