Skip to content

Commit 58f64dd

Browse files
dmitryuksanmai
andcommitted
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 <[email protected]>
1 parent 19c8cce commit 58f64dd

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ php:
77
- 7.1
88
- 7.2
99
- 7.3
10+
- 7.4
1011

1112
cache:
1213
directories:

Spreadsheet/Excel/Writer/Parser.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ protected function _cellToRowcol($cell)
10911091
$col = 0;
10921092
$col_ref_length = strlen($col_ref);
10931093
for ($i = 0; $i < $col_ref_length; $i++) {
1094-
$col += (ord($col_ref{$i}) - ord('A') + 1) * pow(26, $expn);
1094+
$col += (ord($col_ref[$i]) - ord('A') + 1) * pow(26, $expn);
10951095
$expn--;
10961096
}
10971097

@@ -1113,20 +1113,20 @@ protected function _advance()
11131113
$formula_length = strlen($this->_formula);
11141114
// eat up white spaces
11151115
if ($i < $formula_length) {
1116-
while ($this->_formula{$i} == " ") {
1116+
while ($this->_formula[$i] == " ") {
11171117
$i++;
11181118
}
11191119

11201120
if ($i < ($formula_length - 1)) {
1121-
$this->_lookahead = $this->_formula{$i+1};
1121+
$this->_lookahead = $this->_formula[$i+1];
11221122
}
11231123
$token = '';
11241124
}
11251125

11261126
while ($i < $formula_length) {
1127-
$token .= $this->_formula{$i};
1127+
$token .= $this->_formula[$i];
11281128
if ($i < ($formula_length - 1)) {
1129-
$this->_lookahead = $this->_formula{$i+1};
1129+
$this->_lookahead = $this->_formula[$i+1];
11301130
} else {
11311131
$this->_lookahead = '';
11321132
}
@@ -1141,7 +1141,7 @@ protected function _advance()
11411141
}
11421142

11431143
if ($i < ($formula_length - 2)) {
1144-
$this->_lookahead = $this->_formula{$i+2};
1144+
$this->_lookahead = $this->_formula[$i+2];
11451145
} else { // if we run out of characters _lookahead becomes empty
11461146
$this->_lookahead = '';
11471147
}
@@ -1292,7 +1292,7 @@ public function parse($formula)
12921292
{
12931293
$this->_current_char = 0;
12941294
$this->_formula = $formula;
1295-
$this->_lookahead = $formula{1};
1295+
$this->_lookahead = $formula[1];
12961296
$this->_advance();
12971297
$this->_parse_tree = $this->_condition();
12981298
if (PEAR::isError($this->_parse_tree)) {

Spreadsheet/Excel/Writer/Workbook.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,6 @@ protected function _calculateSharedStringsSizes()
14501450
they must be written before the SST records
14511451
*/
14521452

1453-
$tmp_block_sizes = array();
14541453
$tmp_block_sizes = $this->_block_sizes;
14551454

14561455
$length = 12;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"require": {
5353
"pear/pear-core-minimal": "^1.10",
5454
"pear/ole": ">=1.0.0RC4",
55-
"php": ">=5.3.3 <7.4"
55+
"php": ">=5.3.3 <7.5"
5656
},
5757
"require-dev": {
5858
"phpunit/phpunit": "<6.0"

0 commit comments

Comments
 (0)