From 9f575aff685e7cf9d5291cf3c4939a270b4a2d58 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Wed, 15 May 2013 18:02:24 +0100 Subject: [PATCH] Manual PR merge to remove redundant brackets after throw in 2 files, courtesy of kachkaev --- Classes/PHPExcel/Calculation.php | 6 +++--- Classes/PHPExcel/Cell.php | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index 7b935e64..0e6e2306 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -2209,7 +2209,7 @@ class PHPExcel_Calculation { try { return $this->calculateCellValue($pCell); } catch (PHPExcel_Exception $e) { - throw(new PHPExcel_Calculation_Exception($e->getMessage())); + throw new PHPExcel_Calculation_Exception($e->getMessage()); } } // function calculate() @@ -2243,7 +2243,7 @@ class PHPExcel_Calculation { try { $result = self::_unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell)); } catch (PHPExcel_Exception $e) { - throw(new PHPExcel_Calculation_Exception($e->getMessage())); + throw new PHPExcel_Calculation_Exception($e->getMessage()); } if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { @@ -2323,7 +2323,7 @@ class PHPExcel_Calculation { try { $result = self::_unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell)); } catch (PHPExcel_Exception $e) { - throw(new PHPExcel_Calculation_Exception($e->getMessage())); + throw new PHPExcel_Calculation_Exception($e->getMessage()); } // Reset calculation cacheing to its previous state diff --git a/Classes/PHPExcel/Cell.php b/Classes/PHPExcel/Cell.php index c34c7c53..6664e645 100644 --- a/Classes/PHPExcel/Cell.php +++ b/Classes/PHPExcel/Cell.php @@ -295,10 +295,8 @@ class PHPExcel_Cell } //echo 'Calculation Exception: '.$ex->getMessage().PHP_EOL; $result = '#N/A'; - throw( - new PHPExcel_Calculation_Exception( - $this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage() - ) + throw new PHPExcel_Calculation_Exception( + $this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage() ); }