diff --git a/docs/Examples/Calculations/DateTime/DATE.php b/docs/Examples/Calculations/DateTime/DATE.php
index 8fe88340..0179b7c1 100644
--- a/docs/Examples/Calculations/DateTime/DATE.php
+++ b/docs/Examples/Calculations/DateTime/DATE.php
@@ -67,12 +67,12 @@ echo '
';
';
- echo '' , $worksheet->getCell('A' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('C' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('D' . $row)->getValue() , ' | ';
- echo '' , $worksheet->getCell('D' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('E' . $row)->getFormattedValue() , ' | ';
+ echo '', $worksheet->getCell('A' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('C' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('D' . $row)->getValue(), ' | ';
+ echo '', $worksheet->getCell('D' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('E' . $row)->getFormattedValue(), ' | ';
echo '';
}
?>
diff --git a/docs/Examples/Calculations/DateTime/DATEVALUE.php b/docs/Examples/Calculations/DateTime/DATEVALUE.php
index 03468145..7b0a8556 100644
--- a/docs/Examples/Calculations/DateTime/DATEVALUE.php
+++ b/docs/Examples/Calculations/DateTime/DATEVALUE.php
@@ -62,10 +62,10 @@ echo '
';
';
- echo '' , $worksheet->getCell('A' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('C' . $row)->getFormattedValue() , ' | ';
+ echo '', $worksheet->getCell('A' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('C' . $row)->getFormattedValue(), ' | ';
echo '';
}
?>
diff --git a/docs/Examples/Calculations/DateTime/TIME.php b/docs/Examples/Calculations/DateTime/TIME.php
index d2cafb28..3fae88c2 100644
--- a/docs/Examples/Calculations/DateTime/TIME.php
+++ b/docs/Examples/Calculations/DateTime/TIME.php
@@ -65,12 +65,12 @@ echo '
';
';
- echo '' , $worksheet->getCell('A' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('C' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('D' . $row)->getValue() , ' | ';
- echo '' , $worksheet->getCell('D' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('E' . $row)->getFormattedValue() , ' | ';
+ echo '', $worksheet->getCell('A' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('C' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('D' . $row)->getValue(), ' | ';
+ echo '', $worksheet->getCell('D' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('E' . $row)->getFormattedValue(), ' | ';
echo '';
}
?>
diff --git a/docs/Examples/Calculations/DateTime/TIMEVALUE.php b/docs/Examples/Calculations/DateTime/TIMEVALUE.php
index 2ebada32..c482c374 100644
--- a/docs/Examples/Calculations/DateTime/TIMEVALUE.php
+++ b/docs/Examples/Calculations/DateTime/TIMEVALUE.php
@@ -58,10 +58,10 @@ echo '
';
';
- echo '' , $worksheet->getCell('A' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getValue() , ' | ';
- echo '' , $worksheet->getCell('B' . $row)->getFormattedValue() , ' | ';
- echo '' , $worksheet->getCell('C' . $row)->getFormattedValue() , ' | ';
+ echo '', $worksheet->getCell('A' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getValue(), ' | ';
+ echo '', $worksheet->getCell('B' . $row)->getFormattedValue(), ' | ';
+ echo '', $worksheet->getCell('C' . $row)->getFormattedValue(), ' | ';
echo '';
}
?>
diff --git a/docs/Examples/Reader/exampleReader06.php b/docs/Examples/Reader/exampleReader06.php
index e1c4ad72..70cf8e04 100644
--- a/docs/Examples/Reader/exampleReader06.php
+++ b/docs/Examples/Reader/exampleReader06.php
@@ -40,10 +40,10 @@ $spreadsheet = $reader->load($inputFileName);
echo '
';
-echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded
';
+echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded
';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
- echo $sheetIndex,' -> ',$loadedSheetName,'
';
+ echo $sheetIndex, ' -> ', $loadedSheetName, '
';
}
?>
diff --git a/docs/Examples/Reader/exampleReader12.php b/docs/Examples/Reader/exampleReader12.php
index a575bbf1..9dbbd7a0 100644
--- a/docs/Examples/Reader/exampleReader12.php
+++ b/docs/Examples/Reader/exampleReader12.php
@@ -39,7 +39,7 @@ class chunkReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
private $_endRow = 0;
- /** Set the list of rows that we want to read */
+/** Set the list of rows that we want to read */
public function setRows($startRow, $chunkSize)
{
$this->_startRow = $startRow;
@@ -73,7 +73,7 @@ $reader->setReadFilter($chunkFilter);
/* Loop to read our worksheet in "chunk size" blocks **/
for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
- echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow + $chunkSize - 1),'
';
+ echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '
';
/* Tell the Read Filter, the limits on which rows we want to read this iteration **/
$chunkFilter->setRows($startRow, $chunkSize);
/* Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/
diff --git a/docs/Examples/Reader/exampleReader13.php b/docs/Examples/Reader/exampleReader13.php
index 9daa8a63..690eebca 100644
--- a/docs/Examples/Reader/exampleReader13.php
+++ b/docs/Examples/Reader/exampleReader13.php
@@ -42,10 +42,10 @@ foreach ($inputFileNames as $sheet => $inputFileName) {
echo '
';
-echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded
';
+echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded
';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
- echo 'Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'
';
+ echo 'Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, '
';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
var_dump($sheetData);
diff --git a/docs/Examples/Reader/exampleReader14.php b/docs/Examples/Reader/exampleReader14.php
index 9ad2e17b..22d16e12 100644
--- a/docs/Examples/Reader/exampleReader14.php
+++ b/docs/Examples/Reader/exampleReader14.php
@@ -30,7 +30,7 @@ class chunkReadFilter implements \PhpOffice\PhpSpreadsheet\Reader\IReadFilter
private $_endRow = 0;
- /** Set the list of rows that we want to read */
+/** Set the list of rows that we want to read */
public function setRows($startRow, $chunkSize)
{
$this->_startRow = $startRow;
@@ -72,7 +72,7 @@ $sheet = 0;
/* Loop to read our worksheet in "chunk size" blocks **/
/** $startRow is set to 2 initially because we always read the headings in row #1 **/
for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
- echo 'Loading WorkSheet #',($sheet + 1),' using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow + $chunkSize - 1),'
';
+ echo 'Loading WorkSheet #', ($sheet + 1), ' using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '
';
/* Tell the Read Filter, the limits on which rows we want to read this iteration **/
$chunkFilter->setRows($startRow, $chunkSize);
@@ -87,10 +87,10 @@ for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
echo '
';
-echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded
';
+echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded
';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
- echo 'Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'
';
+ echo 'Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, '
';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, false, false, true);
var_dump($sheetData);
diff --git a/docs/Examples/Reader/exampleReader15.php b/docs/Examples/Reader/exampleReader15.php
index c6cbdf37..957a571f 100644
--- a/docs/Examples/Reader/exampleReader15.php
+++ b/docs/Examples/Reader/exampleReader15.php
@@ -46,7 +46,7 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '
';
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
- echo 'Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Unformatted)
';
+ echo 'Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Unformatted)
';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, false, true);
var_dump($sheetData);
@@ -56,7 +56,7 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '
';
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
- echo 'Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Raw)
';
+ echo 'Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Raw)
';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, false, false, true);
var_dump($sheetData);
diff --git a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php
index 2b940e2e..5018ea00 100644
--- a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php
+++ b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader02.php
@@ -40,7 +40,7 @@ $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();
echo 'Custom Property names:
';
foreach ($customPropertyList as $customPropertyName) {
- echo $customPropertyName,'
';
+ echo $customPropertyName, '
';
}
?>
diff --git a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php
index 148186da..6d56a3fb 100644
--- a/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php
+++ b/docs/Examples/Reading WorkBook Data/exampleWorkBookReader03.php
@@ -49,26 +49,26 @@ foreach ($customPropertyList as $customPropertyName) {
/* Manipulate properties as appropriate for display purposes **/
switch ($propertyType) {
- case 'i' : // integer
+ case 'i': // integer
$propertyType = 'integer number';
break;
- case 'f' : // float
+ case 'f': // float
$propertyType = 'floating point number';
break;
- case 's' : // string
+ case 's': // string
$propertyType = 'string';
break;
- case 'd' : // date
+ case 'd': // date
$propertyValue = date('l, d<\s\up>S\s\up> F Y g:i A', $propertyValue);
$propertyType = 'date';
break;
- case 'b' : // boolean
+ case 'b': // boolean
$propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE';
$propertyType = 'boolean';
break;
}
- echo $propertyValue,' (',$propertyType,')
';
+ echo $propertyValue, ' (', $propertyType, ')
';
}
?>
diff --git a/docs/Examples/index.php b/docs/Examples/index.php
index d9594eab..f776a26a 100644
--- a/docs/Examples/index.php
+++ b/docs/Examples/index.php
@@ -34,10 +34,10 @@ foreach ($exampleTypeList as $exampleType) {
$h1Text = $out[1];
$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
- echo '',$h1Text,'
';
+ echo '', $h1Text, '
';
if (($h2Text > '') &&
(pathinfo($exampleType, PATHINFO_BASENAME) != 'Calculations')) {
- echo $h2Text,'
';
+ echo $h2Text, '
';
}
}
}
diff --git a/samples/templates/sampleSpreadsheet.php b/samples/templates/sampleSpreadsheet.php
index 9b34add9..67bd9fd9 100644
--- a/samples/templates/sampleSpreadsheet.php
+++ b/samples/templates/sampleSpreadsheet.php
@@ -96,7 +96,7 @@ $spreadsheet->getActiveSheet()->getCell('A18')->setValue($richText);
// Merge cells
$helper->log('Merge cells');
$spreadsheet->getActiveSheet()->mergeCells('A18:E22');
-$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test...
+$spreadsheet->getActiveSheet()->mergeCells('A28:B28'); // Just to test...
$spreadsheet->getActiveSheet()->unmergeCells('A28:B28'); // Just to test...
// Protect cells
$helper->log('Protect cells');
diff --git a/src/PhpSpreadsheet/Calculation.php b/src/PhpSpreadsheet/Calculation.php
index a9f0c2ca..761121e8 100644
--- a/src/PhpSpreadsheet/Calculation.php
+++ b/src/PhpSpreadsheet/Calculation.php
@@ -3118,7 +3118,7 @@ class Calculation
// The guts of the lexical parser
// Loop through the formula extracting each operator and operand in turn
while (true) {
- $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
+ $opCharacter = $formula[$index]; // Get the first character of the value at the current index position
if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula[$index + 1]]))) {
$opCharacter .= $formula[++$index];
}