@@ -78,7 +78,7 @@ |
||
78 | 78 | $this->imageResource = null; |
79 | 79 | $this->renderingFunction = self::RENDERING_DEFAULT; |
80 | 80 | $this->mimeType = self::MIMETYPE_DEFAULT; |
81 | - $this->uniqueName = md5(rand(0, 9999). time() . rand(0, 9999)); |
|
81 | + $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999)); |
|
82 | 82 | |
83 | 83 | // Initialize parent |
84 | 84 | parent::__construct(); |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * |
221 | 221 | * @var int? |
222 | 222 | */ |
223 | - private $fitToHeight = 1; |
|
223 | + private $fitToHeight = 1; |
|
224 | 224 | |
225 | 225 | /** |
226 | 226 | * Fit To Width |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | * |
229 | 229 | * @var int? |
230 | 230 | */ |
231 | - private $fitToWidth = 1; |
|
231 | + private $fitToWidth = 1; |
|
232 | 232 | |
233 | 233 | /** |
234 | 234 | * Columns to repeat at left |
@@ -599,8 +599,8 @@ discard block |
||
599 | 599 | return $this->printArea; |
600 | 600 | } |
601 | 601 | $printAreas = explode(',', $this->printArea); |
602 | - if (isset($printAreas[$index-1])) { |
|
603 | - return $printAreas[$index-1]; |
|
602 | + if (isset($printAreas[$index - 1])) { |
|
603 | + return $printAreas[$index - 1]; |
|
604 | 604 | } |
605 | 605 | throw new \PHPExcel\Exception("Requested Print Area does not exist"); |
606 | 606 | } |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | return !is_null($this->printArea); |
621 | 621 | } |
622 | 622 | $printAreas = explode(',', $this->printArea); |
623 | - return isset($printAreas[$index-1]); |
|
623 | + return isset($printAreas[$index - 1]); |
|
624 | 624 | } |
625 | 625 | |
626 | 626 | /** |
@@ -638,8 +638,8 @@ discard block |
||
638 | 638 | $this->printArea = null; |
639 | 639 | } else { |
640 | 640 | $printAreas = explode(',', $this->printArea); |
641 | - if (isset($printAreas[$index-1])) { |
|
642 | - unset($printAreas[$index-1]); |
|
641 | + if (isset($printAreas[$index - 1])) { |
|
642 | + unset($printAreas[$index - 1]); |
|
643 | 643 | $this->printArea = implode(',', $printAreas); |
644 | 644 | } |
645 | 645 | } |
@@ -689,12 +689,12 @@ discard block |
||
689 | 689 | if (($index <= 0) || ($index > count($printAreas))) { |
690 | 690 | throw new \PHPExcel\Exception('Invalid index for setting print range.'); |
691 | 691 | } |
692 | - $printAreas[$index-1] = $value; |
|
692 | + $printAreas[$index - 1] = $value; |
|
693 | 693 | $this->printArea = implode(',', $printAreas); |
694 | 694 | } |
695 | 695 | } elseif ($method == self::SETPRINTRANGE_INSERT) { |
696 | 696 | if ($index == 0) { |
697 | - $this->printArea .= ($this->printArea == '') ? $value : ','.$value; |
|
697 | + $this->printArea .= ($this->printArea == '') ? $value : ',' . $value; |
|
698 | 698 | } else { |
699 | 699 | $printAreas = explode(',', $this->printArea); |
700 | 700 | if ($index < 0) { |
@@ -52,7 +52,7 @@ |
||
52 | 52 | public function __construct(\PHPExcel\Worksheet $parent = null, $columnIndex = 'A') |
53 | 53 | { |
54 | 54 | // Set parent and column index |
55 | - $this->parent = $parent; |
|
55 | + $this->parent = $parent; |
|
56 | 56 | $this->columnIndex = $columnIndex; |
57 | 57 | } |
58 | 58 |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | public function __construct() |
127 | 127 | { |
128 | 128 | // Initialise values |
129 | - $this->name = ''; |
|
129 | + $this->name = ''; |
|
130 | 130 | $this->description = ''; |
131 | 131 | $this->worksheet = null; |
132 | 132 | $this->coordinates = 'A1'; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | // Set image index |
142 | 142 | self::$imageCounter++; |
143 | - $this->imageIndex = self::$imageCounter; |
|
143 | + $this->imageIndex = self::$imageCounter; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | $this->height = ceil($xratio * $this->height); |
393 | 393 | $this->width = $width; |
394 | 394 | } else { |
395 | - $this->width = ceil($yratio * $this->width); |
|
396 | - $this->height = $height; |
|
395 | + $this->width = ceil($yratio * $this->width); |
|
396 | + $this->height = $height; |
|
397 | 397 | } |
398 | 398 | } else { |
399 | 399 | $this->width = $width; |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | } |
409 | 409 | } else { |
410 | 410 | // String values are always tested for equality, factoring in for wildcards (hence a regexp test) |
411 | - $retVal = preg_match('/^'.$rule['value'].'$/i', $cellValue); |
|
411 | + $retVal = preg_match('/^' . $rule['value'] . '$/i', $cellValue); |
|
412 | 412 | } |
413 | 413 | // If there are multiple conditions, then we need to test both using the appropriate join operator |
414 | 414 | switch ($join) { |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | * @var array |
460 | 460 | */ |
461 | 461 | private static $fromReplace = array('\*', '\?', '~~', '~.*', '~.?'); |
462 | - private static $toReplace = array('.*', '.', '~', '\*', '\?'); |
|
462 | + private static $toReplace = array('.*', '.', '~', '\*', '\?'); |
|
463 | 463 | |
464 | 464 | |
465 | 465 | /** |
@@ -528,9 +528,9 @@ discard block |
||
528 | 528 | case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: |
529 | 529 | $thisMonth = date('m', $baseDate); |
530 | 530 | $thisQuarter = floor(--$thisMonth / 3); |
531 | - $maxVal = (int) \PHPExcel\Shared\Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), (1+$thisQuarter)*3, date('Y', $baseDate))); |
|
531 | + $maxVal = (int) \PHPExcel\Shared\Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), (1 + $thisQuarter) * 3, date('Y', $baseDate))); |
|
532 | 532 | ++$maxVal; |
533 | - $val = (int) \PHPExcel\Shared\Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1+$thisQuarter*3, date('Y', $baseDate))); |
|
533 | + $val = (int) \PHPExcel\Shared\Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1 + $thisQuarter * 3, date('Y', $baseDate))); |
|
534 | 534 | break; |
535 | 535 | case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH: |
536 | 536 | case AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | |
574 | 574 | private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) |
575 | 575 | { |
576 | - $range = $columnID.$startRow.':'.$columnID.$endRow; |
|
576 | + $range = $columnID . $startRow . ':' . $columnID . $endRow; |
|
577 | 577 | $dataValues = \PHPExcel\Calculation\Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false)); |
578 | 578 | |
579 | 579 | $dataValues = array_filter($dataValues); |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | ($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)) { |
705 | 705 | // Number (Average) based |
706 | 706 | // Calculate the average |
707 | - $averageFormula = '=AVERAGE('.$columnID.($rangeStart[1]+1).':'.$columnID.$rangeEnd[1].')'; |
|
707 | + $averageFormula = '=AVERAGE(' . $columnID . ($rangeStart[1] + 1) . ':' . $columnID . $rangeEnd[1] . ')'; |
|
708 | 708 | $average = \PHPExcel\Calculation::getInstance()->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1')); |
709 | 709 | // Set above/below rule based on greaterThan or LessTan |
710 | 710 | $operator = ($dynamicRuleType === AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) |
@@ -726,8 +726,8 @@ discard block |
||
726 | 726 | $ruleValues = array($period); |
727 | 727 | } else { |
728 | 728 | --$period; |
729 | - $periodEnd = (1+$period)*3; |
|
730 | - $periodStart = 1+$period*3; |
|
729 | + $periodEnd = (1 + $period) * 3; |
|
730 | + $periodStart = 1 + $period * 3; |
|
731 | 731 | $ruleValues = range($periodStart, $periodEnd); |
732 | 732 | } |
733 | 733 | $columnFilterTests[$columnID] = array( |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | $ruleValue = 500; |
763 | 763 | } |
764 | 764 | |
765 | - $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1]+1, $rangeEnd[1], $toptenRuleType, $ruleValue); |
|
765 | + $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1] + 1, $rangeEnd[1], $toptenRuleType, $ruleValue); |
|
766 | 766 | |
767 | 767 | $operator = ($toptenRuleType == AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) |
768 | 768 | ? AutoFilter\Column\Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL |
@@ -781,12 +781,12 @@ discard block |
||
781 | 781 | // var_dump($columnFilterTests); |
782 | 782 | // |
783 | 783 | // Execute the column tests for each row in the autoFilter range to determine show/hide, |
784 | - for ($row = $rangeStart[1]+1; $row <= $rangeEnd[1]; ++$row) { |
|
784 | + for ($row = $rangeStart[1] + 1; $row <= $rangeEnd[1]; ++$row) { |
|
785 | 785 | // echo 'Testing Row = ', $row,PHP_EOL; |
786 | 786 | $result = true; |
787 | 787 | foreach ($columnFilterTests as $columnID => $columnFilterTest) { |
788 | 788 | // echo 'Testing cell ', $columnID.$row,PHP_EOL; |
789 | - $cellValue = $this->workSheet->getCell($columnID.$row)->getCalculatedValue(); |
|
789 | + $cellValue = $this->workSheet->getCell($columnID . $row)->getCalculatedValue(); |
|
790 | 790 | // echo 'Value is ', $cellValue,PHP_EOL; |
791 | 791 | // Execute the filter test |
792 | 792 | $result = $result && |
@@ -34,42 +34,42 @@ |
||
34 | 34 | * |
35 | 35 | * @var double |
36 | 36 | */ |
37 | - private $left = 0.7; |
|
37 | + private $left = 0.7; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Right |
41 | 41 | * |
42 | 42 | * @var double |
43 | 43 | */ |
44 | - private $right = 0.7; |
|
44 | + private $right = 0.7; |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Top |
48 | 48 | * |
49 | 49 | * @var double |
50 | 50 | */ |
51 | - private $top = 0.75; |
|
51 | + private $top = 0.75; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * Bottom |
55 | 55 | * |
56 | 56 | * @var double |
57 | 57 | */ |
58 | - private $bottom = 0.75; |
|
58 | + private $bottom = 0.75; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Header |
62 | 62 | * |
63 | 63 | * @var double |
64 | 64 | */ |
65 | - private $header = 0.3; |
|
65 | + private $header = 0.3; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Footer |
69 | 69 | * |
70 | 70 | * @var double |
71 | 71 | */ |
72 | - private $footer = 0.3; |
|
72 | + private $footer = 0.3; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Create a new PageMargins |
@@ -34,119 +34,119 @@ |
||
34 | 34 | * |
35 | 35 | * @var boolean |
36 | 36 | */ |
37 | - private $sheet = false; |
|
37 | + private $sheet = false; |
|
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Objects |
41 | 41 | * |
42 | 42 | * @var boolean |
43 | 43 | */ |
44 | - private $objects = false; |
|
44 | + private $objects = false; |
|
45 | 45 | |
46 | 46 | /** |
47 | 47 | * Scenarios |
48 | 48 | * |
49 | 49 | * @var boolean |
50 | 50 | */ |
51 | - private $scenarios = false; |
|
51 | + private $scenarios = false; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * Format cells |
55 | 55 | * |
56 | 56 | * @var boolean |
57 | 57 | */ |
58 | - private $formatCells = false; |
|
58 | + private $formatCells = false; |
|
59 | 59 | |
60 | 60 | /** |
61 | 61 | * Format columns |
62 | 62 | * |
63 | 63 | * @var boolean |
64 | 64 | */ |
65 | - private $formatColumns = false; |
|
65 | + private $formatColumns = false; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Format rows |
69 | 69 | * |
70 | 70 | * @var boolean |
71 | 71 | */ |
72 | - private $formatRows = false; |
|
72 | + private $formatRows = false; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Insert columns |
76 | 76 | * |
77 | 77 | * @var boolean |
78 | 78 | */ |
79 | - private $insertColumns = false; |
|
79 | + private $insertColumns = false; |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Insert rows |
83 | 83 | * |
84 | 84 | * @var boolean |
85 | 85 | */ |
86 | - private $insertRows = false; |
|
86 | + private $insertRows = false; |
|
87 | 87 | |
88 | 88 | /** |
89 | 89 | * Insert hyperlinks |
90 | 90 | * |
91 | 91 | * @var boolean |
92 | 92 | */ |
93 | - private $insertHyperlinks = false; |
|
93 | + private $insertHyperlinks = false; |
|
94 | 94 | |
95 | 95 | /** |
96 | 96 | * Delete columns |
97 | 97 | * |
98 | 98 | * @var boolean |
99 | 99 | */ |
100 | - private $deleteColumns = false; |
|
100 | + private $deleteColumns = false; |
|
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Delete rows |
104 | 104 | * |
105 | 105 | * @var boolean |
106 | 106 | */ |
107 | - private $deleteRows = false; |
|
107 | + private $deleteRows = false; |
|
108 | 108 | |
109 | 109 | /** |
110 | 110 | * Select locked cells |
111 | 111 | * |
112 | 112 | * @var boolean |
113 | 113 | */ |
114 | - private $selectLockedCells = false; |
|
114 | + private $selectLockedCells = false; |
|
115 | 115 | |
116 | 116 | /** |
117 | 117 | * Sort |
118 | 118 | * |
119 | 119 | * @var boolean |
120 | 120 | */ |
121 | - private $sort = false; |
|
121 | + private $sort = false; |
|
122 | 122 | |
123 | 123 | /** |
124 | 124 | * AutoFilter |
125 | 125 | * |
126 | 126 | * @var boolean |
127 | 127 | */ |
128 | - private $autoFilter = false; |
|
128 | + private $autoFilter = false; |
|
129 | 129 | |
130 | 130 | /** |
131 | 131 | * Pivot tables |
132 | 132 | * |
133 | 133 | * @var boolean |
134 | 134 | */ |
135 | - private $pivotTables = false; |
|
135 | + private $pivotTables = false; |
|
136 | 136 | |
137 | 137 | /** |
138 | 138 | * Select unlocked cells |
139 | 139 | * |
140 | 140 | * @var boolean |
141 | 141 | */ |
142 | - private $selectUnlockedCells = false; |
|
142 | + private $selectUnlockedCells = false; |
|
143 | 143 | |
144 | 144 | /** |
145 | 145 | * Password |
146 | 146 | * |
147 | 147 | * @var string |
148 | 148 | */ |
149 | - private $password = ''; |
|
149 | + private $password = ''; |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Create a new Protection |
@@ -51,15 +51,15 @@ discard block |
||
51 | 51 | // String operand |
52 | 52 | const CALCULATION_REGEXP_STRING = '"(?:[^"]|"")*"'; |
53 | 53 | // Opening bracket |
54 | - const CALCULATION_REGEXP_OPENBRACE = '\('; |
|
54 | + const CALCULATION_REGEXP_OPENBRACE = '\('; |
|
55 | 55 | // Function (allow for the old @ symbol that could be used to prefix a function, but we'll ignore it) |
56 | - const CALCULATION_REGEXP_FUNCTION = '@?([A-Z][A-Z0-9\.]*)[\s]*\('; |
|
56 | + const CALCULATION_REGEXP_FUNCTION = '@?([A-Z][A-Z0-9\.]*)[\s]*\('; |
|
57 | 57 | // Cell reference (cell or range of cells, with or without a sheet reference) |
58 | - const CALCULATION_REGEXP_CELLREF = CALCULATION_REGEXP_CELLREF; |
|
58 | + const CALCULATION_REGEXP_CELLREF = CALCULATION_REGEXP_CELLREF; |
|
59 | 59 | // Named Range of cells |
60 | - const CALCULATION_REGEXP_NAMEDRANGE = CALCULATION_REGEXP_NAMEDRANGE; |
|
60 | + const CALCULATION_REGEXP_NAMEDRANGE = CALCULATION_REGEXP_NAMEDRANGE; |
|
61 | 61 | // Error |
62 | - const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; |
|
62 | + const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; |
|
63 | 63 | |
64 | 64 | |
65 | 65 | /** constants */ |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @access private |
102 | 102 | * @var array |
103 | 103 | */ |
104 | - private $calculationCache = array (); |
|
104 | + private $calculationCache = array(); |
|
105 | 105 | |
106 | 106 | |
107 | 107 | /** |
@@ -121,10 +121,10 @@ discard block |
||
121 | 121 | * @var array |
122 | 122 | */ |
123 | 123 | private static $operators = array( |
124 | - '+' => true, '-' => true, '*' => true, '/' => true, |
|
125 | - '^' => true, '&' => true, '%' => false, '~' => false, |
|
126 | - '>' => true, '<' => true, '=' => true, '>=' => true, |
|
127 | - '<=' => true, '<>' => true, '|' => true, ':' => true |
|
124 | + '+' => true, '-' => true, '*' => true, '/' => true, |
|
125 | + '^' => true, '&' => true, '%' => false, '~' => false, |
|
126 | + '>' => true, '<' => true, '=' => true, '>=' => true, |
|
127 | + '<=' => true, '<>' => true, '|' => true, ':' => true |
|
128 | 128 | ); |
129 | 129 | |
130 | 130 | /** |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | * @var array |
135 | 135 | */ |
136 | 136 | private static $binaryOperators = array( |
137 | - '+' => true, '-' => true, '*' => true, '/' => true, |
|
138 | - '^' => true, '&' => true, '>' => true, '<' => true, |
|
139 | - '=' => true, '>=' => true, '<=' => true, '<>' => true, |
|
140 | - '|' => true, ':' => true |
|
137 | + '+' => true, '-' => true, '*' => true, '/' => true, |
|
138 | + '^' => true, '&' => true, '>' => true, '<' => true, |
|
139 | + '=' => true, '>=' => true, '<=' => true, '<>' => true, |
|
140 | + '|' => true, ':' => true |
|
141 | 141 | ); |
142 | 142 | |
143 | 143 | /** |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * @var float |
207 | 207 | * |
208 | 208 | */ |
209 | - private $delta = 0.1e-12; |
|
209 | + private $delta = 0.1e-12; |
|
210 | 210 | |
211 | 211 | |
212 | 212 | /** |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | * @var string |
216 | 216 | * |
217 | 217 | */ |
218 | - private static $localeLanguage = 'en_us'; // US English (default locale) |
|
218 | + private static $localeLanguage = 'en_us'; // US English (default locale) |
|
219 | 219 | |
220 | 220 | /** |
221 | 221 | * List of available locale settings |
@@ -2073,9 +2073,9 @@ discard block |
||
2073 | 2073 | |
2074 | 2074 | private static function loadLocales() |
2075 | 2075 | { |
2076 | - $localeFileDirectory = PHPEXCEL_ROOT.'PHPExcel/locale/'; |
|
2077 | - foreach (glob($localeFileDirectory.'/*', GLOB_ONLYDIR) as $filename) { |
|
2078 | - $filename = substr($filename, strlen($localeFileDirectory)+1); |
|
2076 | + $localeFileDirectory = PHPEXCEL_ROOT . 'PHPExcel/locale/'; |
|
2077 | + foreach (glob($localeFileDirectory . '/*', GLOB_ONLYDIR) as $filename) { |
|
2078 | + $filename = substr($filename, strlen($localeFileDirectory) + 1); |
|
2079 | 2079 | if ($filename != 'en') { |
2080 | 2080 | self::$validLocaleLanguages[] = $filename; |
2081 | 2081 | } |
@@ -2320,10 +2320,10 @@ discard block |
||
2320 | 2320 | // Default is English, if user isn't requesting english, then read the necessary data from the locale files |
2321 | 2321 | if ($locale != 'en_us') { |
2322 | 2322 | // Search for a file with a list of function names for locale |
2323 | - $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'functions'; |
|
2323 | + $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions'; |
|
2324 | 2324 | if (!file_exists($functionNamesFile)) { |
2325 | 2325 | // If there isn't a locale specific function file, look for a language specific function file |
2326 | - $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'functions'; |
|
2326 | + $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $language . DIRECTORY_SEPARATOR . 'functions'; |
|
2327 | 2327 | if (!file_exists($functionNamesFile)) { |
2328 | 2328 | return false; |
2329 | 2329 | } |
@@ -2331,7 +2331,7 @@ discard block |
||
2331 | 2331 | // Retrieve the list of locale or language specific function names |
2332 | 2332 | $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
2333 | 2333 | foreach ($localeFunctions as $localeFunction) { |
2334 | - list($localeFunction) = explode('##', $localeFunction); // Strip out comments |
|
2334 | + list($localeFunction) = explode('##', $localeFunction); // Strip out comments |
|
2335 | 2335 | if (strpos($localeFunction, '=') !== false) { |
2336 | 2336 | list($fName, $lfName) = explode('=', $localeFunction); |
2337 | 2337 | $fName = trim($fName); |
@@ -2349,14 +2349,14 @@ discard block |
||
2349 | 2349 | self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE']; |
2350 | 2350 | } |
2351 | 2351 | |
2352 | - $configFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'config'; |
|
2352 | + $configFile = PHPEXCEL_ROOT . 'PHPExcel' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config'; |
|
2353 | 2353 | if (!file_exists($configFile)) { |
2354 | - $configFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'config'; |
|
2354 | + $configFile = PHPEXCEL_ROOT . 'PHPExcel' . DIRECTORY_SEPARATOR . 'locale' . DIRECTORY_SEPARATOR . $language . DIRECTORY_SEPARATOR . 'config'; |
|
2355 | 2355 | } |
2356 | 2356 | if (file_exists($configFile)) { |
2357 | 2357 | $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
2358 | 2358 | foreach ($localeSettings as $localeSetting) { |
2359 | - list($localeSetting) = explode('##', $localeSetting); // Strip out comments |
|
2359 | + list($localeSetting) = explode('##', $localeSetting); // Strip out comments |
|
2360 | 2360 | if (strpos($localeSetting, '=') !== false) { |
2361 | 2361 | list($settingName, $settingValue) = explode('=', $localeSetting); |
2362 | 2362 | $settingName = strtoupper(trim($settingName)); |
@@ -2394,7 +2394,7 @@ discard block |
||
2394 | 2394 | break; |
2395 | 2395 | case $fromSeparator: |
2396 | 2396 | if (!$inBraces) { |
2397 | - $formula = mb_substr($formula, 0, $i).$toSeparator.mb_substr($formula, $i+1); |
|
2397 | + $formula = mb_substr($formula, 0, $i) . $toSeparator . mb_substr($formula, $i + 1); |
|
2398 | 2398 | } |
2399 | 2399 | } |
2400 | 2400 | } |
@@ -2440,20 +2440,20 @@ discard block |
||
2440 | 2440 | if (self::$functionReplaceFromExcel === null) { |
2441 | 2441 | self::$functionReplaceFromExcel = array(); |
2442 | 2442 | foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { |
2443 | - self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelFunctionName).'([\s]*\()/Ui'; |
|
2443 | + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelFunctionName) . '([\s]*\()/Ui'; |
|
2444 | 2444 | } |
2445 | 2445 | foreach (array_keys(self::$localeBoolean) as $excelBoolean) { |
2446 | - self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui'; |
|
2446 | + self::$functionReplaceFromExcel[] = '/(@?[^\w\.])' . preg_quote($excelBoolean) . '([^\w\.])/Ui'; |
|
2447 | 2447 | } |
2448 | 2448 | } |
2449 | 2449 | |
2450 | 2450 | if (self::$functionReplaceToLocale === null) { |
2451 | 2451 | self::$functionReplaceToLocale = array(); |
2452 | 2452 | foreach (array_values(self::$localeFunctions) as $localeFunctionName) { |
2453 | - self::$functionReplaceToLocale[] = '$1'.trim($localeFunctionName).'$2'; |
|
2453 | + self::$functionReplaceToLocale[] = '$1' . trim($localeFunctionName) . '$2'; |
|
2454 | 2454 | } |
2455 | 2455 | foreach (array_values(self::$localeBoolean) as $localeBoolean) { |
2456 | - self::$functionReplaceToLocale[] = '$1'.trim($localeBoolean).'$2'; |
|
2456 | + self::$functionReplaceToLocale[] = '$1' . trim($localeBoolean) . '$2'; |
|
2457 | 2457 | } |
2458 | 2458 | } |
2459 | 2459 | |
@@ -2469,20 +2469,20 @@ discard block |
||
2469 | 2469 | if (self::$functionReplaceFromLocale === null) { |
2470 | 2470 | self::$functionReplaceFromLocale = array(); |
2471 | 2471 | foreach (array_values(self::$localeFunctions) as $localeFunctionName) { |
2472 | - self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($localeFunctionName).'([\s]*\()/Ui'; |
|
2472 | + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($localeFunctionName) . '([\s]*\()/Ui'; |
|
2473 | 2473 | } |
2474 | 2474 | foreach (array_values(self::$localeBoolean) as $excelBoolean) { |
2475 | - self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui'; |
|
2475 | + self::$functionReplaceFromLocale[] = '/(@?[^\w\.])' . preg_quote($excelBoolean) . '([^\w\.])/Ui'; |
|
2476 | 2476 | } |
2477 | 2477 | } |
2478 | 2478 | |
2479 | 2479 | if (self::$functionReplaceToExcel === null) { |
2480 | 2480 | self::$functionReplaceToExcel = array(); |
2481 | 2481 | foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { |
2482 | - self::$functionReplaceToExcel[] = '$1'.trim($excelFunctionName).'$2'; |
|
2482 | + self::$functionReplaceToExcel[] = '$1' . trim($excelFunctionName) . '$2'; |
|
2483 | 2483 | } |
2484 | 2484 | foreach (array_keys(self::$localeBoolean) as $excelBoolean) { |
2485 | - self::$functionReplaceToExcel[] = '$1'.trim($excelBoolean).'$2'; |
|
2485 | + self::$functionReplaceToExcel[] = '$1' . trim($excelBoolean) . '$2'; |
|
2486 | 2486 | } |
2487 | 2487 | } |
2488 | 2488 | |
@@ -2518,12 +2518,12 @@ discard block |
||
2518 | 2518 | { |
2519 | 2519 | if (is_string($value)) { |
2520 | 2520 | // Error values cannot be "wrapped" |
2521 | - if (preg_match('/^'.self::CALCULATION_REGEXP_ERROR.'$/i', $value, $match)) { |
|
2521 | + if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) { |
|
2522 | 2522 | // Return Excel errors "as is" |
2523 | 2523 | return $value; |
2524 | 2524 | } |
2525 | 2525 | // Return strings wrapped in quotes |
2526 | - return '"'.$value.'"'; |
|
2526 | + return '"' . $value . '"'; |
|
2527 | 2527 | // Convert numeric errors to NaN error |
2528 | 2528 | } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { |
2529 | 2529 | return Calculation\Functions::NAN(); |
@@ -2843,7 +2843,7 @@ discard block |
||
2843 | 2843 | // Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller |
2844 | 2844 | self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); |
2845 | 2845 | } |
2846 | - return array( $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); |
|
2846 | + return array($matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); |
|
2847 | 2847 | } |
2848 | 2848 | |
2849 | 2849 | |
@@ -2929,14 +2929,14 @@ discard block |
||
2929 | 2929 | if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { |
2930 | 2930 | if ($matrix2Columns < $matrix1Columns) { |
2931 | 2931 | for ($i = 0; $i < $matrix2Rows; ++$i) { |
2932 | - $x = $matrix2[$i][$matrix2Columns-1]; |
|
2932 | + $x = $matrix2[$i][$matrix2Columns - 1]; |
|
2933 | 2933 | for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { |
2934 | 2934 | $matrix2[$i][$j] = $x; |
2935 | 2935 | } |
2936 | 2936 | } |
2937 | 2937 | } |
2938 | 2938 | if ($matrix2Rows < $matrix1Rows) { |
2939 | - $x = $matrix2[$matrix2Rows-1]; |
|
2939 | + $x = $matrix2[$matrix2Rows - 1]; |
|
2940 | 2940 | for ($i = 0; $i < $matrix1Rows; ++$i) { |
2941 | 2941 | $matrix2[$i] = $x; |
2942 | 2942 | } |
@@ -2946,14 +2946,14 @@ discard block |
||
2946 | 2946 | if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { |
2947 | 2947 | if ($matrix1Columns < $matrix2Columns) { |
2948 | 2948 | for ($i = 0; $i < $matrix1Rows; ++$i) { |
2949 | - $x = $matrix1[$i][$matrix1Columns-1]; |
|
2949 | + $x = $matrix1[$i][$matrix1Columns - 1]; |
|
2950 | 2950 | for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { |
2951 | 2951 | $matrix1[$i][$j] = $x; |
2952 | 2952 | } |
2953 | 2953 | } |
2954 | 2954 | } |
2955 | 2955 | if ($matrix1Rows < $matrix2Rows) { |
2956 | - $x = $matrix1[$matrix1Rows-1]; |
|
2956 | + $x = $matrix1[$matrix1Rows - 1]; |
|
2957 | 2957 | for ($i = 0; $i < $matrix2Rows; ++$i) { |
2958 | 2958 | $matrix1[$i] = $x; |
2959 | 2959 | } |
@@ -2987,9 +2987,9 @@ discard block |
||
2987 | 2987 | $returnMatrix[] = $this->showValue($row); |
2988 | 2988 | } |
2989 | 2989 | } |
2990 | - return '{ '.implode($rpad, $returnMatrix).' }'; |
|
2990 | + return '{ ' . implode($rpad, $returnMatrix) . ' }'; |
|
2991 | 2991 | } elseif (is_string($value) && (trim($value, '"') == $value)) { |
2992 | - return '"'.$value.'"'; |
|
2992 | + return '"' . $value . '"'; |
|
2993 | 2993 | } elseif (is_bool($value)) { |
2994 | 2994 | return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; |
2995 | 2995 | } |
@@ -3026,12 +3026,12 @@ discard block |
||
3026 | 3026 | if ($value == '') { |
3027 | 3027 | return 'an empty string'; |
3028 | 3028 | } elseif ($value{0} == '#') { |
3029 | - return 'a '.$value.' error'; |
|
3029 | + return 'a ' . $value . ' error'; |
|
3030 | 3030 | } else { |
3031 | 3031 | $typeString = 'a string'; |
3032 | 3032 | } |
3033 | 3033 | } |
3034 | - return $typeString.' with a value of '.$this->showValue($value); |
|
3034 | + return $typeString . ' with a value of ' . $this->showValue($value); |
|
3035 | 3035 | } |
3036 | 3036 | } |
3037 | 3037 | |
@@ -3097,31 +3097,31 @@ discard block |
||
3097 | 3097 | // Binary Operators |
3098 | 3098 | // These operators always work on two values |
3099 | 3099 | // Array key is the operator, the value indicates whether this is a left or right associative operator |
3100 | - private static $operatorAssociativity = array( |
|
3101 | - '^' => 0, // Exponentiation |
|
3102 | - '*' => 0, '/' => 0, // Multiplication and Division |
|
3103 | - '+' => 0, '-' => 0, // Addition and Subtraction |
|
3104 | - '&' => 0, // Concatenation |
|
3105 | - '|' => 0, ':' => 0, // Intersect and Range |
|
3100 | + private static $operatorAssociativity = array( |
|
3101 | + '^' => 0, // Exponentiation |
|
3102 | + '*' => 0, '/' => 0, // Multiplication and Division |
|
3103 | + '+' => 0, '-' => 0, // Addition and Subtraction |
|
3104 | + '&' => 0, // Concatenation |
|
3105 | + '|' => 0, ':' => 0, // Intersect and Range |
|
3106 | 3106 | '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0 // Comparison |
3107 | 3107 | ); |
3108 | 3108 | |
3109 | 3109 | // Comparison (Boolean) Operators |
3110 | 3110 | // These operators work on two values, but always return a boolean result |
3111 | - private static $comparisonOperators = array('>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true); |
|
3111 | + private static $comparisonOperators = array('>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true); |
|
3112 | 3112 | |
3113 | 3113 | // Operator Precedence |
3114 | 3114 | // This list includes all valid operators, whether binary (including boolean) or unary (such as %) |
3115 | 3115 | // Array key is the operator, the value is its precedence |
3116 | - private static $operatorPrecedence = array( |
|
3117 | - ':' => 8, // Range |
|
3118 | - '|' => 7, // Intersect |
|
3119 | - '~' => 6, // Negation |
|
3120 | - '%' => 5, // Percentage |
|
3121 | - '^' => 4, // Exponentiation |
|
3122 | - '*' => 3, '/' => 3, // Multiplication and Division |
|
3123 | - '+' => 2, '-' => 2, // Addition and Subtraction |
|
3124 | - '&' => 1, // Concatenation |
|
3116 | + private static $operatorPrecedence = array( |
|
3117 | + ':' => 8, // Range |
|
3118 | + '|' => 7, // Intersect |
|
3119 | + '~' => 6, // Negation |
|
3120 | + '%' => 5, // Percentage |
|
3121 | + '^' => 4, // Exponentiation |
|
3122 | + '*' => 3, '/' => 3, // Multiplication and Division |
|
3123 | + '+' => 2, '-' => 2, // Addition and Subtraction |
|
3124 | + '&' => 1, // Concatenation |
|
3125 | 3125 | '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0 // Comparison |
3126 | 3126 | ); |
3127 | 3127 | |
@@ -3136,22 +3136,22 @@ discard block |
||
3136 | 3136 | // so we store the parent worksheet so that we can re-attach it when necessary |
3137 | 3137 | $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; |
3138 | 3138 | |
3139 | - $regexpMatchString = '/^('.self::CALCULATION_REGEXP_FUNCTION. |
|
3140 | - '|'.self::CALCULATION_REGEXP_CELLREF. |
|
3141 | - '|'.self::CALCULATION_REGEXP_NUMBER. |
|
3142 | - '|'.self::CALCULATION_REGEXP_STRING. |
|
3143 | - '|'.self::CALCULATION_REGEXP_OPENBRACE. |
|
3144 | - '|'.self::CALCULATION_REGEXP_NAMEDRANGE. |
|
3145 | - '|'.self::CALCULATION_REGEXP_ERROR. |
|
3139 | + $regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION . |
|
3140 | + '|' . self::CALCULATION_REGEXP_CELLREF . |
|
3141 | + '|' . self::CALCULATION_REGEXP_NUMBER . |
|
3142 | + '|' . self::CALCULATION_REGEXP_STRING . |
|
3143 | + '|' . self::CALCULATION_REGEXP_OPENBRACE . |
|
3144 | + '|' . self::CALCULATION_REGEXP_NAMEDRANGE . |
|
3145 | + '|' . self::CALCULATION_REGEXP_ERROR . |
|
3146 | 3146 | ')/si'; |
3147 | 3147 | |
3148 | 3148 | // Start with initialisation |
3149 | 3149 | $index = 0; |
3150 | 3150 | $stack = new Calculation\Token\Stack; |
3151 | 3151 | $output = array(); |
3152 | - $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a |
|
3152 | + $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a |
|
3153 | 3153 | // - is a negation or + is a positive operator rather than an operation |
3154 | - $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand |
|
3154 | + $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand |
|
3155 | 3155 | // should be null in a function call |
3156 | 3156 | // The guts of the lexical parser |
3157 | 3157 | // Loop through the formula extracting each operator and operand in turn |
@@ -3159,7 +3159,7 @@ discard block |
||
3159 | 3159 | //echo 'Assessing Expression '.substr($formula, $index), PHP_EOL; |
3160 | 3160 | $opCharacter = $formula{$index}; // Get the first character of the value at the current index position |
3161 | 3161 | //echo 'Initial character of expression block is '.$opCharacter, PHP_EOL; |
3162 | - if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula{$index+1}]))) { |
|
3162 | + if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula{$index + 1}]))) { |
|
3163 | 3163 | $opCharacter .= $formula{++$index}; |
3164 | 3164 | //echo 'Initial character of expression block is comparison operator '.$opCharacter.PHP_EOL; |
3165 | 3165 | } |
@@ -3171,26 +3171,26 @@ discard block |
||
3171 | 3171 | |
3172 | 3172 | if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus? |
3173 | 3173 | //echo 'Element is a Negation operator', PHP_EOL; |
3174 | - $stack->push('Unary Operator', '~'); // Put a negation on the stack |
|
3175 | - ++$index; // and drop the negation symbol |
|
3174 | + $stack->push('Unary Operator', '~'); // Put a negation on the stack |
|
3175 | + ++$index; // and drop the negation symbol |
|
3176 | 3176 | } elseif ($opCharacter == '%' && $expectingOperator) { |
3177 | 3177 | //echo 'Element is a Percentage operator', PHP_EOL; |
3178 | - $stack->push('Unary Operator', '%'); // Put a percentage on the stack |
|
3178 | + $stack->push('Unary Operator', '%'); // Put a percentage on the stack |
|
3179 | 3179 | ++$index; |
3180 | 3180 | } elseif ($opCharacter == '+' && !$expectingOperator) { // Positive (unary plus rather than binary operator plus) can be discarded? |
3181 | 3181 | //echo 'Element is a Positive number, not Plus operator', PHP_EOL; |
3182 | - ++$index; // Drop the redundant plus symbol |
|
3182 | + ++$index; // Drop the redundant plus symbol |
|
3183 | 3183 | } elseif ((($opCharacter == '~') || ($opCharacter == '|')) && (!$isOperandOrFunction)) { // We have to explicitly deny a tilde or pipe, because they are legal |
3184 | - return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression |
|
3184 | + return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression |
|
3185 | 3185 | } elseif ((isset(self::$operators[$opCharacter]) or $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack? |
3186 | 3186 | //echo 'Element with value '.$opCharacter.' is an Operator', PHP_EOL; |
3187 | 3187 | while ($stack->count() > 0 && |
3188 | 3188 | ($o2 = $stack->last()) && |
3189 | 3189 | isset(self::$operators[$o2['value']]) && |
3190 | 3190 | @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { |
3191 | - $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
|
3191 | + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
|
3192 | 3192 | } |
3193 | - $stack->push('Binary Operator', $opCharacter); // Finally put our current operator onto the stack |
|
3193 | + $stack->push('Binary Operator', $opCharacter); // Finally put our current operator onto the stack |
|
3194 | 3194 | ++$index; |
3195 | 3195 | $expectingOperator = false; |
3196 | 3196 | } elseif ($opCharacter == ')' && $expectingOperator) { // Are we expecting to close a parenthesis? |
@@ -3204,11 +3204,11 @@ discard block |
||
3204 | 3204 | } |
3205 | 3205 | } |
3206 | 3206 | $d = $stack->last(2); |
3207 | - if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) { // Did this parenthesis just close a function? |
|
3208 | - $functionName = $matches[1]; // Get the function name |
|
3207 | + if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) { // Did this parenthesis just close a function? |
|
3208 | + $functionName = $matches[1]; // Get the function name |
|
3209 | 3209 | //echo 'Closed Function is '.$functionName, PHP_EOL; |
3210 | 3210 | $d = $stack->pop(); |
3211 | - $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack) |
|
3211 | + $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack) |
|
3212 | 3212 | //if ($argumentCount == 0) { |
3213 | 3213 | // echo 'With no arguments', PHP_EOL; |
3214 | 3214 | //} elseif ($argumentCount == 1) { |
@@ -3216,8 +3216,8 @@ discard block |
||
3216 | 3216 | //} else { |
3217 | 3217 | // echo 'With '.$argumentCount.' arguments', PHP_EOL; |
3218 | 3218 | //} |
3219 | - $output[] = $d; // Dump the argument count on the output |
|
3220 | - $output[] = $stack->pop(); // Pop the function and push onto the output |
|
3219 | + $output[] = $d; // Dump the argument count on the output |
|
3220 | + $output[] = $stack->pop(); // Pop the function and push onto the output |
|
3221 | 3221 | if (isset(self::$controlFunctions[$functionName])) { |
3222 | 3222 | //echo 'Built-in function '.$functionName, PHP_EOL; |
3223 | 3223 | $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount']; |
@@ -3236,7 +3236,7 @@ discard block |
||
3236 | 3236 | //echo '$expectedArgumentCount is between 0 and '.abs($expectedArgumentCount), PHP_EOL; |
3237 | 3237 | if ($argumentCount > abs($expectedArgumentCount)) { |
3238 | 3238 | $argumentCountError = true; |
3239 | - $expectedArgumentCountString = 'no more than '.abs($expectedArgumentCount); |
|
3239 | + $expectedArgumentCountString = 'no more than ' . abs($expectedArgumentCount); |
|
3240 | 3240 | } |
3241 | 3241 | } else { |
3242 | 3242 | //echo '$expectedArgumentCount is numeric '.$expectedArgumentCount, PHP_EOL; |
@@ -3253,25 +3253,25 @@ discard block |
||
3253 | 3253 | case '+': |
3254 | 3254 | if ($argumentCount < $argMatch[1]) { |
3255 | 3255 | $argumentCountError = true; |
3256 | - $expectedArgumentCountString = $argMatch[1].' or more '; |
|
3256 | + $expectedArgumentCountString = $argMatch[1] . ' or more '; |
|
3257 | 3257 | } |
3258 | 3258 | break; |
3259 | 3259 | case '-': |
3260 | 3260 | if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) { |
3261 | 3261 | $argumentCountError = true; |
3262 | - $expectedArgumentCountString = 'between '.$argMatch[1].' and '.$argMatch[3]; |
|
3262 | + $expectedArgumentCountString = 'between ' . $argMatch[1] . ' and ' . $argMatch[3]; |
|
3263 | 3263 | } |
3264 | 3264 | break; |
3265 | 3265 | case ',': |
3266 | 3266 | if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) { |
3267 | 3267 | $argumentCountError = true; |
3268 | - $expectedArgumentCountString = 'either '.$argMatch[1].' or '.$argMatch[3]; |
|
3268 | + $expectedArgumentCountString = 'either ' . $argMatch[1] . ' or ' . $argMatch[3]; |
|
3269 | 3269 | } |
3270 | 3270 | break; |
3271 | 3271 | } |
3272 | 3272 | } |
3273 | 3273 | if ($argumentCountError) { |
3274 | - return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, ".$expectedArgumentCountString." expected"); |
|
3274 | + return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, " . $expectedArgumentCountString . " expected"); |
|
3275 | 3275 | } |
3276 | 3276 | } |
3277 | 3277 | ++$index; |
@@ -3281,7 +3281,7 @@ discard block |
||
3281 | 3281 | if ($o2 === null) { |
3282 | 3282 | return $this->raiseFormulaError("Formula Error: Unexpected ,"); |
3283 | 3283 | } else { |
3284 | - $output[] = $o2; // pop the argument expression stuff and push onto the output |
|
3284 | + $output[] = $o2; // pop the argument expression stuff and push onto the output |
|
3285 | 3285 | } |
3286 | 3286 | } |
3287 | 3287 | // If we've a comma when we're expecting an operand, then what we actually have is a null operand; |
@@ -3291,12 +3291,12 @@ discard block |
||
3291 | 3291 | } |
3292 | 3292 | // make sure there was a function |
3293 | 3293 | $d = $stack->last(2); |
3294 | - if (!preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) { |
|
3294 | + if (!preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $d['value'], $matches)) { |
|
3295 | 3295 | return $this->raiseFormulaError("Formula Error: Unexpected ,"); |
3296 | 3296 | } |
3297 | 3297 | $d = $stack->pop(); |
3298 | - $stack->push($d['type'], ++$d['value'], $d['reference']); // increment the argument count |
|
3299 | - $stack->push('Brace', '('); // put the ( back on, we'll need to pop back to it again |
|
3298 | + $stack->push($d['type'], ++$d['value'], $d['reference']); // increment the argument count |
|
3299 | + $stack->push('Brace', '('); // put the ( back on, we'll need to pop back to it again |
|
3300 | 3300 | $expectingOperator = false; |
3301 | 3301 | $expectingOperand = true; |
3302 | 3302 | ++$index; |
@@ -3311,24 +3311,24 @@ discard block |
||
3311 | 3311 | $length = strlen($val); |
3312 | 3312 | // echo 'Element with value '.$val.' is an Operand, Variable, Constant, String, Number, Cell Reference or Function<br />'; |
3313 | 3313 | |
3314 | - if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $val, $matches)) { |
|
3314 | + if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $val, $matches)) { |
|
3315 | 3315 | $val = preg_replace('/\s/u', '', $val); |
3316 | 3316 | // echo 'Element '.$val.' is a Function<br />'; |
3317 | 3317 | if (isset(self::$PHPExcelFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function |
3318 | 3318 | $stack->push('Function', strtoupper($val)); |
3319 | - $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index+$length), $amatch); |
|
3319 | + $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index + $length), $amatch); |
|
3320 | 3320 | if ($ax) { |
3321 | - $stack->push('Operand Count for Function '.strtoupper($val).')', 0); |
|
3321 | + $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 0); |
|
3322 | 3322 | $expectingOperator = true; |
3323 | 3323 | } else { |
3324 | - $stack->push('Operand Count for Function '.strtoupper($val).')', 1); |
|
3324 | + $stack->push('Operand Count for Function ' . strtoupper($val) . ')', 1); |
|
3325 | 3325 | $expectingOperator = false; |
3326 | 3326 | } |
3327 | 3327 | $stack->push('Brace', '('); |
3328 | 3328 | } else { // it's a var w/ implicit multiplication |
3329 | 3329 | $output[] = array('type' => 'Value', 'value' => $matches[1], 'reference' => null); |
3330 | 3330 | } |
3331 | - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $val, $matches)) { |
|
3331 | + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $val, $matches)) { |
|
3332 | 3332 | // echo 'Element '.$val.' is a Cell reference<br />'; |
3333 | 3333 | // Watch for this case-change when modifying to allow cell references in different worksheets... |
3334 | 3334 | // Should only be applied to the actual cell column, not the worksheet name |
@@ -3340,10 +3340,10 @@ discard block |
||
3340 | 3340 | if ($matches[2] == '') { |
3341 | 3341 | // Otherwise, we 'inherit' the worksheet reference from the start cell reference |
3342 | 3342 | // The start of the cell range reference should be the last entry in $output |
3343 | - $startCellRef = $output[count($output)-1]['value']; |
|
3344 | - preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $startCellRef, $startMatches); |
|
3343 | + $startCellRef = $output[count($output) - 1]['value']; |
|
3344 | + preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $startCellRef, $startMatches); |
|
3345 | 3345 | if ($startMatches[2] > '') { |
3346 | - $val = $startMatches[2].'!'.$val; |
|
3346 | + $val = $startMatches[2] . '!' . $val; |
|
3347 | 3347 | } |
3348 | 3348 | } else { |
3349 | 3349 | return $this->raiseFormulaError("3D Range references are not yet supported"); |
@@ -3357,7 +3357,7 @@ discard block |
||
3357 | 3357 | // If the last entry on the stack was a : operator, then we may have a row or column range reference |
3358 | 3358 | $testPrevOp = $stack->last(1); |
3359 | 3359 | if ($testPrevOp['value'] == ':') { |
3360 | - $startRowColRef = $output[count($output)-1]['value']; |
|
3360 | + $startRowColRef = $output[count($output) - 1]['value']; |
|
3361 | 3361 | $rangeWS1 = ''; |
3362 | 3362 | if (strpos('!', $startRowColRef) !== false) { |
3363 | 3363 | list($rangeWS1, $startRowColRef) = explode('!', $startRowColRef); |
@@ -3375,15 +3375,15 @@ discard block |
||
3375 | 3375 | if ((is_integer($startRowColRef)) && (ctype_digit($val)) && |
3376 | 3376 | ($startRowColRef <= 1048576) && ($val <= 1048576)) { |
3377 | 3377 | // Row range |
3378 | - $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007 |
|
3379 | - $output[count($output)-1]['value'] = $rangeWS1.'A'.$startRowColRef; |
|
3380 | - $val = $rangeWS2.$endRowColRef.$val; |
|
3378 | + $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007 |
|
3379 | + $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef; |
|
3380 | + $val = $rangeWS2 . $endRowColRef . $val; |
|
3381 | 3381 | } elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) && |
3382 | 3382 | (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) { |
3383 | 3383 | // Column range |
3384 | - $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007 |
|
3385 | - $output[count($output)-1]['value'] = $rangeWS1.strtoupper($startRowColRef).'1'; |
|
3386 | - $val = $rangeWS2.$val.$endRowColRef; |
|
3384 | + $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007 |
|
3385 | + $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1'; |
|
3386 | + $val = $rangeWS2 . $val . $endRowColRef; |
|
3387 | 3387 | } |
3388 | 3388 | } |
3389 | 3389 | |
@@ -3452,16 +3452,16 @@ discard block |
||
3452 | 3452 | // If we're expecting an operator, but only have a space between the previous and next operands (and both are |
3453 | 3453 | // Cell References) then we have an INTERSECTION operator |
3454 | 3454 | // echo 'Possible Intersect Operator<br />'; |
3455 | - if (($expectingOperator) && (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'.*/Ui', substr($formula, $index), $match)) && |
|
3456 | - ($output[count($output)-1]['type'] == 'Cell Reference')) { |
|
3455 | + if (($expectingOperator) && (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) && |
|
3456 | + ($output[count($output) - 1]['type'] == 'Cell Reference')) { |
|
3457 | 3457 | // echo 'Element is an Intersect Operator<br />'; |
3458 | 3458 | while ($stack->count() > 0 && |
3459 | 3459 | ($o2 = $stack->last()) && |
3460 | 3460 | isset(self::$operators[$o2['value']]) && |
3461 | 3461 | @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { |
3462 | - $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
|
3462 | + $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output |
|
3463 | 3463 | } |
3464 | - $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack |
|
3464 | + $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack |
|
3465 | 3465 | $expectingOperator = false; |
3466 | 3466 | } |
3467 | 3467 | } |
@@ -3469,7 +3469,7 @@ discard block |
||
3469 | 3469 | |
3470 | 3470 | while (($op = $stack->pop()) !== null) { // pop everything off the stack and push onto output |
3471 | 3471 | if ((is_array($op) && $op['value'] == '(') || ($op === '(')) { |
3472 | - return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced |
|
3472 | + return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced |
|
3473 | 3473 | } |
3474 | 3474 | $output[] = $op; |
3475 | 3475 | } |
@@ -3486,7 +3486,7 @@ discard block |
||
3486 | 3486 | $cKeys = array_keys(array_keys($operand[$rowKey])); |
3487 | 3487 | $colKey = array_shift($cKeys); |
3488 | 3488 | if (ctype_upper($colKey)) { |
3489 | - $operandData['reference'] = $colKey.$rowKey; |
|
3489 | + $operandData['reference'] = $colKey . $rowKey; |
|
3490 | 3490 | } |
3491 | 3491 | } |
3492 | 3492 | return $operand; |
@@ -3559,20 +3559,20 @@ discard block |
||
3559 | 3559 | if ($sheet1 == $sheet2) { |
3560 | 3560 | if ($operand1Data['reference'] === null) { |
3561 | 3561 | if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) { |
3562 | - $operand1Data['reference'] = $pCell->getColumn().$operand1Data['value']; |
|
3562 | + $operand1Data['reference'] = $pCell->getColumn() . $operand1Data['value']; |
|
3563 | 3563 | } elseif (trim($operand1Data['reference']) == '') { |
3564 | 3564 | $operand1Data['reference'] = $pCell->getCoordinate(); |
3565 | 3565 | } else { |
3566 | - $operand1Data['reference'] = $operand1Data['value'].$pCell->getRow(); |
|
3566 | + $operand1Data['reference'] = $operand1Data['value'] . $pCell->getRow(); |
|
3567 | 3567 | } |
3568 | 3568 | } |
3569 | 3569 | if ($operand2Data['reference'] === null) { |
3570 | 3570 | if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) { |
3571 | - $operand2Data['reference'] = $pCell->getColumn().$operand2Data['value']; |
|
3571 | + $operand2Data['reference'] = $pCell->getColumn() . $operand2Data['value']; |
|
3572 | 3572 | } elseif (trim($operand2Data['reference']) == '') { |
3573 | 3573 | $operand2Data['reference'] = $pCell->getCoordinate(); |
3574 | 3574 | } else { |
3575 | - $operand2Data['reference'] = $operand2Data['value'].$pCell->getRow(); |
|
3575 | + $operand2Data['reference'] = $operand2Data['value'] . $pCell->getRow(); |
|
3576 | 3576 | } |
3577 | 3577 | } |
3578 | 3578 | |
@@ -3583,7 +3583,7 @@ discard block |
||
3583 | 3583 | $oCol[] = Cell::columnIndexFromString($oCR[0]) - 1; |
3584 | 3584 | $oRow[] = $oCR[1]; |
3585 | 3585 | } |
3586 | - $cellRef = Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.Cell::stringFromColumnIndex(max($oCol)).max($oRow); |
|
3586 | + $cellRef = Cell::stringFromColumnIndex(min($oCol)) . min($oRow) . ':' . Cell::stringFromColumnIndex(max($oCol)) . max($oRow); |
|
3587 | 3587 | if ($pCellParent !== null) { |
3588 | 3588 | $cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($sheet1), false); |
3589 | 3589 | } else { |
@@ -3633,7 +3633,7 @@ discard block |
||
3633 | 3633 | $result = '#VALUE!'; |
3634 | 3634 | } |
3635 | 3635 | } else { |
3636 | - $result = '"'.str_replace('""', '"', self::unwrapResult($operand1, '"').self::unwrapResult($operand2, '"')).'"'; |
|
3636 | + $result = '"' . str_replace('""', '"', self::unwrapResult($operand1, '"') . self::unwrapResult($operand2, '"')) . '"'; |
|
3637 | 3637 | } |
3638 | 3638 | $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); |
3639 | 3639 | $stack->push('Value', $result); |
@@ -3648,7 +3648,7 @@ discard block |
||
3648 | 3648 | $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]); |
3649 | 3649 | } |
3650 | 3650 | } |
3651 | - $cellRef = Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.Cell::stringFromColumnIndex(max($oCol)).max($oRow); |
|
3651 | + $cellRef = Cell::stringFromColumnIndex(min($oCol)) . min($oRow) . ':' . Cell::stringFromColumnIndex(max($oCol)) . max($oRow); |
|
3652 | 3652 | $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect)); |
3653 | 3653 | $stack->push('Value', $cellIntersect, $cellRef); |
3654 | 3654 | break; |
@@ -3685,7 +3685,7 @@ discard block |
||
3685 | 3685 | } else { |
3686 | 3686 | $this->executeNumericBinaryOperation($cellID, $multiplier, $arg, '*', 'arrayTimesEquals', $stack); |
3687 | 3687 | } |
3688 | - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $token, $matches)) { |
|
3688 | + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) { |
|
3689 | 3689 | $cellRef = null; |
3690 | 3690 | // echo 'Element '.$token.' is a Cell reference<br />'; |
3691 | 3691 | if (isset($matches[8])) { |
@@ -3694,7 +3694,7 @@ discard block |
||
3694 | 3694 | // We can't access the range, so return a REF error |
3695 | 3695 | $cellValue = Calculation\Functions::REF(); |
3696 | 3696 | } else { |
3697 | - $cellRef = $matches[6].$matches[7].':'.$matches[9].$matches[10]; |
|
3697 | + $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10]; |
|
3698 | 3698 | if ($matches[2] > '') { |
3699 | 3699 | $matches[2] = trim($matches[2], "\"'"); |
3700 | 3700 | if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { |
@@ -3728,7 +3728,7 @@ discard block |
||
3728 | 3728 | // We can't access the cell, so return a REF error |
3729 | 3729 | $cellValue = Calculation\Functions::REF(); |
3730 | 3730 | } else { |
3731 | - $cellRef = $matches[6].$matches[7]; |
|
3731 | + $cellRef = $matches[6] . $matches[7]; |
|
3732 | 3732 | if ($matches[2] > '') { |
3733 | 3733 | $matches[2] = trim($matches[2], "\"'"); |
3734 | 3734 | if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { |
@@ -3766,7 +3766,7 @@ discard block |
||
3766 | 3766 | $stack->push('Value', $cellValue, $cellRef); |
3767 | 3767 | |
3768 | 3768 | // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on |
3769 | - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $token, $matches)) { |
|
3769 | + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/i', $token, $matches)) { |
|
3770 | 3770 | // echo 'Token is a function<br />'; |
3771 | 3771 | $functionName = $matches[1]; |
3772 | 3772 | $argCount = $stack->pop(); |
@@ -3823,7 +3823,7 @@ discard block |
||
3823 | 3823 | if ($functionName != 'MKMATRIX') { |
3824 | 3824 | if ($this->_debugLog->getWriteDebugLog()) { |
3825 | 3825 | krsort($argArrayVals); |
3826 | - $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator.' ', Calculation\Functions::flattenArray($argArrayVals)), ' )'); |
|
3826 | + $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator . ' ', Calculation\Functions::flattenArray($argArrayVals)), ' )'); |
|
3827 | 3827 | } |
3828 | 3828 | } |
3829 | 3829 | // Process each argument in turn, building the return value as an array |
@@ -3878,7 +3878,7 @@ discard block |
||
3878 | 3878 | // echo 'Token is a number, boolean, string, null or an Excel error<br />'; |
3879 | 3879 | $stack->push('Value', $token); |
3880 | 3880 | // if the token is a named range, push the named range name onto the stack |
3881 | - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $token, $matches)) { |
|
3881 | + } elseif (preg_match('/^' . self::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $token, $matches)) { |
|
3882 | 3882 | // echo 'Token is a named range<br />'; |
3883 | 3883 | $namedRange = $matches[6]; |
3884 | 3884 | // echo 'Named Range is '.$namedRange.'<br />'; |
@@ -4106,8 +4106,8 @@ discard block |
||
4106 | 4106 | } |
4107 | 4107 | } else { |
4108 | 4108 | if ((Calculation\Functions::getCompatibilityMode() != Calculation\Functions::COMPATIBILITY_OPENOFFICE) && |
4109 | - ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1)>0) || |
|
4110 | - (is_string($operand2) && !is_numeric($operand2) && strlen($operand2)>0))) { |
|
4109 | + ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1) > 0) || |
|
4110 | + (is_string($operand2) && !is_numeric($operand2) && strlen($operand2) > 0))) { |
|
4111 | 4111 | $result = Calculation\Functions::VALUE(); |
4112 | 4112 | } else { |
4113 | 4113 | // If we're dealing with non-matrix operations, execute the necessary operation |
@@ -4175,7 +4175,7 @@ discard block |
||
4175 | 4175 | public function extractCellRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) |
4176 | 4176 | { |
4177 | 4177 | // Return value |
4178 | - $returnValue = array (); |
|
4178 | + $returnValue = array(); |
|
4179 | 4179 | |
4180 | 4180 | // echo 'extractCellRange('.$pRange.')', PHP_EOL; |
4181 | 4181 | if ($pSheet !== null) { |
@@ -4192,7 +4192,7 @@ discard block |
||
4192 | 4192 | |
4193 | 4193 | // Extract range |
4194 | 4194 | $aReferences = Cell::extractAllCellReferencesInRange($pRange); |
4195 | - $pRange = $pSheetName.'!'.$pRange; |
|
4195 | + $pRange = $pSheetName . '!' . $pRange; |
|
4196 | 4196 | if (!isset($aReferences[1])) { |
4197 | 4197 | // Single cell in range |
4198 | 4198 | sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow); |
@@ -4233,7 +4233,7 @@ discard block |
||
4233 | 4233 | public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) |
4234 | 4234 | { |
4235 | 4235 | // Return value |
4236 | - $returnValue = array (); |
|
4236 | + $returnValue = array(); |
|
4237 | 4237 | |
4238 | 4238 | // echo 'extractNamedRange('.$pRange.')<br />'; |
4239 | 4239 | if ($pSheet !== null) { |
@@ -671,7 +671,7 @@ |
||
671 | 671 | set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath); |
672 | 672 | } |
673 | 673 | |
674 | - $rendererName = '\\PHPExcel\\Chart\\Renderer\\'.$libraryName; |
|
674 | + $rendererName = '\\PHPExcel\\Chart\\Renderer\\' . $libraryName; |
|
675 | 675 | $renderer = new $rendererName($this); |
676 | 676 | |
677 | 677 | if ($outputDestination == 'php://output') { |