Completed
Push — master ( a8e8b7...373ce5 )
by Reginaldo
19:01
created
app/Vendor/PHPExcel/PHPExcel/Style/Conditional.php 4 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     /**
107 107
      * Get Condition type
108 108
      *
109
-     * @return string
109
+     * @return integer
110 110
      */
111 111
     public function getConditionType() {
112 112
     	return $this->_conditionType;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     /**
127 127
      * Get Operator type
128 128
      *
129
-     * @return string
129
+     * @return integer
130 130
      */
131 131
     public function getOperatorType() {
132 132
     	return $this->_operatorType;
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 class PHPExcel_Style_Conditional implements PHPExcel_IComparable
37 37
 {
38 38
 	/* Condition types */
39
-	const CONDITION_NONE					= 'none';
40
-	const CONDITION_CELLIS					= 'cellIs';
39
+	const CONDITION_NONE = 'none';
40
+	const CONDITION_CELLIS = 'cellIs';
41 41
 	const CONDITION_CONTAINSTEXT			= 'containsText';
42 42
 	const CONDITION_EXPRESSION 				= 'expression';
43 43
 
44 44
 	/* Operator types */
45 45
 	const OPERATOR_NONE						= '';
46
-	const OPERATOR_BEGINSWITH				= 'beginsWith';
47
-	const OPERATOR_ENDSWITH					= 'endsWith';
46
+	const OPERATOR_BEGINSWITH = 'beginsWith';
47
+	const OPERATOR_ENDSWITH = 'endsWith';
48 48
 	const OPERATOR_EQUAL					= 'equal';
49
-	const OPERATOR_GREATERTHAN				= 'greaterThan';
50
-	const OPERATOR_GREATERTHANOREQUAL		= 'greaterThanOrEqual';
49
+	const OPERATOR_GREATERTHAN = 'greaterThan';
50
+	const OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual';
51 51
 	const OPERATOR_LESSTHAN					= 'lessThan';
52
-	const OPERATOR_LESSTHANOREQUAL			= 'lessThanOrEqual';
52
+	const OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual';
53 53
 	const OPERATOR_NOTEQUAL					= 'notEqual';
54
-	const OPERATOR_CONTAINSTEXT				= 'containsText';
55
-	const OPERATOR_NOTCONTAINS				= 'notContains';
56
-	const OPERATOR_BETWEEN					= 'between';
54
+	const OPERATOR_CONTAINSTEXT = 'containsText';
55
+	const OPERATOR_NOTCONTAINS = 'notContains';
56
+	const OPERATOR_BETWEEN = 'between';
57 57
 
58 58
 	/**
59 59
 	 * Condition type
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
     public function __construct()
97 97
     {
98 98
     	// Initialise values
99
-    	$this->_conditionType		= PHPExcel_Style_Conditional::CONDITION_NONE;
100
-    	$this->_operatorType		= PHPExcel_Style_Conditional::OPERATOR_NONE;
101
-    	$this->_text    			= null;
102
-    	$this->_condition			= array();
103
-    	$this->_style				= new PHPExcel_Style();
99
+    	$this->_conditionType = PHPExcel_Style_Conditional::CONDITION_NONE;
100
+    	$this->_operatorType = PHPExcel_Style_Conditional::OPERATOR_NONE;
101
+    	$this->_text = null;
102
+    	$this->_condition = array();
103
+    	$this->_style = new PHPExcel_Style();
104 104
     }
105 105
 
106 106
     /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
      * @return PHPExcel_Style_Conditional
186 186
      */
187 187
     public function setCondition($pValue = '') {
188
-    	if (!is_array($pValue))
188
+    	if ( ! is_array($pValue))
189 189
     		$pValue = array($pValue);
190 190
 
191 191
     	return $this->setConditions($pValue);
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @return PHPExcel_Style_Conditional
208 208
      */
209 209
     public function setConditions($pValue) {
210
-    	if (!is_array($pValue))
210
+    	if ( ! is_array($pValue))
211 211
     		$pValue = array($pValue);
212 212
 
213 213
     	$this->_condition = $pValue;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -185,8 +185,9 @@  discard block
 block discarded – undo
185 185
      * @return PHPExcel_Style_Conditional
186 186
      */
187 187
     public function setCondition($pValue = '') {
188
-    	if (!is_array($pValue))
189
-    		$pValue = array($pValue);
188
+    	if (!is_array($pValue)) {
189
+    	    		$pValue = array($pValue);
190
+    	}
190 191
 
191 192
     	return $this->setConditions($pValue);
192 193
     }
@@ -207,8 +208,9 @@  discard block
 block discarded – undo
207 208
      * @return PHPExcel_Style_Conditional
208 209
      */
209 210
     public function setConditions($pValue) {
210
-    	if (!is_array($pValue))
211
-    		$pValue = array($pValue);
211
+    	if (!is_array($pValue)) {
212
+    	    		$pValue = array($pValue);
213
+    	}
212 214
 
213 215
     	$this->_condition = $pValue;
214 216
     	return $this;
Please login to merge, or discard this patch.
Indentation   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -90,161 +90,161 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	private $_style;
92 92
 
93
-    /**
94
-     * Create a new PHPExcel_Style_Conditional
95
-     */
96
-    public function __construct()
97
-    {
98
-    	// Initialise values
99
-    	$this->_conditionType		= PHPExcel_Style_Conditional::CONDITION_NONE;
100
-    	$this->_operatorType		= PHPExcel_Style_Conditional::OPERATOR_NONE;
101
-    	$this->_text    			= null;
102
-    	$this->_condition			= array();
103
-    	$this->_style				= new PHPExcel_Style();
104
-    }
93
+	/**
94
+	 * Create a new PHPExcel_Style_Conditional
95
+	 */
96
+	public function __construct()
97
+	{
98
+		// Initialise values
99
+		$this->_conditionType		= PHPExcel_Style_Conditional::CONDITION_NONE;
100
+		$this->_operatorType		= PHPExcel_Style_Conditional::OPERATOR_NONE;
101
+		$this->_text    			= null;
102
+		$this->_condition			= array();
103
+		$this->_style				= new PHPExcel_Style();
104
+	}
105 105
 
106
-    /**
107
-     * Get Condition type
108
-     *
109
-     * @return string
110
-     */
111
-    public function getConditionType() {
112
-    	return $this->_conditionType;
113
-    }
106
+	/**
107
+	 * Get Condition type
108
+	 *
109
+	 * @return string
110
+	 */
111
+	public function getConditionType() {
112
+		return $this->_conditionType;
113
+	}
114 114
 
115
-    /**
116
-     * Set Condition type
117
-     *
118
-     * @param string $pValue	PHPExcel_Style_Conditional condition type
119
-     * @return PHPExcel_Style_Conditional
120
-     */
121
-    public function setConditionType($pValue = PHPExcel_Style_Conditional::CONDITION_NONE) {
122
-    	$this->_conditionType = $pValue;
123
-    	return $this;
124
-    }
115
+	/**
116
+	 * Set Condition type
117
+	 *
118
+	 * @param string $pValue	PHPExcel_Style_Conditional condition type
119
+	 * @return PHPExcel_Style_Conditional
120
+	 */
121
+	public function setConditionType($pValue = PHPExcel_Style_Conditional::CONDITION_NONE) {
122
+		$this->_conditionType = $pValue;
123
+		return $this;
124
+	}
125 125
 
126
-    /**
127
-     * Get Operator type
128
-     *
129
-     * @return string
130
-     */
131
-    public function getOperatorType() {
132
-    	return $this->_operatorType;
133
-    }
126
+	/**
127
+	 * Get Operator type
128
+	 *
129
+	 * @return string
130
+	 */
131
+	public function getOperatorType() {
132
+		return $this->_operatorType;
133
+	}
134 134
 
135
-    /**
136
-     * Set Operator type
137
-     *
138
-     * @param string $pValue	PHPExcel_Style_Conditional operator type
139
-     * @return PHPExcel_Style_Conditional
140
-     */
141
-    public function setOperatorType($pValue = PHPExcel_Style_Conditional::OPERATOR_NONE) {
142
-    	$this->_operatorType = $pValue;
143
-    	return $this;
144
-    }
135
+	/**
136
+	 * Set Operator type
137
+	 *
138
+	 * @param string $pValue	PHPExcel_Style_Conditional operator type
139
+	 * @return PHPExcel_Style_Conditional
140
+	 */
141
+	public function setOperatorType($pValue = PHPExcel_Style_Conditional::OPERATOR_NONE) {
142
+		$this->_operatorType = $pValue;
143
+		return $this;
144
+	}
145 145
 
146
-    /**
147
-     * Get text
148
-     *
149
-     * @return string
150
-     */
151
-    public function getText() {
152
-        return $this->_text;
153
-    }
146
+	/**
147
+	 * Get text
148
+	 *
149
+	 * @return string
150
+	 */
151
+	public function getText() {
152
+		return $this->_text;
153
+	}
154 154
 
155
-    /**
156
-     * Set text
157
-     *
158
-     * @param string $value
159
-     * @return PHPExcel_Style_Conditional
160
-     */
161
-    public function setText($value = null) {
162
-           $this->_text = $value;
163
-           return $this;
164
-    }
155
+	/**
156
+	 * Set text
157
+	 *
158
+	 * @param string $value
159
+	 * @return PHPExcel_Style_Conditional
160
+	 */
161
+	public function setText($value = null) {
162
+		   $this->_text = $value;
163
+		   return $this;
164
+	}
165 165
 
166
-    /**
167
-     * Get Condition
168
-     *
169
-     * @deprecated Deprecated, use getConditions instead
170
-     * @return string
171
-     */
172
-    public function getCondition() {
173
-    	if (isset($this->_condition[0])) {
174
-    		return $this->_condition[0];
175
-    	}
166
+	/**
167
+	 * Get Condition
168
+	 *
169
+	 * @deprecated Deprecated, use getConditions instead
170
+	 * @return string
171
+	 */
172
+	public function getCondition() {
173
+		if (isset($this->_condition[0])) {
174
+			return $this->_condition[0];
175
+		}
176 176
 
177
-    	return '';
178
-    }
177
+		return '';
178
+	}
179 179
 
180
-    /**
181
-     * Set Condition
182
-     *
183
-     * @deprecated Deprecated, use setConditions instead
184
-     * @param string $pValue	Condition
185
-     * @return PHPExcel_Style_Conditional
186
-     */
187
-    public function setCondition($pValue = '') {
188
-    	if (!is_array($pValue))
189
-    		$pValue = array($pValue);
180
+	/**
181
+	 * Set Condition
182
+	 *
183
+	 * @deprecated Deprecated, use setConditions instead
184
+	 * @param string $pValue	Condition
185
+	 * @return PHPExcel_Style_Conditional
186
+	 */
187
+	public function setCondition($pValue = '') {
188
+		if (!is_array($pValue))
189
+			$pValue = array($pValue);
190 190
 
191
-    	return $this->setConditions($pValue);
192
-    }
191
+		return $this->setConditions($pValue);
192
+	}
193 193
 
194
-    /**
195
-     * Get Conditions
196
-     *
197
-     * @return string[]
198
-     */
199
-    public function getConditions() {
200
-    	return $this->_condition;
201
-    }
194
+	/**
195
+	 * Get Conditions
196
+	 *
197
+	 * @return string[]
198
+	 */
199
+	public function getConditions() {
200
+		return $this->_condition;
201
+	}
202 202
 
203
-    /**
204
-     * Set Conditions
205
-     *
206
-     * @param string[] $pValue	Condition
207
-     * @return PHPExcel_Style_Conditional
208
-     */
209
-    public function setConditions($pValue) {
210
-    	if (!is_array($pValue))
211
-    		$pValue = array($pValue);
203
+	/**
204
+	 * Set Conditions
205
+	 *
206
+	 * @param string[] $pValue	Condition
207
+	 * @return PHPExcel_Style_Conditional
208
+	 */
209
+	public function setConditions($pValue) {
210
+		if (!is_array($pValue))
211
+			$pValue = array($pValue);
212 212
 
213
-    	$this->_condition = $pValue;
214
-    	return $this;
215
-    }
213
+		$this->_condition = $pValue;
214
+		return $this;
215
+	}
216 216
 
217
-    /**
218
-     * Add Condition
219
-     *
220
-     * @param string $pValue	Condition
221
-     * @return PHPExcel_Style_Conditional
222
-     */
223
-    public function addCondition($pValue = '') {
224
-    	$this->_condition[] = $pValue;
225
-    	return $this;
226
-    }
217
+	/**
218
+	 * Add Condition
219
+	 *
220
+	 * @param string $pValue	Condition
221
+	 * @return PHPExcel_Style_Conditional
222
+	 */
223
+	public function addCondition($pValue = '') {
224
+		$this->_condition[] = $pValue;
225
+		return $this;
226
+	}
227 227
 
228
-    /**
229
-     * Get Style
230
-     *
231
-     * @return PHPExcel_Style
232
-     */
233
-    public function getStyle() {
234
-    	return $this->_style;
235
-    }
228
+	/**
229
+	 * Get Style
230
+	 *
231
+	 * @return PHPExcel_Style
232
+	 */
233
+	public function getStyle() {
234
+		return $this->_style;
235
+	}
236 236
 
237
-    /**
238
-     * Set Style
239
-     *
240
-     * @param 	PHPExcel_Style $pValue
241
-     * @throws 	Exception
242
-     * @return PHPExcel_Style_Conditional
243
-     */
244
-    public function setStyle(PHPExcel_Style $pValue = null) {
237
+	/**
238
+	 * Set Style
239
+	 *
240
+	 * @param 	PHPExcel_Style $pValue
241
+	 * @throws 	Exception
242
+	 * @return PHPExcel_Style_Conditional
243
+	 */
244
+	public function setStyle(PHPExcel_Style $pValue = null) {
245 245
    		$this->_style = $pValue;
246 246
    		return $this;
247
-    }
247
+	}
248 248
 
249 249
 	/**
250 250
 	 * Get hash code
@@ -252,14 +252,14 @@  discard block
 block discarded – undo
252 252
 	 * @return string	Hash code
253 253
 	 */
254 254
 	public function getHashCode() {
255
-    	return md5(
256
-    		  $this->_conditionType
257
-    		. $this->_operatorType
258
-    		. implode(';', $this->_condition)
259
-    		. $this->_style->getHashCode()
260
-    		. __CLASS__
261
-    	);
262
-    }
255
+		return md5(
256
+			  $this->_conditionType
257
+			. $this->_operatorType
258
+			. implode(';', $this->_condition)
259
+			. $this->_style->getHashCode()
260
+			. __CLASS__
261
+		);
262
+	}
263 263
 
264 264
 	/**
265 265
 	 * Implement PHP __clone to create a deep clone, not just a shallow copy.
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Style/Font.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@
 block discarded – undo
327 327
 	/**
328 328
 	 * Set Size
329 329
 	 *
330
-	 * @param double $pValue
330
+	 * @param integer $pValue
331 331
 	 * @return PHPExcel_Style_Font
332 332
 	 */
333 333
 	public function setSize($pValue = 10) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 class PHPExcel_Style_Font implements PHPExcel_IComparable
37 37
 {
38 38
 	/* Underline types */
39
-	const UNDERLINE_NONE					= 'none';
39
+	const UNDERLINE_NONE = 'none';
40 40
 	const UNDERLINE_DOUBLE					= 'double';
41 41
 	const UNDERLINE_DOUBLEACCOUNTING		= 'doubleAccounting';
42 42
 	const UNDERLINE_SINGLE					= 'single';
@@ -47,56 +47,56 @@  discard block
 block discarded – undo
47 47
 	 *
48 48
 	 * @var string
49 49
 	 */
50
-	private $_name			= 'Calibri';
50
+	private $_name = 'Calibri';
51 51
 
52 52
 	/**
53 53
 	 * Font Size
54 54
 	 *
55 55
 	 * @var float
56 56
 	 */
57
-	private $_size			= 11;
57
+	private $_size = 11;
58 58
 
59 59
 	/**
60 60
 	 * Bold
61 61
 	 *
62 62
 	 * @var boolean
63 63
 	 */
64
-	private $_bold			= false;
64
+	private $_bold = false;
65 65
 
66 66
 	/**
67 67
 	 * Italic
68 68
 	 *
69 69
 	 * @var boolean
70 70
 	 */
71
-	private $_italic		= false;
71
+	private $_italic = false;
72 72
 
73 73
 	/**
74 74
 	 * Superscript
75 75
 	 *
76 76
 	 * @var boolean
77 77
 	 */
78
-	private $_superScript	= false;
78
+	private $_superScript = false;
79 79
 
80 80
 	/**
81 81
 	 * Subscript
82 82
 	 *
83 83
 	 * @var boolean
84 84
 	 */
85
-	private $_subScript		= false;
85
+	private $_subScript = false;
86 86
 
87 87
 	/**
88 88
 	 * Underline
89 89
 	 *
90 90
 	 * @var string
91 91
 	 */
92
-	private $_underline		= PHPExcel_Style_Font::UNDERLINE_NONE;
92
+	private $_underline = PHPExcel_Style_Font::UNDERLINE_NONE;
93 93
 
94 94
 	/**
95 95
 	 * Strikethrough
96 96
 	 *
97 97
 	 * @var boolean
98 98
 	 */
99
-	private $_strikethrough	= false;
99
+	private $_strikethrough = false;
100 100
 
101 101
 	/**
102 102
 	 * Foreground color
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		$this->_isSupervisor = $isSupervisor;
138 138
 
139 139
 		// Initialise values
140
-		$this->_color				= new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor);
140
+		$this->_color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor);
141 141
 
142 142
 		// bind parent if we are a supervisor
143 143
 		if ($isSupervisor) {
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
433 433
 		} else {
434 434
 			$this->_superScript = $pValue;
435
-			$this->_subScript = !$pValue;
435
+			$this->_subScript = ! $pValue;
436 436
 		}
437 437
 		return $this;
438 438
 	}
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 			$this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray);
465 465
 		} else {
466 466
 			$this->_subScript = $pValue;
467
-			$this->_superScript = !$pValue;
467
+			$this->_superScript = ! $pValue;
468 468
 		}
469 469
 		return $this;
470 470
 	}
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -438,10 +438,10 @@
 block discarded – undo
438 438
 	}
439 439
 
440 440
 		/**
441
-	 * Get SubScript
442
-	 *
443
-	 * @return boolean
444
-	 */
441
+		 * Get SubScript
442
+		 *
443
+		 * @return boolean
444
+		 */
445 445
 	public function getSubScript() {
446 446
 		if ($this->_isSupervisor) {
447 447
 			return $this->getSharedComponent()->getSubScript();
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Worksheet.php 4 patches
Doc Comments   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 	 * Get a chart by its index position
551 551
 	 *
552 552
 	 * @param	string	$index			Chart index position
553
-	 * @return	false|PHPExcel_Chart
553
+	 * @return	null|PHPExcel_Chart
554 554
 	 * @throws Exception
555 555
 	 */
556 556
 	public function getChartByIndex($index = null)
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 	/**
917 917
 	 * Get sheet view
918 918
 	 *
919
-	 * @return PHPExcel_Worksheet_HeaderFooter
919
+	 * @return PHPExcel_Worksheet_SheetView
920 920
 	 */
921 921
 	public function getSheetView()
922 922
 	{
@@ -1030,8 +1030,8 @@  discard block
 block discarded – undo
1030 1030
 	/**
1031 1031
 	 * Set a cell value by using numeric cell coordinates
1032 1032
 	 *
1033
-	 * @param string	$pColumn		Numeric column coordinate of the cell
1034
-	 * @param string	$pRow			Numeric row coordinate of the cell
1033
+	 * @param integer	$pColumn		Numeric column coordinate of the cell
1034
+	 * @param integer	$pRow			Numeric row coordinate of the cell
1035 1035
 	 * @param mixed		$pValue			Value of the cell
1036 1036
 	 * @param bool		$returnCell		Return the worksheet (false, default) or the cell (true)
1037 1037
 	 * @return PHPExcel_Worksheet|PHPExcel_Cell	Depending on the last parameter being specified
@@ -1064,11 +1064,11 @@  discard block
 block discarded – undo
1064 1064
 	/**
1065 1065
 	 * Set a cell value by using numeric cell coordinates
1066 1066
 	 *
1067
-	 * @param string	$pColumn		Numeric column coordinate of the cell
1068
-	 * @param string	$pRow			Numeric row coordinate of the cell
1067
+	 * @param integer	$pColumn		Numeric column coordinate of the cell
1068
+	 * @param integer	$pRow			Numeric row coordinate of the cell
1069 1069
 	 * @param mixed		$pValue			Value of the cell
1070 1070
 	 * @param string	$pDataType		Explicit data type
1071
-	 * @return PHPExcel_Worksheet
1071
+	 * @return PHPExcel_Cell
1072 1072
 	 */
1073 1073
 	public function setCellValueExplicitByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING)
1074 1074
 	{
@@ -1148,8 +1148,8 @@  discard block
 block discarded – undo
1148 1148
 	/**
1149 1149
 	 * Get cell at a specific coordinate by using numeric cell coordinates
1150 1150
 	 *
1151
-	 * @param	string $pColumn		Numeric column coordinate of the cell
1152
-	 * @param	string $pRow		Numeric row coordinate of the cell
1151
+	 * @param	integer $pColumn		Numeric column coordinate of the cell
1152
+	 * @param	integer $pRow		Numeric row coordinate of the cell
1153 1153
 	 * @return	PHPExcel_Cell		Cell that was found
1154 1154
 	 */
1155 1155
 	public function getCellByColumnAndRow($pColumn = 0, $pRow = 1)
@@ -1222,8 +1222,8 @@  discard block
 block discarded – undo
1222 1222
 	/**
1223 1223
 	 * Cell at a specific coordinate by using numeric cell coordinates exists?
1224 1224
 	 *
1225
-	 * @param	string $pColumn		Numeric column coordinate of the cell
1226
-	 * @param	string $pRow		Numeric row coordinate of the cell
1225
+	 * @param	integer $pColumn		Numeric column coordinate of the cell
1226
+	 * @param	integer $pRow		Numeric row coordinate of the cell
1227 1227
 	 * @return	boolean
1228 1228
 	 */
1229 1229
 	public function cellExistsByColumnAndRow($pColumn = 0, $pRow = 1)
@@ -1275,7 +1275,7 @@  discard block
 block discarded – undo
1275 1275
 	/**
1276 1276
 	 * Get column dimension at a specific column by using numeric cell coordinates
1277 1277
 	 *
1278
-	 * @param	string $pColumn		Numeric column coordinate of the cell
1278
+	 * @param	integer $pColumn		Numeric column coordinate of the cell
1279 1279
 	 * @return	PHPExcel_Worksheet_ColumnDimension
1280 1280
 	 */
1281 1281
 	public function getColumnDimensionByColumn($pColumn = 0)
Please login to merge, or discard this patch.
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 	/* Break types */
39 39
 	const BREAK_NONE	= 0;
40 40
 	const BREAK_ROW		= 1;
41
-	const BREAK_COLUMN	= 2;
41
+	const BREAK_COLUMN = 2;
42 42
 
43 43
 	/* Sheet state */
44
-	const SHEETSTATE_VISIBLE	= 'visible';
45
-	const SHEETSTATE_HIDDEN	= 'hidden';
44
+	const SHEETSTATE_VISIBLE = 'visible';
45
+	const SHEETSTATE_HIDDEN = 'hidden';
46 46
 	const SHEETSTATE_VERYHIDDEN = 'veryHidden';
47 47
 
48 48
 	/**
@@ -316,14 +316,14 @@  discard block
 block discarded – undo
316 316
 	 *
317 317
 	 * @var boolean
318 318
 	 */
319
-	private $_dirty	= true;
319
+	private $_dirty = true;
320 320
 
321 321
 	/**
322 322
 	 * Hash
323 323
 	 *
324 324
 	 * @var string
325 325
 	 */
326
-	private $_hash	= null;
326
+	private $_hash = null;
327 327
 
328 328
 	/**
329 329
 	 * Create a new worksheet
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 		$this->setTitle($pTitle, FALSE);
339 339
 		$this->setSheetState(PHPExcel_Worksheet::SHEETSTATE_VISIBLE);
340 340
 
341
-		$this->_cellCollection		= PHPExcel_CachedObjectStorageFactory::getInstance($this);
341
+		$this->_cellCollection = PHPExcel_CachedObjectStorageFactory::getInstance($this);
342 342
 
343 343
 		// Set page setup
344
-		$this->_pageSetup			= new PHPExcel_Worksheet_PageSetup();
344
+		$this->_pageSetup = new PHPExcel_Worksheet_PageSetup();
345 345
 
346 346
 		// Set page margins
347 347
 		$this->_pageMargins			= new PHPExcel_Worksheet_PageMargins();
@@ -350,16 +350,16 @@  discard block
 block discarded – undo
350 350
 		$this->_headerFooter		= new PHPExcel_Worksheet_HeaderFooter();
351 351
 
352 352
 		// Set sheet view
353
-		$this->_sheetView			= new PHPExcel_Worksheet_SheetView();
353
+		$this->_sheetView = new PHPExcel_Worksheet_SheetView();
354 354
 
355 355
 		// Drawing collection
356
-		$this->_drawingCollection	= new ArrayObject();
356
+		$this->_drawingCollection = new ArrayObject();
357 357
 
358 358
     	// Chart collection
359
-    	$this->_chartCollection 	= new ArrayObject();
359
+    	$this->_chartCollection = new ArrayObject();
360 360
 
361 361
 		// Protection
362
-		$this->_protection			= new PHPExcel_Worksheet_Protection();
362
+		$this->_protection = new PHPExcel_Worksheet_Protection();
363 363
 
364 364
 		// Default row dimension
365 365
 		$this->_defaultRowDimension = new PHPExcel_Worksheet_RowDimension(null);
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 		if (is_null($index)) {
563 563
 			$index = --$chartCount;
564 564
 		}
565
-		if (!isset($this->_chartCollection[$index])) {
565
+		if ( ! isset($this->_chartCollection[$index])) {
566 566
 			return false;
567 567
 		}
568 568
 
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 	public function getChartNames()
579 579
 	{
580 580
 		$chartNames = array();
581
-		foreach($this->_chartCollection as $chart) {
581
+		foreach ($this->_chartCollection as $chart) {
582 582
 			$chartNames[] = $chart->getName();
583 583
 		}
584 584
 		return $chartNames;
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 		if ($chartCount == 0) {
598 598
 			return false;
599 599
 		}
600
-		foreach($this->_chartCollection as $index => $chart) {
600
+		foreach ($this->_chartCollection as $index => $chart) {
601 601
 			if ($chart->getName() == $chartName) {
602 602
 				return $this->_chartCollection[$index];
603 603
 			}
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
 	public function calculateWorksheetDimension()
652 652
 	{
653 653
 		// Return
654
-		return 'A1' . ':' .  $this->getHighestColumn() . $this->getHighestRow();
654
+		return 'A1'.':'.$this->getHighestColumn().$this->getHighestRow();
655 655
 	}
656 656
 
657 657
 	/**
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 	public function calculateWorksheetDataDimension()
663 663
 	{
664 664
 		// Return
665
-		return 'A1' . ':' .  $this->getHighestDataColumn() . $this->getHighestDataRow();
665
+		return 'A1'.':'.$this->getHighestDataColumn().$this->getHighestDataRow();
666 666
 	}
667 667
 
668 668
 	/**
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 		}
683 683
 
684 684
 		// There is only something to do if there are some auto-size columns
685
-		if (!empty($autoSizes)) {
685
+		if ( ! empty($autoSizes)) {
686 686
 
687 687
 			// build list of cells references that participate in a merge
688 688
 			$isMergeCell = array();
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
 				$cell = $this->getCell($cellID);
698 698
 				if (isset($autoSizes[$cell->getColumn()])) {
699 699
 					// Determine width if cell does not participate in a merge
700
-					if (!isset($isMergeCell[$cell->getCoordinate()])) {
700
+					if ( ! isset($isMergeCell[$cell->getCoordinate()])) {
701 701
 						// Calculated value
702 702
 						$cellValue = $cell->getCalculatedValue();
703 703
 
@@ -705,8 +705,8 @@  discard block
 block discarded – undo
705 705
 						$cellValue = PHPExcel_Style_NumberFormat::toFormattedString($cellValue, $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode());
706 706
 
707 707
 						$autoSizes[$cell->getColumn()] = max(
708
-							(float)$autoSizes[$cell->getColumn()],
709
-							(float)PHPExcel_Shared_Font::calculateColumnWidth(
708
+							(float) $autoSizes[$cell->getColumn()],
709
+							(float) PHPExcel_Shared_Font::calculateColumnWidth(
710 710
 								$this->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont(),
711 711
 								$cellValue,
712 712
 								$this->getParent()->getCellXfByIndex($cell->getXfIndex())->getAlignment()->getTextRotation(),
@@ -795,24 +795,24 @@  discard block
 block discarded – undo
795 795
 			// Use name, but append with lowest possible integer
796 796
 
797 797
 			if (PHPExcel_Shared_String::CountCharacters($pValue) > 29) {
798
-				$pValue = PHPExcel_Shared_String::Substring($pValue,0,29);
798
+				$pValue = PHPExcel_Shared_String::Substring($pValue, 0, 29);
799 799
 			}
800 800
 			$i = 1;
801
-			while ($this->getParent()->getSheetByName($pValue . ' ' . $i)) {
801
+			while ($this->getParent()->getSheetByName($pValue.' '.$i)) {
802 802
 				++$i;
803 803
 				if ($i == 10) {
804 804
 					if (PHPExcel_Shared_String::CountCharacters($pValue) > 28) {
805
-						$pValue = PHPExcel_Shared_String::Substring($pValue,0,28);
805
+						$pValue = PHPExcel_Shared_String::Substring($pValue, 0, 28);
806 806
 					}
807 807
 				} elseif ($i == 100) {
808 808
 					if (PHPExcel_Shared_String::CountCharacters($pValue) > 27) {
809
-						$pValue = PHPExcel_Shared_String::Substring($pValue,0,27);
809
+						$pValue = PHPExcel_Shared_String::Substring($pValue, 0, 27);
810 810
 					}
811 811
 				}
812 812
 			}
813 813
 
814
-			$altTitle = $pValue . ' ' . $i;
815
-			return $this->setTitle($altTitle,$updateFormulaCellReferences);
814
+			$altTitle = $pValue.' '.$i;
815
+			return $this->setTitle($altTitle, $updateFormulaCellReferences);
816 816
 		}
817 817
 
818 818
 		// Set title
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
 	 */
1039 1039
 	public function setCellValueByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $returnCell = false)
1040 1040
 	{
1041
-		$cell = $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow)->setValue($pValue);
1041
+		$cell = $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow)->setValue($pValue);
1042 1042
 
1043 1043
 		if ($returnCell) {
1044 1044
 			return $cell;
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
 	 */
1073 1073
 	public function setCellValueExplicitByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING)
1074 1074
 	{
1075
-		return $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow)->setValueExplicit($pValue, $pDataType);
1075
+		return $this->getCell(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow)->setValueExplicit($pValue, $pDataType);
1076 1076
 	}
1077 1077
 
1078 1078
 	/**
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 		}
1097 1097
 
1098 1098
 		// Named range?
1099
-		if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1099
+		if (( ! preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1100 1100
 			(preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) {
1101 1101
 			$namedRange = PHPExcel_NamedRange::resolveRange($pCoordinate, $this);
1102 1102
 			if ($namedRange !== NULL) {
@@ -1108,9 +1108,9 @@  discard block
 block discarded – undo
1108 1108
 		// Uppercase coordinate
1109 1109
 		$pCoordinate = strtoupper($pCoordinate);
1110 1110
 
1111
-		if (strpos($pCoordinate,':') !== false || strpos($pCoordinate,',') !== false) {
1111
+		if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) {
1112 1112
 			throw new Exception('Cell coordinate can not be a range of cells.');
1113
-		} elseif (strpos($pCoordinate,'$') !== false) {
1113
+		} elseif (strpos($pCoordinate, '$') !== false) {
1114 1114
 			throw new Exception('Cell coordinate must not be absolute.');
1115 1115
 		} else {
1116 1116
 			// Create new cell object
@@ -1118,22 +1118,22 @@  discard block
 block discarded – undo
1118 1118
 			// Coordinates
1119 1119
 			$aCoordinates = PHPExcel_Cell::coordinateFromString($pCoordinate);
1120 1120
 
1121
-			$cell = $this->_cellCollection->addCacheData($pCoordinate,new PHPExcel_Cell($aCoordinates[0], $aCoordinates[1], null, PHPExcel_Cell_DataType::TYPE_NULL, $this));
1121
+			$cell = $this->_cellCollection->addCacheData($pCoordinate, new PHPExcel_Cell($aCoordinates[0], $aCoordinates[1], null, PHPExcel_Cell_DataType::TYPE_NULL, $this));
1122 1122
 			$this->_cellCollectionIsSorted = false;
1123 1123
 
1124 1124
 			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($aCoordinates[0]))
1125 1125
 				$this->_cachedHighestColumn = $aCoordinates[0];
1126 1126
 
1127
-			$this->_cachedHighestRow = max($this->_cachedHighestRow,$aCoordinates[1]);
1127
+			$this->_cachedHighestRow = max($this->_cachedHighestRow, $aCoordinates[1]);
1128 1128
 
1129 1129
 			// Cell needs appropriate xfIndex
1130
-			$rowDimensions	= $this->getRowDimensions();
1130
+			$rowDimensions = $this->getRowDimensions();
1131 1131
 			$columnDimensions = $this->getColumnDimensions();
1132 1132
 
1133
-			if ( isset($rowDimensions[$aCoordinates[1]]) && $rowDimensions[$aCoordinates[1]]->getXfIndex() !== null ) {
1133
+			if (isset($rowDimensions[$aCoordinates[1]]) && $rowDimensions[$aCoordinates[1]]->getXfIndex() !== null) {
1134 1134
 				// then there is a row dimension with explicit style, assign it to the cell
1135 1135
 				$cell->setXfIndex($rowDimensions[$aCoordinates[1]]->getXfIndex());
1136
-			} else if ( isset($columnDimensions[$aCoordinates[0]]) ) {
1136
+			} else if (isset($columnDimensions[$aCoordinates[0]])) {
1137 1137
 				// then there is a column dimension, assign it to the cell
1138 1138
 				$cell->setXfIndex($columnDimensions[$aCoordinates[0]]->getXfIndex());
1139 1139
 			} else {
@@ -1155,16 +1155,16 @@  discard block
 block discarded – undo
1155 1155
 	public function getCellByColumnAndRow($pColumn = 0, $pRow = 1)
1156 1156
 	{
1157 1157
 		$columnLetter = PHPExcel_Cell::stringFromColumnIndex($pColumn);
1158
-		$coordinate = $columnLetter . $pRow;
1158
+		$coordinate = $columnLetter.$pRow;
1159 1159
 
1160
-		if (!$this->_cellCollection->isDataSet($coordinate)) {
1160
+		if ( ! $this->_cellCollection->isDataSet($coordinate)) {
1161 1161
 			$cell = $this->_cellCollection->addCacheData($coordinate, new PHPExcel_Cell($columnLetter, $pRow, null, PHPExcel_Cell_DataType::TYPE_NULL, $this));
1162 1162
 			$this->_cellCollectionIsSorted = false;
1163 1163
 
1164 1164
 			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < $pColumn)
1165 1165
 				$this->_cachedHighestColumn = $columnLetter;
1166 1166
 
1167
-			$this->_cachedHighestRow = max($this->_cachedHighestRow,$pRow);
1167
+			$this->_cachedHighestRow = max($this->_cachedHighestRow, $pRow);
1168 1168
 
1169 1169
 			return $cell;
1170 1170
 		}
@@ -1188,16 +1188,16 @@  discard block
 block discarded – undo
1188 1188
 		}
1189 1189
 
1190 1190
 		// Named range?
1191
-		if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1191
+		if (( ! preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1192 1192
 			(preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) {
1193 1193
 			$namedRange = PHPExcel_NamedRange::resolveRange($pCoordinate, $this);
1194 1194
 			if ($namedRange !== NULL) {
1195 1195
 				$pCoordinate = $namedRange->getRange();
1196 1196
 				if ($this->getHashCode() != $namedRange->getWorksheet()->getHashCode()) {
1197
-					if (!$namedRange->getLocalOnly()) {
1197
+					if ( ! $namedRange->getLocalOnly()) {
1198 1198
 						return $namedRange->getWorksheet()->cellExists($pCoordinate);
1199 1199
 					} else {
1200
-						throw new Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle());
1200
+						throw new Exception('Named range '.$namedRange->getName().' is not accessible from within sheet '.$this->getTitle());
1201 1201
 					}
1202 1202
 				}
1203 1203
 			}
@@ -1206,9 +1206,9 @@  discard block
 block discarded – undo
1206 1206
 		// Uppercase coordinate
1207 1207
 		$pCoordinate = strtoupper($pCoordinate);
1208 1208
 
1209
-		if (strpos($pCoordinate,':') !== false || strpos($pCoordinate,',') !== false) {
1209
+		if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) {
1210 1210
 			throw new Exception('Cell coordinate can not be a range of cells.');
1211
-		} elseif (strpos($pCoordinate,'$') !== false) {
1211
+		} elseif (strpos($pCoordinate, '$') !== false) {
1212 1212
 			throw new Exception('Cell coordinate must not be absolute.');
1213 1213
 		} else {
1214 1214
 			// Coordinates
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
 	 */
1229 1229
 	public function cellExistsByColumnAndRow($pColumn = 0, $pRow = 1)
1230 1230
 	{
1231
-		return $this->cellExists(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
1231
+		return $this->cellExists(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow);
1232 1232
 	}
1233 1233
 
1234 1234
 	/**
@@ -1243,10 +1243,10 @@  discard block
 block discarded – undo
1243 1243
 		$found = null;
1244 1244
 
1245 1245
 		// Get row dimension
1246
-		if (!isset($this->_rowDimensions[$pRow])) {
1246
+		if ( ! isset($this->_rowDimensions[$pRow])) {
1247 1247
 			$this->_rowDimensions[$pRow] = new PHPExcel_Worksheet_RowDimension($pRow);
1248 1248
 
1249
-			$this->_cachedHighestRow = max($this->_cachedHighestRow,$pRow);
1249
+			$this->_cachedHighestRow = max($this->_cachedHighestRow, $pRow);
1250 1250
 		}
1251 1251
 		return $this->_rowDimensions[$pRow];
1252 1252
 	}
@@ -1263,7 +1263,7 @@  discard block
 block discarded – undo
1263 1263
 		$pColumn = strtoupper($pColumn);
1264 1264
 
1265 1265
 		// Fetch dimensions
1266
-		if (!isset($this->_columnDimensions[$pColumn])) {
1266
+		if ( ! isset($this->_columnDimensions[$pColumn])) {
1267 1267
 			$this->_columnDimensions[$pColumn] = new PHPExcel_Worksheet_ColumnDimension($pColumn);
1268 1268
 
1269 1269
 			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($pColumn))
@@ -1350,7 +1350,7 @@  discard block
 block discarded – undo
1350 1350
 	 */
1351 1351
 	public function getConditionalStyles($pCoordinate = 'A1')
1352 1352
 	{
1353
-		if (!isset($this->_conditionalStylesCollection[$pCoordinate])) {
1353
+		if ( ! isset($this->_conditionalStylesCollection[$pCoordinate])) {
1354 1354
 			$this->_conditionalStylesCollection[$pCoordinate] = array();
1355 1355
 		}
1356 1356
 		return $this->_conditionalStylesCollection[$pCoordinate];
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 	 */
1415 1415
 	public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1)
1416 1416
 	{
1417
-		return $this->getStyle(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
1417
+		return $this->getStyle(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow);
1418 1418
 	}
1419 1419
 
1420 1420
 	/**
@@ -1475,11 +1475,11 @@  discard block
 block discarded – undo
1475 1475
 
1476 1476
 		// Calculate range outer borders
1477 1477
 		$rangeStart = PHPExcel_Cell::coordinateFromString($rangeA);
1478
-		$rangeEnd	= PHPExcel_Cell::coordinateFromString($rangeB);
1478
+		$rangeEnd = PHPExcel_Cell::coordinateFromString($rangeB);
1479 1479
 
1480 1480
 		// Translate column into index
1481
-		$rangeStart[0]	= PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
1482
-		$rangeEnd[0]	= PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
1481
+		$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
1482
+		$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
1483 1483
 
1484 1484
 		// Make sure we can loop upwards on rows and columns
1485 1485
 		if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
@@ -1491,7 +1491,7 @@  discard block
 block discarded – undo
1491 1491
 		// Loop through cells and apply styles
1492 1492
 		for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {
1493 1493
 			for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {
1494
-				$this->getCell(PHPExcel_Cell::stringFromColumnIndex($col) . $row)->setXfIndex($xfIndex);
1494
+				$this->getCell(PHPExcel_Cell::stringFromColumnIndex($col).$row)->setXfIndex($xfIndex);
1495 1495
 			}
1496 1496
 		}
1497 1497
 
@@ -1510,8 +1510,8 @@  discard block
 block discarded – undo
1510 1510
 	 */
1511 1511
 	public function duplicateConditionalStyle(array $pCellStyle = null, $pRange = '')
1512 1512
 	{
1513
-		foreach($pCellStyle as $cellStyle) {
1514
-			if (!is_a($cellStyle,'PHPExcel_Style_Conditional')) {
1513
+		foreach ($pCellStyle as $cellStyle) {
1514
+			if ( ! is_a($cellStyle, 'PHPExcel_Style_Conditional')) {
1515 1515
 				throw new Exception('Style is not a conditional style');
1516 1516
 			}
1517 1517
 		}
@@ -1531,11 +1531,11 @@  discard block
 block discarded – undo
1531 1531
 
1532 1532
 		// Calculate range outer borders
1533 1533
 		$rangeStart = PHPExcel_Cell::coordinateFromString($rangeA);
1534
-		$rangeEnd	= PHPExcel_Cell::coordinateFromString($rangeB);
1534
+		$rangeEnd = PHPExcel_Cell::coordinateFromString($rangeB);
1535 1535
 
1536 1536
 		// Translate column into index
1537
-		$rangeStart[0]	= PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
1538
-		$rangeEnd[0]	= PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
1537
+		$rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1;
1538
+		$rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1;
1539 1539
 
1540 1540
 		// Make sure we can loop upwards on rows and columns
1541 1541
 		if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) {
@@ -1547,7 +1547,7 @@  discard block
 block discarded – undo
1547 1547
 		// Loop through cells and apply styles
1548 1548
 		for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {
1549 1549
 			for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {
1550
-				$this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col) . $row, $pCellStyle);
1550
+				$this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col).$row, $pCellStyle);
1551 1551
 			}
1552 1552
 		}
1553 1553
 
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
 	 */
1608 1608
 	public function setBreakByColumnAndRow($pColumn = 0, $pRow = 1, $pBreak = PHPExcel_Worksheet::BREAK_NONE)
1609 1609
 	{
1610
-		return $this->setBreak(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow, $pBreak);
1610
+		return $this->setBreak(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow, $pBreak);
1611 1611
 	}
1612 1612
 
1613 1613
 	/**
@@ -1632,7 +1632,7 @@  discard block
 block discarded – undo
1632 1632
 		// Uppercase coordinate
1633 1633
 		$pRange = strtoupper($pRange);
1634 1634
 
1635
-		if (strpos($pRange,':') !== false) {
1635
+		if (strpos($pRange, ':') !== false) {
1636 1636
 			$this->_mergeCells[$pRange] = $pRange;
1637 1637
 
1638 1638
 			// make sure cells are created
@@ -1642,7 +1642,7 @@  discard block
 block discarded – undo
1642 1642
 
1643 1643
 			// create upper left cell if it does not already exist
1644 1644
 			$upperLeft = $aReferences[0];
1645
-			if (!$this->cellExists($upperLeft)) {
1645
+			if ( ! $this->cellExists($upperLeft)) {
1646 1646
 				$this->getCell($upperLeft)->setValueExplicit(null, PHPExcel_Cell_DataType::TYPE_NULL);
1647 1647
 			}
1648 1648
 
@@ -1671,7 +1671,7 @@  discard block
 block discarded – undo
1671 1671
 	 */
1672 1672
 	public function mergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1)
1673 1673
 	{
1674
-		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
1674
+		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1).$pRow1.':'.PHPExcel_Cell::stringFromColumnIndex($pColumn2).$pRow2;
1675 1675
 		return $this->mergeCells($cellRange);
1676 1676
 	}
1677 1677
 
@@ -1687,11 +1687,11 @@  discard block
 block discarded – undo
1687 1687
 		// Uppercase coordinate
1688 1688
 		$pRange = strtoupper($pRange);
1689 1689
 
1690
-		if (strpos($pRange,':') !== false) {
1690
+		if (strpos($pRange, ':') !== false) {
1691 1691
 			if (isset($this->_mergeCells[$pRange])) {
1692 1692
 				unset($this->_mergeCells[$pRange]);
1693 1693
 			} else {
1694
-				throw new Exception('Cell range ' . $pRange . ' not known as merged.');
1694
+				throw new Exception('Cell range '.$pRange.' not known as merged.');
1695 1695
 			}
1696 1696
 		} else {
1697 1697
 			throw new Exception('Merge can only be removed from a range of cells.');
@@ -1712,7 +1712,7 @@  discard block
 block discarded – undo
1712 1712
 	 */
1713 1713
 	public function unmergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1)
1714 1714
 	{
1715
-		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
1715
+		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1).$pRow1.':'.PHPExcel_Cell::stringFromColumnIndex($pColumn2).$pRow2;
1716 1716
 		return $this->unmergeCells($cellRange);
1717 1717
 	}
1718 1718
 
@@ -1753,7 +1753,7 @@  discard block
 block discarded – undo
1753 1753
 		// Uppercase coordinate
1754 1754
 		$pRange = strtoupper($pRange);
1755 1755
 
1756
-		if (!$pAlreadyHashed) {
1756
+		if ( ! $pAlreadyHashed) {
1757 1757
 			$pPassword = PHPExcel_Shared_PasswordHasher::hashPassword($pPassword);
1758 1758
 		}
1759 1759
 		$this->_protectedCells[$pRange] = $pPassword;
@@ -1775,7 +1775,7 @@  discard block
 block discarded – undo
1775 1775
 	 */
1776 1776
 	public function protectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false)
1777 1777
 	{
1778
-		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
1778
+		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1).$pRow1.':'.PHPExcel_Cell::stringFromColumnIndex($pColumn2).$pRow2;
1779 1779
 		return $this->protectCells($cellRange, $pPassword, $pAlreadyHashed);
1780 1780
 	}
1781 1781
 
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
 		if (isset($this->_protectedCells[$pRange])) {
1795 1795
 			unset($this->_protectedCells[$pRange]);
1796 1796
 		} else {
1797
-			throw new Exception('Cell range ' . $pRange . ' not known as protected.');
1797
+			throw new Exception('Cell range '.$pRange.' not known as protected.');
1798 1798
 		}
1799 1799
 		return $this;
1800 1800
 	}
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
 	 */
1814 1814
 	public function unprotectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false)
1815 1815
 	{
1816
-		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2;
1816
+		$cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1).$pRow1.':'.PHPExcel_Cell::stringFromColumnIndex($pColumn2).$pRow2;
1817 1817
 		return $this->unprotectCells($cellRange, $pPassword, $pAlreadyHashed);
1818 1818
 	}
1819 1819
 
@@ -1849,7 +1849,7 @@  discard block
 block discarded – undo
1849 1849
 		// Uppercase coordinate
1850 1850
 		$pRange = strtoupper($pRange);
1851 1851
 
1852
-		if (strpos($pRange,':') !== false) {
1852
+		if (strpos($pRange, ':') !== false) {
1853 1853
 			$this->_autoFilter = $pRange;
1854 1854
 			$this->_dirty = true;
1855 1855
 		} else {
@@ -1871,9 +1871,9 @@  discard block
 block discarded – undo
1871 1871
 	public function setAutoFilterByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1)
1872 1872
 	{
1873 1873
 		return $this->setAutoFilter(
1874
-			PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1
1875
-			. ':' .
1876
-			PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2
1874
+			PHPExcel_Cell::stringFromColumnIndex($pColumn1).$pRow1
1875
+			. ':'.
1876
+			PHPExcel_Cell::stringFromColumnIndex($pColumn2).$pRow2
1877 1877
 		);
1878 1878
 	}
1879 1879
 
@@ -1910,7 +1910,7 @@  discard block
 block discarded – undo
1910 1910
 		// Uppercase coordinate
1911 1911
 		$pCell = strtoupper($pCell);
1912 1912
 
1913
-		if (strpos($pCell,':') === false && strpos($pCell,',') === false) {
1913
+		if (strpos($pCell, ':') === false && strpos($pCell, ',') === false) {
1914 1914
 			$this->_freezePane = $pCell;
1915 1915
 		} else {
1916 1916
 			throw new Exception('Freeze pane can not be set on a range of cells.');
@@ -1928,7 +1928,7 @@  discard block
 block discarded – undo
1928 1928
 	 */
1929 1929
 	public function freezePaneByColumnAndRow($pColumn = 0, $pRow = 1)
1930 1930
 	{
1931
-		return $this->freezePane(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
1931
+		return $this->freezePane(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow);
1932 1932
 	}
1933 1933
 
1934 1934
 	/**
@@ -1952,7 +1952,7 @@  discard block
 block discarded – undo
1952 1952
 	public function insertNewRowBefore($pBefore = 1, $pNumRows = 1) {
1953 1953
 		if ($pBefore >= 1) {
1954 1954
 			$objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
1955
-			$objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this);
1955
+			$objReferenceHelper->insertNewBefore('A'.$pBefore, 0, $pNumRows, $this);
1956 1956
 		} else {
1957 1957
 			throw new Exception("Rows can only be inserted before at least row 1.");
1958 1958
 		}
@@ -1968,9 +1968,9 @@  discard block
 block discarded – undo
1968 1968
 	 * @return PHPExcel_Worksheet
1969 1969
 	 */
1970 1970
 	public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1) {
1971
-		if (!is_numeric($pBefore)) {
1971
+		if ( ! is_numeric($pBefore)) {
1972 1972
 			$objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
1973
-			$objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this);
1973
+			$objReferenceHelper->insertNewBefore($pBefore.'1', $pNumCols, 0, $this);
1974 1974
 		} else {
1975 1975
 			throw new Exception("Column references should not be numeric.");
1976 1976
 		}
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
 	public function removeRow($pRow = 1, $pNumRows = 1) {
2005 2005
 		if ($pRow >= 1) {
2006 2006
 			$objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
2007
-			$objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this);
2007
+			$objReferenceHelper->insertNewBefore('A'.($pRow + $pNumRows), 0, -$pNumRows, $this);
2008 2008
 		} else {
2009 2009
 			throw new Exception("Rows to be deleted should at least start from row 1.");
2010 2010
 		}
@@ -2020,10 +2020,10 @@  discard block
 block discarded – undo
2020 2020
 	 * @return PHPExcel_Worksheet
2021 2021
 	 */
2022 2022
 	public function removeColumn($pColumn = 'A', $pNumCols = 1) {
2023
-		if (!is_numeric($pColumn)) {
2023
+		if ( ! is_numeric($pColumn)) {
2024 2024
 			$pColumn = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($pColumn) - 1 + $pNumCols);
2025 2025
 			$objReferenceHelper = PHPExcel_ReferenceHelper::getInstance();
2026
-			$objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this);
2026
+			$objReferenceHelper->insertNewBefore($pColumn.'1', -$pNumCols, 0, $this);
2027 2027
 		} else {
2028 2028
 			throw new Exception("Column references should not be numeric.");
2029 2029
 		}
@@ -2181,9 +2181,9 @@  discard block
 block discarded – undo
2181 2181
 		// Uppercase coordinate
2182 2182
 		$pCellCoordinate = strtoupper($pCellCoordinate);
2183 2183
 
2184
-		if (strpos($pCellCoordinate,':') !== false || strpos($pCellCoordinate,',') !== false) {
2184
+		if (strpos($pCellCoordinate, ':') !== false || strpos($pCellCoordinate, ',') !== false) {
2185 2185
 			throw new Exception('Cell coordinate string can not be a range of cells.');
2186
-		} else if (strpos($pCellCoordinate,'$') !== false) {
2186
+		} else if (strpos($pCellCoordinate, '$') !== false) {
2187 2187
 			throw new Exception('Cell coordinate string must not be absolute.');
2188 2188
 		} else if ($pCellCoordinate == '') {
2189 2189
 			throw new Exception('Cell coordinate can not be zero-length string.');
@@ -2209,7 +2209,7 @@  discard block
 block discarded – undo
2209 2209
 	 */
2210 2210
 	public function getCommentByColumnAndRow($pColumn = 0, $pRow = 1)
2211 2211
 	{
2212
-		return $this->getComment(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
2212
+		return $this->getComment(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow);
2213 2213
 	}
2214 2214
 
2215 2215
 	/**
@@ -2278,8 +2278,8 @@  discard block
 block discarded – undo
2278 2278
 		// Convert '1:3' to 'A1:XFD3'
2279 2279
 		$pCoordinate = preg_replace('/^([0-9]+):([0-9]+)$/', 'A${1}:XFD${2}', $pCoordinate);
2280 2280
 
2281
-		if (strpos($pCoordinate,':') !== false || strpos($pCoordinate,',') !== false) {
2282
-			list($first, ) = PHPExcel_Cell::splitRange($pCoordinate);
2281
+		if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) {
2282
+			list($first,) = PHPExcel_Cell::splitRange($pCoordinate);
2283 2283
 			$this->_activeCell = $first[0];
2284 2284
 		} else {
2285 2285
 			$this->_activeCell = $pCoordinate;
@@ -2298,7 +2298,7 @@  discard block
 block discarded – undo
2298 2298
 	 */
2299 2299
 	public function setSelectedCellByColumnAndRow($pColumn = 0, $pRow = 1)
2300 2300
 	{
2301
-		return $this->setSelectedCells(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow);
2301
+		return $this->setSelectedCells(PHPExcel_Cell::stringFromColumnIndex($pColumn).$pRow);
2302 2302
 	}
2303 2303
 
2304 2304
 	/**
@@ -2334,7 +2334,7 @@  discard block
 block discarded – undo
2334 2334
 	public function fromArray($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) {
2335 2335
 		if (is_array($source)) {
2336 2336
 			//	Convert a 1-D array to 2-D (for ease of looping)
2337
-			if (!is_array(end($source))) {
2337
+			if ( ! is_array(end($source))) {
2338 2338
 				$source = array($source);
2339 2339
 			}
2340 2340
 
@@ -2344,16 +2344,16 @@  discard block
 block discarded – undo
2344 2344
 			// Loop through $source
2345 2345
 			foreach ($source as $rowData) {
2346 2346
 				$currentColumn = $startColumn;
2347
-				foreach($rowData as $cellValue) {
2347
+				foreach ($rowData as $cellValue) {
2348 2348
 					if ($strictNullComparison) {
2349 2349
 						if ($cellValue !== $nullValue) {
2350 2350
 							// Set cell value
2351
-							$this->getCell($currentColumn . $startRow)->setValue($cellValue);
2351
+							$this->getCell($currentColumn.$startRow)->setValue($cellValue);
2352 2352
 						}
2353 2353
 					} else {
2354 2354
 						if ($cellValue != $nullValue) {
2355 2355
 							// Set cell value
2356
-							$this->getCell($currentColumn . $startRow)->setValue($cellValue);
2356
+							$this->getCell($currentColumn.$startRow)->setValue($cellValue);
2357 2357
 						}
2358 2358
 					}
2359 2359
 					++$currentColumn;
@@ -2383,9 +2383,9 @@  discard block
 block discarded – undo
2383 2383
 
2384 2384
 		//	Identify the range that we need to extract from the worksheet
2385 2385
 		list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange);
2386
-		$minCol = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] -1);
2386
+		$minCol = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] - 1);
2387 2387
 		$minRow = $rangeStart[1];
2388
-		$maxCol = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0] -1);
2388
+		$maxCol = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0] - 1);
2389 2389
 		$maxRow = $rangeEnd[1];
2390 2390
 
2391 2391
 		$maxCol++;
@@ -2452,7 +2452,7 @@  discard block
 block discarded – undo
2452 2452
 			$pWorkSheet = $namedRange->getWorksheet();
2453 2453
 			$pCellRange = $namedRange->getRange();
2454 2454
 
2455
-			return $pWorkSheet->rangeToArray(	$pCellRange,
2455
+			return $pWorkSheet->rangeToArray($pCellRange,
2456 2456
 												$nullValue, $calculateFormulas, $formatData, $returnCellRef);
2457 2457
 		}
2458 2458
 
@@ -2478,7 +2478,7 @@  discard block
 block discarded – undo
2478 2478
 		$maxCol = $this->getHighestColumn();
2479 2479
 		$maxRow = $this->getHighestRow();
2480 2480
 		// Return
2481
-		return $this->rangeToArray(	'A1:'.$maxCol.$maxRow,
2481
+		return $this->rangeToArray('A1:'.$maxCol.$maxRow,
2482 2482
 									$nullValue, $calculateFormulas, $formatData, $returnCellRef);
2483 2483
 	}
2484 2484
 
@@ -2489,7 +2489,7 @@  discard block
 block discarded – undo
2489 2489
 	 * @return PHPExcel_Worksheet_RowIterator
2490 2490
 	 */
2491 2491
 	public function getRowIterator($startRow = 1) {
2492
-		return new PHPExcel_Worksheet_RowIterator($this,$startRow);
2492
+		return new PHPExcel_Worksheet_RowIterator($this, $startRow);
2493 2493
 	}
2494 2494
 
2495 2495
 	/**
@@ -2514,12 +2514,12 @@  discard block
 block discarded – undo
2514 2514
 
2515 2515
 		// Loop through column dimensions
2516 2516
 		foreach ($this->_columnDimensions as $dimension) {
2517
-			$highestColumn = max($highestColumn,PHPExcel_Cell::columnIndexFromString($dimension->getColumnIndex()));
2517
+			$highestColumn = max($highestColumn, PHPExcel_Cell::columnIndexFromString($dimension->getColumnIndex()));
2518 2518
 		}
2519 2519
 
2520 2520
 		// Loop through row dimensions
2521 2521
 		foreach ($this->_rowDimensions as $dimension) {
2522
-			$highestRow = max($highestRow,$dimension->getRowIndex());
2522
+			$highestRow = max($highestRow, $dimension->getRowIndex());
2523 2523
 		}
2524 2524
 
2525 2525
 		// Cache values
@@ -2541,9 +2541,9 @@  discard block
 block discarded – undo
2541 2541
 	 */
2542 2542
 	public function getHashCode() {
2543 2543
 		if ($this->_dirty) {
2544
-			$this->_hash = md5( $this->_title .
2545
-								$this->_autoFilter .
2546
-								($this->_protection->isProtectionEnabled() ? 't' : 'f') .
2544
+			$this->_hash = md5($this->_title.
2545
+								$this->_autoFilter.
2546
+								($this->_protection->isProtectionEnabled() ? 't' : 'f').
2547 2547
 								__CLASS__
2548 2548
 							  );
2549 2549
 			$this->_dirty = false;
@@ -2568,7 +2568,7 @@  discard block
 block discarded – undo
2568 2568
 		}
2569 2569
 
2570 2570
 		if ($returnRange) {
2571
-			return array( trim(substr($pRange, 0, $sep),"'"),
2571
+			return array(trim(substr($pRange, 0, $sep), "'"),
2572 2572
 						  substr($pRange, $sep + 1)
2573 2573
 						);
2574 2574
 		}
@@ -2697,7 +2697,7 @@  discard block
 block discarded – undo
2697 2697
 		$maxRow = $this->getHighestRow();
2698 2698
 		$maxCol = PHPExcel_Cell::columnIndexFromString($maxCol);
2699 2699
 
2700
-		$rangeBlocks = explode(' ',$range);
2700
+		$rangeBlocks = explode(' ', $range);
2701 2701
 		foreach ($rangeBlocks as &$rangeSet) {
2702 2702
 			$rangeBoundaries = PHPExcel_Cell::getRangeBoundaries($rangeSet);
2703 2703
 
@@ -2708,7 +2708,7 @@  discard block
 block discarded – undo
2708 2708
 			$rangeSet = $rangeBoundaries[0][0].$rangeBoundaries[0][1].':'.$rangeBoundaries[1][0].$rangeBoundaries[1][1];
2709 2709
 		}
2710 2710
 		unset($rangeSet);
2711
-		$stRange = implode(' ',$rangeBlocks);
2711
+		$stRange = implode(' ', $rangeBlocks);
2712 2712
 
2713 2713
 		return $stRange;
2714 2714
 	}
Please login to merge, or discard this patch.
Braces   +18 added lines, -11 removed lines patch added patch discarded remove patch
@@ -719,7 +719,9 @@  discard block
 block discarded – undo
719 719
 
720 720
 			// adjust column widths
721 721
 			foreach ($autoSizes as $columnIndex => $width) {
722
-				if ($width == -1) $width = $this->getDefaultColumnDimension()->getWidth();
722
+				if ($width == -1) {
723
+					$width = $this->getDefaultColumnDimension()->getWidth();
724
+				}
723 725
 				$this->getColumnDimension($columnIndex)->setWidth($width);
724 726
 			}
725 727
 		}
@@ -821,8 +823,9 @@  discard block
 block discarded – undo
821 823
 
822 824
 		// New title
823 825
 		$newTitle = $this->getTitle();
824
-		if ($updateFormulaCellReferences)
825
-			PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->getParent(), $oldTitle, $newTitle);
826
+		if ($updateFormulaCellReferences) {
827
+					PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->getParent(), $oldTitle, $newTitle);
828
+		}
826 829
 
827 830
 		return $this;
828 831
 	}
@@ -1121,8 +1124,9 @@  discard block
 block discarded – undo
1121 1124
 			$cell = $this->_cellCollection->addCacheData($pCoordinate,new PHPExcel_Cell($aCoordinates[0], $aCoordinates[1], null, PHPExcel_Cell_DataType::TYPE_NULL, $this));
1122 1125
 			$this->_cellCollectionIsSorted = false;
1123 1126
 
1124
-			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($aCoordinates[0]))
1125
-				$this->_cachedHighestColumn = $aCoordinates[0];
1127
+			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($aCoordinates[0])) {
1128
+							$this->_cachedHighestColumn = $aCoordinates[0];
1129
+			}
1126 1130
 
1127 1131
 			$this->_cachedHighestRow = max($this->_cachedHighestRow,$aCoordinates[1]);
1128 1132
 
@@ -1161,8 +1165,9 @@  discard block
 block discarded – undo
1161 1165
 			$cell = $this->_cellCollection->addCacheData($coordinate, new PHPExcel_Cell($columnLetter, $pRow, null, PHPExcel_Cell_DataType::TYPE_NULL, $this));
1162 1166
 			$this->_cellCollectionIsSorted = false;
1163 1167
 
1164
-			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < $pColumn)
1165
-				$this->_cachedHighestColumn = $columnLetter;
1168
+			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < $pColumn) {
1169
+							$this->_cachedHighestColumn = $columnLetter;
1170
+			}
1166 1171
 
1167 1172
 			$this->_cachedHighestRow = max($this->_cachedHighestRow,$pRow);
1168 1173
 
@@ -1266,8 +1271,9 @@  discard block
 block discarded – undo
1266 1271
 		if (!isset($this->_columnDimensions[$pColumn])) {
1267 1272
 			$this->_columnDimensions[$pColumn] = new PHPExcel_Worksheet_ColumnDimension($pColumn);
1268 1273
 
1269
-			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($pColumn))
1270
-				$this->_cachedHighestColumn = $pColumn;
1274
+			if (PHPExcel_Cell::columnIndexFromString($this->_cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($pColumn)) {
1275
+							$this->_cachedHighestColumn = $pColumn;
1276
+			}
1271 1277
 		}
1272 1278
 		return $this->_columnDimensions[$pColumn];
1273 1279
 	}
@@ -2721,8 +2727,9 @@  discard block
 block discarded – undo
2721 2727
 	 */
2722 2728
 	public function getTabColor()
2723 2729
 	{
2724
-		if ($this->_tabColor === NULL)
2725
-			$this->_tabColor = new PHPExcel_Style_Color();
2730
+		if ($this->_tabColor === NULL) {
2731
+					$this->_tabColor = new PHPExcel_Style_Color();
2732
+		}
2726 2733
 
2727 2734
 		return $this->_tabColor;
2728 2735
 	}
Please login to merge, or discard this patch.
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -221,17 +221,17 @@  discard block
 block discarded – undo
221 221
 	private $_showGridlines = true;
222 222
 
223 223
 	/**
224
-	* Print gridlines?
225
-	*
226
-	* @var boolean
227
-	*/
224
+	 * Print gridlines?
225
+	 *
226
+	 * @var boolean
227
+	 */
228 228
 	private $_printGridlines = false;
229 229
 
230 230
 	/**
231
-	* Show row and column headers?
232
-	*
233
-	* @var boolean
234
-	*/
231
+	 * Show row and column headers?
232
+	 *
233
+	 * @var boolean
234
+	 */
235 235
 	private $_showRowColHeaders = true;
236 236
 
237 237
 	/**
@@ -355,8 +355,8 @@  discard block
 block discarded – undo
355 355
 		// Drawing collection
356 356
 		$this->_drawingCollection	= new ArrayObject();
357 357
 
358
-    	// Chart collection
359
-    	$this->_chartCollection 	= new ArrayObject();
358
+		// Chart collection
359
+		$this->_chartCollection 	= new ArrayObject();
360 360
 
361 361
 		// Protection
362 362
 		$this->_protection			= new PHPExcel_Worksheet_Protection();
@@ -1877,16 +1877,16 @@  discard block
 block discarded – undo
1877 1877
 		);
1878 1878
 	}
1879 1879
 
1880
-    /**
1881
-     * Remove autofilter
1882
-     *
1883
-     * @return PHPExcel_Worksheet
1884
-     */
1885
-    public function removeAutoFilter()
1886
-    {
1887
-    	$this->_autoFilter = '';
1888
-    	return $this;
1889
-    }
1880
+	/**
1881
+	 * Remove autofilter
1882
+	 *
1883
+	 * @return PHPExcel_Worksheet
1884
+	 */
1885
+	public function removeAutoFilter()
1886
+	{
1887
+		$this->_autoFilter = '';
1888
+		return $this;
1889
+	}
1890 1890
 
1891 1891
 	/**
1892 1892
 	 * Get Freeze Pane
@@ -2067,40 +2067,40 @@  discard block
 block discarded – undo
2067 2067
 	}
2068 2068
 
2069 2069
 	/**
2070
-	* Print gridlines?
2071
-	*
2072
-	* @return boolean
2073
-	*/
2070
+	 * Print gridlines?
2071
+	 *
2072
+	 * @return boolean
2073
+	 */
2074 2074
 	public function getPrintGridlines() {
2075 2075
 		return $this->_printGridlines;
2076 2076
 	}
2077 2077
 
2078 2078
 	/**
2079
-	* Set print gridlines
2080
-	*
2081
-	* @param boolean $pValue Print gridlines (true/false)
2082
-	* @return PHPExcel_Worksheet
2083
-	*/
2079
+	 * Set print gridlines
2080
+	 *
2081
+	 * @param boolean $pValue Print gridlines (true/false)
2082
+	 * @return PHPExcel_Worksheet
2083
+	 */
2084 2084
 	public function setPrintGridlines($pValue = false) {
2085 2085
 		$this->_printGridlines = $pValue;
2086 2086
 		return $this;
2087 2087
 	}
2088 2088
 
2089 2089
 	/**
2090
-	* Show row and column headers?
2091
-	*
2092
-	* @return boolean
2093
-	*/
2090
+	 * Show row and column headers?
2091
+	 *
2092
+	 * @return boolean
2093
+	 */
2094 2094
 	public function getShowRowColHeaders() {
2095 2095
 		return $this->_showRowColHeaders;
2096 2096
 	}
2097 2097
 
2098 2098
 	/**
2099
-	* Set show row and column headers
2100
-	*
2101
-	* @param boolean $pValue Show row and column headers (true/false)
2102
-	* @return PHPExcel_Worksheet
2103
-	*/
2099
+	 * Set show row and column headers
2100
+	 *
2101
+	 * @param boolean $pValue Show row and column headers (true/false)
2102
+	 * @return PHPExcel_Worksheet
2103
+	 */
2104 2104
 	public function setShowRowColHeaders($pValue = false) {
2105 2105
 		$this->_showRowColHeaders = $pValue;
2106 2106
 		return $this;
@@ -2485,7 +2485,7 @@  discard block
 block discarded – undo
2485 2485
 	/**
2486 2486
 	 * Get row iterator
2487 2487
 	 *
2488
-     * @param  integer                           $startRow    The row number at which to start iterating
2488
+	 * @param  integer                           $startRow    The row number at which to start iterating
2489 2489
 	 * @return PHPExcel_Worksheet_RowIterator
2490 2490
 	 */
2491 2491
 	public function getRowIterator($startRow = 1) {
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Worksheet/ColumnDimension.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * Get ColumnIndex
105 105
      *
106
-     * @return string
106
+     * @return integer
107 107
      */
108 108
     public function getColumnIndex() {
109 109
     	return $this->_columnIndex;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Set Width
134 134
      *
135
-     * @param double $pValue
135
+     * @param integer $pValue
136 136
      * @return PHPExcel_Worksheet_ColumnDimension
137 137
      */
138 138
     public function setWidth($pValue = -1) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,35 +49,35 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @var double
51 51
 	 */
52
-	private $_width			= -1;
52
+	private $_width = -1;
53 53
 
54 54
 	/**
55 55
 	 * Auto size?
56 56
 	 *
57 57
 	 * @var bool
58 58
 	 */
59
-	private $_autoSize		= false;
59
+	private $_autoSize = false;
60 60
 
61 61
 	/**
62 62
 	 * Visible?
63 63
 	 *
64 64
 	 * @var bool
65 65
 	 */
66
-	private $_visible		= true;
66
+	private $_visible = true;
67 67
 
68 68
 	/**
69 69
 	 * Outline level
70 70
 	 *
71 71
 	 * @var int
72 72
 	 */
73
-	private $_outlineLevel	= 0;
73
+	private $_outlineLevel = 0;
74 74
 
75 75
 	/**
76 76
 	 * Collapsed
77 77
 	 *
78 78
 	 * @var bool
79 79
 	 */
80
-	private $_collapsed		= false;
80
+	private $_collapsed = false;
81 81
 
82 82
 	/**
83 83
 	 * Index to cellXf
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public function __construct($pIndex = 'A')
95 95
     {
96 96
     	// Initialise values
97
-    	$this->_columnIndex		= $pIndex;
97
+    	$this->_columnIndex = $pIndex;
98 98
 
99 99
 		// set default index to cellXf
100 100
 		$this->_xfIndex = 0;
Please login to merge, or discard this patch.
Indentation   +124 added lines, -124 removed lines patch added patch discarded remove patch
@@ -86,146 +86,146 @@
 block discarded – undo
86 86
 	 */
87 87
 	private $_xfIndex;
88 88
 
89
-    /**
90
-     * Create a new PHPExcel_Worksheet_ColumnDimension
91
-     *
92
-     * @param string $pIndex Character column index
93
-     */
94
-    public function __construct($pIndex = 'A')
95
-    {
96
-    	// Initialise values
97
-    	$this->_columnIndex		= $pIndex;
89
+	/**
90
+	 * Create a new PHPExcel_Worksheet_ColumnDimension
91
+	 *
92
+	 * @param string $pIndex Character column index
93
+	 */
94
+	public function __construct($pIndex = 'A')
95
+	{
96
+		// Initialise values
97
+		$this->_columnIndex		= $pIndex;
98 98
 
99 99
 		// set default index to cellXf
100 100
 		$this->_xfIndex = 0;
101
-    }
101
+	}
102 102
 
103
-    /**
104
-     * Get ColumnIndex
105
-     *
106
-     * @return string
107
-     */
108
-    public function getColumnIndex() {
109
-    	return $this->_columnIndex;
110
-    }
103
+	/**
104
+	 * Get ColumnIndex
105
+	 *
106
+	 * @return string
107
+	 */
108
+	public function getColumnIndex() {
109
+		return $this->_columnIndex;
110
+	}
111 111
 
112
-    /**
113
-     * Set ColumnIndex
114
-     *
115
-     * @param string $pValue
116
-     * @return PHPExcel_Worksheet_ColumnDimension
117
-     */
118
-    public function setColumnIndex($pValue) {
119
-    	$this->_columnIndex = $pValue;
120
-    	return $this;
121
-    }
112
+	/**
113
+	 * Set ColumnIndex
114
+	 *
115
+	 * @param string $pValue
116
+	 * @return PHPExcel_Worksheet_ColumnDimension
117
+	 */
118
+	public function setColumnIndex($pValue) {
119
+		$this->_columnIndex = $pValue;
120
+		return $this;
121
+	}
122 122
 
123
-    /**
124
-     * Get Width
125
-     *
126
-     * @return double
127
-     */
128
-    public function getWidth() {
129
-    	return $this->_width;
130
-    }
123
+	/**
124
+	 * Get Width
125
+	 *
126
+	 * @return double
127
+	 */
128
+	public function getWidth() {
129
+		return $this->_width;
130
+	}
131 131
 
132
-    /**
133
-     * Set Width
134
-     *
135
-     * @param double $pValue
136
-     * @return PHPExcel_Worksheet_ColumnDimension
137
-     */
138
-    public function setWidth($pValue = -1) {
139
-    	$this->_width = $pValue;
140
-    	return $this;
141
-    }
132
+	/**
133
+	 * Set Width
134
+	 *
135
+	 * @param double $pValue
136
+	 * @return PHPExcel_Worksheet_ColumnDimension
137
+	 */
138
+	public function setWidth($pValue = -1) {
139
+		$this->_width = $pValue;
140
+		return $this;
141
+	}
142 142
 
143
-    /**
144
-     * Get Auto Size
145
-     *
146
-     * @return bool
147
-     */
148
-    public function getAutoSize() {
149
-    	return $this->_autoSize;
150
-    }
143
+	/**
144
+	 * Get Auto Size
145
+	 *
146
+	 * @return bool
147
+	 */
148
+	public function getAutoSize() {
149
+		return $this->_autoSize;
150
+	}
151 151
 
152
-    /**
153
-     * Set Auto Size
154
-     *
155
-     * @param bool $pValue
156
-     * @return PHPExcel_Worksheet_ColumnDimension
157
-     */
158
-    public function setAutoSize($pValue = false) {
159
-    	$this->_autoSize = $pValue;
160
-    	return $this;
161
-    }
152
+	/**
153
+	 * Set Auto Size
154
+	 *
155
+	 * @param bool $pValue
156
+	 * @return PHPExcel_Worksheet_ColumnDimension
157
+	 */
158
+	public function setAutoSize($pValue = false) {
159
+		$this->_autoSize = $pValue;
160
+		return $this;
161
+	}
162 162
 
163
-    /**
164
-     * Get Visible
165
-     *
166
-     * @return bool
167
-     */
168
-    public function getVisible() {
169
-    	return $this->_visible;
170
-    }
163
+	/**
164
+	 * Get Visible
165
+	 *
166
+	 * @return bool
167
+	 */
168
+	public function getVisible() {
169
+		return $this->_visible;
170
+	}
171 171
 
172
-    /**
173
-     * Set Visible
174
-     *
175
-     * @param bool $pValue
176
-     * @return PHPExcel_Worksheet_ColumnDimension
177
-     */
178
-    public function setVisible($pValue = true) {
179
-    	$this->_visible = $pValue;
180
-    	return $this;
181
-    }
172
+	/**
173
+	 * Set Visible
174
+	 *
175
+	 * @param bool $pValue
176
+	 * @return PHPExcel_Worksheet_ColumnDimension
177
+	 */
178
+	public function setVisible($pValue = true) {
179
+		$this->_visible = $pValue;
180
+		return $this;
181
+	}
182 182
 
183
-    /**
184
-     * Get Outline Level
185
-     *
186
-     * @return int
187
-     */
188
-    public function getOutlineLevel() {
189
-    	return $this->_outlineLevel;
190
-    }
183
+	/**
184
+	 * Get Outline Level
185
+	 *
186
+	 * @return int
187
+	 */
188
+	public function getOutlineLevel() {
189
+		return $this->_outlineLevel;
190
+	}
191 191
 
192
-    /**
193
-     * Set Outline Level
194
-     *
195
-     * Value must be between 0 and 7
196
-     *
197
-     * @param int $pValue
198
-     * @throws Exception
199
-     * @return PHPExcel_Worksheet_ColumnDimension
200
-     */
201
-    public function setOutlineLevel($pValue) {
202
-    	if ($pValue < 0 || $pValue > 7) {
203
-    		throw new Exception("Outline level must range between 0 and 7.");
204
-    	}
192
+	/**
193
+	 * Set Outline Level
194
+	 *
195
+	 * Value must be between 0 and 7
196
+	 *
197
+	 * @param int $pValue
198
+	 * @throws Exception
199
+	 * @return PHPExcel_Worksheet_ColumnDimension
200
+	 */
201
+	public function setOutlineLevel($pValue) {
202
+		if ($pValue < 0 || $pValue > 7) {
203
+			throw new Exception("Outline level must range between 0 and 7.");
204
+		}
205 205
 
206
-    	$this->_outlineLevel = $pValue;
207
-    	return $this;
208
-    }
206
+		$this->_outlineLevel = $pValue;
207
+		return $this;
208
+	}
209 209
 
210
-    /**
211
-     * Get Collapsed
212
-     *
213
-     * @return bool
214
-     */
215
-    public function getCollapsed() {
216
-    	return $this->_collapsed;
217
-    }
210
+	/**
211
+	 * Get Collapsed
212
+	 *
213
+	 * @return bool
214
+	 */
215
+	public function getCollapsed() {
216
+		return $this->_collapsed;
217
+	}
218 218
 
219
-    /**
220
-     * Set Collapsed
221
-     *
222
-     * @param bool $pValue
223
-     * @return PHPExcel_Worksheet_ColumnDimension
224
-     */
225
-    public function setCollapsed($pValue = true) {
226
-    	$this->_collapsed = $pValue;
227
-    	return $this;
228
-    }
219
+	/**
220
+	 * Set Collapsed
221
+	 *
222
+	 * @param bool $pValue
223
+	 * @return PHPExcel_Worksheet_ColumnDimension
224
+	 */
225
+	public function setCollapsed($pValue = true) {
226
+		$this->_collapsed = $pValue;
227
+		return $this;
228
+	}
229 229
 
230 230
 	/**
231 231
 	 * Get index to cellXf
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Worksheet/PageSetup.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
      * Set first page number
767 767
      *
768 768
      * @param int $value
769
-     * @return PHPExcel_Worksheet_HeaderFooter
769
+     * @return PHPExcel_Worksheet_PageSetup
770 770
      */
771 771
     public function setFirstPageNumber($value = null) {
772 772
 		$this->_firstPageNumber = $value;
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     /**
777 777
      * Reset first page number
778 778
      *
779
-     * @return PHPExcel_Worksheet_HeaderFooter
779
+     * @return PHPExcel_Worksheet_PageSetup
780 780
      */
781 781
     public function resetFirstPageNumber() {
782 782
 		return $this->setFirstPageNumber(null);
Please login to merge, or discard this patch.
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -108,24 +108,24 @@  discard block
 block discarded – undo
108 108
 {
109 109
 	/* Paper size */
110 110
 	const PAPERSIZE_LETTER							= 1;
111
-	const PAPERSIZE_LETTER_SMALL					= 2;
112
-	const PAPERSIZE_TABLOID							= 3;
111
+	const PAPERSIZE_LETTER_SMALL = 2;
112
+	const PAPERSIZE_TABLOID = 3;
113 113
 	const PAPERSIZE_LEDGER							= 4;
114
-	const PAPERSIZE_LEGAL							= 5;
114
+	const PAPERSIZE_LEGAL = 5;
115 115
 	const PAPERSIZE_STATEMENT						= 6;
116 116
 	const PAPERSIZE_EXECUTIVE						= 7;
117 117
 	const PAPERSIZE_A3								= 8;
118 118
 	const PAPERSIZE_A4								= 9;
119
-	const PAPERSIZE_A4_SMALL						= 10;
119
+	const PAPERSIZE_A4_SMALL = 10;
120 120
 	const PAPERSIZE_A5								= 11;
121 121
 	const PAPERSIZE_B4								= 12;
122 122
 	const PAPERSIZE_B5								= 13;
123
-	const PAPERSIZE_FOLIO							= 14;
124
-	const PAPERSIZE_QUARTO							= 15;
123
+	const PAPERSIZE_FOLIO = 14;
124
+	const PAPERSIZE_QUARTO = 15;
125 125
 	const PAPERSIZE_STANDARD_1						= 16;
126 126
 	const PAPERSIZE_STANDARD_2						= 17;
127
-	const PAPERSIZE_NOTE							= 18;
128
-	const PAPERSIZE_NO9_ENVELOPE					= 19;
127
+	const PAPERSIZE_NOTE = 18;
128
+	const PAPERSIZE_NO9_ENVELOPE = 19;
129 129
 	const PAPERSIZE_NO10_ENVELOPE					= 20;
130 130
 	const PAPERSIZE_NO11_ENVELOPE					= 21;
131 131
 	const PAPERSIZE_NO12_ENVELOPE					= 22;
@@ -143,45 +143,45 @@  discard block
 block discarded – undo
143 143
 	const PAPERSIZE_B5_ENVELOPE						= 34;
144 144
 	const PAPERSIZE_B6_ENVELOPE						= 35;
145 145
 	const PAPERSIZE_ITALY_ENVELOPE					= 36;
146
-	const PAPERSIZE_MONARCH_ENVELOPE				= 37;
146
+	const PAPERSIZE_MONARCH_ENVELOPE = 37;
147 147
 	const PAPERSIZE_6_3_4_ENVELOPE					= 38;
148 148
 	const PAPERSIZE_US_STANDARD_FANFOLD				= 39;
149 149
 	const PAPERSIZE_GERMAN_STANDARD_FANFOLD			= 40;
150 150
 	const PAPERSIZE_GERMAN_LEGAL_FANFOLD			= 41;
151
-	const PAPERSIZE_ISO_B4							= 42;
151
+	const PAPERSIZE_ISO_B4 = 42;
152 152
 	const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD		= 43;
153 153
 	const PAPERSIZE_STANDARD_PAPER_1				= 44;
154 154
 	const PAPERSIZE_STANDARD_PAPER_2				= 45;
155 155
 	const PAPERSIZE_STANDARD_PAPER_3				= 46;
156 156
 	const PAPERSIZE_INVITE_ENVELOPE					= 47;
157
-	const PAPERSIZE_LETTER_EXTRA_PAPER				= 48;
158
-	const PAPERSIZE_LEGAL_EXTRA_PAPER				= 49;
157
+	const PAPERSIZE_LETTER_EXTRA_PAPER = 48;
158
+	const PAPERSIZE_LEGAL_EXTRA_PAPER = 49;
159 159
 	const PAPERSIZE_TABLOID_EXTRA_PAPER				= 50;
160
-	const PAPERSIZE_A4_EXTRA_PAPER					= 51;
161
-	const PAPERSIZE_LETTER_TRANSVERSE_PAPER			= 52;
160
+	const PAPERSIZE_A4_EXTRA_PAPER = 51;
161
+	const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52;
162 162
 	const PAPERSIZE_A4_TRANSVERSE_PAPER				= 53;
163
-	const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER	= 54;
163
+	const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54;
164 164
 	const PAPERSIZE_SUPERA_SUPERA_A4_PAPER			= 55;
165 165
 	const PAPERSIZE_SUPERB_SUPERB_A3_PAPER			= 56;
166
-	const PAPERSIZE_LETTER_PLUS_PAPER				= 57;
167
-	const PAPERSIZE_A4_PLUS_PAPER					= 58;
168
-	const PAPERSIZE_A5_TRANSVERSE_PAPER				= 59;
169
-	const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER			= 60;
166
+	const PAPERSIZE_LETTER_PLUS_PAPER = 57;
167
+	const PAPERSIZE_A4_PLUS_PAPER = 58;
168
+	const PAPERSIZE_A5_TRANSVERSE_PAPER = 59;
169
+	const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60;
170 170
 	const PAPERSIZE_A3_EXTRA_PAPER					= 61;
171 171
 	const PAPERSIZE_A5_EXTRA_PAPER					= 62;
172
-	const PAPERSIZE_ISO_B5_EXTRA_PAPER				= 63;
173
-	const PAPERSIZE_A2_PAPER						= 64;
174
-	const PAPERSIZE_A3_TRANSVERSE_PAPER				= 65;
175
-	const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER		= 66;
172
+	const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63;
173
+	const PAPERSIZE_A2_PAPER = 64;
174
+	const PAPERSIZE_A3_TRANSVERSE_PAPER = 65;
175
+	const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66;
176 176
 
177 177
 	/* Page orientation */
178
-	const ORIENTATION_DEFAULT	= 'default';
179
-	const ORIENTATION_LANDSCAPE	= 'landscape';
180
-	const ORIENTATION_PORTRAIT	= 'portrait';
178
+	const ORIENTATION_DEFAULT = 'default';
179
+	const ORIENTATION_LANDSCAPE = 'landscape';
180
+	const ORIENTATION_PORTRAIT = 'portrait';
181 181
 
182 182
 	/* Print Range Set Method */
183
-	const SETPRINTRANGE_OVERWRITE	= 'O';
184
-	const SETPRINTRANGE_INSERT		= 'I';
183
+	const SETPRINTRANGE_OVERWRITE = 'O';
184
+	const SETPRINTRANGE_INSERT = 'I';
185 185
 
186 186
 
187 187
 	/**
@@ -189,14 +189,14 @@  discard block
 block discarded – undo
189 189
 	 *
190 190
 	 * @var int
191 191
 	 */
192
-	private $_paperSize		= PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER;
192
+	private $_paperSize = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER;
193 193
 
194 194
 	/**
195 195
 	 * Orientation
196 196
 	 *
197 197
 	 * @var string
198 198
 	 */
199
-	private $_orientation	= PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT;
199
+	private $_orientation = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT;
200 200
 
201 201
 	/**
202 202
 	 * Scale (Print Scale)
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 	 *
207 207
 	 * @var int?
208 208
 	 */
209
-	private $_scale			= 100;
209
+	private $_scale = 100;
210 210
 
211 211
 	/**
212 212
 	  * Fit To Page
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	  *
215 215
 	  * @var boolean
216 216
 	  */
217
-	private $_fitToPage		= FALSE;
217
+	private $_fitToPage = FALSE;
218 218
 
219 219
 	/**
220 220
 	  * Fit To Height
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	  *
223 223
 	  * @var int?
224 224
 	  */
225
-	private $_fitToHeight	= 1;
225
+	private $_fitToHeight = 1;
226 226
 
227 227
 	/**
228 228
 	  * Fit To Width
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	  *
231 231
 	  * @var int?
232 232
 	  */
233
-	private $_fitToWidth	= 1;
233
+	private $_fitToWidth = 1;
234 234
 
235 235
 	/**
236 236
 	 * Columns to repeat at left
@@ -575,9 +575,9 @@  discard block
 block discarded – undo
575 575
 		if ($index == 0) {
576 576
 			return $this->_printArea;
577 577
 		}
578
-		$printAreas = explode(',',$this->_printArea);
579
-		if (isset($printAreas[$index-1])) {
580
-			return $printAreas[$index-1];
578
+		$printAreas = explode(',', $this->_printArea);
579
+		if (isset($printAreas[$index - 1])) {
580
+			return $printAreas[$index - 1];
581 581
 		}
582 582
 		throw new Exception("Requested Print Area does not exist");
583 583
 	}
@@ -593,10 +593,10 @@  discard block
 block discarded – undo
593 593
 	 */
594 594
 	public function isPrintAreaSet($index = 0) {
595 595
 		if ($index == 0) {
596
-			return !is_null($this->_printArea);
596
+			return ! is_null($this->_printArea);
597 597
 		}
598
-		$printAreas = explode(',',$this->_printArea);
599
-		return isset($printAreas[$index-1]);
598
+		$printAreas = explode(',', $this->_printArea);
599
+		return isset($printAreas[$index - 1]);
600 600
 	}
601 601
 
602 602
 	/**
@@ -612,10 +612,10 @@  discard block
 block discarded – undo
612 612
 		if ($index == 0) {
613 613
 			$this->_printArea = NULL;
614 614
 		} else {
615
-			$printAreas = explode(',',$this->_printArea);
616
-			if (isset($printAreas[$index-1])) {
617
-				unset($printAreas[$index-1]);
618
-				$this->_printArea = implode(',',$printAreas);
615
+			$printAreas = explode(',', $this->_printArea);
616
+			if (isset($printAreas[$index - 1])) {
617
+				unset($printAreas[$index - 1]);
618
+				$this->_printArea = implode(',', $printAreas);
619 619
 			}
620 620
 		}
621 621
 
@@ -643,11 +643,11 @@  discard block
 block discarded – undo
643 643
 	 * @throws	Exception
644 644
 	 */
645 645
 	public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) {
646
-		if (strpos($value,'!') !== false) {
646
+		if (strpos($value, '!') !== false) {
647 647
 			throw new Exception('Cell coordinate must not specify a worksheet.');
648
-		} elseif (strpos($value,':') === false) {
648
+		} elseif (strpos($value, ':') === false) {
649 649
 			throw new Exception('Cell coordinate must be a range of cells.');
650
-		} elseif (strpos($value,'$') !== false) {
650
+		} elseif (strpos($value, '$') !== false) {
651 651
 			throw new Exception('Cell coordinate must not be absolute.');
652 652
 		}
653 653
 		$value = strtoupper($value);
@@ -656,29 +656,29 @@  discard block
 block discarded – undo
656 656
 			if ($index == 0) {
657 657
 				$this->_printArea = $value;
658 658
 			} else {
659
-				$printAreas = explode(',',$this->_printArea);
660
-				if($index < 0) {
659
+				$printAreas = explode(',', $this->_printArea);
660
+				if ($index < 0) {
661 661
 					$index = count($printAreas) - abs($index) + 1;
662 662
 				}
663 663
 				if (($index <= 0) || ($index > count($printAreas))) {
664 664
 		    		throw new Exception('Invalid index for setting print range.');
665 665
 				}
666
-				$printAreas[$index-1] = $value;
667
-				$this->_printArea = implode(',',$printAreas);
666
+				$printAreas[$index - 1] = $value;
667
+				$this->_printArea = implode(',', $printAreas);
668 668
 			}
669
-		} elseif($method == self::SETPRINTRANGE_INSERT) {
669
+		} elseif ($method == self::SETPRINTRANGE_INSERT) {
670 670
 			if ($index == 0) {
671 671
 				$this->_printArea .= ($this->_printArea == '') ? $value : ','.$value;
672 672
 			} else {
673
-				$printAreas = explode(',',$this->_printArea);
674
-				if($index < 0) {
673
+				$printAreas = explode(',', $this->_printArea);
674
+				if ($index < 0) {
675 675
 					$index = abs($index) - 1;
676 676
 				}
677 677
 				if ($index > count($printAreas)) {
678 678
 		    		throw new Exception('Invalid index for setting print range.');
679 679
 				}
680
-				$printAreas = array_merge(array_slice($printAreas,0,$index),array($value),array_slice($printAreas,$index));
681
-				$this->_printArea = implode(',',$printAreas);
680
+				$printAreas = array_merge(array_slice($printAreas, 0, $index), array($value), array_slice($printAreas, $index));
681
+				$this->_printArea = implode(',', $printAreas);
682 682
 			}
683 683
 		} else {
684 684
     		throw new Exception('Invalid method for setting print range.');
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 	 */
730 730
     public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
731 731
     {
732
-    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, $method);
732
+    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1).$row1.':'.PHPExcel_Cell::stringFromColumnIndex($column2).$row2, $index, $method);
733 733
     }
734 734
 
735 735
 	/**
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
 	 */
751 751
     public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
752 752
     {
753
-    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, self::SETPRINTRANGE_INSERT);
753
+    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1).$row1.':'.PHPExcel_Cell::stringFromColumnIndex($column2).$row2, $index, self::SETPRINTRANGE_INSERT);
754 754
 	}
755 755
 
756 756
 	/**
Please login to merge, or discard this patch.
Indentation   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -209,27 +209,27 @@  discard block
 block discarded – undo
209 209
 	private $_scale			= 100;
210 210
 
211 211
 	/**
212
-	  * Fit To Page
213
-	  * Whether scale or fitToWith / fitToHeight applies
214
-	  *
215
-	  * @var boolean
216
-	  */
212
+	 * Fit To Page
213
+	 * Whether scale or fitToWith / fitToHeight applies
214
+	 *
215
+	 * @var boolean
216
+	 */
217 217
 	private $_fitToPage		= FALSE;
218 218
 
219 219
 	/**
220
-	  * Fit To Height
221
-	  * Number of vertical pages to fit on
222
-	  *
223
-	  * @var int?
224
-	  */
220
+	 * Fit To Height
221
+	 * Number of vertical pages to fit on
222
+	 *
223
+	 * @var int?
224
+	 */
225 225
 	private $_fitToHeight	= 1;
226 226
 
227 227
 	/**
228
-	  * Fit To Width
229
-	  * Number of horizontal pages to fit on
230
-	  *
231
-	  * @var int?
232
-	  */
228
+	 * Fit To Width
229
+	 * Number of horizontal pages to fit on
230
+	 *
231
+	 * @var int?
232
+	 */
233 233
 	private $_fitToWidth	= 1;
234 234
 
235 235
 	/**
@@ -274,52 +274,52 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	private $_firstPageNumber = NULL;
276 276
 
277
-    /**
278
-     * Create a new PHPExcel_Worksheet_PageSetup
279
-     */
280
-    public function __construct()
281
-    {
282
-    }
283
-
284
-    /**
285
-     * Get Paper Size
286
-     *
287
-     * @return int
288
-     */
289
-    public function getPaperSize() {
290
-    	return $this->_paperSize;
291
-    }
292
-
293
-    /**
294
-     * Set Paper Size
295
-     *
296
-     * @param int $pValue
297
-     * @return PHPExcel_Worksheet_PageSetup
298
-     */
299
-    public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER) {
300
-    	$this->_paperSize = $pValue;
301
-    	return $this;
302
-    }
303
-
304
-    /**
305
-     * Get Orientation
306
-     *
307
-     * @return string
308
-     */
309
-    public function getOrientation() {
310
-    	return $this->_orientation;
311
-    }
312
-
313
-    /**
314
-     * Set Orientation
315
-     *
316
-     * @param string $pValue
317
-     * @return PHPExcel_Worksheet_PageSetup
318
-     */
319
-    public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) {
320
-    	$this->_orientation = $pValue;
321
-    	return $this;
322
-    }
277
+	/**
278
+	 * Create a new PHPExcel_Worksheet_PageSetup
279
+	 */
280
+	public function __construct()
281
+	{
282
+	}
283
+
284
+	/**
285
+	 * Get Paper Size
286
+	 *
287
+	 * @return int
288
+	 */
289
+	public function getPaperSize() {
290
+		return $this->_paperSize;
291
+	}
292
+
293
+	/**
294
+	 * Set Paper Size
295
+	 *
296
+	 * @param int $pValue
297
+	 * @return PHPExcel_Worksheet_PageSetup
298
+	 */
299
+	public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER) {
300
+		$this->_paperSize = $pValue;
301
+		return $this;
302
+	}
303
+
304
+	/**
305
+	 * Get Orientation
306
+	 *
307
+	 * @return string
308
+	 */
309
+	public function getOrientation() {
310
+		return $this->_orientation;
311
+	}
312
+
313
+	/**
314
+	 * Set Orientation
315
+	 *
316
+	 * @param string $pValue
317
+	 * @return PHPExcel_Worksheet_PageSetup
318
+	 */
319
+	public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) {
320
+		$this->_orientation = $pValue;
321
+		return $this;
322
+	}
323 323
 
324 324
 	/**
325 325
 	 * Get Scale
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
 			}
620 620
 		}
621 621
 
622
-    	return $this;
622
+		return $this;
623 623
 	}
624 624
 
625 625
 	/**
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 					$index = count($printAreas) - abs($index) + 1;
662 662
 				}
663 663
 				if (($index <= 0) || ($index > count($printAreas))) {
664
-		    		throw new Exception('Invalid index for setting print range.');
664
+					throw new Exception('Invalid index for setting print range.');
665 665
 				}
666 666
 				$printAreas[$index-1] = $value;
667 667
 				$this->_printArea = implode(',',$printAreas);
@@ -675,16 +675,16 @@  discard block
 block discarded – undo
675 675
 					$index = abs($index) - 1;
676 676
 				}
677 677
 				if ($index > count($printAreas)) {
678
-		    		throw new Exception('Invalid index for setting print range.');
678
+					throw new Exception('Invalid index for setting print range.');
679 679
 				}
680 680
 				$printAreas = array_merge(array_slice($printAreas,0,$index),array($value),array_slice($printAreas,$index));
681 681
 				$this->_printArea = implode(',',$printAreas);
682 682
 			}
683 683
 		} else {
684
-    		throw new Exception('Invalid method for setting print range.');
684
+			throw new Exception('Invalid method for setting print range.');
685 685
 		}
686 686
 
687
-    	return $this;
687
+		return $this;
688 688
 	}
689 689
 
690 690
 	/**
@@ -727,10 +727,10 @@  discard block
 block discarded – undo
727 727
 	 * @return	PHPExcel_Worksheet_PageSetup
728 728
 	 * @throws	Exception
729 729
 	 */
730
-    public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
731
-    {
732
-    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, $method);
733
-    }
730
+	public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
731
+	{
732
+		return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, $method);
733
+	}
734 734
 
735 735
 	/**
736 736
 	 * Add a new print area to the list of print areas
@@ -748,9 +748,9 @@  discard block
 block discarded – undo
748 748
 	 * @return	PHPExcel_Worksheet_PageSetup
749 749
 	 * @throws	Exception
750 750
 	 */
751
-    public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
752
-    {
753
-    	return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, self::SETPRINTRANGE_INSERT);
751
+	public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
752
+	{
753
+		return $this->setPrintArea(PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, $index, self::SETPRINTRANGE_INSERT);
754 754
 	}
755 755
 
756 756
 	/**
@@ -758,29 +758,29 @@  discard block
 block discarded – undo
758 758
 	 *
759 759
 	 * @return int
760 760
 	 */
761
-    public function getFirstPageNumber() {
761
+	public function getFirstPageNumber() {
762 762
 		return $this->_firstPageNumber;
763
-    }
764
-
765
-    /**
766
-     * Set first page number
767
-     *
768
-     * @param int $value
769
-     * @return PHPExcel_Worksheet_HeaderFooter
770
-     */
771
-    public function setFirstPageNumber($value = null) {
763
+	}
764
+
765
+	/**
766
+	 * Set first page number
767
+	 *
768
+	 * @param int $value
769
+	 * @return PHPExcel_Worksheet_HeaderFooter
770
+	 */
771
+	public function setFirstPageNumber($value = null) {
772 772
 		$this->_firstPageNumber = $value;
773 773
 		return $this;
774
-    }
775
-
776
-    /**
777
-     * Reset first page number
778
-     *
779
-     * @return PHPExcel_Worksheet_HeaderFooter
780
-     */
781
-    public function resetFirstPageNumber() {
774
+	}
775
+
776
+	/**
777
+	 * Reset first page number
778
+	 *
779
+	 * @return PHPExcel_Worksheet_HeaderFooter
780
+	 */
781
+	public function resetFirstPageNumber() {
782 782
 		return $this->setFirstPageNumber(null);
783
-    }
783
+	}
784 784
 
785 785
 	/**
786 786
 	 * Implement PHP __clone to create a deep clone, not just a shallow copy.
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Worksheet/RowDimension.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
     /**
126 126
      * Set Row Height
127 127
      *
128
-     * @param double $pValue
128
+     * @param integer $pValue
129 129
      * @return PHPExcel_Worksheet_RowDimension
130 130
      */
131 131
     public function setRowHeight($pValue = -1) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,28 +49,28 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @var double
51 51
 	 */
52
-	private $_rowHeight		= -1;
52
+	private $_rowHeight = -1;
53 53
 
54 54
 	/**
55 55
 	 * Visible?
56 56
 	 *
57 57
 	 * @var bool
58 58
 	 */
59
-	private $_visible		= true;
59
+	private $_visible = true;
60 60
 
61 61
 	/**
62 62
 	 * Outline level
63 63
 	 *
64 64
 	 * @var int
65 65
 	 */
66
-	private $_outlineLevel	= 0;
66
+	private $_outlineLevel = 0;
67 67
 
68 68
 	/**
69 69
 	 * Collapsed
70 70
 	 *
71 71
 	 * @var bool
72 72
 	 */
73
-	private $_collapsed		= false;
73
+	private $_collapsed = false;
74 74
 
75 75
 	/**
76 76
 	 * Index to cellXf. Null value means row has no explicit cellXf format.
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function __construct($pIndex = 0)
88 88
     {
89 89
     	// Initialise values
90
-    	$this->_rowIndex		= $pIndex;
90
+    	$this->_rowIndex = $pIndex;
91 91
 
92 92
 		// set row dimension as unformatted by default
93 93
 		$this->_xfIndex = null;
Please login to merge, or discard this patch.
Indentation   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -79,126 +79,126 @@
 block discarded – undo
79 79
 	 */
80 80
 	private $_xfIndex;
81 81
 
82
-    /**
83
-     * Create a new PHPExcel_Worksheet_RowDimension
84
-     *
85
-     * @param int $pIndex Numeric row index
86
-     */
87
-    public function __construct($pIndex = 0)
88
-    {
89
-    	// Initialise values
90
-    	$this->_rowIndex		= $pIndex;
82
+	/**
83
+	 * Create a new PHPExcel_Worksheet_RowDimension
84
+	 *
85
+	 * @param int $pIndex Numeric row index
86
+	 */
87
+	public function __construct($pIndex = 0)
88
+	{
89
+		// Initialise values
90
+		$this->_rowIndex		= $pIndex;
91 91
 
92 92
 		// set row dimension as unformatted by default
93 93
 		$this->_xfIndex = null;
94
-    }
95
-
96
-    /**
97
-     * Get Row Index
98
-     *
99
-     * @return int
100
-     */
101
-    public function getRowIndex() {
102
-    	return $this->_rowIndex;
103
-    }
104
-
105
-    /**
106
-     * Set Row Index
107
-     *
108
-     * @param int $pValue
109
-     * @return PHPExcel_Worksheet_RowDimension
110
-     */
111
-    public function setRowIndex($pValue) {
112
-    	$this->_rowIndex = $pValue;
113
-    	return $this;
114
-    }
115
-
116
-    /**
117
-     * Get Row Height
118
-     *
119
-     * @return double
120
-     */
121
-    public function getRowHeight() {
122
-    	return $this->_rowHeight;
123
-    }
124
-
125
-    /**
126
-     * Set Row Height
127
-     *
128
-     * @param double $pValue
129
-     * @return PHPExcel_Worksheet_RowDimension
130
-     */
131
-    public function setRowHeight($pValue = -1) {
132
-    	$this->_rowHeight = $pValue;
133
-    	return $this;
134
-    }
135
-
136
-    /**
137
-     * Get Visible
138
-     *
139
-     * @return bool
140
-     */
141
-    public function getVisible() {
142
-    	return $this->_visible;
143
-    }
144
-
145
-    /**
146
-     * Set Visible
147
-     *
148
-     * @param bool $pValue
149
-     * @return PHPExcel_Worksheet_RowDimension
150
-     */
151
-    public function setVisible($pValue = true) {
152
-    	$this->_visible = $pValue;
153
-    	return $this;
154
-    }
155
-
156
-    /**
157
-     * Get Outline Level
158
-     *
159
-     * @return int
160
-     */
161
-    public function getOutlineLevel() {
162
-    	return $this->_outlineLevel;
163
-    }
164
-
165
-    /**
166
-     * Set Outline Level
167
-     *
168
-     * Value must be between 0 and 7
169
-     *
170
-     * @param int $pValue
171
-     * @throws Exception
172
-     * @return PHPExcel_Worksheet_RowDimension
173
-     */
174
-    public function setOutlineLevel($pValue) {
175
-    	if ($pValue < 0 || $pValue > 7) {
176
-    		throw new Exception("Outline level must range between 0 and 7.");
177
-    	}
178
-
179
-    	$this->_outlineLevel = $pValue;
180
-    	return $this;
181
-    }
182
-
183
-    /**
184
-     * Get Collapsed
185
-     *
186
-     * @return bool
187
-     */
188
-    public function getCollapsed() {
189
-    	return $this->_collapsed;
190
-    }
191
-
192
-    /**
193
-     * Set Collapsed
194
-     *
195
-     * @param bool $pValue
196
-     * @return PHPExcel_Worksheet_RowDimension
197
-     */
198
-    public function setCollapsed($pValue = true) {
199
-    	$this->_collapsed = $pValue;
200
-    	return $this;
201
-    }
94
+	}
95
+
96
+	/**
97
+	 * Get Row Index
98
+	 *
99
+	 * @return int
100
+	 */
101
+	public function getRowIndex() {
102
+		return $this->_rowIndex;
103
+	}
104
+
105
+	/**
106
+	 * Set Row Index
107
+	 *
108
+	 * @param int $pValue
109
+	 * @return PHPExcel_Worksheet_RowDimension
110
+	 */
111
+	public function setRowIndex($pValue) {
112
+		$this->_rowIndex = $pValue;
113
+		return $this;
114
+	}
115
+
116
+	/**
117
+	 * Get Row Height
118
+	 *
119
+	 * @return double
120
+	 */
121
+	public function getRowHeight() {
122
+		return $this->_rowHeight;
123
+	}
124
+
125
+	/**
126
+	 * Set Row Height
127
+	 *
128
+	 * @param double $pValue
129
+	 * @return PHPExcel_Worksheet_RowDimension
130
+	 */
131
+	public function setRowHeight($pValue = -1) {
132
+		$this->_rowHeight = $pValue;
133
+		return $this;
134
+	}
135
+
136
+	/**
137
+	 * Get Visible
138
+	 *
139
+	 * @return bool
140
+	 */
141
+	public function getVisible() {
142
+		return $this->_visible;
143
+	}
144
+
145
+	/**
146
+	 * Set Visible
147
+	 *
148
+	 * @param bool $pValue
149
+	 * @return PHPExcel_Worksheet_RowDimension
150
+	 */
151
+	public function setVisible($pValue = true) {
152
+		$this->_visible = $pValue;
153
+		return $this;
154
+	}
155
+
156
+	/**
157
+	 * Get Outline Level
158
+	 *
159
+	 * @return int
160
+	 */
161
+	public function getOutlineLevel() {
162
+		return $this->_outlineLevel;
163
+	}
164
+
165
+	/**
166
+	 * Set Outline Level
167
+	 *
168
+	 * Value must be between 0 and 7
169
+	 *
170
+	 * @param int $pValue
171
+	 * @throws Exception
172
+	 * @return PHPExcel_Worksheet_RowDimension
173
+	 */
174
+	public function setOutlineLevel($pValue) {
175
+		if ($pValue < 0 || $pValue > 7) {
176
+			throw new Exception("Outline level must range between 0 and 7.");
177
+		}
178
+
179
+		$this->_outlineLevel = $pValue;
180
+		return $this;
181
+	}
182
+
183
+	/**
184
+	 * Get Collapsed
185
+	 *
186
+	 * @return bool
187
+	 */
188
+	public function getCollapsed() {
189
+		return $this->_collapsed;
190
+	}
191
+
192
+	/**
193
+	 * Set Collapsed
194
+	 *
195
+	 * @param bool $pValue
196
+	 * @return PHPExcel_Worksheet_RowDimension
197
+	 */
198
+	public function setCollapsed($pValue = true) {
199
+		$this->_collapsed = $pValue;
200
+		return $this;
201
+	}
202 202
 
203 203
 	/**
204 204
 	 * Get index to cellXf
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Writer/Excel5/Escher.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -65,6 +65,7 @@
 block discarded – undo
65 65
 
66 66
 	/**
67 67
 	 * Process the object to be written
68
+	 * @return string
68 69
 	 */
69 70
 	public function close()
70 71
 	{
Please login to merge, or discard this patch.
Switch Indentation   +302 added lines, -302 removed lines patch added patch discarded remove patch
@@ -73,426 +73,426 @@
 block discarded – undo
73 73
 
74 74
 		switch (get_class($this->_object)) {
75 75
 
76
-		case 'PHPExcel_Shared_Escher':
77
-			if ($dggContainer = $this->_object->getDggContainer()) {
78
-				$writer = new PHPExcel_Writer_Excel5_Escher($dggContainer);
79
-				$this->_data = $writer->close();
80
-			} else if ($dgContainer = $this->_object->getDgContainer()) {
81
-				$writer = new PHPExcel_Writer_Excel5_Escher($dgContainer);
82
-				$this->_data = $writer->close();
83
-				$this->_spOffsets = $writer->getSpOffsets();
84
-			}
85
-			break;
76
+			case 'PHPExcel_Shared_Escher':
77
+				if ($dggContainer = $this->_object->getDggContainer()) {
78
+					$writer = new PHPExcel_Writer_Excel5_Escher($dggContainer);
79
+					$this->_data = $writer->close();
80
+				} else if ($dgContainer = $this->_object->getDgContainer()) {
81
+					$writer = new PHPExcel_Writer_Excel5_Escher($dgContainer);
82
+					$this->_data = $writer->close();
83
+					$this->_spOffsets = $writer->getSpOffsets();
84
+				}
85
+				break;
86 86
 
87
-		case 'PHPExcel_Shared_Escher_DggContainer':
88
-			// this is a container record
87
+			case 'PHPExcel_Shared_Escher_DggContainer':
88
+				// this is a container record
89 89
 
90
-			// initialize
91
-			$innerData = '';
90
+				// initialize
91
+				$innerData = '';
92 92
 
93
-			// write the dgg
94
-			$recVer			= 0x0;
95
-			$recInstance	= 0x0000;
96
-			$recType		= 0xF006;
93
+				// write the dgg
94
+				$recVer			= 0x0;
95
+				$recInstance	= 0x0000;
96
+				$recType		= 0xF006;
97 97
 
98
-			$recVerInstance  = $recVer;
99
-			$recVerInstance |= $recInstance << 4;
98
+				$recVerInstance  = $recVer;
99
+				$recVerInstance |= $recInstance << 4;
100 100
 
101
-			// dgg data
102
-			$dggData =
103
-				pack('VVVV'
104
-					, $this->_object->getSpIdMax() // maximum shape identifier increased by one
105
-					, $this->_object->getCDgSaved() + 1 // number of file identifier clusters increased by one
106
-					, $this->_object->getCSpSaved()
107
-					, $this->_object->getCDgSaved() // count total number of drawings saved
108
-				);
101
+				// dgg data
102
+				$dggData =
103
+					pack('VVVV'
104
+						, $this->_object->getSpIdMax() // maximum shape identifier increased by one
105
+						, $this->_object->getCDgSaved() + 1 // number of file identifier clusters increased by one
106
+						, $this->_object->getCSpSaved()
107
+						, $this->_object->getCDgSaved() // count total number of drawings saved
108
+					);
109 109
 
110
-			// add file identifier clusters (one per drawing)
111
-			$IDCLs = $this->_object->getIDCLs();
110
+				// add file identifier clusters (one per drawing)
111
+				$IDCLs = $this->_object->getIDCLs();
112 112
 
113
-			foreach ($IDCLs as $dgId => $maxReducedSpId) {
114
-				$dggData .= pack('VV', $dgId, $maxReducedSpId + 1);
115
-			}
113
+				foreach ($IDCLs as $dgId => $maxReducedSpId) {
114
+					$dggData .= pack('VV', $dgId, $maxReducedSpId + 1);
115
+				}
116 116
 
117
-			$header = pack('vvV', $recVerInstance, $recType, strlen($dggData));
118
-			$innerData .= $header . $dggData;
117
+				$header = pack('vvV', $recVerInstance, $recType, strlen($dggData));
118
+				$innerData .= $header . $dggData;
119 119
 
120
-			// write the bstoreContainer
121
-			if ($bstoreContainer = $this->_object->getBstoreContainer()) {
122
-				$writer = new PHPExcel_Writer_Excel5_Escher($bstoreContainer);
123
-				$innerData .= $writer->close();
124
-			}
120
+				// write the bstoreContainer
121
+				if ($bstoreContainer = $this->_object->getBstoreContainer()) {
122
+					$writer = new PHPExcel_Writer_Excel5_Escher($bstoreContainer);
123
+					$innerData .= $writer->close();
124
+				}
125 125
 
126
-			// write the record
127
-			$recVer			= 0xF;
128
-			$recInstance	= 0x0000;
129
-			$recType		= 0xF000;
130
-			$length			= strlen($innerData);
126
+				// write the record
127
+				$recVer			= 0xF;
128
+				$recInstance	= 0x0000;
129
+				$recType		= 0xF000;
130
+				$length			= strlen($innerData);
131 131
 
132
-			$recVerInstance  = $recVer;
133
-			$recVerInstance |= $recInstance << 4;
132
+				$recVerInstance  = $recVer;
133
+				$recVerInstance |= $recInstance << 4;
134 134
 
135
-			$header = pack('vvV', $recVerInstance, $recType, $length);
135
+				$header = pack('vvV', $recVerInstance, $recType, $length);
136 136
 
137
-			$this->_data = $header . $innerData;
138
-			break;
137
+				$this->_data = $header . $innerData;
138
+				break;
139 139
 
140
-		case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
141
-			// this is a container record
140
+			case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
141
+				// this is a container record
142 142
 
143
-			// initialize
144
-			$innerData = '';
143
+				// initialize
144
+				$innerData = '';
145 145
 
146
-			// treat the inner data
147
-			if ($BSECollection = $this->_object->getBSECollection()) {
148
-				foreach ($BSECollection as $BSE) {
149
-					$writer = new PHPExcel_Writer_Excel5_Escher($BSE);
150
-					$innerData .= $writer->close();
146
+				// treat the inner data
147
+				if ($BSECollection = $this->_object->getBSECollection()) {
148
+					foreach ($BSECollection as $BSE) {
149
+						$writer = new PHPExcel_Writer_Excel5_Escher($BSE);
150
+						$innerData .= $writer->close();
151
+					}
151 152
 				}
152
-			}
153 153
 
154
-			// write the record
155
-			$recVer			= 0xF;
156
-			$recInstance	= count($this->_object->getBSECollection());
157
-			$recType		= 0xF001;
158
-			$length			= strlen($innerData);
154
+				// write the record
155
+				$recVer			= 0xF;
156
+				$recInstance	= count($this->_object->getBSECollection());
157
+				$recType		= 0xF001;
158
+				$length			= strlen($innerData);
159 159
 
160
-			$recVerInstance  = $recVer;
161
-			$recVerInstance |= $recInstance << 4;
160
+				$recVerInstance  = $recVer;
161
+				$recVerInstance |= $recInstance << 4;
162 162
 
163
-			$header = pack('vvV', $recVerInstance, $recType, $length);
163
+				$header = pack('vvV', $recVerInstance, $recType, $length);
164 164
 
165
-			$this->_data = $header . $innerData;
166
-			break;
165
+				$this->_data = $header . $innerData;
166
+				break;
167 167
 
168
-		case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
169
-			// this is a semi-container record
168
+			case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
169
+				// this is a semi-container record
170 170
 
171
-			// initialize
172
-			$innerData = '';
171
+				// initialize
172
+				$innerData = '';
173 173
 
174
-			// here we treat the inner data
175
-			if ($blip = $this->_object->getBlip()) {
176
-				$writer = new PHPExcel_Writer_Excel5_Escher($blip);
177
-				$innerData .= $writer->close();
178
-			}
174
+				// here we treat the inner data
175
+				if ($blip = $this->_object->getBlip()) {
176
+					$writer = new PHPExcel_Writer_Excel5_Escher($blip);
177
+					$innerData .= $writer->close();
178
+				}
179 179
 
180
-			// initialize
181
-			$data = '';
180
+				// initialize
181
+				$data = '';
182 182
 
183
-			$btWin32 = $this->_object->getBlipType();
184
-			$btMacOS = $this->_object->getBlipType();
185
-			$data .= pack('CC', $btWin32, $btMacOS);
183
+				$btWin32 = $this->_object->getBlipType();
184
+				$btMacOS = $this->_object->getBlipType();
185
+				$data .= pack('CC', $btWin32, $btMacOS);
186 186
 
187
-			$rgbUid = pack('VVVV', 0,0,0,0); // todo
188
-			$data .= $rgbUid;
187
+				$rgbUid = pack('VVVV', 0,0,0,0); // todo
188
+				$data .= $rgbUid;
189 189
 
190
-			$tag = 0;
191
-			$size = strlen($innerData);
192
-			$cRef = 1;
193
-			$foDelay = 0; //todo
194
-			$unused1 = 0x0;
195
-			$cbName = 0x0;
196
-			$unused2 = 0x0;
197
-			$unused3 = 0x0;
198
-			$data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3);
190
+				$tag = 0;
191
+				$size = strlen($innerData);
192
+				$cRef = 1;
193
+				$foDelay = 0; //todo
194
+				$unused1 = 0x0;
195
+				$cbName = 0x0;
196
+				$unused2 = 0x0;
197
+				$unused3 = 0x0;
198
+				$data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3);
199 199
 
200
-			$data .= $innerData;
200
+				$data .= $innerData;
201 201
 
202
-			// write the record
203
-			$recVer			= 0x2;
204
-			$recInstance	= $this->_object->getBlipType();
205
-			$recType		= 0xF007;
206
-			$length			= strlen($data);
202
+				// write the record
203
+				$recVer			= 0x2;
204
+				$recInstance	= $this->_object->getBlipType();
205
+				$recType		= 0xF007;
206
+				$length			= strlen($data);
207 207
 
208
-			$recVerInstance  = $recVer;
209
-			$recVerInstance |=	$recInstance << 4;
208
+				$recVerInstance  = $recVer;
209
+				$recVerInstance |=	$recInstance << 4;
210 210
 
211
-			$header = pack('vvV', $recVerInstance, $recType, $length);
211
+				$header = pack('vvV', $recVerInstance, $recType, $length);
212 212
 
213
-			$this->_data = $header;
213
+				$this->_data = $header;
214 214
 
215
-			$this->_data .= $data;
216
-			break;
215
+				$this->_data .= $data;
216
+				break;
217 217
 
218
-		case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip':
219
-			// this is an atom record
218
+			case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip':
219
+				// this is an atom record
220 220
 
221
-			// write the record
222
-			switch ($this->_object->getParent()->getBlipType()) {
221
+				// write the record
222
+				switch ($this->_object->getParent()->getBlipType()) {
223 223
 
224
-			case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG:
225
-				// initialize
226
-				$innerData = '';
224
+					case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG:
225
+						// initialize
226
+						$innerData = '';
227 227
 
228
-				$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
229
-				$innerData .= $rgbUid1;
228
+						$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
229
+						$innerData .= $rgbUid1;
230 230
 
231
-				$tag = 0xFF; // todo
232
-				$innerData .= pack('C', $tag);
231
+						$tag = 0xFF; // todo
232
+						$innerData .= pack('C', $tag);
233 233
 
234
-				$innerData .= $this->_object->getData();
234
+						$innerData .= $this->_object->getData();
235 235
 
236
-				$recVer			= 0x0;
237
-				$recInstance	= 0x46A;
238
-				$recType		= 0xF01D;
239
-				$length			= strlen($innerData);
236
+						$recVer			= 0x0;
237
+						$recInstance	= 0x46A;
238
+						$recType		= 0xF01D;
239
+						$length			= strlen($innerData);
240 240
 
241
-				$recVerInstance  = $recVer;
242
-				$recVerInstance |=	$recInstance << 4;
241
+						$recVerInstance  = $recVer;
242
+						$recVerInstance |=	$recInstance << 4;
243 243
 
244
-				$header = pack('vvV', $recVerInstance, $recType, $length);
244
+						$header = pack('vvV', $recVerInstance, $recType, $length);
245 245
 
246
-				$this->_data = $header;
246
+						$this->_data = $header;
247 247
 
248
-				$this->_data .= $innerData;
249
-				break;
248
+						$this->_data .= $innerData;
249
+						break;
250 250
 
251
-			case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG:
252
-				// initialize
253
-				$innerData = '';
251
+					case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG:
252
+						// initialize
253
+						$innerData = '';
254 254
 
255
-				$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
256
-				$innerData .= $rgbUid1;
255
+						$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
256
+						$innerData .= $rgbUid1;
257 257
 
258
-				$tag = 0xFF; // todo
259
-				$innerData .= pack('C', $tag);
258
+						$tag = 0xFF; // todo
259
+						$innerData .= pack('C', $tag);
260 260
 
261
-				$innerData .= $this->_object->getData();
261
+						$innerData .= $this->_object->getData();
262 262
 
263
-				$recVer			= 0x0;
264
-				$recInstance	= 0x6E0;
265
-				$recType		= 0xF01E;
266
-				$length			= strlen($innerData);
263
+						$recVer			= 0x0;
264
+						$recInstance	= 0x6E0;
265
+						$recType		= 0xF01E;
266
+						$length			= strlen($innerData);
267 267
 
268
-				$recVerInstance  = $recVer;
269
-				$recVerInstance |=	$recInstance << 4;
268
+						$recVerInstance  = $recVer;
269
+						$recVerInstance |=	$recInstance << 4;
270 270
 
271
-				$header = pack('vvV', $recVerInstance, $recType, $length);
271
+						$header = pack('vvV', $recVerInstance, $recType, $length);
272 272
 
273
-				$this->_data = $header;
273
+						$this->_data = $header;
274 274
 
275
-				$this->_data .= $innerData;
276
-				break;
275
+						$this->_data .= $innerData;
276
+						break;
277 277
 
278
-			}
278
+				}
279 279
 			break;
280 280
 
281
-		case 'PHPExcel_Shared_Escher_DgContainer':
282
-			// this is a container record
281
+			case 'PHPExcel_Shared_Escher_DgContainer':
282
+				// this is a container record
283 283
 
284
-			// initialize
285
-			$innerData = '';
284
+				// initialize
285
+				$innerData = '';
286
+
287
+				// write the dg
288
+				$recVer			= 0x0;
289
+				$recInstance	= $this->_object->getDgId();
290
+				$recType		= 0xF008;
291
+				$length			= 8;
286 292
 
287
-			// write the dg
288
-			$recVer			= 0x0;
289
-			$recInstance	= $this->_object->getDgId();
290
-			$recType		= 0xF008;
291
-			$length			= 8;
293
+				$recVerInstance  = $recVer;
294
+				$recVerInstance |= $recInstance << 4;
292 295
 
293
-			$recVerInstance  = $recVer;
294
-			$recVerInstance |= $recInstance << 4;
296
+				$header = pack('vvV', $recVerInstance, $recType, $length);
295 297
 
296
-			$header = pack('vvV', $recVerInstance, $recType, $length);
298
+				// number of shapes in this drawing (including group shape)
299
+				$countShapes = count($this->_object->getSpgrContainer()->getChildren());
300
+				$innerData .= $header . pack('VV', $countShapes, $this->_object->getLastSpId());
301
+				//$innerData .= $header . pack('VV', 0, 0);
297 302
 
298
-			// number of shapes in this drawing (including group shape)
299
-			$countShapes = count($this->_object->getSpgrContainer()->getChildren());
300
-			$innerData .= $header . pack('VV', $countShapes, $this->_object->getLastSpId());
301
-			//$innerData .= $header . pack('VV', 0, 0);
303
+				// write the spgrContainer
304
+				if ($spgrContainer = $this->_object->getSpgrContainer()) {
305
+					$writer = new PHPExcel_Writer_Excel5_Escher($spgrContainer);
306
+					$innerData .= $writer->close();
302 307
 
303
-			// write the spgrContainer
304
-			if ($spgrContainer = $this->_object->getSpgrContainer()) {
305
-				$writer = new PHPExcel_Writer_Excel5_Escher($spgrContainer);
306
-				$innerData .= $writer->close();
308
+					// get the shape offsets relative to the spgrContainer record
309
+					$spOffsets = $writer->getSpOffsets();
307 310
 
308
-				// get the shape offsets relative to the spgrContainer record
309
-				$spOffsets = $writer->getSpOffsets();
311
+					// save the shape offsets relative to dgContainer
312
+					foreach ($spOffsets as & $spOffset) {
313
+						$spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes)
314
+					}
310 315
 
311
-				// save the shape offsets relative to dgContainer
312
-				foreach ($spOffsets as & $spOffset) {
313
-					$spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes)
316
+					$this->_spOffsets = $spOffsets;
314 317
 				}
315 318
 
316
-				$this->_spOffsets = $spOffsets;
317
-			}
319
+				// write the record
320
+				$recVer			= 0xF;
321
+				$recInstance	= 0x0000;
322
+				$recType		= 0xF002;
323
+				$length			= strlen($innerData);
318 324
 
319
-			// write the record
320
-			$recVer			= 0xF;
321
-			$recInstance	= 0x0000;
322
-			$recType		= 0xF002;
323
-			$length			= strlen($innerData);
325
+				$recVerInstance  = $recVer;
326
+				$recVerInstance |= $recInstance << 4;
324 327
 
325
-			$recVerInstance  = $recVer;
326
-			$recVerInstance |= $recInstance << 4;
328
+				$header = pack('vvV', $recVerInstance, $recType, $length);
327 329
 
328
-			$header = pack('vvV', $recVerInstance, $recType, $length);
330
+				$this->_data = $header . $innerData;
331
+				break;
329 332
 
330
-			$this->_data = $header . $innerData;
331
-			break;
333
+			case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
334
+				// this is a container record
332 335
 
333
-		case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
334
-			// this is a container record
336
+				// initialize
337
+				$innerData = '';
335 338
 
336
-			// initialize
337
-			$innerData = '';
339
+				// initialize spape offsets
340
+				$totalSize = 8;
341
+				$spOffsets = array();
338 342
 
339
-			// initialize spape offsets
340
-			$totalSize = 8;
341
-			$spOffsets = array();
343
+				// treat the inner data
344
+				foreach ($this->_object->getChildren() as $spContainer) {
345
+					$writer = new PHPExcel_Writer_Excel5_Escher($spContainer);
346
+					$spData = $writer->close();
347
+					$innerData .= $spData;
342 348
 
343
-			// treat the inner data
344
-			foreach ($this->_object->getChildren() as $spContainer) {
345
-				$writer = new PHPExcel_Writer_Excel5_Escher($spContainer);
346
-				$spData = $writer->close();
347
-				$innerData .= $spData;
349
+					// save the shape offsets (where new shape records begin)
350
+					$totalSize += strlen($spData);
351
+					$spOffsets[] = $totalSize;
352
+				}
348 353
 
349
-				// save the shape offsets (where new shape records begin)
350
-				$totalSize += strlen($spData);
351
-				$spOffsets[] = $totalSize;
352
-			}
354
+				// write the record
355
+				$recVer			= 0xF;
356
+				$recInstance	= 0x0000;
357
+				$recType		= 0xF003;
358
+				$length			= strlen($innerData);
353 359
 
354
-			// write the record
355
-			$recVer			= 0xF;
356
-			$recInstance	= 0x0000;
357
-			$recType		= 0xF003;
358
-			$length			= strlen($innerData);
360
+				$recVerInstance  = $recVer;
361
+				$recVerInstance |= $recInstance << 4;
359 362
 
360
-			$recVerInstance  = $recVer;
361
-			$recVerInstance |= $recInstance << 4;
363
+				$header = pack('vvV', $recVerInstance, $recType, $length);
362 364
 
363
-			$header = pack('vvV', $recVerInstance, $recType, $length);
365
+				$this->_data = $header . $innerData;
366
+				$this->_spOffsets = $spOffsets;
367
+				break;
364 368
 
365
-			$this->_data = $header . $innerData;
366
-			$this->_spOffsets = $spOffsets;
367
-			break;
369
+			case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer':
370
+				// initialize
371
+				$data = '';
368 372
 
369
-		case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer':
370
-			// initialize
371
-			$data = '';
373
+				// build the data
372 374
 
373
-			// build the data
375
+				// write group shape record, if necessary?
376
+				if ($this->_object->getSpgr()) {
377
+					$recVer			= 0x1;
378
+					$recInstance	= 0x0000;
379
+					$recType		= 0xF009;
380
+					$length			= 0x00000010;
374 381
 
375
-			// write group shape record, if necessary?
376
-			if ($this->_object->getSpgr()) {
377
-				$recVer			= 0x1;
378
-				$recInstance	= 0x0000;
379
-				$recType		= 0xF009;
380
-				$length			= 0x00000010;
382
+					$recVerInstance  = $recVer;
383
+					$recVerInstance |= $recInstance << 4;
384
+
385
+					$header = pack('vvV', $recVerInstance, $recType, $length);
386
+
387
+					$data .= $header . pack('VVVV', 0,0,0,0);
388
+				}
389
+
390
+				// write the shape record
391
+				$recVer			= 0x2;
392
+				$recInstance	= $this->_object->getSpType(); // shape type
393
+				$recType		= 0xF00A;
394
+				$length			= 0x00000008;
381 395
 
382 396
 				$recVerInstance  = $recVer;
383 397
 				$recVerInstance |= $recInstance << 4;
384 398
 
385 399
 				$header = pack('vvV', $recVerInstance, $recType, $length);
386 400
 
387
-				$data .= $header . pack('VVVV', 0,0,0,0);
388
-			}
389
-
390
-			// write the shape record
391
-			$recVer			= 0x2;
392
-			$recInstance	= $this->_object->getSpType(); // shape type
393
-			$recType		= 0xF00A;
394
-			$length			= 0x00000008;
401
+				$data .= $header . pack('VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
395 402
 
396
-			$recVerInstance  = $recVer;
397
-			$recVerInstance |= $recInstance << 4;
398 403
 
399
-			$header = pack('vvV', $recVerInstance, $recType, $length);
404
+				// the options
405
+				if ($this->_object->getOPTCollection()) {
406
+					$optData = '';
400 407
 
401
-			$data .= $header . pack('VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
408
+					$recVer			= 0x3;
409
+					$recInstance	= count($this->_object->getOPTCollection());
410
+					$recType		= 0xF00B;
411
+					foreach ($this->_object->getOPTCollection() as $property => $value) {
412
+						$optData .= pack('vV', $property, $value);
413
+					}
414
+					$length			= strlen($optData);
402 415
 
416
+					$recVerInstance  = $recVer;
417
+					$recVerInstance |= $recInstance << 4;
403 418
 
404
-			// the options
405
-			if ($this->_object->getOPTCollection()) {
406
-				$optData = '';
407
-
408
-				$recVer			= 0x3;
409
-				$recInstance	= count($this->_object->getOPTCollection());
410
-				$recType		= 0xF00B;
411
-				foreach ($this->_object->getOPTCollection() as $property => $value) {
412
-					$optData .= pack('vV', $property, $value);
419
+					$header = pack('vvV', $recVerInstance, $recType, $length);
420
+					$data .= $header . $optData;
413 421
 				}
414
-				$length			= strlen($optData);
415 422
 
416
-				$recVerInstance  = $recVer;
417
-				$recVerInstance |= $recInstance << 4;
423
+				// the client anchor
424
+				if ($this->_object->getStartCoordinates()) {
425
+					$clientAnchorData = '';
418 426
 
419
-				$header = pack('vvV', $recVerInstance, $recType, $length);
420
-				$data .= $header . $optData;
421
-			}
427
+					$recVer			= 0x0;
428
+					$recInstance	= 0x0;
429
+					$recType		= 0xF010;
422 430
 
423
-			// the client anchor
424
-			if ($this->_object->getStartCoordinates()) {
425
-				$clientAnchorData = '';
431
+					// start coordinates
432
+					list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getStartCoordinates());
433
+					$c1 = PHPExcel_Cell::columnIndexFromString($column) - 1;
434
+					$r1 = $row - 1;
426 435
 
427
-				$recVer			= 0x0;
428
-				$recInstance	= 0x0;
429
-				$recType		= 0xF010;
436
+					// start offsetX
437
+					$startOffsetX = $this->_object->getStartOffsetX();
430 438
 
431
-				// start coordinates
432
-				list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getStartCoordinates());
433
-				$c1 = PHPExcel_Cell::columnIndexFromString($column) - 1;
434
-				$r1 = $row - 1;
439
+					// start offsetY
440
+					$startOffsetY = $this->_object->getStartOffsetY();
435 441
 
436
-				// start offsetX
437
-				$startOffsetX = $this->_object->getStartOffsetX();
442
+					// end coordinates
443
+					list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getEndCoordinates());
444
+					$c2 = PHPExcel_Cell::columnIndexFromString($column) - 1;
445
+					$r2 = $row - 1;
438 446
 
439
-				// start offsetY
440
-				$startOffsetY = $this->_object->getStartOffsetY();
447
+					// end offsetX
448
+					$endOffsetX = $this->_object->getEndOffsetX();
441 449
 
442
-				// end coordinates
443
-				list($column, $row) = PHPExcel_Cell::coordinateFromString($this->_object->getEndCoordinates());
444
-				$c2 = PHPExcel_Cell::columnIndexFromString($column) - 1;
445
-				$r2 = $row - 1;
450
+					// end offsetY
451
+					$endOffsetY = $this->_object->getEndOffsetY();
446 452
 
447
-				// end offsetX
448
-				$endOffsetX = $this->_object->getEndOffsetX();
453
+					$clientAnchorData = pack('vvvvvvvvv', 0x02,
454
+						$c1, $startOffsetX, $r1, $startOffsetY,
455
+						$c2, $endOffsetX, $r2, $endOffsetY);
449 456
 
450
-				// end offsetY
451
-				$endOffsetY = $this->_object->getEndOffsetY();
457
+					$length			= strlen($clientAnchorData);
452 458
 
453
-				$clientAnchorData = pack('vvvvvvvvv', 0x02,
454
-					$c1, $startOffsetX, $r1, $startOffsetY,
455
-					$c2, $endOffsetX, $r2, $endOffsetY);
459
+					$recVerInstance  = $recVer;
460
+					$recVerInstance |= $recInstance << 4;
456 461
 
457
-				$length			= strlen($clientAnchorData);
462
+					$header = pack('vvV', $recVerInstance, $recType, $length);
463
+					$data .= $header . $clientAnchorData;
464
+				}
458 465
 
459
-				$recVerInstance  = $recVer;
460
-				$recVerInstance |= $recInstance << 4;
466
+				// the client data, just empty for now
467
+				if (!$this->_object->getSpgr()) {
468
+					$clientDataData = '';
461 469
 
462
-				$header = pack('vvV', $recVerInstance, $recType, $length);
463
-				$data .= $header . $clientAnchorData;
464
-			}
470
+					$recVer			= 0x0;
471
+					$recInstance	= 0x0;
472
+					$recType		= 0xF011;
465 473
 
466
-			// the client data, just empty for now
467
-			if (!$this->_object->getSpgr()) {
468
-				$clientDataData = '';
474
+					$length = strlen($clientDataData);
469 475
 
470
-				$recVer			= 0x0;
471
-				$recInstance	= 0x0;
472
-				$recType		= 0xF011;
476
+					$recVerInstance  = $recVer;
477
+					$recVerInstance |= $recInstance << 4;
473 478
 
474
-				$length = strlen($clientDataData);
479
+					$header = pack('vvV', $recVerInstance, $recType, $length);
480
+					$data .= $header . $clientDataData;
481
+				}
482
+
483
+				// write the record
484
+				$recVer			= 0xF;
485
+				$recInstance	= 0x0000;
486
+				$recType		= 0xF004;
487
+				$length			= strlen($data);
475 488
 
476 489
 				$recVerInstance  = $recVer;
477 490
 				$recVerInstance |= $recInstance << 4;
478 491
 
479 492
 				$header = pack('vvV', $recVerInstance, $recType, $length);
480
-				$data .= $header . $clientDataData;
481
-			}
482
-
483
-			// write the record
484
-			$recVer			= 0xF;
485
-			$recInstance	= 0x0000;
486
-			$recType		= 0xF004;
487
-			$length			= strlen($data);
488
-
489
-			$recVerInstance  = $recVer;
490
-			$recVerInstance |= $recInstance << 4;
491 493
 
492
-			$header = pack('vvV', $recVerInstance, $recType, $length);
493
-
494
-			$this->_data = $header . $data;
495
-			break;
494
+				$this->_data = $header . $data;
495
+				break;
496 496
 
497 497
 		}
498 498
 
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 			// write the dgg
94 94
 			$recVer			= 0x0;
95
-			$recInstance	= 0x0000;
95
+			$recInstance = 0x0000;
96 96
 			$recType		= 0xF006;
97 97
 
98 98
 			$recVerInstance  = $recVer;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			}
116 116
 
117 117
 			$header = pack('vvV', $recVerInstance, $recType, strlen($dggData));
118
-			$innerData .= $header . $dggData;
118
+			$innerData .= $header.$dggData;
119 119
 
120 120
 			// write the bstoreContainer
121 121
 			if ($bstoreContainer = $this->_object->getBstoreContainer()) {
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 			// write the record
127 127
 			$recVer			= 0xF;
128
-			$recInstance	= 0x0000;
128
+			$recInstance = 0x0000;
129 129
 			$recType		= 0xF000;
130 130
 			$length			= strlen($innerData);
131 131
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 			$header = pack('vvV', $recVerInstance, $recType, $length);
136 136
 
137
-			$this->_data = $header . $innerData;
137
+			$this->_data = $header.$innerData;
138 138
 			break;
139 139
 
140 140
 		case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer':
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
 			// write the record
155 155
 			$recVer			= 0xF;
156
-			$recInstance	= count($this->_object->getBSECollection());
156
+			$recInstance = count($this->_object->getBSECollection());
157 157
 			$recType		= 0xF001;
158 158
 			$length			= strlen($innerData);
159 159
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
 			$header = pack('vvV', $recVerInstance, $recType, $length);
164 164
 
165
-			$this->_data = $header . $innerData;
165
+			$this->_data = $header.$innerData;
166 166
 			break;
167 167
 
168 168
 		case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE':
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			$btMacOS = $this->_object->getBlipType();
185 185
 			$data .= pack('CC', $btWin32, $btMacOS);
186 186
 
187
-			$rgbUid = pack('VVVV', 0,0,0,0); // todo
187
+			$rgbUid = pack('VVVV', 0, 0, 0, 0); // todo
188 188
 			$data .= $rgbUid;
189 189
 
190 190
 			$tag = 0;
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
 
202 202
 			// write the record
203 203
 			$recVer			= 0x2;
204
-			$recInstance	= $this->_object->getBlipType();
204
+			$recInstance = $this->_object->getBlipType();
205 205
 			$recType		= 0xF007;
206 206
 			$length			= strlen($data);
207 207
 
208 208
 			$recVerInstance  = $recVer;
209
-			$recVerInstance |=	$recInstance << 4;
209
+			$recVerInstance |= $recInstance << 4;
210 210
 
211 211
 			$header = pack('vvV', $recVerInstance, $recType, $length);
212 212
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 				// initialize
226 226
 				$innerData = '';
227 227
 
228
-				$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
228
+				$rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo
229 229
 				$innerData .= $rgbUid1;
230 230
 
231 231
 				$tag = 0xFF; // todo
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
 				$innerData .= $this->_object->getData();
235 235
 
236 236
 				$recVer			= 0x0;
237
-				$recInstance	= 0x46A;
237
+				$recInstance = 0x46A;
238 238
 				$recType		= 0xF01D;
239 239
 				$length			= strlen($innerData);
240 240
 
241 241
 				$recVerInstance  = $recVer;
242
-				$recVerInstance |=	$recInstance << 4;
242
+				$recVerInstance |= $recInstance << 4;
243 243
 
244 244
 				$header = pack('vvV', $recVerInstance, $recType, $length);
245 245
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 				// initialize
253 253
 				$innerData = '';
254 254
 
255
-				$rgbUid1 = pack('VVVV', 0,0,0,0); // todo
255
+				$rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo
256 256
 				$innerData .= $rgbUid1;
257 257
 
258 258
 				$tag = 0xFF; // todo
@@ -261,12 +261,12 @@  discard block
 block discarded – undo
261 261
 				$innerData .= $this->_object->getData();
262 262
 
263 263
 				$recVer			= 0x0;
264
-				$recInstance	= 0x6E0;
264
+				$recInstance = 0x6E0;
265 265
 				$recType		= 0xF01E;
266 266
 				$length			= strlen($innerData);
267 267
 
268 268
 				$recVerInstance  = $recVer;
269
-				$recVerInstance |=	$recInstance << 4;
269
+				$recVerInstance |= $recInstance << 4;
270 270
 
271 271
 				$header = pack('vvV', $recVerInstance, $recType, $length);
272 272
 
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 
287 287
 			// write the dg
288 288
 			$recVer			= 0x0;
289
-			$recInstance	= $this->_object->getDgId();
289
+			$recInstance = $this->_object->getDgId();
290 290
 			$recType		= 0xF008;
291 291
 			$length			= 8;
292 292
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 
298 298
 			// number of shapes in this drawing (including group shape)
299 299
 			$countShapes = count($this->_object->getSpgrContainer()->getChildren());
300
-			$innerData .= $header . pack('VV', $countShapes, $this->_object->getLastSpId());
300
+			$innerData .= $header.pack('VV', $countShapes, $this->_object->getLastSpId());
301 301
 			//$innerData .= $header . pack('VV', 0, 0);
302 302
 
303 303
 			// write the spgrContainer
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 			// write the record
320 320
 			$recVer			= 0xF;
321
-			$recInstance	= 0x0000;
321
+			$recInstance = 0x0000;
322 322
 			$recType		= 0xF002;
323 323
 			$length			= strlen($innerData);
324 324
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 
328 328
 			$header = pack('vvV', $recVerInstance, $recType, $length);
329 329
 
330
-			$this->_data = $header . $innerData;
330
+			$this->_data = $header.$innerData;
331 331
 			break;
332 332
 
333 333
 		case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer':
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 
354 354
 			// write the record
355 355
 			$recVer			= 0xF;
356
-			$recInstance	= 0x0000;
356
+			$recInstance = 0x0000;
357 357
 			$recType		= 0xF003;
358 358
 			$length			= strlen($innerData);
359 359
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 
363 363
 			$header = pack('vvV', $recVerInstance, $recType, $length);
364 364
 
365
-			$this->_data = $header . $innerData;
365
+			$this->_data = $header.$innerData;
366 366
 			$this->_spOffsets = $spOffsets;
367 367
 			break;
368 368
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 			// write group shape record, if necessary?
376 376
 			if ($this->_object->getSpgr()) {
377 377
 				$recVer			= 0x1;
378
-				$recInstance	= 0x0000;
378
+				$recInstance = 0x0000;
379 379
 				$recType		= 0xF009;
380 380
 				$length			= 0x00000010;
381 381
 
@@ -384,12 +384,12 @@  discard block
 block discarded – undo
384 384
 
385 385
 				$header = pack('vvV', $recVerInstance, $recType, $length);
386 386
 
387
-				$data .= $header . pack('VVVV', 0,0,0,0);
387
+				$data .= $header.pack('VVVV', 0, 0, 0, 0);
388 388
 			}
389 389
 
390 390
 			// write the shape record
391 391
 			$recVer			= 0x2;
392
-			$recInstance	= $this->_object->getSpType(); // shape type
392
+			$recInstance = $this->_object->getSpType(); // shape type
393 393
 			$recType		= 0xF00A;
394 394
 			$length			= 0x00000008;
395 395
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 
399 399
 			$header = pack('vvV', $recVerInstance, $recType, $length);
400 400
 
401
-			$data .= $header . pack('VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
401
+			$data .= $header.pack('VV', $this->_object->getSpId(), $this->_object->getSpgr() ? 0x0005 : 0x0A00);
402 402
 
403 403
 
404 404
 			// the options
@@ -406,18 +406,18 @@  discard block
 block discarded – undo
406 406
 				$optData = '';
407 407
 
408 408
 				$recVer			= 0x3;
409
-				$recInstance	= count($this->_object->getOPTCollection());
409
+				$recInstance = count($this->_object->getOPTCollection());
410 410
 				$recType		= 0xF00B;
411 411
 				foreach ($this->_object->getOPTCollection() as $property => $value) {
412 412
 					$optData .= pack('vV', $property, $value);
413 413
 				}
414
-				$length			= strlen($optData);
414
+				$length = strlen($optData);
415 415
 
416 416
 				$recVerInstance  = $recVer;
417 417
 				$recVerInstance |= $recInstance << 4;
418 418
 
419 419
 				$header = pack('vvV', $recVerInstance, $recType, $length);
420
-				$data .= $header . $optData;
420
+				$data .= $header.$optData;
421 421
 			}
422 422
 
423 423
 			// the client anchor
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 				$clientAnchorData = '';
426 426
 
427 427
 				$recVer			= 0x0;
428
-				$recInstance	= 0x0;
428
+				$recInstance = 0x0;
429 429
 				$recType		= 0xF010;
430 430
 
431 431
 				// start coordinates
@@ -454,21 +454,21 @@  discard block
 block discarded – undo
454 454
 					$c1, $startOffsetX, $r1, $startOffsetY,
455 455
 					$c2, $endOffsetX, $r2, $endOffsetY);
456 456
 
457
-				$length			= strlen($clientAnchorData);
457
+				$length = strlen($clientAnchorData);
458 458
 
459 459
 				$recVerInstance  = $recVer;
460 460
 				$recVerInstance |= $recInstance << 4;
461 461
 
462 462
 				$header = pack('vvV', $recVerInstance, $recType, $length);
463
-				$data .= $header . $clientAnchorData;
463
+				$data .= $header.$clientAnchorData;
464 464
 			}
465 465
 
466 466
 			// the client data, just empty for now
467
-			if (!$this->_object->getSpgr()) {
467
+			if ( ! $this->_object->getSpgr()) {
468 468
 				$clientDataData = '';
469 469
 
470 470
 				$recVer			= 0x0;
471
-				$recInstance	= 0x0;
471
+				$recInstance = 0x0;
472 472
 				$recType		= 0xF011;
473 473
 
474 474
 				$length = strlen($clientDataData);
@@ -477,12 +477,12 @@  discard block
 block discarded – undo
477 477
 				$recVerInstance |= $recInstance << 4;
478 478
 
479 479
 				$header = pack('vvV', $recVerInstance, $recType, $length);
480
-				$data .= $header . $clientDataData;
480
+				$data .= $header.$clientDataData;
481 481
 			}
482 482
 
483 483
 			// write the record
484 484
 			$recVer			= 0xF;
485
-			$recInstance	= 0x0000;
485
+			$recInstance = 0x0000;
486 486
 			$recType		= 0xF004;
487 487
 			$length			= strlen($data);
488 488
 
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 
492 492
 			$header = pack('vvV', $recVerInstance, $recType, $length);
493 493
 
494
-			$this->_data = $header . $data;
494
+			$this->_data = $header.$data;
495 495
 			break;
496 496
 
497 497
 		}
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Writer/Excel5/Parser.php 4 patches
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	 *
511 511
 	 * @access private
512 512
 	 * @param mixed $token The token to convert.
513
-	 * @return mixed the converted token on success
513
+	 * @return string the converted token on success
514 514
 	 */
515 515
 	function _convert($token)
516 516
 	{
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
 	 *
592 592
 	 * @access private
593 593
 	 * @param string $string A string for conversion to its ptg value.
594
-	 * @return mixed the converted token on success
594
+	 * @return string the converted token on success
595 595
 	 */
596 596
 	function _convertString($string)
597 597
 	{
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
 	 *
672 672
 	 * @access private
673 673
 	 * @param string $token An Excel range in the Sheet1!A1:A2 format.
674
-	 * @return mixed The packed ptgArea3d token on success.
674
+	 * @return string The packed ptgArea3d token on success.
675 675
 	 */
676 676
 	function _convertRange3d($token)
677 677
 	{
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
 	 *
744 744
 	 * @access private
745 745
 	 * @param string $cell An Excel cell reference
746
-	 * @return mixed The packed ptgRef3d token on success.
746
+	 * @return string The packed ptgRef3d token on success.
747 747
 	 */
748 748
 	function _convertRef3d($cell)
749 749
 	{
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
 	 *
845 845
 	 * @access private
846 846
 	 * @param string $ext_ref The name of the external reference
847
-	 * @return mixed The reference index in packed() format on success
847
+	 * @return string The reference index in packed() format on success
848 848
 	 */
849 849
 	function _getRefIndex($ext_ref)
850 850
 	{
@@ -935,7 +935,7 @@  discard block
 block discarded – undo
935 935
 	 *
936 936
 	 * @access private
937 937
 	 * @param string $cell The Excel cell reference to be packed
938
-	 * @return array Array containing the row and column in packed() format
938
+	 * @return string[] Array containing the row and column in packed() format
939 939
 	 */
940 940
 	function _cellToPackedRowcol($cell)
941 941
 	{
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
 	 *
966 966
 	 * @access private
967 967
 	 * @param string $range The Excel range to be packed
968
-	 * @return array Array containing (row1,col1,row2,col2) in packed() format
968
+	 * @return string[] Array containing (row1,col1,row2,col2) in packed() format
969 969
 	 */
970 970
 	function _rangeToPackedRange($range)
971 971
 	{
@@ -1086,7 +1086,7 @@  discard block
 block discarded – undo
1086 1086
 	 * Checks if it's a valid token.
1087 1087
 	 *
1088 1088
 	 * @access private
1089
-	 * @param mixed $token The token to check.
1089
+	 * @param string $token The token to check.
1090 1090
 	 * @return mixed       The checked token or false on failure
1091 1091
 	 */
1092 1092
 	function _match($token)
@@ -1200,7 +1200,7 @@  discard block
 block discarded – undo
1200 1200
 	 * @access public
1201 1201
 	 * @param string $formula The formula to parse, without the initial equal
1202 1202
 	 *                        sign (=).
1203
-	 * @return mixed true on success
1203
+	 * @return boolean true on success
1204 1204
 	 */
1205 1205
 	function parse($formula)
1206 1206
 	{
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -548,9 +548,9 @@  discard block
 block discarded – undo
548 548
 		} elseif (isset($this->ptg[$token])) {
549 549
 			return pack("C", $this->ptg[$token]);
550 550
 
551
-        // match error codes
551
+		// match error codes
552 552
 		} elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $token) or $token == '#N/A') {
553
-		    return $this->_convertError($token);
553
+			return $this->_convertError($token);
554 554
 
555 555
 		// commented so argument number can be processed correctly. See toReversePolish().
556 556
 		/*elseif (preg_match("/[A-Z0-9\xc0-\xdc\.]+/",$token))
@@ -772,15 +772,15 @@  discard block
 block discarded – undo
772 772
 		return $ptgRef . $ext_ref. $row . $col;
773 773
 	}
774 774
 
775
-    /**
776
-     * Convert an error code to a ptgErr
777
-     *
778
-     * @access	private
775
+	/**
776
+	 * Convert an error code to a ptgErr
777
+	 *
778
+	 * @access	private
779 779
 	 * @param	string	$errorCode	The error code for conversion to its ptg value
780
-     * @return	string				The error code ptgErr
781
-     */
782
-    function _convertError($errorCode)
783
-    {
780
+	 * @return	string				The error code ptgErr
781
+	 */
782
+	function _convertError($errorCode)
783
+	{
784 784
 		switch ($errorCode) {
785 785
 			case '#NULL!':	return pack("C", 0x00);
786 786
 			case '#DIV/0!':	return pack("C", 0x07);
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 			case '#N/A':	return pack("C", 0x2A);
792 792
 		}
793 793
 		return pack("C", 0xFF);
794
-    }
794
+	}
795 795
 
796 796
 	/**
797 797
 	 * Convert the sheet name part of an external reference, for example "Sheet1" or
@@ -1175,11 +1175,11 @@  discard block
 block discarded – undo
1175 1175
 				{
1176 1176
 					return $token;
1177 1177
 				}
1178
-			    // If it's an error code
1179
-			    elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $token) or $token == '#N/A')
1180
-			    {
1181
-			        return $token;
1182
-			    }
1178
+				// If it's an error code
1179
+				elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $token) or $token == '#N/A')
1180
+				{
1181
+					return $token;
1182
+				}
1183 1183
 				// if it's a function call
1184 1184
 				elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$token) and ($this->_lookahead == "("))
1185 1185
 				{
@@ -1247,9 +1247,9 @@  discard block
 block discarded – undo
1247 1247
 			$result2 = $this->_expression();
1248 1248
 			$result = $this->_createTree('ptgNE', $result, $result2);
1249 1249
 		} elseif ($this->_current_token == "&") {
1250
-		    $this->_advance();
1251
-		    $result2 = $this->_expression();
1252
-		    $result = $this->_createTree('ptgConcat', $result, $result2);
1250
+			$this->_advance();
1251
+			$result2 = $this->_expression();
1252
+			$result = $this->_createTree('ptgConcat', $result, $result2);
1253 1253
 		}
1254 1254
 		return $result;
1255 1255
 	}
@@ -1274,19 +1274,19 @@  discard block
 block discarded – undo
1274 1274
 			$result = $this->_createTree($tmp, '', '');
1275 1275
 			$this->_advance();
1276 1276
 			return $result;
1277
-        // If it's an error code
1278
-        } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->_current_token) or $this->_current_token == '#N/A'){
1279
-		    $result = $this->_createTree($this->_current_token, 'ptgErr', '');
1280
-		    $this->_advance();
1281
-		    return $result;
1277
+		// If it's an error code
1278
+		} elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->_current_token) or $this->_current_token == '#N/A'){
1279
+			$result = $this->_createTree($this->_current_token, 'ptgErr', '');
1280
+			$this->_advance();
1281
+			return $result;
1282 1282
 		// If it's a negative value
1283
-        } elseif ($this->_current_token == "-") {
1283
+		} elseif ($this->_current_token == "-") {
1284 1284
 			// catch "-" Term
1285 1285
 			$this->_advance();
1286 1286
 			$result2 = $this->_expression();
1287 1287
 			$result = $this->_createTree('ptgUminus', $result2, '');
1288 1288
 			return $result;
1289
-        // If it's a positive value
1289
+		// If it's a positive value
1290 1290
 		} elseif ($this->_current_token == "+") {
1291 1291
 			// catch "+" Term
1292 1292
 			$this->_advance();
@@ -1429,13 +1429,13 @@  discard block
 block discarded – undo
1429 1429
 		// If it's a number or a percent
1430 1430
 		elseif (is_numeric($this->_current_token))
1431 1431
 		{
1432
-		    if($this->_lookahead == '%'){
1433
-		        $result = $this->_createTree('ptgPercent', $this->_current_token, '');
1434
-		    } else {
1435
-		        $result = $this->_createTree($this->_current_token, '', '');
1436
-		    }
1437
-		    $this->_advance();
1438
-		    return $result;
1432
+			if($this->_lookahead == '%'){
1433
+				$result = $this->_createTree('ptgPercent', $this->_current_token, '');
1434
+			} else {
1435
+				$result = $this->_createTree($this->_current_token, '', '');
1436
+			}
1437
+			$this->_advance();
1438
+			return $result;
1439 1439
 		}
1440 1440
 		// if it's a function call
1441 1441
 		elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$this->_current_token))
Please login to merge, or discard this patch.
Spacing   +309 added lines, -309 removed lines patch added patch discarded remove patch
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 	public function __construct()
123 123
 	{
124 124
 		$this->_current_char  = 0;
125
-		$this->_current_token = '';       // The token we are working on.
126
-		$this->_formula       = '';       // The formula to parse.
127
-		$this->_lookahead     = '';       // The character ahead of the current char.
128
-		$this->_parse_tree    = '';       // The parse tree to be generated.
129
-		$this->_initializeHashes();      // Initialize the hashes: ptg's and function's ptg's
125
+		$this->_current_token = ''; // The token we are working on.
126
+		$this->_formula       = ''; // The formula to parse.
127
+		$this->_lookahead     = ''; // The character ahead of the current char.
128
+		$this->_parse_tree    = ''; // The parse tree to be generated.
129
+		$this->_initializeHashes(); // Initialize the hashes: ptg's and function's ptg's
130 130
 		$this->_ext_sheets = array();
131 131
 		$this->_references = array();
132 132
 	}
@@ -252,256 +252,256 @@  discard block
 block discarded – undo
252 252
 		//
253 253
 		$this->_functions = array(
254 254
 			  // function                  ptg  args  class  vol
255
-			  'COUNT'           => array(   0,   -1,    0,    0 ),
256
-			  'IF'              => array(   1,   -1,    1,    0 ),
257
-			  'ISNA'            => array(   2,    1,    1,    0 ),
258
-			  'ISERROR'         => array(   3,    1,    1,    0 ),
259
-			  'SUM'             => array(   4,   -1,    0,    0 ),
260
-			  'AVERAGE'         => array(   5,   -1,    0,    0 ),
261
-			  'MIN'             => array(   6,   -1,    0,    0 ),
262
-			  'MAX'             => array(   7,   -1,    0,    0 ),
263
-			  'ROW'             => array(   8,   -1,    0,    0 ),
264
-			  'COLUMN'          => array(   9,   -1,    0,    0 ),
265
-			  'NA'              => array(  10,    0,    0,    0 ),
266
-			  'NPV'             => array(  11,   -1,    1,    0 ),
267
-			  'STDEV'           => array(  12,   -1,    0,    0 ),
268
-			  'DOLLAR'          => array(  13,   -1,    1,    0 ),
269
-			  'FIXED'           => array(  14,   -1,    1,    0 ),
270
-			  'SIN'             => array(  15,    1,    1,    0 ),
271
-			  'COS'             => array(  16,    1,    1,    0 ),
272
-			  'TAN'             => array(  17,    1,    1,    0 ),
273
-			  'ATAN'            => array(  18,    1,    1,    0 ),
274
-			  'PI'              => array(  19,    0,    1,    0 ),
275
-			  'SQRT'            => array(  20,    1,    1,    0 ),
276
-			  'EXP'             => array(  21,    1,    1,    0 ),
277
-			  'LN'              => array(  22,    1,    1,    0 ),
278
-			  'LOG10'           => array(  23,    1,    1,    0 ),
279
-			  'ABS'             => array(  24,    1,    1,    0 ),
280
-			  'INT'             => array(  25,    1,    1,    0 ),
281
-			  'SIGN'            => array(  26,    1,    1,    0 ),
282
-			  'ROUND'           => array(  27,    2,    1,    0 ),
283
-			  'LOOKUP'          => array(  28,   -1,    0,    0 ),
284
-			  'INDEX'           => array(  29,   -1,    0,    1 ),
285
-			  'REPT'            => array(  30,    2,    1,    0 ),
286
-			  'MID'             => array(  31,    3,    1,    0 ),
287
-			  'LEN'             => array(  32,    1,    1,    0 ),
288
-			  'VALUE'           => array(  33,    1,    1,    0 ),
289
-			  'TRUE'            => array(  34,    0,    1,    0 ),
290
-			  'FALSE'           => array(  35,    0,    1,    0 ),
291
-			  'AND'             => array(  36,   -1,    0,    0 ),
292
-			  'OR'              => array(  37,   -1,    0,    0 ),
293
-			  'NOT'             => array(  38,    1,    1,    0 ),
294
-			  'MOD'             => array(  39,    2,    1,    0 ),
295
-			  'DCOUNT'          => array(  40,    3,    0,    0 ),
296
-			  'DSUM'            => array(  41,    3,    0,    0 ),
297
-			  'DAVERAGE'        => array(  42,    3,    0,    0 ),
298
-			  'DMIN'            => array(  43,    3,    0,    0 ),
299
-			  'DMAX'            => array(  44,    3,    0,    0 ),
300
-			  'DSTDEV'          => array(  45,    3,    0,    0 ),
301
-			  'VAR'             => array(  46,   -1,    0,    0 ),
302
-			  'DVAR'            => array(  47,    3,    0,    0 ),
303
-			  'TEXT'            => array(  48,    2,    1,    0 ),
304
-			  'LINEST'          => array(  49,   -1,    0,    0 ),
305
-			  'TREND'           => array(  50,   -1,    0,    0 ),
306
-			  'LOGEST'          => array(  51,   -1,    0,    0 ),
307
-			  'GROWTH'          => array(  52,   -1,    0,    0 ),
308
-			  'PV'              => array(  56,   -1,    1,    0 ),
309
-			  'FV'              => array(  57,   -1,    1,    0 ),
310
-			  'NPER'            => array(  58,   -1,    1,    0 ),
311
-			  'PMT'             => array(  59,   -1,    1,    0 ),
312
-			  'RATE'            => array(  60,   -1,    1,    0 ),
313
-			  'MIRR'            => array(  61,    3,    0,    0 ),
314
-			  'IRR'             => array(  62,   -1,    0,    0 ),
315
-			  'RAND'            => array(  63,    0,    1,    1 ),
316
-			  'MATCH'           => array(  64,   -1,    0,    0 ),
317
-			  'DATE'            => array(  65,    3,    1,    0 ),
318
-			  'TIME'            => array(  66,    3,    1,    0 ),
319
-			  'DAY'             => array(  67,    1,    1,    0 ),
320
-			  'MONTH'           => array(  68,    1,    1,    0 ),
321
-			  'YEAR'            => array(  69,    1,    1,    0 ),
322
-			  'WEEKDAY'         => array(  70,   -1,    1,    0 ),
323
-			  'HOUR'            => array(  71,    1,    1,    0 ),
324
-			  'MINUTE'          => array(  72,    1,    1,    0 ),
325
-			  'SECOND'          => array(  73,    1,    1,    0 ),
326
-			  'NOW'             => array(  74,    0,    1,    1 ),
327
-			  'AREAS'           => array(  75,    1,    0,    1 ),
328
-			  'ROWS'            => array(  76,    1,    0,    1 ),
329
-			  'COLUMNS'         => array(  77,    1,    0,    1 ),
330
-			  'OFFSET'          => array(  78,   -1,    0,    1 ),
331
-			  'SEARCH'          => array(  82,   -1,    1,    0 ),
332
-			  'TRANSPOSE'       => array(  83,    1,    1,    0 ),
333
-			  'TYPE'            => array(  86,    1,    1,    0 ),
334
-			  'ATAN2'           => array(  97,    2,    1,    0 ),
335
-			  'ASIN'            => array(  98,    1,    1,    0 ),
336
-			  'ACOS'            => array(  99,    1,    1,    0 ),
337
-			  'CHOOSE'          => array( 100,   -1,    1,    0 ),
338
-			  'HLOOKUP'         => array( 101,   -1,    0,    0 ),
339
-			  'VLOOKUP'         => array( 102,   -1,    0,    0 ),
340
-			  'ISREF'           => array( 105,    1,    0,    0 ),
341
-			  'LOG'             => array( 109,   -1,    1,    0 ),
342
-			  'CHAR'            => array( 111,    1,    1,    0 ),
343
-			  'LOWER'           => array( 112,    1,    1,    0 ),
344
-			  'UPPER'           => array( 113,    1,    1,    0 ),
345
-			  'PROPER'          => array( 114,    1,    1,    0 ),
346
-			  'LEFT'            => array( 115,   -1,    1,    0 ),
347
-			  'RIGHT'           => array( 116,   -1,    1,    0 ),
348
-			  'EXACT'           => array( 117,    2,    1,    0 ),
349
-			  'TRIM'            => array( 118,    1,    1,    0 ),
350
-			  'REPLACE'         => array( 119,    4,    1,    0 ),
351
-			  'SUBSTITUTE'      => array( 120,   -1,    1,    0 ),
352
-			  'CODE'            => array( 121,    1,    1,    0 ),
353
-			  'FIND'            => array( 124,   -1,    1,    0 ),
354
-			  'CELL'            => array( 125,   -1,    0,    1 ),
355
-			  'ISERR'           => array( 126,    1,    1,    0 ),
356
-			  'ISTEXT'          => array( 127,    1,    1,    0 ),
357
-			  'ISNUMBER'        => array( 128,    1,    1,    0 ),
358
-			  'ISBLANK'         => array( 129,    1,    1,    0 ),
359
-			  'T'               => array( 130,    1,    0,    0 ),
360
-			  'N'               => array( 131,    1,    0,    0 ),
361
-			  'DATEVALUE'       => array( 140,    1,    1,    0 ),
362
-			  'TIMEVALUE'       => array( 141,    1,    1,    0 ),
363
-			  'SLN'             => array( 142,    3,    1,    0 ),
364
-			  'SYD'             => array( 143,    4,    1,    0 ),
365
-			  'DDB'             => array( 144,   -1,    1,    0 ),
366
-			  'INDIRECT'        => array( 148,   -1,    1,    1 ),
367
-			  'CALL'            => array( 150,   -1,    1,    0 ),
368
-			  'CLEAN'           => array( 162,    1,    1,    0 ),
369
-			  'MDETERM'         => array( 163,    1,    2,    0 ),
370
-			  'MINVERSE'        => array( 164,    1,    2,    0 ),
371
-			  'MMULT'           => array( 165,    2,    2,    0 ),
372
-			  'IPMT'            => array( 167,   -1,    1,    0 ),
373
-			  'PPMT'            => array( 168,   -1,    1,    0 ),
374
-			  'COUNTA'          => array( 169,   -1,    0,    0 ),
375
-			  'PRODUCT'         => array( 183,   -1,    0,    0 ),
376
-			  'FACT'            => array( 184,    1,    1,    0 ),
377
-			  'DPRODUCT'        => array( 189,    3,    0,    0 ),
378
-			  'ISNONTEXT'       => array( 190,    1,    1,    0 ),
379
-			  'STDEVP'          => array( 193,   -1,    0,    0 ),
380
-			  'VARP'            => array( 194,   -1,    0,    0 ),
381
-			  'DSTDEVP'         => array( 195,    3,    0,    0 ),
382
-			  'DVARP'           => array( 196,    3,    0,    0 ),
383
-			  'TRUNC'           => array( 197,   -1,    1,    0 ),
384
-			  'ISLOGICAL'       => array( 198,    1,    1,    0 ),
385
-			  'DCOUNTA'         => array( 199,    3,    0,    0 ),
386
-			  'USDOLLAR'        => array( 204,   -1,    1,    0 ),
387
-			  'FINDB'           => array( 205,   -1,    1,    0 ),
388
-			  'SEARCHB'         => array( 206,   -1,    1,    0 ),
389
-			  'REPLACEB'        => array( 207,    4,    1,    0 ),
390
-			  'LEFTB'           => array( 208,   -1,    1,    0 ),
391
-			  'RIGHTB'          => array( 209,   -1,    1,    0 ),
392
-			  'MIDB'            => array( 210,    3,    1,    0 ),
393
-			  'LENB'            => array( 211,    1,    1,    0 ),
394
-			  'ROUNDUP'         => array( 212,    2,    1,    0 ),
395
-			  'ROUNDDOWN'       => array( 213,    2,    1,    0 ),
396
-			  'ASC'             => array( 214,    1,    1,    0 ),
397
-			  'DBCS'            => array( 215,    1,    1,    0 ),
398
-			  'RANK'            => array( 216,   -1,    0,    0 ),
399
-			  'ADDRESS'         => array( 219,   -1,    1,    0 ),
400
-			  'DAYS360'         => array( 220,   -1,    1,    0 ),
401
-			  'TODAY'           => array( 221,    0,    1,    1 ),
402
-			  'VDB'             => array( 222,   -1,    1,    0 ),
403
-			  'MEDIAN'          => array( 227,   -1,    0,    0 ),
404
-			  'SUMPRODUCT'      => array( 228,   -1,    2,    0 ),
405
-			  'SINH'            => array( 229,    1,    1,    0 ),
406
-			  'COSH'            => array( 230,    1,    1,    0 ),
407
-			  'TANH'            => array( 231,    1,    1,    0 ),
408
-			  'ASINH'           => array( 232,    1,    1,    0 ),
409
-			  'ACOSH'           => array( 233,    1,    1,    0 ),
410
-			  'ATANH'           => array( 234,    1,    1,    0 ),
411
-			  'DGET'            => array( 235,    3,    0,    0 ),
412
-			  'INFO'            => array( 244,    1,    1,    1 ),
413
-			  'DB'              => array( 247,   -1,    1,    0 ),
414
-			  'FREQUENCY'       => array( 252,    2,    0,    0 ),
415
-			  'ERROR.TYPE'      => array( 261,    1,    1,    0 ),
416
-			  'REGISTER.ID'     => array( 267,   -1,    1,    0 ),
417
-			  'AVEDEV'          => array( 269,   -1,    0,    0 ),
418
-			  'BETADIST'        => array( 270,   -1,    1,    0 ),
419
-			  'GAMMALN'         => array( 271,    1,    1,    0 ),
420
-			  'BETAINV'         => array( 272,   -1,    1,    0 ),
421
-			  'BINOMDIST'       => array( 273,    4,    1,    0 ),
422
-			  'CHIDIST'         => array( 274,    2,    1,    0 ),
423
-			  'CHIINV'          => array( 275,    2,    1,    0 ),
424
-			  'COMBIN'          => array( 276,    2,    1,    0 ),
425
-			  'CONFIDENCE'      => array( 277,    3,    1,    0 ),
426
-			  'CRITBINOM'       => array( 278,    3,    1,    0 ),
427
-			  'EVEN'            => array( 279,    1,    1,    0 ),
428
-			  'EXPONDIST'       => array( 280,    3,    1,    0 ),
429
-			  'FDIST'           => array( 281,    3,    1,    0 ),
430
-			  'FINV'            => array( 282,    3,    1,    0 ),
431
-			  'FISHER'          => array( 283,    1,    1,    0 ),
432
-			  'FISHERINV'       => array( 284,    1,    1,    0 ),
433
-			  'FLOOR'           => array( 285,    2,    1,    0 ),
434
-			  'GAMMADIST'       => array( 286,    4,    1,    0 ),
435
-			  'GAMMAINV'        => array( 287,    3,    1,    0 ),
436
-			  'CEILING'         => array( 288,    2,    1,    0 ),
437
-			  'HYPGEOMDIST'     => array( 289,    4,    1,    0 ),
438
-			  'LOGNORMDIST'     => array( 290,    3,    1,    0 ),
439
-			  'LOGINV'          => array( 291,    3,    1,    0 ),
440
-			  'NEGBINOMDIST'    => array( 292,    3,    1,    0 ),
441
-			  'NORMDIST'        => array( 293,    4,    1,    0 ),
442
-			  'NORMSDIST'       => array( 294,    1,    1,    0 ),
443
-			  'NORMINV'         => array( 295,    3,    1,    0 ),
444
-			  'NORMSINV'        => array( 296,    1,    1,    0 ),
445
-			  'STANDARDIZE'     => array( 297,    3,    1,    0 ),
446
-			  'ODD'             => array( 298,    1,    1,    0 ),
447
-			  'PERMUT'          => array( 299,    2,    1,    0 ),
448
-			  'POISSON'         => array( 300,    3,    1,    0 ),
449
-			  'TDIST'           => array( 301,    3,    1,    0 ),
450
-			  'WEIBULL'         => array( 302,    4,    1,    0 ),
451
-			  'SUMXMY2'         => array( 303,    2,    2,    0 ),
452
-			  'SUMX2MY2'        => array( 304,    2,    2,    0 ),
453
-			  'SUMX2PY2'        => array( 305,    2,    2,    0 ),
454
-			  'CHITEST'         => array( 306,    2,    2,    0 ),
455
-			  'CORREL'          => array( 307,    2,    2,    0 ),
456
-			  'COVAR'           => array( 308,    2,    2,    0 ),
457
-			  'FORECAST'        => array( 309,    3,    2,    0 ),
458
-			  'FTEST'           => array( 310,    2,    2,    0 ),
459
-			  'INTERCEPT'       => array( 311,    2,    2,    0 ),
460
-			  'PEARSON'         => array( 312,    2,    2,    0 ),
461
-			  'RSQ'             => array( 313,    2,    2,    0 ),
462
-			  'STEYX'           => array( 314,    2,    2,    0 ),
463
-			  'SLOPE'           => array( 315,    2,    2,    0 ),
464
-			  'TTEST'           => array( 316,    4,    2,    0 ),
465
-			  'PROB'            => array( 317,   -1,    2,    0 ),
466
-			  'DEVSQ'           => array( 318,   -1,    0,    0 ),
467
-			  'GEOMEAN'         => array( 319,   -1,    0,    0 ),
468
-			  'HARMEAN'         => array( 320,   -1,    0,    0 ),
469
-			  'SUMSQ'           => array( 321,   -1,    0,    0 ),
470
-			  'KURT'            => array( 322,   -1,    0,    0 ),
471
-			  'SKEW'            => array( 323,   -1,    0,    0 ),
472
-			  'ZTEST'           => array( 324,   -1,    0,    0 ),
473
-			  'LARGE'           => array( 325,    2,    0,    0 ),
474
-			  'SMALL'           => array( 326,    2,    0,    0 ),
475
-			  'QUARTILE'        => array( 327,    2,    0,    0 ),
476
-			  'PERCENTILE'      => array( 328,    2,    0,    0 ),
477
-			  'PERCENTRANK'     => array( 329,   -1,    0,    0 ),
478
-			  'MODE'            => array( 330,   -1,    2,    0 ),
479
-			  'TRIMMEAN'        => array( 331,    2,    0,    0 ),
480
-			  'TINV'            => array( 332,    2,    1,    0 ),
481
-			  'CONCATENATE'     => array( 336,   -1,    1,    0 ),
482
-			  'POWER'           => array( 337,    2,    1,    0 ),
483
-			  'RADIANS'         => array( 342,    1,    1,    0 ),
484
-			  'DEGREES'         => array( 343,    1,    1,    0 ),
485
-			  'SUBTOTAL'        => array( 344,   -1,    0,    0 ),
486
-			  'SUMIF'           => array( 345,   -1,    0,    0 ),
487
-			  'COUNTIF'         => array( 346,    2,    0,    0 ),
488
-			  'COUNTBLANK'      => array( 347,    1,    0,    0 ),
489
-			  'ISPMT'           => array( 350,    4,    1,    0 ),
490
-			  'DATEDIF'         => array( 351,    3,    1,    0 ),
491
-			  'DATESTRING'      => array( 352,    1,    1,    0 ),
492
-			  'NUMBERSTRING'    => array( 353,    2,    1,    0 ),
493
-			  'ROMAN'           => array( 354,   -1,    1,    0 ),
494
-			  'GETPIVOTDATA'    => array( 358,   -1,    0,    0 ),
495
-			  'HYPERLINK'       => array( 359,   -1,    1,    0 ),
496
-			  'PHONETIC'        => array( 360,    1,    0,    0 ),
497
-			  'AVERAGEA'        => array( 361,   -1,    0,    0 ),
498
-			  'MAXA'            => array( 362,   -1,    0,    0 ),
499
-			  'MINA'            => array( 363,   -1,    0,    0 ),
500
-			  'STDEVPA'         => array( 364,   -1,    0,    0 ),
501
-			  'VARPA'           => array( 365,   -1,    0,    0 ),
502
-			  'STDEVA'          => array( 366,   -1,    0,    0 ),
503
-			  'VARA'            => array( 367,   -1,    0,    0 ),
504
-			  'BAHTTEXT'        => array( 368,    1,    0,    0 ),
255
+			  'COUNT'           => array(0, -1, 0, 0),
256
+			  'IF'              => array(1, -1, 1, 0),
257
+			  'ISNA'            => array(2, 1, 1, 0),
258
+			  'ISERROR'         => array(3, 1, 1, 0),
259
+			  'SUM'             => array(4, -1, 0, 0),
260
+			  'AVERAGE'         => array(5, -1, 0, 0),
261
+			  'MIN'             => array(6, -1, 0, 0),
262
+			  'MAX'             => array(7, -1, 0, 0),
263
+			  'ROW'             => array(8, -1, 0, 0),
264
+			  'COLUMN'          => array(9, -1, 0, 0),
265
+			  'NA'              => array(10, 0, 0, 0),
266
+			  'NPV'             => array(11, -1, 1, 0),
267
+			  'STDEV'           => array(12, -1, 0, 0),
268
+			  'DOLLAR'          => array(13, -1, 1, 0),
269
+			  'FIXED'           => array(14, -1, 1, 0),
270
+			  'SIN'             => array(15, 1, 1, 0),
271
+			  'COS'             => array(16, 1, 1, 0),
272
+			  'TAN'             => array(17, 1, 1, 0),
273
+			  'ATAN'            => array(18, 1, 1, 0),
274
+			  'PI'              => array(19, 0, 1, 0),
275
+			  'SQRT'            => array(20, 1, 1, 0),
276
+			  'EXP'             => array(21, 1, 1, 0),
277
+			  'LN'              => array(22, 1, 1, 0),
278
+			  'LOG10'           => array(23, 1, 1, 0),
279
+			  'ABS'             => array(24, 1, 1, 0),
280
+			  'INT'             => array(25, 1, 1, 0),
281
+			  'SIGN'            => array(26, 1, 1, 0),
282
+			  'ROUND'           => array(27, 2, 1, 0),
283
+			  'LOOKUP'          => array(28, -1, 0, 0),
284
+			  'INDEX'           => array(29, -1, 0, 1),
285
+			  'REPT'            => array(30, 2, 1, 0),
286
+			  'MID'             => array(31, 3, 1, 0),
287
+			  'LEN'             => array(32, 1, 1, 0),
288
+			  'VALUE'           => array(33, 1, 1, 0),
289
+			  'TRUE'            => array(34, 0, 1, 0),
290
+			  'FALSE'           => array(35, 0, 1, 0),
291
+			  'AND'             => array(36, -1, 0, 0),
292
+			  'OR'              => array(37, -1, 0, 0),
293
+			  'NOT'             => array(38, 1, 1, 0),
294
+			  'MOD'             => array(39, 2, 1, 0),
295
+			  'DCOUNT'          => array(40, 3, 0, 0),
296
+			  'DSUM'            => array(41, 3, 0, 0),
297
+			  'DAVERAGE'        => array(42, 3, 0, 0),
298
+			  'DMIN'            => array(43, 3, 0, 0),
299
+			  'DMAX'            => array(44, 3, 0, 0),
300
+			  'DSTDEV'          => array(45, 3, 0, 0),
301
+			  'VAR'             => array(46, -1, 0, 0),
302
+			  'DVAR'            => array(47, 3, 0, 0),
303
+			  'TEXT'            => array(48, 2, 1, 0),
304
+			  'LINEST'          => array(49, -1, 0, 0),
305
+			  'TREND'           => array(50, -1, 0, 0),
306
+			  'LOGEST'          => array(51, -1, 0, 0),
307
+			  'GROWTH'          => array(52, -1, 0, 0),
308
+			  'PV'              => array(56, -1, 1, 0),
309
+			  'FV'              => array(57, -1, 1, 0),
310
+			  'NPER'            => array(58, -1, 1, 0),
311
+			  'PMT'             => array(59, -1, 1, 0),
312
+			  'RATE'            => array(60, -1, 1, 0),
313
+			  'MIRR'            => array(61, 3, 0, 0),
314
+			  'IRR'             => array(62, -1, 0, 0),
315
+			  'RAND'            => array(63, 0, 1, 1),
316
+			  'MATCH'           => array(64, -1, 0, 0),
317
+			  'DATE'            => array(65, 3, 1, 0),
318
+			  'TIME'            => array(66, 3, 1, 0),
319
+			  'DAY'             => array(67, 1, 1, 0),
320
+			  'MONTH'           => array(68, 1, 1, 0),
321
+			  'YEAR'            => array(69, 1, 1, 0),
322
+			  'WEEKDAY'         => array(70, -1, 1, 0),
323
+			  'HOUR'            => array(71, 1, 1, 0),
324
+			  'MINUTE'          => array(72, 1, 1, 0),
325
+			  'SECOND'          => array(73, 1, 1, 0),
326
+			  'NOW'             => array(74, 0, 1, 1),
327
+			  'AREAS'           => array(75, 1, 0, 1),
328
+			  'ROWS'            => array(76, 1, 0, 1),
329
+			  'COLUMNS'         => array(77, 1, 0, 1),
330
+			  'OFFSET'          => array(78, -1, 0, 1),
331
+			  'SEARCH'          => array(82, -1, 1, 0),
332
+			  'TRANSPOSE'       => array(83, 1, 1, 0),
333
+			  'TYPE'            => array(86, 1, 1, 0),
334
+			  'ATAN2'           => array(97, 2, 1, 0),
335
+			  'ASIN'            => array(98, 1, 1, 0),
336
+			  'ACOS'            => array(99, 1, 1, 0),
337
+			  'CHOOSE'          => array(100, -1, 1, 0),
338
+			  'HLOOKUP'         => array(101, -1, 0, 0),
339
+			  'VLOOKUP'         => array(102, -1, 0, 0),
340
+			  'ISREF'           => array(105, 1, 0, 0),
341
+			  'LOG'             => array(109, -1, 1, 0),
342
+			  'CHAR'            => array(111, 1, 1, 0),
343
+			  'LOWER'           => array(112, 1, 1, 0),
344
+			  'UPPER'           => array(113, 1, 1, 0),
345
+			  'PROPER'          => array(114, 1, 1, 0),
346
+			  'LEFT'            => array(115, -1, 1, 0),
347
+			  'RIGHT'           => array(116, -1, 1, 0),
348
+			  'EXACT'           => array(117, 2, 1, 0),
349
+			  'TRIM'            => array(118, 1, 1, 0),
350
+			  'REPLACE'         => array(119, 4, 1, 0),
351
+			  'SUBSTITUTE'      => array(120, -1, 1, 0),
352
+			  'CODE'            => array(121, 1, 1, 0),
353
+			  'FIND'            => array(124, -1, 1, 0),
354
+			  'CELL'            => array(125, -1, 0, 1),
355
+			  'ISERR'           => array(126, 1, 1, 0),
356
+			  'ISTEXT'          => array(127, 1, 1, 0),
357
+			  'ISNUMBER'        => array(128, 1, 1, 0),
358
+			  'ISBLANK'         => array(129, 1, 1, 0),
359
+			  'T'               => array(130, 1, 0, 0),
360
+			  'N'               => array(131, 1, 0, 0),
361
+			  'DATEVALUE'       => array(140, 1, 1, 0),
362
+			  'TIMEVALUE'       => array(141, 1, 1, 0),
363
+			  'SLN'             => array(142, 3, 1, 0),
364
+			  'SYD'             => array(143, 4, 1, 0),
365
+			  'DDB'             => array(144, -1, 1, 0),
366
+			  'INDIRECT'        => array(148, -1, 1, 1),
367
+			  'CALL'            => array(150, -1, 1, 0),
368
+			  'CLEAN'           => array(162, 1, 1, 0),
369
+			  'MDETERM'         => array(163, 1, 2, 0),
370
+			  'MINVERSE'        => array(164, 1, 2, 0),
371
+			  'MMULT'           => array(165, 2, 2, 0),
372
+			  'IPMT'            => array(167, -1, 1, 0),
373
+			  'PPMT'            => array(168, -1, 1, 0),
374
+			  'COUNTA'          => array(169, -1, 0, 0),
375
+			  'PRODUCT'         => array(183, -1, 0, 0),
376
+			  'FACT'            => array(184, 1, 1, 0),
377
+			  'DPRODUCT'        => array(189, 3, 0, 0),
378
+			  'ISNONTEXT'       => array(190, 1, 1, 0),
379
+			  'STDEVP'          => array(193, -1, 0, 0),
380
+			  'VARP'            => array(194, -1, 0, 0),
381
+			  'DSTDEVP'         => array(195, 3, 0, 0),
382
+			  'DVARP'           => array(196, 3, 0, 0),
383
+			  'TRUNC'           => array(197, -1, 1, 0),
384
+			  'ISLOGICAL'       => array(198, 1, 1, 0),
385
+			  'DCOUNTA'         => array(199, 3, 0, 0),
386
+			  'USDOLLAR'        => array(204, -1, 1, 0),
387
+			  'FINDB'           => array(205, -1, 1, 0),
388
+			  'SEARCHB'         => array(206, -1, 1, 0),
389
+			  'REPLACEB'        => array(207, 4, 1, 0),
390
+			  'LEFTB'           => array(208, -1, 1, 0),
391
+			  'RIGHTB'          => array(209, -1, 1, 0),
392
+			  'MIDB'            => array(210, 3, 1, 0),
393
+			  'LENB'            => array(211, 1, 1, 0),
394
+			  'ROUNDUP'         => array(212, 2, 1, 0),
395
+			  'ROUNDDOWN'       => array(213, 2, 1, 0),
396
+			  'ASC'             => array(214, 1, 1, 0),
397
+			  'DBCS'            => array(215, 1, 1, 0),
398
+			  'RANK'            => array(216, -1, 0, 0),
399
+			  'ADDRESS'         => array(219, -1, 1, 0),
400
+			  'DAYS360'         => array(220, -1, 1, 0),
401
+			  'TODAY'           => array(221, 0, 1, 1),
402
+			  'VDB'             => array(222, -1, 1, 0),
403
+			  'MEDIAN'          => array(227, -1, 0, 0),
404
+			  'SUMPRODUCT'      => array(228, -1, 2, 0),
405
+			  'SINH'            => array(229, 1, 1, 0),
406
+			  'COSH'            => array(230, 1, 1, 0),
407
+			  'TANH'            => array(231, 1, 1, 0),
408
+			  'ASINH'           => array(232, 1, 1, 0),
409
+			  'ACOSH'           => array(233, 1, 1, 0),
410
+			  'ATANH'           => array(234, 1, 1, 0),
411
+			  'DGET'            => array(235, 3, 0, 0),
412
+			  'INFO'            => array(244, 1, 1, 1),
413
+			  'DB'              => array(247, -1, 1, 0),
414
+			  'FREQUENCY'       => array(252, 2, 0, 0),
415
+			  'ERROR.TYPE'      => array(261, 1, 1, 0),
416
+			  'REGISTER.ID'     => array(267, -1, 1, 0),
417
+			  'AVEDEV'          => array(269, -1, 0, 0),
418
+			  'BETADIST'        => array(270, -1, 1, 0),
419
+			  'GAMMALN'         => array(271, 1, 1, 0),
420
+			  'BETAINV'         => array(272, -1, 1, 0),
421
+			  'BINOMDIST'       => array(273, 4, 1, 0),
422
+			  'CHIDIST'         => array(274, 2, 1, 0),
423
+			  'CHIINV'          => array(275, 2, 1, 0),
424
+			  'COMBIN'          => array(276, 2, 1, 0),
425
+			  'CONFIDENCE'      => array(277, 3, 1, 0),
426
+			  'CRITBINOM'       => array(278, 3, 1, 0),
427
+			  'EVEN'            => array(279, 1, 1, 0),
428
+			  'EXPONDIST'       => array(280, 3, 1, 0),
429
+			  'FDIST'           => array(281, 3, 1, 0),
430
+			  'FINV'            => array(282, 3, 1, 0),
431
+			  'FISHER'          => array(283, 1, 1, 0),
432
+			  'FISHERINV'       => array(284, 1, 1, 0),
433
+			  'FLOOR'           => array(285, 2, 1, 0),
434
+			  'GAMMADIST'       => array(286, 4, 1, 0),
435
+			  'GAMMAINV'        => array(287, 3, 1, 0),
436
+			  'CEILING'         => array(288, 2, 1, 0),
437
+			  'HYPGEOMDIST'     => array(289, 4, 1, 0),
438
+			  'LOGNORMDIST'     => array(290, 3, 1, 0),
439
+			  'LOGINV'          => array(291, 3, 1, 0),
440
+			  'NEGBINOMDIST'    => array(292, 3, 1, 0),
441
+			  'NORMDIST'        => array(293, 4, 1, 0),
442
+			  'NORMSDIST'       => array(294, 1, 1, 0),
443
+			  'NORMINV'         => array(295, 3, 1, 0),
444
+			  'NORMSINV'        => array(296, 1, 1, 0),
445
+			  'STANDARDIZE'     => array(297, 3, 1, 0),
446
+			  'ODD'             => array(298, 1, 1, 0),
447
+			  'PERMUT'          => array(299, 2, 1, 0),
448
+			  'POISSON'         => array(300, 3, 1, 0),
449
+			  'TDIST'           => array(301, 3, 1, 0),
450
+			  'WEIBULL'         => array(302, 4, 1, 0),
451
+			  'SUMXMY2'         => array(303, 2, 2, 0),
452
+			  'SUMX2MY2'        => array(304, 2, 2, 0),
453
+			  'SUMX2PY2'        => array(305, 2, 2, 0),
454
+			  'CHITEST'         => array(306, 2, 2, 0),
455
+			  'CORREL'          => array(307, 2, 2, 0),
456
+			  'COVAR'           => array(308, 2, 2, 0),
457
+			  'FORECAST'        => array(309, 3, 2, 0),
458
+			  'FTEST'           => array(310, 2, 2, 0),
459
+			  'INTERCEPT'       => array(311, 2, 2, 0),
460
+			  'PEARSON'         => array(312, 2, 2, 0),
461
+			  'RSQ'             => array(313, 2, 2, 0),
462
+			  'STEYX'           => array(314, 2, 2, 0),
463
+			  'SLOPE'           => array(315, 2, 2, 0),
464
+			  'TTEST'           => array(316, 4, 2, 0),
465
+			  'PROB'            => array(317, -1, 2, 0),
466
+			  'DEVSQ'           => array(318, -1, 0, 0),
467
+			  'GEOMEAN'         => array(319, -1, 0, 0),
468
+			  'HARMEAN'         => array(320, -1, 0, 0),
469
+			  'SUMSQ'           => array(321, -1, 0, 0),
470
+			  'KURT'            => array(322, -1, 0, 0),
471
+			  'SKEW'            => array(323, -1, 0, 0),
472
+			  'ZTEST'           => array(324, -1, 0, 0),
473
+			  'LARGE'           => array(325, 2, 0, 0),
474
+			  'SMALL'           => array(326, 2, 0, 0),
475
+			  'QUARTILE'        => array(327, 2, 0, 0),
476
+			  'PERCENTILE'      => array(328, 2, 0, 0),
477
+			  'PERCENTRANK'     => array(329, -1, 0, 0),
478
+			  'MODE'            => array(330, -1, 2, 0),
479
+			  'TRIMMEAN'        => array(331, 2, 0, 0),
480
+			  'TINV'            => array(332, 2, 1, 0),
481
+			  'CONCATENATE'     => array(336, -1, 1, 0),
482
+			  'POWER'           => array(337, 2, 1, 0),
483
+			  'RADIANS'         => array(342, 1, 1, 0),
484
+			  'DEGREES'         => array(343, 1, 1, 0),
485
+			  'SUBTOTAL'        => array(344, -1, 0, 0),
486
+			  'SUMIF'           => array(345, -1, 0, 0),
487
+			  'COUNTIF'         => array(346, 2, 0, 0),
488
+			  'COUNTBLANK'      => array(347, 1, 0, 0),
489
+			  'ISPMT'           => array(350, 4, 1, 0),
490
+			  'DATEDIF'         => array(351, 3, 1, 0),
491
+			  'DATESTRING'      => array(352, 1, 1, 0),
492
+			  'NUMBERSTRING'    => array(353, 2, 1, 0),
493
+			  'ROMAN'           => array(354, -1, 1, 0),
494
+			  'GETPIVOTDATA'    => array(358, -1, 0, 0),
495
+			  'HYPERLINK'       => array(359, -1, 1, 0),
496
+			  'PHONETIC'        => array(360, 1, 0, 0),
497
+			  'AVERAGEA'        => array(361, -1, 0, 0),
498
+			  'MAXA'            => array(362, -1, 0, 0),
499
+			  'MINA'            => array(363, -1, 0, 0),
500
+			  'STDEVPA'         => array(364, -1, 0, 0),
501
+			  'VARPA'           => array(365, -1, 0, 0),
502
+			  'STDEVA'          => array(366, -1, 0, 0),
503
+			  'VARA'            => array(367, -1, 0, 0),
504
+			  'BAHTTEXT'        => array(368, 1, 0, 0),
505 505
 			  );
506 506
 	}
507 507
 
@@ -521,15 +521,15 @@  discard block
 block discarded – undo
521 521
 			return $this->_convertNumber($token);
522 522
 
523 523
 		// match references like A1 or $A$1
524
-		} elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$token)) {
524
+		} elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) {
525 525
 			return $this->_convertRef2d($token);
526 526
 
527 527
 		// match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1
528
-		} elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u",$token)) {
528
+		} elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) {
529 529
 			return $this->_convertRef3d($token);
530 530
 
531 531
 		// match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1
532
-		} elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u",$token)) {
532
+		} elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) {
533 533
 			return $this->_convertRef3d($token);
534 534
 
535 535
 		// match ranges like A1:B2 or $A$1:$B$2
@@ -537,11 +537,11 @@  discard block
 block discarded – undo
537 537
 			return $this->_convertRange2d($token);
538 538
 
539 539
 		// match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2
540
-		} elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u",$token)) {
540
+		} elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u", $token)) {
541 541
 			return $this->_convertRange3d($token);
542 542
 
543 543
 		// match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2
544
-		} elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u",$token)) {
544
+		} elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u", $token)) {
545 545
 			return $this->_convertRange3d($token);
546 546
 
547 547
 		// operators (including parentheses)
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
 			throw new Exception("String is too long");
602 602
 		}
603 603
 
604
-		return pack('C', $this->ptg['ptgStr']) . PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($string);
604
+		return pack('C', $this->ptg['ptgStr']).PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($string);
605 605
 	}
606 606
 
607 607
 	/**
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 	 */
616 616
 	function _convertFunction($token, $num_args)
617 617
 	{
618
-		$args     = $this->_functions[$token][1];
618
+		$args = $this->_functions[$token][1];
619 619
 //		$volatile = $this->_functions[$token][3];
620 620
 
621 621
 		// Fixed number of args eg. TIME($i,$j,$k).
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 	 * @param string	$range	An Excel range in the A1:A2
636 636
 	 * @param int		$class
637 637
 	 */
638
-	function _convertRange2d($range, $class=0)
638
+	function _convertRange2d($range, $class = 0)
639 639
 	{
640 640
 
641 641
 		// TODO: possible class value 0,1,2 check Formula.pm
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
 			// TODO: use real error codes
663 663
 			throw new Exception("Unknown class $class");
664 664
 		}
665
-		return $ptgArea . $row1 . $row2 . $col1. $col2;
665
+		return $ptgArea.$row1.$row2.$col1.$col2;
666 666
 	}
667 667
 
668 668
 	/**
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
 //			throw new Exception("Unknown class $class");
706 706
 //		}
707 707
 
708
-		return $ptgArea . $ext_ref . $row1 . $row2 . $col1. $col2;
708
+		return $ptgArea.$ext_ref.$row1.$row2.$col1.$col2;
709 709
 	}
710 710
 
711 711
 	/**
@@ -769,7 +769,7 @@  discard block
 block discarded – undo
769 769
 //			throw new Exception("Unknown class $class");
770 770
 //		}
771 771
 
772
-		return $ptgRef . $ext_ref. $row . $col;
772
+		return $ptgRef.$ext_ref.$row.$col;
773 773
 	}
774 774
 
775 775
     /**
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
 	 */
909 909
 	function _getSheetIndex($sheet_name)
910 910
 	{
911
-		if (!isset($this->_ext_sheets[$sheet_name])) {
911
+		if ( ! isset($this->_ext_sheets[$sheet_name])) {
912 912
 			return -1;
913 913
 		} else {
914 914
 			return $this->_ext_sheets[$sheet_name];
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
 	 */
1011 1011
 	function _cellToRowcol($cell)
1012 1012
 	{
1013
-		preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/',$cell,$match);
1013
+		preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/', $cell, $match);
1014 1014
 		// return absolute column if there is a $ in the ref
1015 1015
 		$col_rel = empty($match[1]) ? 1 : 0;
1016 1016
 		$col_ref = $match[2];
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
 			}
1050 1050
 
1051 1051
 			if ($i < ($formula_length - 1)) {
1052
-				$this->_lookahead = $this->_formula{$i+1};
1052
+				$this->_lookahead = $this->_formula{$i + 1};
1053 1053
 			}
1054 1054
 			$token = '';
1055 1055
 		}
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
 			$token .= $this->_formula{$i};
1059 1059
 
1060 1060
 			if ($i < ($formula_length - 1)) {
1061
-				$this->_lookahead = $this->_formula{$i+1};
1061
+				$this->_lookahead = $this->_formula{$i + 1};
1062 1062
 			} else {
1063 1063
 				$this->_lookahead = '';
1064 1064
 			}
@@ -1073,7 +1073,7 @@  discard block
 block discarded – undo
1073 1073
 			}
1074 1074
 
1075 1075
 			if ($i < ($formula_length - 2)) {
1076
-				$this->_lookahead = $this->_formula{$i+2};
1076
+				$this->_lookahead = $this->_formula{$i + 2};
1077 1077
 			} else { // if we run out of characters _lookahead becomes empty
1078 1078
 				$this->_lookahead = '';
1079 1079
 			}
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
 	 */
1092 1092
 	function _match($token)
1093 1093
 	{
1094
-		switch($token) {
1094
+		switch ($token) {
1095 1095
 			case "+":
1096 1096
 			case "-":
1097 1097
 			case "*":
@@ -1124,54 +1124,54 @@  discard block
 block discarded – undo
1124 1124
 				break;
1125 1125
 			default:
1126 1126
 				// if it's a reference A1 or $A$1 or $A1 or A$1
1127
-				if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/',$token) and
1128
-				   !preg_match("/[0-9]/",$this->_lookahead) and
1127
+				if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/', $token) and
1128
+				   ! preg_match("/[0-9]/", $this->_lookahead) and
1129 1129
 				   ($this->_lookahead != ':') and ($this->_lookahead != '.') and
1130 1130
 				   ($this->_lookahead != '!'))
1131 1131
 				{
1132 1132
 					return $token;
1133 1133
 				}
1134 1134
 				// If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)
1135
-				elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u",$token) and
1136
-					   !preg_match("/[0-9]/",$this->_lookahead) and
1135
+				elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and
1136
+					   ! preg_match("/[0-9]/", $this->_lookahead) and
1137 1137
 					   ($this->_lookahead != ':') and ($this->_lookahead != '.'))
1138 1138
 				{
1139 1139
 					return $token;
1140 1140
 				}
1141 1141
 				// If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)
1142
-				elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u",$token) and
1143
-					   !preg_match("/[0-9]/",$this->_lookahead) and
1142
+				elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and
1143
+					   ! preg_match("/[0-9]/", $this->_lookahead) and
1144 1144
 					   ($this->_lookahead != ':') and ($this->_lookahead != '.'))
1145 1145
 				{
1146 1146
 					return $token;
1147 1147
 				}
1148 1148
 				// if it's a range A1:A2 or $A$1:$A$2
1149 1149
 				elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $token) and
1150
-					   !preg_match("/[0-9]/",$this->_lookahead))
1150
+					   ! preg_match("/[0-9]/", $this->_lookahead))
1151 1151
 				{
1152 1152
 					return $token;
1153 1153
 				}
1154 1154
 				// If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2
1155
-				elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u",$token) and
1156
-					   !preg_match("/[0-9]/",$this->_lookahead))
1155
+				elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and
1156
+					   ! preg_match("/[0-9]/", $this->_lookahead))
1157 1157
 				{
1158 1158
 					return $token;
1159 1159
 				}
1160 1160
 				// If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2
1161
-				elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u",$token) and
1162
-					   !preg_match("/[0-9]/",$this->_lookahead))
1161
+				elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and
1162
+					   ! preg_match("/[0-9]/", $this->_lookahead))
1163 1163
 				{
1164 1164
 					return $token;
1165 1165
 				}
1166 1166
 				// If it's a number (check that it's not a sheet name or range)
1167 1167
 				elseif (is_numeric($token) and
1168
-						(!is_numeric($token.$this->_lookahead) or ($this->_lookahead == '')) and
1168
+						( ! is_numeric($token.$this->_lookahead) or ($this->_lookahead == '')) and
1169 1169
 						($this->_lookahead != '!') and ($this->_lookahead != ':'))
1170 1170
 				{
1171 1171
 					return $token;
1172 1172
 				}
1173 1173
 				// If it's a string (of maximum 255 characters)
1174
-				elseif (preg_match("/\"([^\"]|\"\"){0,255}\"/",$token) and $this->_lookahead != '"' and (substr_count($token, '"')%2 == 0))
1174
+				elseif (preg_match("/\"([^\"]|\"\"){0,255}\"/", $token) and $this->_lookahead != '"' and (substr_count($token, '"') % 2 == 0))
1175 1175
 				{
1176 1176
 					return $token;
1177 1177
 				}
@@ -1181,13 +1181,13 @@  discard block
 block discarded – undo
1181 1181
 			        return $token;
1182 1182
 			    }
1183 1183
 				// if it's a function call
1184
-				elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$token) and ($this->_lookahead == "("))
1184
+				elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i", $token) and ($this->_lookahead == "("))
1185 1185
 				{
1186 1186
 					return $token;
1187 1187
 				}
1188 1188
 				//	It's an argument of some description (e.g. a named range),
1189 1189
 				//		precise nature yet to be determined
1190
-				elseif(substr($token,-1) == ')') {
1190
+				elseif (substr($token, -1) == ')') {
1191 1191
 					return $token;
1192 1192
 				}
1193 1193
 				return '';
@@ -1270,12 +1270,12 @@  discard block
 block discarded – undo
1270 1270
 		// If it's a string return a string node
1271 1271
 		if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->_current_token)) {
1272 1272
 			$tmp = str_replace('""', '"', $this->_current_token);
1273
-			if (($tmp == '"') || ($tmp == '')) $tmp = '""';	//	Trap for "" that has been used for an empty string
1273
+			if (($tmp == '"') || ($tmp == '')) $tmp = '""'; //	Trap for "" that has been used for an empty string
1274 1274
 			$result = $this->_createTree($tmp, '', '');
1275 1275
 			$this->_advance();
1276 1276
 			return $result;
1277 1277
         // If it's an error code
1278
-        } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->_current_token) or $this->_current_token == '#N/A'){
1278
+        } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->_current_token) or $this->_current_token == '#N/A') {
1279 1279
 		    $result = $this->_createTree($this->_current_token, 'ptgErr', '');
1280 1280
 		    $this->_advance();
1281 1281
 		    return $result;
@@ -1370,38 +1370,38 @@  discard block
 block discarded – undo
1370 1370
 	function _fact()
1371 1371
 	{
1372 1372
 		if ($this->_current_token == "(") {
1373
-			$this->_advance();         // eat the "("
1373
+			$this->_advance(); // eat the "("
1374 1374
 			$result = $this->_parenthesizedExpression();
1375 1375
 			if ($this->_current_token != ")") {
1376 1376
 				throw new Exception("')' token expected.");
1377 1377
 			}
1378
-			$this->_advance();         // eat the ")"
1378
+			$this->_advance(); // eat the ")"
1379 1379
 			return $result;
1380 1380
 		}
1381 1381
 		// if it's a reference
1382
-		if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/',$this->_current_token))
1382
+		if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/', $this->_current_token))
1383 1383
 		{
1384 1384
 			$result = $this->_createTree($this->_current_token, '', '');
1385 1385
 			$this->_advance();
1386 1386
 			return $result;
1387 1387
 		}
1388 1388
 		// If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)
1389
-		elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u",$this->_current_token))
1389
+		elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->_current_token))
1390 1390
 		{
1391 1391
 			$result = $this->_createTree($this->_current_token, '', '');
1392 1392
 			$this->_advance();
1393 1393
 			return $result;
1394 1394
 		}
1395 1395
 		// If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)
1396
-		elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u",$this->_current_token))
1396
+		elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->_current_token))
1397 1397
 		{
1398 1398
 			$result = $this->_createTree($this->_current_token, '', '');
1399 1399
 			$this->_advance();
1400 1400
 			return $result;
1401 1401
 		}
1402 1402
 		// if it's a range A1:B2 or $A$1:$B$2
1403
-		elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/',$this->_current_token) or
1404
-				preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/',$this->_current_token))
1403
+		elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $this->_current_token) or
1404
+				preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $this->_current_token))
1405 1405
 		{
1406 1406
 			// must be an error?
1407 1407
 			$result = $this->_createTree($this->_current_token, '', '');
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 			return $result;
1410 1410
 		}
1411 1411
 		// If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2)
1412
-		elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u",$this->_current_token))
1412
+		elseif (preg_match("/^".self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->_current_token))
1413 1413
 		{
1414 1414
 			// must be an error?
1415 1415
 			//$result = $this->_current_token;
@@ -1418,7 +1418,7 @@  discard block
 block discarded – undo
1418 1418
 			return $result;
1419 1419
 		}
1420 1420
 		// If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2)
1421
-		elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u",$this->_current_token))
1421
+		elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->_current_token))
1422 1422
 		{
1423 1423
 			// must be an error?
1424 1424
 			//$result = $this->_current_token;
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
 		// If it's a number or a percent
1430 1430
 		elseif (is_numeric($this->_current_token))
1431 1431
 		{
1432
-		    if($this->_lookahead == '%'){
1432
+		    if ($this->_lookahead == '%') {
1433 1433
 		        $result = $this->_createTree('ptgPercent', $this->_current_token, '');
1434 1434
 		    } else {
1435 1435
 		        $result = $this->_createTree($this->_current_token, '', '');
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
 		    return $result;
1439 1439
 		}
1440 1440
 		// if it's a function call
1441
-		elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i",$this->_current_token))
1441
+		elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i", $this->_current_token))
1442 1442
 		{
1443 1443
 			$result = $this->_func();
1444 1444
 			return $result;
@@ -1461,14 +1461,14 @@  discard block
 block discarded – undo
1461 1461
 		$function = strtoupper($this->_current_token);
1462 1462
 		$result   = ''; // initialize result
1463 1463
 		$this->_advance();
1464
-		$this->_advance();         // eat the "("
1464
+		$this->_advance(); // eat the "("
1465 1465
 		while ($this->_current_token != ')') {
1466 1466
 		/**/
1467 1467
 			if ($num_args > 0) {
1468 1468
 				if ($this->_current_token == "," or
1469 1469
 					$this->_current_token == ";")
1470 1470
 				{
1471
-					$this->_advance();  // eat the "," or ";"
1471
+					$this->_advance(); // eat the "," or ";"
1472 1472
 				} else {
1473 1473
 					throw new Exception("Syntax error: comma expected in ".
1474 1474
 									  "function $function, arg #{$num_args}");
@@ -1481,7 +1481,7 @@  discard block
 block discarded – undo
1481 1481
 			}
1482 1482
 			++$num_args;
1483 1483
 		}
1484
-		if (!isset($this->_functions[$function])) {
1484
+		if ( ! isset($this->_functions[$function])) {
1485 1485
 			throw new Exception("Function $function() doesn't exist");
1486 1486
 		}
1487 1487
 		$args = $this->_functions[$function][1];
@@ -1491,7 +1491,7 @@  discard block
 block discarded – undo
1491 1491
 		}
1492 1492
 
1493 1493
 		$result = $this->_createTree($function, $result, $num_args);
1494
-		$this->_advance();         // eat the ")"
1494
+		$this->_advance(); // eat the ")"
1495 1495
 		return $result;
1496 1496
 	}
1497 1497
 
@@ -1559,11 +1559,11 @@  discard block
 block discarded – undo
1559 1559
 			$polish .= $converted_tree;
1560 1560
 		}
1561 1561
 		// if it's a function convert it here (so we can set it's arguments)
1562
-		if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/",$tree['value']) and
1563
-			!preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/',$tree['value']) and
1564
-			!preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/",$tree['value']) and
1565
-			!is_numeric($tree['value']) and
1566
-			!isset($this->ptg[$tree['value']]))
1562
+		if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/", $tree['value']) and
1563
+			! preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) and
1564
+			! preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/", $tree['value']) and
1565
+			! is_numeric($tree['value']) and
1566
+			! isset($this->ptg[$tree['value']]))
1567 1567
 		{
1568 1568
 			// left subtree for a function is always an array.
1569 1569
 			if ($tree['left'] != '') {
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1270,7 +1270,10 @@
 block discarded – undo
1270 1270
 		// If it's a string return a string node
1271 1271
 		if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->_current_token)) {
1272 1272
 			$tmp = str_replace('""', '"', $this->_current_token);
1273
-			if (($tmp == '"') || ($tmp == '')) $tmp = '""';	//	Trap for "" that has been used for an empty string
1273
+			if (($tmp == '"') || ($tmp == '')) {
1274
+				$tmp = '""';
1275
+			}
1276
+			//	Trap for "" that has been used for an empty string
1274 1277
 			$result = $this->_createTree($tmp, '', '');
1275 1278
 			$this->_advance();
1276 1279
 			return $result;
Please login to merge, or discard this patch.
app/Vendor/PHPExcel/PHPExcel/Writer/Excel5/Workbook.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,7 +198,9 @@  discard block
 block discarded – undo
198 198
 	 * @param int		&$str_unique	Total number of unique strings
199 199
 	 * @param array		&$str_table		String Table
200 200
 	 * @param array		&$colors		Colour Table
201
-	 * @param mixed		$parser			The formula parser created for the Workbook
201
+	 * @param PHPExcel_Writer_Excel5_Parser		$parser			The formula parser created for the Workbook
202
+	 * @param integer $str_total
203
+	 * @param integer $str_unique
202 204
 	 */
203 205
 	public function __construct(PHPExcel $phpExcel = null,
204 206
 								&$str_total, &$str_unique, &$str_table, &$colors,
@@ -248,6 +250,7 @@  discard block
 block discarded – undo
248 250
 	 *
249 251
 	 * @param PHPExcel_Style
250 252
 	 * @param boolean Is it a style XF?
253
+	 * @param PHPExcel_Style $style
251 254
 	 * @return int Index to XF record
252 255
 	 */
253 256
 	public function addXfWriter($style, $isStyleXf = false)
@@ -788,7 +791,7 @@  discard block
 block discarded – undo
788 791
 	 *
789 792
 	 * @param	string		$name			The name in UTF-8
790 793
 	 * @param	string		$formulaData	The binary formula data
791
-	 * @param	string		$sheetIndex		1-based sheet index the defined name applies to. 0 = global
794
+	 * @param	integer		$sheetIndex		1-based sheet index the defined name applies to. 0 = global
792 795
 	 * @param	boolean		$isBuiltIn		Built-in name?
793 796
 	 * @return	string	Complete binary record data
794 797
 	 */
Please login to merge, or discard this patch.
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 */
203 203
 	public function __construct(PHPExcel $phpExcel = null,
204 204
 								&$str_total, &$str_unique, &$str_table, &$colors,
205
-								$parser )
205
+								$parser)
206 206
 	{
207 207
 		// It needs to call its parent's constructor explicitly
208 208
 		parent::__construct();
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
 		for ($i = 0; $i < $countSheets; ++$i) {
230 230
 			$phpSheet = $phpExcel->getSheet($i);
231 231
 
232
-			$this->_parser->setExtSheet($phpSheet->getTitle(), $i);  // Register worksheet name with parser
232
+			$this->_parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser
233 233
 
234 234
 			$supbook_index = 0x00;
235 235
 			$ref = pack('vvv', $supbook_index, $i, $i);
236
-			$this->_parser->_references[] = $ref;  // Register reference with parser
236
+			$this->_parser->_references[] = $ref; // Register reference with parser
237 237
 
238 238
 			// Sheet tab colors?
239 239
 			if ($phpSheet->isTabColorSet()) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	public function _addFont(PHPExcel_Style_Font $font)
304 304
 	{
305 305
 		$fontHashCode = $font->getHashCode();
306
-		if(isset($this->_addedFonts[$fontHashCode])){
306
+		if (isset($this->_addedFonts[$fontHashCode])) {
307 307
 			$fontIndex = $this->_addedFonts[$fontHashCode];
308 308
 		} else {
309 309
 			$countFonts = count($this->_fontWriters);
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * @return int Color index
325 325
 	 */
326 326
 	private function _addColor($rgb) {
327
-		if (!isset($this->_colors[$rgb])) {
327
+		if ( ! isset($this->_colors[$rgb])) {
328 328
 			if (count($this->_colors) < 57) {
329 329
 				// then we add a custom color altering the palette
330 330
 				$colorIndex = 8 + count($this->_colors);
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 	 */
479 479
 	function _calcSheetOffsets()
480 480
 	{
481
-		$boundsheet_length = 10;  // fixed length for a BOUNDSHEET record
481
+		$boundsheet_length = 10; // fixed length for a BOUNDSHEET record
482 482
 
483 483
 		// size of Workbook globals part 1 + 3
484 484
 		$offset            = $this->_datasize;
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 				// Create absolute coordinate
662 662
 				$range = PHPExcel_Cell::splitRange($namedRange->getRange());
663 663
 				for ($i = 0; $i < count($range); $i++) {
664
-					$range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . PHPExcel_Cell::absoluteCoordinate($range[$i][0]);
664
+					$range[$i][0] = '\''.str_replace("'", "''", $namedRange->getWorksheet()->getTitle()).'\'!'.PHPExcel_Cell::absoluteCoordinate($range[$i][0]);
665 665
 					if (isset($range[$i][1])) {
666 666
 						$range[$i][1] = PHPExcel_Cell::absoluteCoordinate($range[$i][1]);
667 667
 					}
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
 
676 676
 					// make sure tRef3d is of type tRef3dR (0x3A)
677 677
 					if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
678
-						$formulaData = "\x3A" . substr($formulaData, 1);
678
+						$formulaData = "\x3A".substr($formulaData, 1);
679 679
 					}
680 680
 
681 681
 					if ($namedRange->getLocalOnly()) {
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 					}
688 688
 					$chunk .= $this->writeData($this->_writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false));
689 689
 
690
-				} catch(Exception $e) {
690
+				} catch (Exception $e) {
691 691
 					// do nothing
692 692
 				}
693 693
 			}
@@ -810,12 +810,12 @@  discard block
 block discarded – undo
810 810
 
811 811
 		// combine the parts
812 812
 		$data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0)
813
-			. $name . $formulaData;
813
+			. $name.$formulaData;
814 814
 		$length = strlen($data);
815 815
 
816 816
 		$header = pack('vv', $record, $length);
817 817
 
818
-		return $header . $data;
818
+		return $header.$data;
819 819
 	}
820 820
 
821 821
 	/**
@@ -823,14 +823,14 @@  discard block
 block discarded – undo
823 823
 	 */
824 824
 	private function _writeCodepage()
825 825
 	{
826
-		$record          = 0x0042;             // Record identifier
827
-		$length          = 0x0002;             // Number of bytes to follow
828
-		$cv              = $this->_codepage;   // The code page
826
+		$record          = 0x0042; // Record identifier
827
+		$length          = 0x0002; // Number of bytes to follow
828
+		$cv              = $this->_codepage; // The code page
829 829
 
830 830
 		$header          = pack('vv', $record, $length);
831
-		$data            = pack('v',  $cv);
831
+		$data            = pack('v', $cv);
832 832
 
833
-		$this->_append($header . $data);
833
+		$this->_append($header.$data);
834 834
 	}
835 835
 
836 836
 	/**
@@ -838,31 +838,31 @@  discard block
 block discarded – undo
838 838
 	 */
839 839
 	private function _writeWindow1()
840 840
 	{
841
-		$record    = 0x003D;                 // Record identifier
842
-		$length    = 0x0012;                 // Number of bytes to follow
841
+		$record    = 0x003D; // Record identifier
842
+		$length    = 0x0012; // Number of bytes to follow
843 843
 
844
-		$xWn       = 0x0000;                 // Horizontal position of window
845
-		$yWn       = 0x0000;                 // Vertical position of window
846
-		$dxWn      = 0x25BC;                 // Width of window
847
-		$dyWn      = 0x1572;                 // Height of window
844
+		$xWn       = 0x0000; // Horizontal position of window
845
+		$yWn       = 0x0000; // Vertical position of window
846
+		$dxWn      = 0x25BC; // Width of window
847
+		$dyWn      = 0x1572; // Height of window
848 848
 
849
-		$grbit     = 0x0038;                 // Option flags
849
+		$grbit     = 0x0038; // Option flags
850 850
 
851 851
 		// not supported by PHPExcel, so there is only one selected sheet, the active
852
-		$ctabsel   = 1;       // Number of workbook tabs selected
852
+		$ctabsel   = 1; // Number of workbook tabs selected
853 853
 
854
-		$wTabRatio = 0x0258;                 // Tab to scrollbar ratio
854
+		$wTabRatio = 0x0258; // Tab to scrollbar ratio
855 855
 
856 856
 		// not supported by PHPExcel, set to 0
857
-		$itabFirst = 0;     // 1st displayed worksheet
858
-		$itabCur   = $this->_phpExcel->getActiveSheetIndex();    // Active worksheet
857
+		$itabFirst = 0; // 1st displayed worksheet
858
+		$itabCur   = $this->_phpExcel->getActiveSheetIndex(); // Active worksheet
859 859
 
860
-		$header    = pack("vv",        $record, $length);
860
+		$header    = pack("vv", $record, $length);
861 861
 		$data      = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn,
862 862
 									   $grbit,
863 863
 									   $itabCur, $itabFirst,
864 864
 									   $ctabsel, $wTabRatio);
865
-		$this->_append($header . $data);
865
+		$this->_append($header.$data);
866 866
 	}
867 867
 
868 868
 	/**
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
 	private function _writeBoundsheet($sheet, $offset)
875 875
 	{
876 876
 		$sheetname = $sheet->getTitle();
877
-		$record    = 0x0085;                    // Record identifier
877
+		$record    = 0x0085; // Record identifier
878 878
 
879 879
 		// sheet state
880 880
 		switch ($sheet->getSheetState()) {
@@ -887,14 +887,14 @@  discard block
 block discarded – undo
887 887
 		// sheet type
888 888
 		$st = 0x00;
889 889
 
890
-		$grbit     = 0x0000;                    // Visibility and sheet type
890
+		$grbit     = 0x0000; // Visibility and sheet type
891 891
 
892 892
 		$data      = pack("VCC", $offset, $ss, $st);
893 893
 		$data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($sheetname);
894 894
 
895 895
 		$length = strlen($data);
896
-		$header = pack("vv",  $record, $length);
897
-		$this->_append($header . $data);
896
+		$header = pack("vv", $record, $length);
897
+		$this->_append($header.$data);
898 898
 	}
899 899
 
900 900
 	/**
@@ -902,12 +902,12 @@  discard block
 block discarded – undo
902 902
 	 */
903 903
 	private function _writeSupbookInternal()
904 904
 	{
905
-		$record    = 0x01AE;   // Record identifier
906
-		$length    = 0x0004;   // Bytes to follow
905
+		$record    = 0x01AE; // Record identifier
906
+		$length    = 0x0004; // Bytes to follow
907 907
 
908 908
 		$header    = pack("vv", $record, $length);
909 909
 		$data      = pack("vv", $this->_phpExcel->getSheetCount(), 0x0401);
910
-		return $this->writeData($header . $data);
910
+		return $this->writeData($header.$data);
911 911
 	}
912 912
 
913 913
 	/**
@@ -918,16 +918,16 @@  discard block
 block discarded – undo
918 918
 	private function _writeExternsheetBiff8()
919 919
 	{
920 920
 		$total_references = count($this->_parser->_references);
921
-		$record   = 0x0017;                     // Record identifier
922
-		$length   = 2 + 6 * $total_references;  // Number of bytes to follow
921
+		$record   = 0x0017; // Record identifier
922
+		$length   = 2 + 6 * $total_references; // Number of bytes to follow
923 923
 
924
-		$supbook_index = 0;           // FIXME: only using internal SUPBOOK record
925
-		$header           = pack("vv",  $record, $length);
924
+		$supbook_index = 0; // FIXME: only using internal SUPBOOK record
925
+		$header           = pack("vv", $record, $length);
926 926
 		$data             = pack('v', $total_references);
927 927
 		for ($i = 0; $i < $total_references; ++$i) {
928 928
 			$data .= $this->_parser->_references[$i];
929 929
 		}
930
-		return $this->writeData($header . $data);
930
+		return $this->writeData($header.$data);
931 931
 	}
932 932
 
933 933
 	/**
@@ -935,16 +935,16 @@  discard block
 block discarded – undo
935 935
 	 */
936 936
 	private function _writeStyle()
937 937
 	{
938
-		$record    = 0x0293;   // Record identifier
939
-		$length    = 0x0004;   // Bytes to follow
938
+		$record    = 0x0293; // Record identifier
939
+		$length    = 0x0004; // Bytes to follow
940 940
 
941
-		$ixfe      = 0x8000;  // Index to cell style XF
942
-		$BuiltIn   = 0x00;     // Built-in style
943
-		$iLevel    = 0xff;     // Outline style level
941
+		$ixfe      = 0x8000; // Index to cell style XF
942
+		$BuiltIn   = 0x00; // Built-in style
943
+		$iLevel    = 0xff; // Outline style level
944 944
 
945
-		$header    = pack("vv",  $record, $length);
945
+		$header    = pack("vv", $record, $length);
946 946
 		$data      = pack("vCC", $ixfe, $BuiltIn, $iLevel);
947
-		$this->_append($header . $data);
947
+		$this->_append($header.$data);
948 948
 	}
949 949
 
950 950
 	/**
@@ -955,15 +955,15 @@  discard block
 block discarded – undo
955 955
 	 */
956 956
 	private function _writeNumFormat($format, $ifmt)
957 957
 	{
958
-		$record    = 0x041E;                      // Record identifier
958
+		$record    = 0x041E; // Record identifier
959 959
 
960 960
 		$numberFormatString = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($format);
961
-		$length    = 2 + strlen($numberFormatString);      // Number of bytes to follow
961
+		$length    = 2 + strlen($numberFormatString); // Number of bytes to follow
962 962
 
963 963
 
964 964
 		$header    = pack("vv", $record, $length);
965
-		$data      = pack("v", $ifmt) .  $numberFormatString;
966
-		$this->_append($header . $data);
965
+		$data      = pack("v", $ifmt).$numberFormatString;
966
+		$this->_append($header.$data);
967 967
 	}
968 968
 
969 969
 	/**
@@ -971,15 +971,15 @@  discard block
 block discarded – undo
971 971
 	 */
972 972
 	private function _writeDatemode()
973 973
 	{
974
-		$record    = 0x0022;         // Record identifier
975
-		$length    = 0x0002;         // Bytes to follow
974
+		$record    = 0x0022; // Record identifier
975
+		$length    = 0x0002; // Bytes to follow
976 976
 
977 977
 		$f1904     = (PHPExcel_Shared_Date::getExcelCalendar() == PHPExcel_Shared_Date::CALENDAR_MAC_1904) ?
978
-			1 : 0;   // Flag for 1904 date system
978
+			1 : 0; // Flag for 1904 date system
979 979
 
980 980
 		$header    = pack("vv", $record, $length);
981 981
 		$data      = pack("v", $f1904);
982
-		$this->_append($header . $data);
982
+		$this->_append($header.$data);
983 983
 	}
984 984
 
985 985
 	/**
@@ -996,12 +996,12 @@  discard block
 block discarded – undo
996 996
 	 */
997 997
 	private function _writeExterncount($cxals)
998 998
 	{
999
-		$record   = 0x0016;          // Record identifier
1000
-		$length   = 0x0002;          // Number of bytes to follow
999
+		$record   = 0x0016; // Record identifier
1000
+		$length   = 0x0002; // Number of bytes to follow
1001 1001
 
1002 1002
 		$header   = pack("vv", $record, $length);
1003
-		$data     = pack("v",  $cxals);
1004
-		$this->_append($header . $data);
1003
+		$data     = pack("v", $cxals);
1004
+		$this->_append($header.$data);
1005 1005
 	}
1006 1006
 
1007 1007
 	/**
@@ -1015,15 +1015,15 @@  discard block
 block discarded – undo
1015 1015
 	 */
1016 1016
 	private function _writeExternsheet($sheetname)
1017 1017
 	{
1018
-		$record      = 0x0017;                     // Record identifier
1019
-		$length      = 0x02 + strlen($sheetname);  // Number of bytes to follow
1018
+		$record      = 0x0017; // Record identifier
1019
+		$length      = 0x02 + strlen($sheetname); // Number of bytes to follow
1020 1020
 
1021
-		$cch         = strlen($sheetname);         // Length of sheet name
1022
-		$rgch        = 0x03;                       // Filename encoding
1021
+		$cch         = strlen($sheetname); // Length of sheet name
1022
+		$rgch        = 0x03; // Filename encoding
1023 1023
 
1024
-		$header      = pack("vv",  $record, $length);
1024
+		$header      = pack("vv", $record, $length);
1025 1025
 		$data        = pack("CC", $cch, $rgch);
1026
-		$this->_append($header . $data . $sheetname);
1026
+		$this->_append($header.$data.$sheetname);
1027 1027
 	}
1028 1028
 
1029 1029
 	/**
@@ -1039,23 +1039,23 @@  discard block
 block discarded – undo
1039 1039
 	 */
1040 1040
 	private function _writeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1041 1041
 	{
1042
-		$record          = 0x0018;       // Record identifier
1043
-		$length          = 0x0024;       // Number of bytes to follow
1044
-
1045
-		$grbit           = 0x0020;       // Option flags
1046
-		$chKey           = 0x00;         // Keyboard shortcut
1047
-		$cch             = 0x01;         // Length of text name
1048
-		$cce             = 0x0015;       // Length of text definition
1049
-		$ixals           = $index + 1;   // Sheet index
1050
-		$itab            = $ixals;       // Equal to ixals
1051
-		$cchCustMenu     = 0x00;         // Length of cust menu text
1052
-		$cchDescription  = 0x00;         // Length of description text
1053
-		$cchHelptopic    = 0x00;         // Length of help topic text
1054
-		$cchStatustext   = 0x00;         // Length of status bar text
1055
-		$rgch            = $type;        // Built-in name type
1042
+		$record          = 0x0018; // Record identifier
1043
+		$length          = 0x0024; // Number of bytes to follow
1044
+
1045
+		$grbit           = 0x0020; // Option flags
1046
+		$chKey           = 0x00; // Keyboard shortcut
1047
+		$cch             = 0x01; // Length of text name
1048
+		$cce             = 0x0015; // Length of text definition
1049
+		$ixals           = $index + 1; // Sheet index
1050
+		$itab            = $ixals; // Equal to ixals
1051
+		$cchCustMenu     = 0x00; // Length of cust menu text
1052
+		$cchDescription  = 0x00; // Length of description text
1053
+		$cchHelptopic    = 0x00; // Length of help topic text
1054
+		$cchStatustext   = 0x00; // Length of status bar text
1055
+		$rgch            = $type; // Built-in name type
1056 1056
 
1057 1057
 		$unknown03       = 0x3b;
1058
-		$unknown04       = 0xffff-$index;
1058
+		$unknown04       = 0xffff - $index;
1059 1059
 		$unknown05       = 0x0000;
1060 1060
 		$unknown06       = 0x0000;
1061 1061
 		$unknown07       = 0x1087;
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
 		$data              .= pack("v", $rowmax);
1086 1086
 		$data              .= pack("C", $colmin);
1087 1087
 		$data              .= pack("C", $colmax);
1088
-		$this->_append($header . $data);
1088
+		$this->_append($header.$data);
1089 1089
 	}
1090 1090
 
1091 1091
 	/**
@@ -1103,30 +1103,30 @@  discard block
 block discarded – undo
1103 1103
 	 */
1104 1104
 	private function _writeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1105 1105
 	{
1106
-		$record          = 0x0018;       // Record identifier
1107
-		$length          = 0x003d;       // Number of bytes to follow
1108
-		$grbit           = 0x0020;       // Option flags
1109
-		$chKey           = 0x00;         // Keyboard shortcut
1110
-		$cch             = 0x01;         // Length of text name
1111
-		$cce             = 0x002e;       // Length of text definition
1112
-		$ixals           = $index + 1;   // Sheet index
1113
-		$itab            = $ixals;       // Equal to ixals
1114
-		$cchCustMenu     = 0x00;         // Length of cust menu text
1115
-		$cchDescription  = 0x00;         // Length of description text
1116
-		$cchHelptopic    = 0x00;         // Length of help topic text
1117
-		$cchStatustext   = 0x00;         // Length of status bar text
1118
-		$rgch            = $type;        // Built-in name type
1106
+		$record          = 0x0018; // Record identifier
1107
+		$length          = 0x003d; // Number of bytes to follow
1108
+		$grbit           = 0x0020; // Option flags
1109
+		$chKey           = 0x00; // Keyboard shortcut
1110
+		$cch             = 0x01; // Length of text name
1111
+		$cce             = 0x002e; // Length of text definition
1112
+		$ixals           = $index + 1; // Sheet index
1113
+		$itab            = $ixals; // Equal to ixals
1114
+		$cchCustMenu     = 0x00; // Length of cust menu text
1115
+		$cchDescription  = 0x00; // Length of description text
1116
+		$cchHelptopic    = 0x00; // Length of help topic text
1117
+		$cchStatustext   = 0x00; // Length of status bar text
1118
+		$rgch            = $type; // Built-in name type
1119 1119
 
1120 1120
 		$unknown01       = 0x29;
1121 1121
 		$unknown02       = 0x002b;
1122 1122
 		$unknown03       = 0x3b;
1123
-		$unknown04       = 0xffff-$index;
1123
+		$unknown04       = 0xffff - $index;
1124 1124
 		$unknown05       = 0x0000;
1125 1125
 		$unknown06       = 0x0000;
1126 1126
 		$unknown07       = 0x1087;
1127 1127
 		$unknown08       = 0x8008;
1128 1128
 
1129
-		$header             = pack("vv",  $record, $length);
1129
+		$header             = pack("vv", $record, $length);
1130 1130
 		$data               = pack("v", $grbit);
1131 1131
 		$data              .= pack("C", $chKey);
1132 1132
 		$data              .= pack("C", $cch);
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
 		$data              .= pack("C", 0xff);
1169 1169
 		// End of data
1170 1170
 		$data              .= pack("C", 0x10);
1171
-		$this->_append($header . $data);
1171
+		$this->_append($header.$data);
1172 1172
 	}
1173 1173
 
1174 1174
 	/**
@@ -1178,14 +1178,14 @@  discard block
 block discarded – undo
1178 1178
 	 */
1179 1179
 	private function _writeCountry()
1180 1180
 	{
1181
-		$record          = 0x008C;    // Record identifier
1182
-		$length          = 4;         // Number of bytes to follow
1181
+		$record          = 0x008C; // Record identifier
1182
+		$length          = 4; // Number of bytes to follow
1183 1183
 
1184
-		$header = pack('vv',  $record, $length);
1184
+		$header = pack('vv', $record, $length);
1185 1185
 		/* using the same country code always for simplicity */
1186 1186
 		$data = pack('vv', $this->_country_code, $this->_country_code);
1187 1187
 		//$this->_append($header . $data);
1188
-		return $this->writeData($header . $data);
1188
+		return $this->writeData($header.$data);
1189 1189
 	}
1190 1190
 
1191 1191
 	/**
@@ -1195,15 +1195,15 @@  discard block
 block discarded – undo
1195 1195
 	 */
1196 1196
 	private function _writeRecalcId()
1197 1197
 	{
1198
-		$record = 0x01C1;    // Record identifier
1199
-		$length = 8;         // Number of bytes to follow
1198
+		$record = 0x01C1; // Record identifier
1199
+		$length = 8; // Number of bytes to follow
1200 1200
 
1201
-		$header = pack('vv',  $record, $length);
1201
+		$header = pack('vv', $record, $length);
1202 1202
 
1203 1203
 		// by inspection of real Excel files, MS Office Excel 2007 writes this
1204 1204
 		$data = pack('VV', 0x000001C1, 0x00001E667);
1205 1205
 
1206
-		return $this->writeData($header . $data);
1206
+		return $this->writeData($header.$data);
1207 1207
 	}
1208 1208
 
1209 1209
 	/**
@@ -1213,20 +1213,20 @@  discard block
 block discarded – undo
1213 1213
 	{
1214 1214
 		$aref            = $this->_palette;
1215 1215
 
1216
-		$record          = 0x0092;                 // Record identifier
1217
-		$length          = 2 + 4 * count($aref);   // Number of bytes to follow
1218
-		$ccv             =         count($aref);   // Number of RGB values to follow
1219
-		$data = '';                                // The RGB data
1216
+		$record          = 0x0092; // Record identifier
1217
+		$length          = 2 + 4 * count($aref); // Number of bytes to follow
1218
+		$ccv             = count($aref); // Number of RGB values to follow
1219
+		$data = ''; // The RGB data
1220 1220
 
1221 1221
 		// Pack the RGB data
1222 1222
 		foreach ($aref as $color) {
1223 1223
 			foreach ($color as $byte) {
1224
-				$data .= pack("C",$byte);
1224
+				$data .= pack("C", $byte);
1225 1225
 			}
1226 1226
 		}
1227 1227
 
1228
-		$header = pack("vvv",  $record, $length, $ccv);
1229
-		$this->_append($header . $data);
1228
+		$header = pack("vvv", $record, $length, $ccv);
1229
+		$this->_append($header.$data);
1230 1230
 	}
1231 1231
 
1232 1232
 	/**
@@ -1318,7 +1318,7 @@  discard block
 block discarded – undo
1318 1318
 						$effective_space_remaining = $space_remaining;
1319 1319
 
1320 1320
 						// for uncompressed strings, sometimes effective space remaining is reduced by 1
1321
-						if ( $encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1 ) {
1321
+						if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) {
1322 1322
 							--$effective_space_remaining;
1323 1323
 						}
1324 1324
 
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 			$record = ($i == 0) ? 0x00FC : 0x003C;
1349 1349
 
1350 1350
 			$header = pack("vv", $record, strlen($recordData));
1351
-			$data = $header . $recordData;
1351
+			$data = $header.$recordData;
1352 1352
 
1353 1353
 			$chunk .= $this->writeData($data);
1354 1354
 		}
@@ -1368,9 +1368,9 @@  discard block
 block discarded – undo
1368 1368
 
1369 1369
 			$record = 0x00EB;
1370 1370
 			$length = strlen($data);
1371
-			$header = pack("vv",  $record, $length);
1371
+			$header = pack("vv", $record, $length);
1372 1372
 
1373
-			return $this->writeData($header . $data);
1373
+			return $this->writeData($header.$data);
1374 1374
 
1375 1375
 		} else {
1376 1376
 			return '';
Please login to merge, or discard this patch.