@@ -109,11 +109,11 @@ discard block |
||
109 | 109 | return true; |
110 | 110 | } |
111 | 111 | // Check if the requested entry still exists in apc |
112 | - $success = apc_fetch($this->cachePrefix.$pCoord.'.cache'); |
|
112 | + $success = apc_fetch($this->cachePrefix . $pCoord . '.cache'); |
|
113 | 113 | if ($success === false) { |
114 | 114 | // Entry no longer exists in APC, so clear it from the cache array |
115 | 115 | parent::deleteCacheData($pCoord); |
116 | - throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in APC cache'); |
|
116 | + throw new \PHPExcel\Exception('Cell entry ' . $pCoord . ' no longer exists in APC cache'); |
|
117 | 117 | } |
118 | 118 | return true; |
119 | 119 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | if ($obj === false) { |
142 | 142 | // Entry no longer exists in APC, so clear it from the cache array |
143 | 143 | parent::deleteCacheData($pCoord); |
144 | - throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in APC cache'); |
|
144 | + throw new \PHPExcel\Exception('Cell entry ' . $pCoord . ' no longer exists in APC cache'); |
|
145 | 145 | } |
146 | 146 | } else { |
147 | 147 | // Return null if requested entry doesn't exist in cache |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | public function deleteCacheData($pCoord) |
183 | 183 | { |
184 | 184 | // Delete the entry from APC |
185 | - apc_delete($this->cachePrefix.$pCoord.'.cache'); |
|
185 | + apc_delete($this->cachePrefix . $pCoord . '.cache'); |
|
186 | 186 | |
187 | 187 | // Delete the entry from our cell address array |
188 | 188 | parent::deleteCacheData($pCoord); |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | return true; |
114 | 114 | } |
115 | 115 | // Check if the requested entry still exists in Memcache |
116 | - $success = $this->memcache->get($this->cachePrefix.$pCoord.'.cache'); |
|
116 | + $success = $this->memcache->get($this->cachePrefix . $pCoord . '.cache'); |
|
117 | 117 | if ($success === false) { |
118 | 118 | // Entry no longer exists in Memcache, so clear it from the cache array |
119 | 119 | parent::deleteCacheData($pCoord); |
120 | - throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); |
|
120 | + throw new \PHPExcel\Exception('Cell entry ' . $pCoord . ' no longer exists in MemCache'); |
|
121 | 121 | } |
122 | 122 | return true; |
123 | 123 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $cacheList = $this->getCellList(); |
207 | 207 | foreach ($cacheList as $cellID) { |
208 | 208 | if ($cellID != $this->currentObjectID) { |
209 | - $obj = $this->memcache->get($this->cachePrefix.$cellID.'.cache'); |
|
209 | + $obj = $this->memcache->get($this->cachePrefix . $cellID . '.cache'); |
|
210 | 210 | if ($obj === false) { |
211 | 211 | // Entry no longer exists in Memcache, so clear it from the cache array |
212 | 212 | parent::deleteCacheData($cellID); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | { |
290 | 290 | $cacheList = $this->getCellList(); |
291 | 291 | foreach ($cacheList as $cellID) { |
292 | - $this->memcache->delete($this->cachePrefix.$cellID . '.cache'); |
|
292 | + $this->memcache->delete($this->cachePrefix . $cellID . '.cache'); |
|
293 | 293 | } |
294 | 294 | } |
295 | 295 |
@@ -196,7 +196,7 @@ |
||
196 | 196 | foreach ($this->getCellList() as $coord) { |
197 | 197 | sscanf($coord, '%[A-Z]%d', $c, $r); |
198 | 198 | $row[$r] = $r; |
199 | - $col[$c] = strlen($c).$c; |
|
199 | + $col[$c] = strlen($c) . $c; |
|
200 | 200 | } |
201 | 201 | if (!empty($row)) { |
202 | 202 | // Determine highest column and row |
@@ -57,15 +57,15 @@ discard block |
||
57 | 57 | $this->currentObject->detach(); |
58 | 58 | |
59 | 59 | $obj = serialize($this->currentObject); |
60 | - if (wincache_ucache_exists($this->cachePrefix.$this->currentObjectID.'.cache')) { |
|
61 | - if (!wincache_ucache_set($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) { |
|
60 | + if (wincache_ucache_exists($this->cachePrefix . $this->currentObjectID . '.cache')) { |
|
61 | + if (!wincache_ucache_set($this->cachePrefix . $this->currentObjectID . '.cache', $obj, $this->cacheTime)) { |
|
62 | 62 | $this->__destruct(); |
63 | - throw new \PHPExcel\Exception('Failed to store cell '.$this->currentObjectID.' in WinCache'); |
|
63 | + throw new \PHPExcel\Exception('Failed to store cell ' . $this->currentObjectID . ' in WinCache'); |
|
64 | 64 | } |
65 | 65 | } else { |
66 | - if (!wincache_ucache_add($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) { |
|
66 | + if (!wincache_ucache_add($this->cachePrefix . $this->currentObjectID . '.cache', $obj, $this->cacheTime)) { |
|
67 | 67 | $this->__destruct(); |
68 | - throw new \PHPExcel\Exception('Failed to store cell '.$this->currentObjectID.' in WinCache'); |
|
68 | + throw new \PHPExcel\Exception('Failed to store cell ' . $this->currentObjectID . ' in WinCache'); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | $this->currentCellIsDirty = false; |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | return true; |
112 | 112 | } |
113 | 113 | // Check if the requested entry still exists in cache |
114 | - $success = wincache_ucache_exists($this->cachePrefix.$pCoord.'.cache'); |
|
114 | + $success = wincache_ucache_exists($this->cachePrefix . $pCoord . '.cache'); |
|
115 | 115 | if ($success === false) { |
116 | 116 | // Entry no longer exists in Wincache, so clear it from the cache array |
117 | 117 | parent::deleteCacheData($pCoord); |
118 | - throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); |
|
118 | + throw new \PHPExcel\Exception('Cell entry ' . $pCoord . ' no longer exists in WinCache'); |
|
119 | 119 | } |
120 | 120 | return true; |
121 | 121 | } |
@@ -141,11 +141,11 @@ discard block |
||
141 | 141 | $obj = null; |
142 | 142 | if (parent::isDataSet($pCoord)) { |
143 | 143 | $success = false; |
144 | - $obj = wincache_ucache_get($this->cachePrefix.$pCoord.'.cache', $success); |
|
144 | + $obj = wincache_ucache_get($this->cachePrefix . $pCoord . '.cache', $success); |
|
145 | 145 | if ($success === false) { |
146 | 146 | // Entry no longer exists in WinCache, so clear it from the cache array |
147 | 147 | parent::deleteCacheData($pCoord); |
148 | - throw new \PHPExcel\Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); |
|
148 | + throw new \PHPExcel\Exception('Cell entry ' . $pCoord . ' no longer exists in WinCache'); |
|
149 | 149 | } |
150 | 150 | } else { |
151 | 151 | // Return null if requested entry doesn't exist in cache |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | public function deleteCacheData($pCoord) |
187 | 187 | { |
188 | 188 | // Delete the entry from Wincache |
189 | - wincache_ucache_delete($this->cachePrefix.$pCoord.'.cache'); |
|
189 | + wincache_ucache_delete($this->cachePrefix . $pCoord . '.cache'); |
|
190 | 190 | |
191 | 191 | // Delete the entry from our cell address array |
192 | 192 | parent::deleteCacheData($pCoord); |
@@ -208,15 +208,15 @@ discard block |
||
208 | 208 | foreach ($cacheList as $cellID) { |
209 | 209 | if ($cellID != $this->currentObjectID) { |
210 | 210 | $success = false; |
211 | - $obj = wincache_ucache_get($this->cachePrefix.$cellID.'.cache', $success); |
|
211 | + $obj = wincache_ucache_get($this->cachePrefix . $cellID . '.cache', $success); |
|
212 | 212 | if ($success === false) { |
213 | 213 | // Entry no longer exists in WinCache, so clear it from the cache array |
214 | 214 | parent::deleteCacheData($cellID); |
215 | - throw new \PHPExcel\Exception('Cell entry '.$cellID.' no longer exists in Wincache'); |
|
215 | + throw new \PHPExcel\Exception('Cell entry ' . $cellID . ' no longer exists in Wincache'); |
|
216 | 216 | } |
217 | - if (!wincache_ucache_add($newCachePrefix.$cellID.'.cache', $obj, $this->cacheTime)) { |
|
217 | + if (!wincache_ucache_add($newCachePrefix . $cellID . '.cache', $obj, $this->cacheTime)) { |
|
218 | 218 | $this->__destruct(); |
219 | - throw new \PHPExcel\Exception('Failed to store cell '.$cellID.' in Wincache'); |
|
219 | + throw new \PHPExcel\Exception('Failed to store cell ' . $cellID . ' in Wincache'); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
@@ -253,11 +253,11 @@ discard block |
||
253 | 253 | */ |
254 | 254 | public function __construct(\PHPExcel\Worksheet $parent, $arguments) |
255 | 255 | { |
256 | - $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600; |
|
256 | + $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600; |
|
257 | 257 | |
258 | 258 | if (is_null($this->cachePrefix)) { |
259 | 259 | $baseUnique = $this->getUniqueID(); |
260 | - $this->cachePrefix = substr(md5($baseUnique), 0, 8).'.'; |
|
260 | + $this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.'; |
|
261 | 261 | $this->cacheTime = $cacheTime; |
262 | 262 | |
263 | 263 | parent::__construct($parent); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | { |
272 | 272 | $cacheList = $this->getCellList(); |
273 | 273 | foreach ($cacheList as $cellID) { |
274 | - wincache_ucache_delete($this->cachePrefix.$cellID.'.cache'); |
|
274 | + wincache_ucache_delete($this->cachePrefix . $cellID . '.cache'); |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | parent::copyCellCollection($parent); |
150 | 150 | // Get a new id for the new file name |
151 | 151 | $baseUnique = $this->getUniqueID(); |
152 | - $newFileName = $this->cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache'; |
|
152 | + $newFileName = $this->cacheDirectory . '/PHPExcel.' . $baseUnique . '.cache'; |
|
153 | 153 | // Copy the existing cell cache file |
154 | 154 | copy($this->fileName, $newFileName); |
155 | 155 | $this->fileName = $newFileName; |
@@ -184,14 +184,14 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function __construct(\PHPExcel\Worksheet $parent, $arguments) |
186 | 186 | { |
187 | - $this->cacheDirectory = ((isset($arguments['dir'])) && ($arguments['dir'] !== null)) |
|
187 | + $this->cacheDirectory = ((isset($arguments['dir'])) && ($arguments['dir'] !== null)) |
|
188 | 188 | ? $arguments['dir'] |
189 | 189 | : \PHPExcel\Shared\File::sysGetTempDir(); |
190 | 190 | |
191 | 191 | parent::__construct($parent); |
192 | 192 | if (is_null($this->fileHandle)) { |
193 | 193 | $baseUnique = $this->getUniqueID(); |
194 | - $this->fileName = $this->cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache'; |
|
194 | + $this->fileName = $this->cacheDirectory . '/PHPExcel.' . $baseUnique . '.cache'; |
|
195 | 195 | $this->fileHandle = fopen($this->fileName, 'a+'); |
196 | 196 | } |
197 | 197 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($this->currentCellIsDirty && !empty($this->currentObjectID)) { |
55 | 55 | $this->currentObject->detach(); |
56 | 56 | |
57 | - if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES('".$this->currentObjectID."','".sqlite_escape_string(serialize($this->currentObject))."')")) { |
|
57 | + if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_" . $this->TableName . " VALUES('" . $this->currentObjectID . "','" . sqlite_escape_string(serialize($this->currentObject)) . "')")) { |
|
58 | 58 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
59 | 59 | } |
60 | 60 | $this->currentCellIsDirty = false; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | $this->storeData(); |
99 | 99 | |
100 | - $query = "SELECT value FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; |
|
100 | + $query = "SELECT value FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'"; |
|
101 | 101 | $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC); |
102 | 102 | if ($cellResultSet === false) { |
103 | 103 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | // Check if the requested entry exists in the cache |
135 | - $query = "SELECT id FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; |
|
135 | + $query = "SELECT id FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'"; |
|
136 | 136 | $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC); |
137 | 137 | if ($cellResultSet === false) { |
138 | 138 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | // Check if the requested entry exists in the cache |
160 | - $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; |
|
160 | + $query = "DELETE FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'"; |
|
161 | 161 | if (!$this->DBHandle->queryExec($query)) { |
162 | 162 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
163 | 163 | } |
@@ -179,13 +179,13 @@ discard block |
||
179 | 179 | $this->currentObjectID = $toAddress; |
180 | 180 | } |
181 | 181 | |
182 | - $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$toAddress."'"; |
|
182 | + $query = "DELETE FROM kvp_" . $this->TableName . " WHERE id='" . $toAddress . "'"; |
|
183 | 183 | $result = $this->DBHandle->exec($query); |
184 | 184 | if ($result === false) { |
185 | 185 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
186 | 186 | } |
187 | 187 | |
188 | - $query = "UPDATE kvp_".$this->TableName." SET id='".$toAddress."' WHERE id='".$fromAddress."'"; |
|
188 | + $query = "UPDATE kvp_" . $this->TableName . " SET id='" . $toAddress . "' WHERE id='" . $fromAddress . "'"; |
|
189 | 189 | $result = $this->DBHandle->exec($query); |
190 | 190 | if ($result === false) { |
191 | 191 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $this->storeData(); |
207 | 207 | } |
208 | 208 | |
209 | - $query = "SELECT id FROM kvp_".$this->TableName; |
|
209 | + $query = "SELECT id FROM kvp_" . $this->TableName; |
|
210 | 210 | $cellIdsResult = $this->DBHandle->unbufferedQuery($query, SQLITE_ASSOC); |
211 | 211 | if ($cellIdsResult === false) { |
212 | 212 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | // Get a new id for the new table name |
235 | 235 | $tableName = str_replace('.', '_', $this->getUniqueID()); |
236 | - if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) |
|
236 | + if (!$this->DBHandle->queryExec('CREATE TABLE kvp_' . $tableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB) |
|
237 | 237 | AS SELECT * FROM kvp_'.$this->TableName) |
238 | 238 | ) { |
239 | 239 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | if ($this->DBHandle === false) { |
279 | 279 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
280 | 280 | } |
281 | - if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { |
|
281 | + if (!$this->DBHandle->queryExec('CREATE TABLE kvp_' . $this->TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { |
|
282 | 282 | throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError())); |
283 | 283 | } |
284 | 284 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | public function __destruct() |
291 | 291 | { |
292 | 292 | if (!is_null($this->DBHandle)) { |
293 | - $this->DBHandle->queryExec('DROP TABLE kvp_'.$this->TableName); |
|
293 | + $this->DBHandle->queryExec('DROP TABLE kvp_' . $this->TableName); |
|
294 | 294 | } |
295 | 295 | $this->DBHandle = null; |
296 | 296 | } |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $this->storeData(); |
241 | 241 | } |
242 | 242 | |
243 | - $query = "SELECT id FROM kvp_".$this->TableName; |
|
243 | + $query = "SELECT id FROM kvp_" . $this->TableName; |
|
244 | 244 | $cellIdsResult = $this->DBHandle->query($query); |
245 | 245 | if ($cellIdsResult === false) { |
246 | 246 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | // Get a new id for the new table name |
269 | 269 | $tableName = str_replace('.', '_', $this->getUniqueID()); |
270 | - if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) |
|
270 | + if (!$this->DBHandle->exec('CREATE TABLE kvp_' . $tableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB) |
|
271 | 271 | AS SELECT * FROM kvp_'.$this->TableName) |
272 | 272 | ) { |
273 | 273 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
@@ -312,15 +312,15 @@ discard block |
||
312 | 312 | if ($this->DBHandle === false) { |
313 | 313 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
314 | 314 | } |
315 | - if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { |
|
315 | + if (!$this->DBHandle->exec('CREATE TABLE kvp_' . $this->TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { |
|
316 | 316 | throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg()); |
317 | 317 | } |
318 | 318 | } |
319 | 319 | |
320 | - $this->selectQuery = $this->DBHandle->prepare("SELECT value FROM kvp_".$this->TableName." WHERE id = :id"); |
|
321 | - $this->insertQuery = $this->DBHandle->prepare("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES(:id,:data)"); |
|
322 | - $this->updateQuery = $this->DBHandle->prepare("UPDATE kvp_".$this->TableName." SET id=:toId WHERE id=:fromId"); |
|
323 | - $this->deleteQuery = $this->DBHandle->prepare("DELETE FROM kvp_".$this->TableName." WHERE id = :id"); |
|
320 | + $this->selectQuery = $this->DBHandle->prepare("SELECT value FROM kvp_" . $this->TableName . " WHERE id = :id"); |
|
321 | + $this->insertQuery = $this->DBHandle->prepare("INSERT OR REPLACE INTO kvp_" . $this->TableName . " VALUES(:id,:data)"); |
|
322 | + $this->updateQuery = $this->DBHandle->prepare("UPDATE kvp_" . $this->TableName . " SET id=:toId WHERE id=:fromId"); |
|
323 | + $this->deleteQuery = $this->DBHandle->prepare("DELETE FROM kvp_" . $this->TableName . " WHERE id = :id"); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | public function __destruct() |
330 | 330 | { |
331 | 331 | if (!is_null($this->DBHandle)) { |
332 | - $this->DBHandle->exec('DROP TABLE kvp_'.$this->TableName); |
|
332 | + $this->DBHandle->exec('DROP TABLE kvp_' . $this->TableName); |
|
333 | 333 | $this->DBHandle->close(); |
334 | 334 | } |
335 | 335 | $this->DBHandle = null; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | // Check for number in scientific format |
61 | - if (preg_match('/^'.\PHPExcel\Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) { |
|
61 | + if (preg_match('/^' . \PHPExcel\Calculation::CALCULATION_REGEXP_NUMBER . '$/', $value)) { |
|
62 | 62 | $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); |
63 | 63 | return true; |
64 | 64 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $currencyCode = \PHPExcel\Shared\StringHelper::getCurrencyCode(); |
104 | 104 | $decimalSeparator = \PHPExcel\Shared\StringHelper::getDecimalSeparator(); |
105 | 105 | $thousandsSeparator = \PHPExcel\Shared\StringHelper::getThousandsSeparator(); |
106 | - if (preg_match('/^'.preg_quote($currencyCode).' *(\d{1,3}('.preg_quote($thousandsSeparator).'\d{3})*|(\d+))('.preg_quote($decimalSeparator).'\d{2})?$/', $value)) { |
|
106 | + if (preg_match('/^' . preg_quote($currencyCode) . ' *(\d{1,3}(' . preg_quote($thousandsSeparator) . '\d{3})*|(\d+))(' . preg_quote($decimalSeparator) . '\d{2})?$/', $value)) { |
|
107 | 107 | // Convert value to number |
108 | 108 | $value = (float) trim(str_replace(array($currencyCode, $thousandsSeparator, $decimalSeparator), array('', '', '.'), $value)); |
109 | 109 | $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | return true; |
116 | 116 | } elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) { |
117 | 117 | // Convert value to number |
118 | - $value = (float) trim(str_replace(array('$',','), '', $value)); |
|
118 | + $value = (float) trim(str_replace(array('$', ','), '', $value)); |
|
119 | 119 | $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); |
120 | 120 | // Set style |
121 | 121 | $cell->getWorksheet()->getStyle($cell->getCoordinate()) |
@@ -63,7 +63,7 @@ |
||
63 | 63 | 0x3F => '333333', |
64 | 64 | ); |
65 | 65 | |
66 | - /** |
|
66 | + /** |
|
67 | 67 | * Map color array from BIFF8 built-in color index |
68 | 68 | * |
69 | 69 | * @param int $color |