remove curly brace array access

This commit is contained in:
Dave Umrysh 2023-09-18 08:07:33 -06:00
parent 28158dd29a
commit cae4acf5b2
5 changed files with 17 additions and 17 deletions

View File

@ -250,16 +250,16 @@ class PHPExcel_Reader_Excel5_Escher
$foDelay = PHPExcel_Reader_Excel5::_GetInt4d($recordData, 28);
// offset: 32; size: 1; unused1
$unused1 = ord($recordData{32});
$unused1 = ord($recordData[32]);
// offset: 33; size: 1; size of nameData in bytes (including null terminator)
$cbName = ord($recordData{33});
$cbName = ord($recordData[33]);
// offset: 34; size: 1; unused2
$unused2 = ord($recordData{34});
$unused2 = ord($recordData[34]);
// offset: 35; size: 1; unused3
$unused3 = ord($recordData{35});
$unused3 = ord($recordData[35]);
// offset: 36; size: $cbName; nameData
$nameData = substr($recordData, 36, $cbName);
@ -301,7 +301,7 @@ class PHPExcel_Reader_Excel5_Escher
}
// offset: var; size: 1; tag
$tag = ord($recordData{$pos});
$tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data
@ -342,7 +342,7 @@ class PHPExcel_Reader_Excel5_Escher
}
// offset: var; size: 1; tag
$tag = ord($recordData{$pos});
$tag = ord($recordData[$pos]);
$pos += 1;
// offset: var; size: var; the raw image data

View File

@ -287,7 +287,7 @@ class PHPExcel_Shared_OLE
$pps = new PHPExcel_Shared_OLE_PPS_File($name);
break;
default:
continue;
break;
}
fseek($fh, 1, SEEK_CUR);
$pps->Type = $type;
@ -447,7 +447,7 @@ class PHPExcel_Shared_OLE
{
$rawname = '';
for ($i = 0; $i < strlen($ascii); ++$i) {
$rawname .= $ascii{$i} . "\x00";
$rawname .= $ascii[$i] . "\x00";
}
return $rawname;
}

View File

@ -1021,7 +1021,7 @@ class PHPExcel_Writer_Excel5_Parser
$col = 0;
$col_ref_length = strlen($col_ref);
for ($i = 0; $i < $col_ref_length; ++$i) {
$col += (ord($col_ref{$i}) - 64) * pow(26, $expn);
$col += (ord($col_ref[$i]) - 64) * pow(26, $expn);
--$expn;
}
@ -1043,21 +1043,21 @@ class PHPExcel_Writer_Excel5_Parser
$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 = '';
}
@ -1072,7 +1072,7 @@ class PHPExcel_Writer_Excel5_Parser
}
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 = '';
}
@ -1205,7 +1205,7 @@ class PHPExcel_Writer_Excel5_Parser
{
$this->_current_char = 0;
$this->_formula = $formula;
$this->_lookahead = isset($formula{1}) ? $formula{1} : '';
$this->_lookahead = isset($formula[1]) ? $formula[1] : '';
$this->_advance();
$this->_parse_tree = $this->_condition();
return true;

View File

@ -675,7 +675,7 @@ class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter
$formulaData = $this->_parser->toReversePolish();
// make sure tRef3d is of type tRef3dR (0x3A)
if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) {
if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) {
$formulaData = "\x3A" . substr($formulaData, 1);
}

View File

@ -904,7 +904,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$unknown = 0x0000; // Must be zero
// Strip the '=' or '@' sign at the beginning of the formula string
if ($formula{0} == '=') {
if ($formula[0] == '=') {
$formula = substr($formula,1);
} else {
// Error handling