From 1b01b7d1ec52f9cadb1177d650a5da08311834c3 Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Wed, 13 Sep 2023 22:45:06 -0700 Subject: [PATCH] Scrutinizer Samples/Tests (#3733) * Scrutinizer Samples/Tests A great many statements recently flagged. Attend to those in Samples and Tests. * Missed a Few * Update XlsTest.php --- samples/Basic/25_In_memory_image.php | 4 ++-- samples/Calculations/DateTime/DAYS360.php | 2 ++ samples/Calculations/DateTime/EDATE.php | 1 + samples/Calculations/DateTime/EOMONTH.php | 1 + samples/Calculations/DateTime/NETWORKDAYS.php | 2 ++ samples/Calculations/DateTime/NOW.php | 1 + samples/Calculations/DateTime/TODAY.php | 1 + samples/Calculations/DateTime/WEEKDAY.php | 2 ++ samples/Calculations/DateTime/YEARFRAC.php | 5 +++++ samples/Calculations/Engineering/BESSELI.php | 1 + samples/Calculations/Engineering/BESSELJ.php | 1 + samples/Calculations/Engineering/BESSELK.php | 1 + samples/Calculations/Engineering/BESSELY.php | 1 + samples/Calculations/Engineering/BIN2DEC.php | 1 + samples/Calculations/Engineering/BIN2HEX.php | 1 + samples/Calculations/Engineering/BIN2OCT.php | 1 + samples/Calculations/Engineering/BITAND.php | 4 ++++ samples/Calculations/Engineering/BITLSHIFT.php | 9 +++++++++ samples/Calculations/Engineering/BITOR.php | 4 ++++ samples/Calculations/Engineering/BITRSHIFT.php | 9 +++++++++ samples/Calculations/Engineering/BITXOR.php | 4 ++++ samples/Calculations/Engineering/COMPLEX.php | 1 + samples/Calculations/Engineering/CONVERT.php | 2 ++ samples/Calculations/Engineering/DEC2BIN.php | 1 + samples/Calculations/Engineering/DEC2HEX.php | 1 + samples/Calculations/Engineering/DEC2OCT.php | 1 + samples/Calculations/Engineering/DELTA.php | 2 ++ samples/Calculations/Engineering/ERF.php | 2 ++ samples/Calculations/Engineering/ERFC.php | 1 + samples/Calculations/Engineering/GESTEP.php | 2 ++ samples/Calculations/Engineering/HEX2BIN.php | 1 + samples/Calculations/Engineering/HEX2DEC.php | 1 + samples/Calculations/Engineering/HEX2OCT.php | 1 + samples/Calculations/Engineering/IMABS.php | 1 + samples/Calculations/Engineering/IMAGINARY.php | 1 + samples/Calculations/Engineering/IMARGUMENT.php | 1 + samples/Calculations/Engineering/IMCONJUGATE.php | 1 + samples/Calculations/Engineering/IMCOS.php | 1 + samples/Calculations/Engineering/IMCOSH.php | 1 + samples/Calculations/Engineering/IMCOT.php | 1 + samples/Calculations/Engineering/IMCSC.php | 1 + samples/Calculations/Engineering/IMCSCH.php | 1 + samples/Calculations/Engineering/IMDIV.php | 1 + samples/Calculations/Engineering/IMEXP.php | 1 + samples/Calculations/Engineering/IMLN.php | 1 + samples/Calculations/Engineering/IMLOG10.php | 1 + samples/Calculations/Engineering/IMLOG2.php | 1 + samples/Calculations/Engineering/IMPOWER.php | 1 + samples/Calculations/Engineering/IMPRODUCT.php | 1 + samples/Calculations/Engineering/IMREAL.php | 1 + samples/Calculations/Engineering/IMSEC.php | 1 + samples/Calculations/Engineering/IMSECH.php | 1 + samples/Calculations/Engineering/IMSIN.php | 1 + samples/Calculations/Engineering/IMSINH.php | 1 + samples/Calculations/Engineering/IMSQRT.php | 1 + samples/Calculations/Engineering/IMSUB.php | 1 + samples/Calculations/Engineering/IMSUM.php | 1 + samples/Calculations/Engineering/IMTAN.php | 1 + samples/Calculations/Engineering/OCT2BIN.php | 1 + samples/Calculations/Engineering/OCT2DEC.php | 1 + samples/Calculations/Engineering/OCT2HEX.php | 1 + samples/DefinedNames/AbsoluteNamedRange.php | 2 ++ samples/DefinedNames/NamedFormulaeAndRanges.php | 2 ++ samples/DefinedNames/RelativeNamedRange.php | 2 ++ samples/DefinedNames/RelativeNamedRange2.php | 2 ++ samples/DefinedNames/RelativeNamedRangeAsFunction.php | 2 ++ samples/DefinedNames/ScopedNamedRange.php | 2 ++ samples/DefinedNames/ScopedNamedRange2.php | 2 ++ samples/DefinedNames/SimpleNamedFormula.php | 3 +++ samples/DefinedNames/SimpleNamedRange.php | 3 +++ samples/Reader/20_Reader_worksheet_hyperlink_image.php | 2 +- .../Calculation/Functions/LookupRef/HyperlinkTest.php | 7 +++---- .../Calculation/Functions/TextData/TextSplitTest.php | 2 +- .../Functional/DrawingImageHyperlinkTest.php | 2 +- tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php | 3 ++- tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php | 2 +- .../PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php | 2 +- .../Writer/Html/MemoryDrawingOffsetTest.php | 2 +- tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php | 2 +- .../Writer/Xlsx/MemoryDrawingTest.php | 2 +- 80 files changed, 131 insertions(+), 15 deletions(-) diff --git a/samples/Basic/25_In_memory_image.php b/samples/Basic/25_In_memory_image.php index 1833e683a..b0cd8ec05 100644 --- a/samples/Basic/25_In_memory_image.php +++ b/samples/Basic/25_In_memory_image.php @@ -40,7 +40,7 @@ $helper->log('Add a drawing to the worksheet'); $drawing = new MemoryDrawing(); $drawing->setName('Sample image'); $drawing->setDescription('Sample image'); -$drawing->setImageResource($gdImage); +$drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG); $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT); $drawing->setHeight(36); @@ -56,7 +56,7 @@ $helper->log('Add a drawing to the new worksheet'); $drawing = new MemoryDrawing(); $drawing->setName('Sample image'); $drawing->setDescription('Sample image'); -$drawing->setImageResource($gdImage); +$drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction(MemoryDrawing::RENDERING_JPEG); $drawing->setMimeType(MemoryDrawing::MIMETYPE_DEFAULT); $drawing->setHeight(36); diff --git a/samples/Calculations/DateTime/DAYS360.php b/samples/Calculations/DateTime/DAYS360.php index b0e2fdbb1..0963cc620 100644 --- a/samples/Calculations/DateTime/DAYS360.php +++ b/samples/Calculations/DateTime/DAYS360.php @@ -51,7 +51,9 @@ for ($row = 1; $row <= $testDateCount; ++$row) { )); $helper->log(sprintf( 'Days: %d (US) %d (European)', + /** @scrutinizer ignore-type */ $worksheet->getCell('G' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('H' . $row)->getCalculatedValue() )); } diff --git a/samples/Calculations/DateTime/EDATE.php b/samples/Calculations/DateTime/EDATE.php index be6e4d191..d3681d4ab 100644 --- a/samples/Calculations/DateTime/EDATE.php +++ b/samples/Calculations/DateTime/EDATE.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDateCount; ++$row) { '%s and %d months is %d (%s)', $worksheet->getCell('B' . $row)->getFormattedValue(), $worksheet->getCell('C' . $row)->getFormattedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), $worksheet->getCell('D' . $row)->getFormattedValue() )); diff --git a/samples/Calculations/DateTime/EOMONTH.php b/samples/Calculations/DateTime/EOMONTH.php index e0b7568a0..3fefcbcf4 100644 --- a/samples/Calculations/DateTime/EOMONTH.php +++ b/samples/Calculations/DateTime/EOMONTH.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDateCount; ++$row) { '%s and %d months is %d (%s)', $worksheet->getCell('B' . $row)->getFormattedValue(), $worksheet->getCell('C' . $row)->getFormattedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), $worksheet->getCell('D' . $row)->getFormattedValue() )); diff --git a/samples/Calculations/DateTime/NETWORKDAYS.php b/samples/Calculations/DateTime/NETWORKDAYS.php index 585c04380..6ba302593 100644 --- a/samples/Calculations/DateTime/NETWORKDAYS.php +++ b/samples/Calculations/DateTime/NETWORKDAYS.php @@ -60,7 +60,9 @@ for ($row = 1; $row <= 12; ++$row) { 'Between %s and %s is %d working days; %d with public holidays', $worksheet->getCell('A1')->getFormattedValue(), $worksheet->getCell('B' . $row)->getFormattedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue() )); } diff --git a/samples/Calculations/DateTime/NOW.php b/samples/Calculations/DateTime/NOW.php index 858a3162b..fb0222b17 100644 --- a/samples/Calculations/DateTime/NOW.php +++ b/samples/Calculations/DateTime/NOW.php @@ -22,6 +22,7 @@ $worksheet->getStyle('A1') // Test the formulae $helper->log(sprintf( 'Today is %f (%s)', + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue(), $worksheet->getCell('A1')->getFormattedValue() )); diff --git a/samples/Calculations/DateTime/TODAY.php b/samples/Calculations/DateTime/TODAY.php index 031149d59..7f1dd0780 100644 --- a/samples/Calculations/DateTime/TODAY.php +++ b/samples/Calculations/DateTime/TODAY.php @@ -22,6 +22,7 @@ $worksheet->getStyle('A1') // Test the formulae $helper->log(sprintf( 'Today is %d (%s)', + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue(), $worksheet->getCell('A1')->getFormattedValue() )); diff --git a/samples/Calculations/DateTime/WEEKDAY.php b/samples/Calculations/DateTime/WEEKDAY.php index 7d4b4288b..7be2bbdf2 100644 --- a/samples/Calculations/DateTime/WEEKDAY.php +++ b/samples/Calculations/DateTime/WEEKDAY.php @@ -49,10 +49,12 @@ for ($row = 1; $row <= $testDateCount; ++$row) { $helper->log(sprintf('(E%d): %s', $row, $worksheet->getCell('E' . $row)->getFormattedValue())); $helper->log(sprintf( 'Weekday is: %d (1-7 = Sun-Sat)', + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue() )); $helper->log(sprintf( 'Weekday is: %d (1-7 = Mon-Sun)', + /** @scrutinizer ignore-type */ $worksheet->getCell('G' . $row)->getCalculatedValue() )); } diff --git a/samples/Calculations/DateTime/YEARFRAC.php b/samples/Calculations/DateTime/YEARFRAC.php index 81b36435d..bc8edb710 100644 --- a/samples/Calculations/DateTime/YEARFRAC.php +++ b/samples/Calculations/DateTime/YEARFRAC.php @@ -55,22 +55,27 @@ for ($row = 1; $row <= $testDateCount; ++$row) { )); $helper->log(sprintf( 'Days: %f - US (NASD) 30/360', + /** @scrutinizer ignore-type */ $worksheet->getCell('G' . $row)->getCalculatedValue() )); $helper->log(sprintf( 'Days: %f - Actual', + /** @scrutinizer ignore-type */ $worksheet->getCell('H' . $row)->getCalculatedValue() )); $helper->log(sprintf( 'Days: %f - Actual/360', + /** @scrutinizer ignore-type */ $worksheet->getCell('I' . $row)->getCalculatedValue() )); $helper->log(sprintf( 'Days: %f - Actual/365', + /** @scrutinizer ignore-type */ $worksheet->getCell('J' . $row)->getCalculatedValue() )); $helper->log(sprintf( 'Days: %f - European 30/360', + /** @scrutinizer ignore-type */ $worksheet->getCell('K' . $row)->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/BESSELI.php b/samples/Calculations/Engineering/BESSELI.php index bd5d9b715..4962dfbbd 100644 --- a/samples/Calculations/Engineering/BESSELI.php +++ b/samples/Calculations/Engineering/BESSELI.php @@ -23,6 +23,7 @@ for ($n = 0; $n <= 5; ++$n) { $helper->log(sprintf( '%s = %f', $worksheet->getCell('A1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/BESSELJ.php b/samples/Calculations/Engineering/BESSELJ.php index 3aa478868..f9a0b6a50 100644 --- a/samples/Calculations/Engineering/BESSELJ.php +++ b/samples/Calculations/Engineering/BESSELJ.php @@ -23,6 +23,7 @@ for ($n = 0; $n <= 5; ++$n) { $helper->log(sprintf( '%s = %f', $worksheet->getCell('A1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/BESSELK.php b/samples/Calculations/Engineering/BESSELK.php index ee8698e94..7f5cc20ca 100644 --- a/samples/Calculations/Engineering/BESSELK.php +++ b/samples/Calculations/Engineering/BESSELK.php @@ -23,6 +23,7 @@ for ($n = 0; $n <= 5; ++$n) { $helper->log(sprintf( '%s = %f', $worksheet->getCell('A1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/BESSELY.php b/samples/Calculations/Engineering/BESSELY.php index 750b7204b..626177218 100644 --- a/samples/Calculations/Engineering/BESSELY.php +++ b/samples/Calculations/Engineering/BESSELY.php @@ -23,6 +23,7 @@ for ($n = 0; $n <= 5; ++$n) { $helper->log(sprintf( '%s = %f', $worksheet->getCell('A1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('A1')->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/BIN2DEC.php b/samples/Calculations/Engineering/BIN2DEC.php index 0c4c45324..9117bef92 100644 --- a/samples/Calculations/Engineering/BIN2DEC.php +++ b/samples/Calculations/Engineering/BIN2DEC.php @@ -41,6 +41,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Binary %s is decimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BIN2HEX.php b/samples/Calculations/Engineering/BIN2HEX.php index 51a111997..072cf28e4 100644 --- a/samples/Calculations/Engineering/BIN2HEX.php +++ b/samples/Calculations/Engineering/BIN2HEX.php @@ -41,6 +41,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Binary %s is hexadecimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BIN2OCT.php b/samples/Calculations/Engineering/BIN2OCT.php index c320d360a..01c632531 100644 --- a/samples/Calculations/Engineering/BIN2OCT.php +++ b/samples/Calculations/Engineering/BIN2OCT.php @@ -41,6 +41,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Binary %s is octal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BITAND.php b/samples/Calculations/Engineering/BITAND.php index 2a8f7a3cc..1fa82f1a4 100644 --- a/samples/Calculations/Engineering/BITAND.php +++ b/samples/Calculations/Engineering/BITAND.php @@ -40,10 +40,14 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): Bitwise AND of %d (%s) and %d (%s) is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('E' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BITLSHIFT.php b/samples/Calculations/Engineering/BITLSHIFT.php index 872c8098d..4c8cfefd9 100644 --- a/samples/Calculations/Engineering/BITLSHIFT.php +++ b/samples/Calculations/Engineering/BITLSHIFT.php @@ -42,24 +42,33 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): Bitwise Left Shift of %d (%s) by 1 bit is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), )); $helper->log(sprintf( '(E%d): Bitwise Left Shift of %d (%s) by 2 bits is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('E' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue(), )); $helper->log(sprintf( '(E%d): Bitwise Left Shift of %d (%s) by 3 bits is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('G' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('H' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BITOR.php b/samples/Calculations/Engineering/BITOR.php index 1bf7f71d1..f8cf3f2a0 100644 --- a/samples/Calculations/Engineering/BITOR.php +++ b/samples/Calculations/Engineering/BITOR.php @@ -40,10 +40,14 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): Bitwise OR of %d (%s) and %d (%s) is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('E' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BITRSHIFT.php b/samples/Calculations/Engineering/BITRSHIFT.php index 3e7f3a88d..bc8774a88 100644 --- a/samples/Calculations/Engineering/BITRSHIFT.php +++ b/samples/Calculations/Engineering/BITRSHIFT.php @@ -40,24 +40,33 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): Bitwise Right Shift of %d (%s) by 1 bit is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), )); $helper->log(sprintf( '(E%d): Bitwise Right Shift of %d (%s) by 2 bits is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('E' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue(), )); $helper->log(sprintf( '(E%d): Bitwise Right Shift of %d (%s) by 3 bits is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('G' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('H' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/BITXOR.php b/samples/Calculations/Engineering/BITXOR.php index 482662cd7..84098b979 100644 --- a/samples/Calculations/Engineering/BITXOR.php +++ b/samples/Calculations/Engineering/BITXOR.php @@ -40,10 +40,14 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): Bitwise XOR of %d (%s) and %d (%s) is %d (%s)', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('E' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('F' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/COMPLEX.php b/samples/Calculations/Engineering/COMPLEX.php index c58a17977..bf88a2a39 100644 --- a/samples/Calculations/Engineering/COMPLEX.php +++ b/samples/Calculations/Engineering/COMPLEX.php @@ -36,6 +36,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(A%d): Formula %s result is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('A' . $row)->getCalculatedValue() )); } diff --git a/samples/Calculations/Engineering/CONVERT.php b/samples/Calculations/Engineering/CONVERT.php index bce56ba50..38fd47c9c 100644 --- a/samples/Calculations/Engineering/CONVERT.php +++ b/samples/Calculations/Engineering/CONVERT.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $worksheet->getCell('D' . $row)->getValue(), $worksheet->getCell('A' . $row)->getValue(), trim($worksheet->getCell('B' . $row)->getValue(), '"'), + /** @scrutinizer ignore-type */ $worksheet->getCell('D' . $row)->getCalculatedValue(), trim($worksheet->getCell('C' . $row)->getValue(), '"') )); @@ -54,5 +55,6 @@ $helper->log(sprintf( '(A%d): Unit of Measure Conversion Formula %s result is %s', $row, $worksheet->getCell('H1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('H1')->getCalculatedValue() )); diff --git a/samples/Calculations/Engineering/DEC2BIN.php b/samples/Calculations/Engineering/DEC2BIN.php index 2a064c061..1d7e4c86a 100644 --- a/samples/Calculations/Engineering/DEC2BIN.php +++ b/samples/Calculations/Engineering/DEC2BIN.php @@ -42,6 +42,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Decimal %s is binary %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/DEC2HEX.php b/samples/Calculations/Engineering/DEC2HEX.php index 0a19ae544..ac00996d2 100644 --- a/samples/Calculations/Engineering/DEC2HEX.php +++ b/samples/Calculations/Engineering/DEC2HEX.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Decimal %s is hexadecimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/DEC2OCT.php b/samples/Calculations/Engineering/DEC2OCT.php index fc11a832b..9eb80594b 100644 --- a/samples/Calculations/Engineering/DEC2OCT.php +++ b/samples/Calculations/Engineering/DEC2OCT.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Decimal %s is octal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/DELTA.php b/samples/Calculations/Engineering/DELTA.php index cd51b1616..579b5e6a7 100644 --- a/samples/Calculations/Engineering/DELTA.php +++ b/samples/Calculations/Engineering/DELTA.php @@ -40,7 +40,9 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), + /** @scrutinizer ignore-type */ $comparison[$worksheet->getCell('C' . $row)->getCalculatedValue()] )); } diff --git a/samples/Calculations/Engineering/ERF.php b/samples/Calculations/Engineering/ERF.php index e65058889..310db12aa 100644 --- a/samples/Calculations/Engineering/ERF.php +++ b/samples/Calculations/Engineering/ERF.php @@ -50,6 +50,7 @@ for ($row = 1; $row <= $testDataCount1; ++$row) { $row, $worksheet->getCell('C' . $row)->getValue(), $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } @@ -62,6 +63,7 @@ for ($row = $testDataCount1 + 1; $row <= $testDataCount2 + $testDataCount1; ++$r $worksheet->getCell('C' . $row)->getValue(), $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/ERFC.php b/samples/Calculations/Engineering/ERFC.php index 5e7bcc6d0..59a2cec8e 100644 --- a/samples/Calculations/Engineering/ERFC.php +++ b/samples/Calculations/Engineering/ERFC.php @@ -36,6 +36,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('C' . $row)->getValue(), $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/GESTEP.php b/samples/Calculations/Engineering/GESTEP.php index 73f0a31ce..ccc44e23a 100644 --- a/samples/Calculations/Engineering/GESTEP.php +++ b/samples/Calculations/Engineering/GESTEP.php @@ -43,8 +43,10 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), sprintf( + /** @scrutinizer ignore-type */ $comparison[$worksheet->getCell('C' . $row)->getCalculatedValue()], $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), diff --git a/samples/Calculations/Engineering/HEX2BIN.php b/samples/Calculations/Engineering/HEX2BIN.php index 2ad089256..55dfc1f51 100644 --- a/samples/Calculations/Engineering/HEX2BIN.php +++ b/samples/Calculations/Engineering/HEX2BIN.php @@ -41,6 +41,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Hexadecimal %s is binary %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/HEX2DEC.php b/samples/Calculations/Engineering/HEX2DEC.php index 745d41105..eee19de88 100644 --- a/samples/Calculations/Engineering/HEX2DEC.php +++ b/samples/Calculations/Engineering/HEX2DEC.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Hexadecimal %s is decimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/HEX2OCT.php b/samples/Calculations/Engineering/HEX2OCT.php index 3608c1bb3..e1f72cc16 100644 --- a/samples/Calculations/Engineering/HEX2OCT.php +++ b/samples/Calculations/Engineering/HEX2OCT.php @@ -41,6 +41,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Hexadecimal %s is octal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMABS.php b/samples/Calculations/Engineering/IMABS.php index 9c6b843cd..706ffac88 100644 --- a/samples/Calculations/Engineering/IMABS.php +++ b/samples/Calculations/Engineering/IMABS.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The absolute value of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMAGINARY.php b/samples/Calculations/Engineering/IMAGINARY.php index 991389385..3f5479675 100644 --- a/samples/Calculations/Engineering/IMAGINARY.php +++ b/samples/Calculations/Engineering/IMAGINARY.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The imaginary component of %s is %f', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMARGUMENT.php b/samples/Calculations/Engineering/IMARGUMENT.php index e559e9513..dabd90f61 100644 --- a/samples/Calculations/Engineering/IMARGUMENT.php +++ b/samples/Calculations/Engineering/IMARGUMENT.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Theta Argument of %s is %f radians', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCONJUGATE.php b/samples/Calculations/Engineering/IMCONJUGATE.php index 3b4429ed0..2038d58d7 100644 --- a/samples/Calculations/Engineering/IMCONJUGATE.php +++ b/samples/Calculations/Engineering/IMCONJUGATE.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Conjugate of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCOS.php b/samples/Calculations/Engineering/IMCOS.php index 5b8f81ea3..ef4ee3261 100644 --- a/samples/Calculations/Engineering/IMCOS.php +++ b/samples/Calculations/Engineering/IMCOS.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Cosine of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCOSH.php b/samples/Calculations/Engineering/IMCOSH.php index 9a3937664..e0faa0c13 100644 --- a/samples/Calculations/Engineering/IMCOSH.php +++ b/samples/Calculations/Engineering/IMCOSH.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Hyperbolic Cosine of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCOT.php b/samples/Calculations/Engineering/IMCOT.php index e3d980cd2..3aded47e0 100644 --- a/samples/Calculations/Engineering/IMCOT.php +++ b/samples/Calculations/Engineering/IMCOT.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Cotangent of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCSC.php b/samples/Calculations/Engineering/IMCSC.php index ab6695d06..4101fb6e7 100644 --- a/samples/Calculations/Engineering/IMCSC.php +++ b/samples/Calculations/Engineering/IMCSC.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Cosecant of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMCSCH.php b/samples/Calculations/Engineering/IMCSCH.php index 4513d9e94..e25878ff7 100644 --- a/samples/Calculations/Engineering/IMCSCH.php +++ b/samples/Calculations/Engineering/IMCSCH.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Hyperbolic Cosecant of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMDIV.php b/samples/Calculations/Engineering/IMDIV.php index 9512be573..e8c0292f9 100644 --- a/samples/Calculations/Engineering/IMDIV.php +++ b/samples/Calculations/Engineering/IMDIV.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMEXP.php b/samples/Calculations/Engineering/IMEXP.php index 7f5837b23..484edf20d 100644 --- a/samples/Calculations/Engineering/IMEXP.php +++ b/samples/Calculations/Engineering/IMEXP.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Exponential of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMLN.php b/samples/Calculations/Engineering/IMLN.php index 956182573..eb7afe974 100644 --- a/samples/Calculations/Engineering/IMLN.php +++ b/samples/Calculations/Engineering/IMLN.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Natural Logarithm of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMLOG10.php b/samples/Calculations/Engineering/IMLOG10.php index d501c3ded..8adba66d7 100644 --- a/samples/Calculations/Engineering/IMLOG10.php +++ b/samples/Calculations/Engineering/IMLOG10.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Base-10 Logarithm of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMLOG2.php b/samples/Calculations/Engineering/IMLOG2.php index 25986b398..311b39433 100644 --- a/samples/Calculations/Engineering/IMLOG2.php +++ b/samples/Calculations/Engineering/IMLOG2.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Base-2 Logarithm of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMPOWER.php b/samples/Calculations/Engineering/IMPOWER.php index c6674fbe9..55037b7fc 100644 --- a/samples/Calculations/Engineering/IMPOWER.php +++ b/samples/Calculations/Engineering/IMPOWER.php @@ -44,6 +44,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMPRODUCT.php b/samples/Calculations/Engineering/IMPRODUCT.php index f81bc6668..fa2c3d937 100644 --- a/samples/Calculations/Engineering/IMPRODUCT.php +++ b/samples/Calculations/Engineering/IMPRODUCT.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMREAL.php b/samples/Calculations/Engineering/IMREAL.php index 4e537c0fd..232c5c43a 100644 --- a/samples/Calculations/Engineering/IMREAL.php +++ b/samples/Calculations/Engineering/IMREAL.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The real component of %s is %f radians', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSEC.php b/samples/Calculations/Engineering/IMSEC.php index e6c524b3c..83bdc27fc 100644 --- a/samples/Calculations/Engineering/IMSEC.php +++ b/samples/Calculations/Engineering/IMSEC.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Secant of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSECH.php b/samples/Calculations/Engineering/IMSECH.php index e07b6e08e..5e156e5b5 100644 --- a/samples/Calculations/Engineering/IMSECH.php +++ b/samples/Calculations/Engineering/IMSECH.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Hyperbolic Secant of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSIN.php b/samples/Calculations/Engineering/IMSIN.php index d3b8c281d..18c17af1b 100644 --- a/samples/Calculations/Engineering/IMSIN.php +++ b/samples/Calculations/Engineering/IMSIN.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Sine of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSINH.php b/samples/Calculations/Engineering/IMSINH.php index ac0a9039b..94ef2e20e 100644 --- a/samples/Calculations/Engineering/IMSINH.php +++ b/samples/Calculations/Engineering/IMSINH.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Hyperbolic Sine of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSQRT.php b/samples/Calculations/Engineering/IMSQRT.php index c2573c919..a12b5582b 100644 --- a/samples/Calculations/Engineering/IMSQRT.php +++ b/samples/Calculations/Engineering/IMSQRT.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Square Root of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSUB.php b/samples/Calculations/Engineering/IMSUB.php index 90bd27a4f..194b7063a 100644 --- a/samples/Calculations/Engineering/IMSUB.php +++ b/samples/Calculations/Engineering/IMSUB.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMSUM.php b/samples/Calculations/Engineering/IMSUM.php index 2a8be3207..51f702a56 100644 --- a/samples/Calculations/Engineering/IMSUM.php +++ b/samples/Calculations/Engineering/IMSUM.php @@ -37,6 +37,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { $row, $worksheet->getCell('A' . $row)->getValue(), $worksheet->getCell('B' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('C' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/IMTAN.php b/samples/Calculations/Engineering/IMTAN.php index ffaa53b24..5f083a803 100644 --- a/samples/Calculations/Engineering/IMTAN.php +++ b/samples/Calculations/Engineering/IMTAN.php @@ -43,6 +43,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(E%d): The Tangent of %s is %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/OCT2BIN.php b/samples/Calculations/Engineering/OCT2BIN.php index 9c4bbf863..9c116f343 100644 --- a/samples/Calculations/Engineering/OCT2BIN.php +++ b/samples/Calculations/Engineering/OCT2BIN.php @@ -42,6 +42,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Octal %s is binary %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/OCT2DEC.php b/samples/Calculations/Engineering/OCT2DEC.php index ea6afb2fb..6b1eec9fc 100644 --- a/samples/Calculations/Engineering/OCT2DEC.php +++ b/samples/Calculations/Engineering/OCT2DEC.php @@ -44,6 +44,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Octal %s is decimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/Calculations/Engineering/OCT2HEX.php b/samples/Calculations/Engineering/OCT2HEX.php index 47e9b6e16..2407c86fa 100644 --- a/samples/Calculations/Engineering/OCT2HEX.php +++ b/samples/Calculations/Engineering/OCT2HEX.php @@ -44,6 +44,7 @@ for ($row = 1; $row <= $testDataCount; ++$row) { '(B%d): Octal %s is hexadecimal %s', $row, $worksheet->getCell('A' . $row)->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B' . $row)->getCalculatedValue(), )); } diff --git a/samples/DefinedNames/AbsoluteNamedRange.php b/samples/DefinedNames/AbsoluteNamedRange.php index 30afc00d6..492249dd1 100644 --- a/samples/DefinedNames/AbsoluteNamedRange.php +++ b/samples/DefinedNames/AbsoluteNamedRange.php @@ -46,8 +46,10 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/NamedFormulaeAndRanges.php b/samples/DefinedNames/NamedFormulaeAndRanges.php index a5ca80e70..43a5832ec 100644 --- a/samples/DefinedNames/NamedFormulaeAndRanges.php +++ b/samples/DefinedNames/NamedFormulaeAndRanges.php @@ -57,8 +57,10 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/RelativeNamedRange.php b/samples/DefinedNames/RelativeNamedRange.php index fac75a471..f6fb0968f 100644 --- a/samples/DefinedNames/RelativeNamedRange.php +++ b/samples/DefinedNames/RelativeNamedRange.php @@ -49,8 +49,10 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/RelativeNamedRange2.php b/samples/DefinedNames/RelativeNamedRange2.php index b3e957fd2..fa0e27975 100644 --- a/samples/DefinedNames/RelativeNamedRange2.php +++ b/samples/DefinedNames/RelativeNamedRange2.php @@ -52,8 +52,10 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/RelativeNamedRangeAsFunction.php b/samples/DefinedNames/RelativeNamedRangeAsFunction.php index 333d01ab0..4797615e7 100644 --- a/samples/DefinedNames/RelativeNamedRangeAsFunction.php +++ b/samples/DefinedNames/RelativeNamedRangeAsFunction.php @@ -55,8 +55,10 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/ScopedNamedRange.php b/samples/DefinedNames/ScopedNamedRange.php index aa71454df..776a8589d 100644 --- a/samples/DefinedNames/ScopedNamedRange.php +++ b/samples/DefinedNames/ScopedNamedRange.php @@ -62,10 +62,12 @@ $worksheet $helper->log(sprintf( 'Worked %.2f hours at a rate of %s - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $chargeRateCellValue = $spreadsheet ->getSheetByName($spreadsheet->getNamedRange('CHARGE_RATE')->getWorksheet()->getTitle()) ->getCell($spreadsheet->getNamedRange('CHARGE_RATE')->getCellsInRange()[0])->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); diff --git a/samples/DefinedNames/ScopedNamedRange2.php b/samples/DefinedNames/ScopedNamedRange2.php index 5f0898c91..e4ec13a5f 100644 --- a/samples/DefinedNames/ScopedNamedRange2.php +++ b/samples/DefinedNames/ScopedNamedRange2.php @@ -78,9 +78,11 @@ $worksheet foreach ($spreadsheet->getAllSheets() as $worksheet) { $helper->log(sprintf( 'Worked %.2f hours for "%s" at a rate of %.2f - Charge to the client is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell("B{$row}")->getCalculatedValue(), $worksheet->getTitle(), $worksheet->getCell('B1')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell("C{$row}")->getCalculatedValue() )); } diff --git a/samples/DefinedNames/SimpleNamedFormula.php b/samples/DefinedNames/SimpleNamedFormula.php index ea1f802da..c327f56c4 100644 --- a/samples/DefinedNames/SimpleNamedFormula.php +++ b/samples/DefinedNames/SimpleNamedFormula.php @@ -34,9 +34,12 @@ $worksheet $helper->log(sprintf( 'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell('B1')->getCalculatedValue(), $worksheet->getCell('B3')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B4')->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B5')->getCalculatedValue() )); diff --git a/samples/DefinedNames/SimpleNamedRange.php b/samples/DefinedNames/SimpleNamedRange.php index 7a7cdc94a..c725f1b1c 100644 --- a/samples/DefinedNames/SimpleNamedRange.php +++ b/samples/DefinedNames/SimpleNamedRange.php @@ -28,9 +28,12 @@ $worksheet $helper->log(sprintf( 'With a Tax Rate of %.2f and a net price of %.2f, Tax is %.2f and the gross price is %.2f', + /** @scrutinizer ignore-type */ $worksheet->getCell('B1')->getCalculatedValue(), $worksheet->getCell('B3')->getValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B4')->getCalculatedValue(), + /** @scrutinizer ignore-type */ $worksheet->getCell('B5')->getCalculatedValue() )); diff --git a/samples/Reader/20_Reader_worksheet_hyperlink_image.php b/samples/Reader/20_Reader_worksheet_hyperlink_image.php index 2b3f294a6..95a9829ed 100644 --- a/samples/Reader/20_Reader_worksheet_hyperlink_image.php +++ b/samples/Reader/20_Reader_worksheet_hyperlink_image.php @@ -25,7 +25,7 @@ $drawing = new \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing(); $drawing->setName('In-Memory image 1'); $drawing->setDescription('In-Memory image 1'); $drawing->setCoordinates('A1'); -$drawing->setImageResource($gdImage); +$drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction( \PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing::RENDERING_JPEG ); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php index 5eaf7d35e..5e8420e14 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/HyperlinkTest.php @@ -9,13 +9,12 @@ use PhpOffice\PhpSpreadsheet\Calculation\LookupRef; class HyperlinkTest extends AllSetupTeardown { - /** @var bool */ - protected $issue2464 = true; + private bool $issue2464 = true; /** * @dataProvider providerHYPERLINK */ - public function testHYPERLINK(array|string $expectedResult, ?string $linkUrl, ?string $description): void + public function testHYPERLINK(mixed $expectedResult, ?string $linkUrl, ?string $description): void { $this->mightHaveException($expectedResult); $sheet = $this->getSheet(); @@ -43,7 +42,7 @@ class HyperlinkTest extends AllSetupTeardown /** * @dataProvider providerHYPERLINK */ - public function testHYPERLINKcellRef(array|string $expectedResult, ?string $linkUrl, ?string $description): void + public function testHYPERLINKcellRef(mixed $expectedResult, ?string $linkUrl, ?string $description): void { $this->mightHaveException($expectedResult); $sheet = $this->getSheet(); diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php index 9801d77d4..985e08567 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/TextSplitTest.php @@ -14,7 +14,7 @@ class TextSplitTest extends AllSetupTeardown return '{' . $column . implode(',' . $column, range(1, count($argument))) . '}'; } - private function setDelimiterValues(Worksheet $worksheet, string $column, array|string $argument): void + private function setDelimiterValues(Worksheet $worksheet, string $column, mixed $argument): void { if (is_array($argument)) { foreach ($argument as $index => $value) { diff --git a/tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php b/tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php index 711f87e24..393af1f88 100644 --- a/tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php +++ b/tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php @@ -27,7 +27,7 @@ class DrawingImageHyperlinkTest extends AbstractFunctional $drawing->setName('In-Memory image 1'); $drawing->setDescription('In-Memory image 1'); $drawing->setCoordinates('A1'); - $drawing->setImageResource($gdImage); + $drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction( MemoryDrawing::RENDERING_JPEG ); diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php index 4cdfc06f6..78b9539e4 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xls/XlsTest.php @@ -80,8 +80,9 @@ class XlsTest extends AbstractFunctional foreach ($row->getCellIterator() as $cellx) { /** @var Cell */ $cell = $cellx; + /** @scrutinizer ignore-call */ $valOld = $cell->getFormattedValue(); - $valNew = $newsheet->getCell($cell->getCoordinate())->getFormattedValue(); + $valNew = $newsheet->getCell($cell->/** @scrutinizer ignore-call */ getCoordinate())->getFormattedValue(); self::assertEquals($valOld, $valNew); } } diff --git a/tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php b/tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php index 4ab1ca2e2..668a6b5c6 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php @@ -28,7 +28,7 @@ class DrawingTest extends TestCase $drawing->setName('In-Memory image 1'); $drawing->setDescription('In-Memory image 1'); $drawing->setCoordinates('A1'); - $drawing->setImageResource($gdImage); + $drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction( MemoryDrawing::RENDERING_JPEG ); diff --git a/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php b/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php index 307496143..313f85656 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php @@ -26,7 +26,7 @@ class MemoryDrawingTest extends TestCase $drawing->setName($name); $drawing->setDescription('In-Memory image 1'); $drawing->setCoordinates('A1'); - $drawing->setImageResource($gdImage); + $drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG); $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG); diff --git a/tests/PhpSpreadsheetTests/Writer/Html/MemoryDrawingOffsetTest.php b/tests/PhpSpreadsheetTests/Writer/Html/MemoryDrawingOffsetTest.php index ab2baea81..ac6353cf2 100644 --- a/tests/PhpSpreadsheetTests/Writer/Html/MemoryDrawingOffsetTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Html/MemoryDrawingOffsetTest.php @@ -24,7 +24,7 @@ class MemoryDrawingOffsetTest extends TestCase $image = imagecreatefromstring($image); self::assertNotFalse($image, 'unable to create image from string'); $drawing = new MemoryDrawing(); - $drawing->setImageResource($image) + $drawing->setImageResource(/** @scrutinizer ignore-type */ $image) ->setResizeProportional(false) //是否保持比例 ->setWidthAndHeight($w, $h) //图片宽高,原始尺寸 100*100 ->setOffsetX($x) diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php index 26c55a056..eb5308a9c 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/DrawingsTest.php @@ -588,7 +588,7 @@ class DrawingsTest extends AbstractFunctional $drawing->setCoordinates2('D' . ((4 * $i) + 4)); $drawing->setEditAs($mode); - $drawing->setImageResource($gdImage); + $drawing->setImageResource(/** @scrutinizer ignore-type */ $gdImage); $drawing->setRenderingFunction( MemoryDrawing::RENDERING_JPEG ); diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/MemoryDrawingTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/MemoryDrawingTest.php index 67380e1ba..885d599f3 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/MemoryDrawingTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/MemoryDrawingTest.php @@ -56,7 +56,7 @@ class MemoryDrawingTest extends AbstractFunctional if ($gdImage === false) { self::fail('unexpected failure in imagecreatefromstring'); } else { - self::assertTrue(self::checkTransparent($gdImage)); + self::assertTrue(self::checkTransparent(/** @scrutinizer ignore-type */ $gdImage)); } } else { self::fail('Unexpected drawing not in Drawing class');