Apply Scrutinzer patches for spacing

This commit is contained in:
Adrien Crivelli 2017-01-05 12:14:44 +09:00
parent c8a69dfb54
commit e9d03cc6d3
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
14 changed files with 43 additions and 43 deletions

View File

@ -67,12 +67,12 @@ echo '<hr />';
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('D' . $row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('D' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('E' . $row)->getFormattedValue() , '</td>';
echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
echo '</tr>';
}
?>

View File

@ -62,10 +62,10 @@ echo '<hr />';
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C' . $row)->getFormattedValue() , '</td>';
echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
echo '</tr>';
}
?>

View File

@ -65,12 +65,12 @@ echo '<hr />';
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('D' . $row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('D' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('E' . $row)->getFormattedValue() , '</td>';
echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
echo '</tr>';
}
?>

View File

@ -58,10 +58,10 @@ echo '<hr />';
<?php
for ($row = 1; $row <= $testDateCount; ++$row) {
echo '<tr>';
echo '<td>' , $worksheet->getCell('A' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getValue() , '</td>';
echo '<td>' , $worksheet->getCell('B' . $row)->getFormattedValue() , '</td>';
echo '<td>' , $worksheet->getCell('C' . $row)->getFormattedValue() , '</td>';
echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
echo '</tr>';
}
?>

View File

@ -40,10 +40,10 @@ $spreadsheet = $reader->load($inputFileName);
echo '<hr />';
echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
}
?>

View File

@ -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),'<br />';
echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '<br />';
/* 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 **/

View File

@ -42,10 +42,10 @@ foreach ($inputFileNames as $sheet => $inputFileName) {
echo '<hr />';
echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />';
echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, '</b><br />';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
var_dump($sheetData);

View File

@ -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),'<br />';
echo 'Loading WorkSheet #', ($sheet + 1), ' using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '<br />';
/* 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 '<hr />';
echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
$loadedSheetNames = $spreadsheet->getSheetNames();
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />';
echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, '</b><br />';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, false, false, true);
var_dump($sheetData);

View File

@ -46,7 +46,7 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<hr />';
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Unformatted)</b><br />';
echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Unformatted)</b><br />';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, false, true);
var_dump($sheetData);
@ -56,7 +56,7 @@ foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<hr />';
foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Raw)</b><br />';
echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, ' (Raw)</b><br />';
$spreadsheet->setActiveSheetIndexByName($loadedSheetName);
$sheetData = $spreadsheet->getActiveSheet()->toArray(null, false, false, true);
var_dump($sheetData);

View File

@ -40,7 +40,7 @@ $customPropertyList = $spreadsheet->getProperties()->getCustomProperties();
echo '<b>Custom Property names: </b><br />';
foreach ($customPropertyList as $customPropertyName) {
echo $customPropertyName,'<br />';
echo $customPropertyName, '<br />';
}
?>

View File

@ -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,')<br />';
echo $propertyValue, ' (', $propertyType, ')<br />';
}
?>

View File

@ -34,10 +34,10 @@ foreach ($exampleTypeList as $exampleType) {
$h1Text = $out[1];
$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />';
if (($h2Text > '') &&
(pathinfo($exampleType, PATHINFO_BASENAME) != 'Calculations')) {
echo $h2Text,'<br />';
echo $h2Text, '<br />';
}
}
}

View File

@ -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');

View File

@ -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];
}