php7.4 curved brackets deprecation (#20)

* php7.4 curved brackets deprecation

* travis 7.4 support

* change php 8.0 to 7.5

Co-Authored-By: Alexey Kopytko <alexey@kopytko.com>
This commit is contained in:
Alexander Dmitryuk 2019-12-13 12:30:32 +07:00 committed by Alexey Kopytko
parent 19c8cce3e0
commit 58f64dd649
4 changed files with 9 additions and 9 deletions

View File

@ -7,6 +7,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4
cache:
directories:

View File

@ -1091,7 +1091,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$col = 0;
$col_ref_length = strlen($col_ref);
for ($i = 0; $i < $col_ref_length; $i++) {
$col += (ord($col_ref{$i}) - ord('A') + 1) * pow(26, $expn);
$col += (ord($col_ref[$i]) - ord('A') + 1) * pow(26, $expn);
$expn--;
}
@ -1113,20 +1113,20 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
$formula_length = strlen($this->_formula);
// eat up white spaces
if ($i < $formula_length) {
while ($this->_formula{$i} == " ") {
while ($this->_formula[$i] == " ") {
$i++;
}
if ($i < ($formula_length - 1)) {
$this->_lookahead = $this->_formula{$i+1};
$this->_lookahead = $this->_formula[$i+1];
}
$token = '';
}
while ($i < $formula_length) {
$token .= $this->_formula{$i};
$token .= $this->_formula[$i];
if ($i < ($formula_length - 1)) {
$this->_lookahead = $this->_formula{$i+1};
$this->_lookahead = $this->_formula[$i+1];
} else {
$this->_lookahead = '';
}
@ -1141,7 +1141,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
}
if ($i < ($formula_length - 2)) {
$this->_lookahead = $this->_formula{$i+2};
$this->_lookahead = $this->_formula[$i+2];
} else { // if we run out of characters _lookahead becomes empty
$this->_lookahead = '';
}
@ -1292,7 +1292,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
{
$this->_current_char = 0;
$this->_formula = $formula;
$this->_lookahead = $formula{1};
$this->_lookahead = $formula[1];
$this->_advance();
$this->_parse_tree = $this->_condition();
if (PEAR::isError($this->_parse_tree)) {

View File

@ -1450,7 +1450,6 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
they must be written before the SST records
*/
$tmp_block_sizes = array();
$tmp_block_sizes = $this->_block_sizes;
$length = 12;

View File

@ -52,7 +52,7 @@
"require": {
"pear/pear-core-minimal": "^1.10",
"pear/ole": ">=1.0.0RC4",
"php": ">=5.3.3 <7.4"
"php": ">=5.3.3 <7.5"
},
"require-dev": {
"phpunit/phpunit": "<6.0"