From e5a1ba1fa9045a0de22bbf69bbbee59bbfc1911d Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sat, 9 Dec 2023 23:29:45 +0100 Subject: [PATCH] Apply PhpCsFixer `phpdoc_to_property_type` --- infra/LocaleGenerator.php | 25 +- phpstan-baseline.neon | 972 +++++++++++++++++- .../Calculation/ArrayEnabled.php | 5 +- .../Calculation/Calculation.php | 88 +- .../Engine/ArrayArgumentHelper.php | 33 +- .../Engine/ArrayArgumentProcessor.php | 5 +- .../Calculation/Engine/BranchPruner.php | 21 +- .../Engine/CyclicReferenceStack.php | 2 +- .../Calculation/Engine/Logger.php | 2 +- .../Calculation/Engineering/ConvertUOM.php | 8 +- .../Calculation/Financial/Depreciation.php | 3 +- .../Calculation/FormulaParser.php | 2 +- .../Calculation/FormulaToken.php | 12 +- src/PhpSpreadsheet/Calculation/Functions.php | 8 +- .../Calculation/Information/ExcelError.php | 2 +- .../Statistical/Distributions/Beta.php | 10 +- .../Statistical/Distributions/GammaBase.php | 7 +- .../Calculation/Token/Stack.php | 6 +- src/PhpSpreadsheet/Cell/Cell.php | 15 +- src/PhpSpreadsheet/Cell/CellRange.php | 12 +- src/PhpSpreadsheet/Cell/DataType.php | 2 +- src/PhpSpreadsheet/Cell/DataValidation.php | 44 +- src/PhpSpreadsheet/Cell/Hyperlink.php | 8 +- src/PhpSpreadsheet/Cell/IgnoredErrors.php | 12 +- src/PhpSpreadsheet/Cell/StringValueBinder.php | 20 +- src/PhpSpreadsheet/Chart/Axis.php | 5 +- src/PhpSpreadsheet/Chart/Chart.php | 44 +- src/PhpSpreadsheet/Chart/DataSeries.php | 41 +- src/PhpSpreadsheet/Chart/DataSeriesValues.php | 72 +- src/PhpSpreadsheet/Chart/Legend.php | 8 +- src/PhpSpreadsheet/Chart/PlotArea.php | 12 +- src/PhpSpreadsheet/Chart/Properties.php | 14 +- src/PhpSpreadsheet/Chart/Title.php | 4 +- src/PhpSpreadsheet/Chart/TrendLine.php | 21 +- src/PhpSpreadsheet/Collection/Cells.php | 18 +- .../Collection/Memory/SimpleCache1.php | 2 +- .../Collection/Memory/SimpleCache3.php | 2 +- src/PhpSpreadsheet/Comment.php | 4 +- src/PhpSpreadsheet/Document/Properties.php | 2 +- src/PhpSpreadsheet/Document/Security.php | 12 +- src/PhpSpreadsheet/HashTable.php | 4 +- src/PhpSpreadsheet/Helper/Dimension.php | 5 +- src/PhpSpreadsheet/Helper/Handler.php | 3 +- src/PhpSpreadsheet/Helper/Html.php | 36 +- src/PhpSpreadsheet/Helper/TextGrid.php | 5 +- src/PhpSpreadsheet/IOFactory.php | 4 +- src/PhpSpreadsheet/Reader/BaseReader.php | 18 +- src/PhpSpreadsheet/Reader/Csv.php | 32 +- src/PhpSpreadsheet/Reader/Csv/Delimiter.php | 8 +- src/PhpSpreadsheet/Reader/Gnumeric.php | 11 +- src/PhpSpreadsheet/Reader/Gnumeric/Styles.php | 3 +- src/PhpSpreadsheet/Reader/Html.php | 24 +- .../Reader/Ods/PageSettings.php | 29 +- src/PhpSpreadsheet/Reader/Slk.php | 24 +- src/PhpSpreadsheet/Reader/Xls.php | 141 +-- .../Reader/Xls/ConditionalFormatting.php | 4 +- .../Reader/Xls/DataValidationHelper.php | 6 +- src/PhpSpreadsheet/Reader/Xls/Escher.php | 12 +- src/PhpSpreadsheet/Reader/Xls/MD5.php | 20 +- src/PhpSpreadsheet/Reader/Xls/RC4.php | 8 +- .../Reader/Xls/Style/Border.php | 2 +- .../Reader/Xls/Style/CellAlignment.php | 4 +- .../Reader/Xls/Style/CellFont.php | 2 +- .../Reader/Xls/Style/FillPattern.php | 2 +- src/PhpSpreadsheet/Reader/Xlsx.php | 13 +- .../Reader/Xlsx/ConditionalStyles.php | 5 +- src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php | 3 +- src/PhpSpreadsheet/Reader/Xlsx/Styles.php | 17 +- src/PhpSpreadsheet/Reader/Xlsx/Theme.php | 10 +- src/PhpSpreadsheet/Reader/Xml.php | 7 +- src/PhpSpreadsheet/Reader/Xml/Style.php | 4 +- src/PhpSpreadsheet/ReferenceHelper.php | 7 +- src/PhpSpreadsheet/RichText/Run.php | 2 +- src/PhpSpreadsheet/RichText/TextElement.php | 4 +- src/PhpSpreadsheet/Settings.php | 15 +- src/PhpSpreadsheet/Shared/CodePage.php | 3 +- src/PhpSpreadsheet/Shared/Date.php | 12 +- src/PhpSpreadsheet/Shared/Escher.php | 4 +- .../Escher/DgContainer/SpgrContainer.php | 4 +- .../DgContainer/SpgrContainer/SpContainer.php | 48 +- .../Shared/Escher/DggContainer.php | 22 +- .../Escher/DggContainer/BstoreContainer.php | 2 +- .../DggContainer/BstoreContainer/BSE.php | 10 +- .../DggContainer/BstoreContainer/BSE/Blip.php | 4 +- src/PhpSpreadsheet/Shared/File.php | 4 +- src/PhpSpreadsheet/Shared/Font.php | 16 +- src/PhpSpreadsheet/Shared/OLE.php | 22 +- .../Shared/OLE/ChainedBlockStream.php | 14 +- src/PhpSpreadsheet/Shared/OLE/PPS.php | 42 +- src/PhpSpreadsheet/Shared/OLE/PPS/Root.php | 4 +- src/PhpSpreadsheet/Shared/OLERead.php | 62 +- src/PhpSpreadsheet/Shared/StringHelper.php | 20 +- src/PhpSpreadsheet/Shared/TimeZone.php | 4 +- src/PhpSpreadsheet/Shared/Trend/BestFit.php | 60 +- .../Shared/Trend/ExponentialBestFit.php | 4 +- .../Shared/Trend/LinearBestFit.php | 4 +- .../Shared/Trend/LogarithmicBestFit.php | 4 +- .../Shared/Trend/PolynomialBestFit.php | 8 +- .../Shared/Trend/PowerBestFit.php | 4 +- src/PhpSpreadsheet/Shared/Trend/Trend.php | 6 +- src/PhpSpreadsheet/Shared/XMLWriter.php | 3 +- src/PhpSpreadsheet/Spreadsheet.php | 66 +- src/PhpSpreadsheet/Style/Alignment.php | 28 +- src/PhpSpreadsheet/Style/Border.php | 9 +- src/PhpSpreadsheet/Style/Borders.php | 20 +- src/PhpSpreadsheet/Style/Color.php | 7 +- src/PhpSpreadsheet/Style/Conditional.php | 14 +- .../ConditionalFormatting/CellMatcher.php | 30 +- .../ConditionalDataBarExtension.php | 65 +- .../Wizard/CellValue.php | 8 +- .../Wizard/DateValue.php | 3 +- .../Wizard/Expression.php | 5 +- .../Wizard/TextValue.php | 11 +- .../Wizard/WizardAbstract.php | 27 +- src/PhpSpreadsheet/Style/Fill.php | 21 +- src/PhpSpreadsheet/Style/Font.php | 60 +- src/PhpSpreadsheet/Style/NumberFormat.php | 12 +- src/PhpSpreadsheet/Style/Style.php | 10 +- src/PhpSpreadsheet/Style/Supervisor.php | 8 +- src/PhpSpreadsheet/Theme.php | 6 +- src/PhpSpreadsheet/Worksheet/AutoFilter.php | 5 +- .../Worksheet/AutoFilter/Column.php | 20 +- .../Worksheet/AutoFilter/Column/Rule.php | 12 +- src/PhpSpreadsheet/Worksheet/BaseDrawing.php | 48 +- src/PhpSpreadsheet/Worksheet/CellIterator.php | 16 +- .../Worksheet/ColumnCellIterator.php | 8 +- .../Worksheet/ColumnDimension.php | 8 +- .../Worksheet/ColumnIterator.php | 16 +- src/PhpSpreadsheet/Worksheet/Dimension.php | 12 +- src/PhpSpreadsheet/Worksheet/HeaderFooter.php | 42 +- src/PhpSpreadsheet/Worksheet/Iterator.php | 4 +- src/PhpSpreadsheet/Worksheet/PageMargins.php | 24 +- src/PhpSpreadsheet/Worksheet/PageSetup.php | 51 +- src/PhpSpreadsheet/Worksheet/Protection.php | 8 +- src/PhpSpreadsheet/Worksheet/Row.php | 4 +- .../Worksheet/RowCellIterator.php | 12 +- src/PhpSpreadsheet/Worksheet/RowDimension.php | 8 +- src/PhpSpreadsheet/Worksheet/RowIterator.php | 16 +- src/PhpSpreadsheet/Worksheet/SheetView.php | 12 +- src/PhpSpreadsheet/Worksheet/Table.php | 14 +- src/PhpSpreadsheet/Worksheet/Table/Column.php | 4 +- .../Worksheet/Table/TableStyle.php | 16 +- src/PhpSpreadsheet/Worksheet/Worksheet.php | 106 +- src/PhpSpreadsheet/Writer/BaseWriter.php | 21 +- src/PhpSpreadsheet/Writer/Csv.php | 23 +- src/PhpSpreadsheet/Writer/Html.php | 56 +- src/PhpSpreadsheet/Writer/Ods.php | 4 +- src/PhpSpreadsheet/Writer/Ods/Formula.php | 3 +- src/PhpSpreadsheet/Writer/Pdf.php | 10 +- src/PhpSpreadsheet/Writer/Pdf/Dompdf.php | 4 +- src/PhpSpreadsheet/Writer/Pdf/Mpdf.php | 3 +- src/PhpSpreadsheet/Writer/Xls.php | 35 +- src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php | 14 +- .../Writer/Xls/CellDataValidation.php | 6 +- .../Writer/Xls/ConditionalHelper.php | 5 +- src/PhpSpreadsheet/Writer/Xls/ErrorCode.php | 2 +- src/PhpSpreadsheet/Writer/Xls/Escher.php | 12 +- src/PhpSpreadsheet/Writer/Xls/Font.php | 5 +- src/PhpSpreadsheet/Writer/Xls/Parser.php | 27 +- .../Writer/Xls/Style/CellAlignment.php | 4 +- .../Writer/Xls/Style/CellBorder.php | 2 +- .../Writer/Xls/Style/CellFill.php | 2 +- .../Writer/Xls/Style/ColorMap.php | 2 +- src/PhpSpreadsheet/Writer/Xls/Workbook.php | 44 +- src/PhpSpreadsheet/Writer/Xls/Worksheet.php | 42 +- src/PhpSpreadsheet/Writer/Xlsx.php | 17 +- src/PhpSpreadsheet/Writer/Xlsx/Chart.php | 5 +- src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php | 12 +- .../Calculation/Engine/RangeTest.php | 3 +- .../Database/SetupTeardownDatabases.php | 4 +- .../Functions/Financial/AllSetupTeardown.php | 4 +- .../Functions/Logical/AllSetupTeardown.php | 4 +- .../Functions/LookupRef/AllSetupTeardown.php | 9 +- .../Functions/LookupRef/IndirectTest.php | 3 +- .../Functions/MathTrig/AllSetupTeardown.php | 4 +- .../Statistical/AllSetupTeardown.php | 4 +- .../Functions/TextData/AllSetupTeardown.php | 4 +- .../Functions/Web/WebServiceTest.php | 2 +- .../Calculation/RowColumnReferenceTest.php | 5 +- .../Cell/CellDetachTest.php | 2 +- .../Chart/Charts32CatAxValAxTest.php | 3 +- .../Custom/ComplexAssert.php | 3 +- .../Document/PropertiesTest.php | 8 +- tests/PhpSpreadsheetTests/NamedRange2Test.php | 2 +- .../Reader/Csv/CsvContiguousFilter.php | 15 +- .../Reader/Csv/CsvContiguousTest.php | 5 +- .../Reader/Csv/CsvLineEndingTest.php | 3 +- .../Reader/Csv/CsvNumberFormatLocaleTest.php | 10 +- .../Reader/Csv/CsvNumberFormatTest.php | 10 +- .../Reader/Ods/EmptyFileTest.php | 3 +- .../Reader/Ods/OdsTest.php | 3 +- .../Reader/Slk/SlkTest.php | 12 +- .../Reader/Xls/LoadSheetsOnlyTest.php | 7 +- .../Reader/Xlsx/EmptyFileTest.php | 3 +- .../Reader/Xlsx/ExplicitDateTest.php | 5 +- .../Reader/Xlsx/Issue1482Test.php | 5 +- .../Reader/Xlsx/Issue2301Test.php | 5 +- .../Reader/Xlsx/Issue2488Test.php | 5 +- .../Reader/Xlsx/Issue2490Test.php | 10 +- .../Reader/Xlsx/Issue2501Test.php | 5 +- .../Reader/Xlsx/Issue2516Test.php | 5 +- .../Reader/Xlsx/Issue2542Test.php | 5 +- .../Reader/Xlsx/Issue2778Test.php | 5 +- .../Reader/Xlsx/Issue2885Test.php | 5 +- .../Reader/Xlsx/Issue3435Test.php | 5 +- .../Reader/Xlsx/Issue3464Test.php | 5 +- .../Reader/Xlsx/Issue3495Test.php | 5 +- .../Reader/Xlsx/Issue3534Test.php | 5 +- .../Reader/Xlsx/Issue3552Test.php | 5 +- .../Reader/Xlsx/Issue3553Test.php | 5 +- .../Reader/Xlsx/Issue3665Test.php | 5 +- .../Reader/Xlsx/LoadSheetsOnlyTest.php | 7 +- .../Reader/Xlsx/NamespaceIssue2109bTest.php | 5 +- .../Reader/Xlsx/NamespaceNonStdTest.php | 5 +- .../Reader/Xlsx/NamespaceOpenpyxl35Test.php | 5 +- .../Reader/Xlsx/NamespacePurlTest.php | 5 +- .../Reader/Xlsx/NamespaceStdTest.php | 5 +- .../Reader/Xlsx/SharedFormulaTest.php | 5 +- .../Reader/Xlsx/SplitsTest.php | 5 +- .../Reader/Xlsx/XlsxRootZipFilesTest.php | 5 +- .../Reader/Xml/DataValidationsTest.php | 3 +- .../Reader/Xml/PageSetupTest.php | 5 +- .../Reader/Xml/SplitsTest.php | 5 +- .../Reader/Xml/XmlLoadTest.php | 2 +- .../Reader/Xml/XmlOddTest.php | 5 +- .../Reader/Xml/XmlPropertiesTest.php | 3 +- .../ReferenceHelper3Test.php | 3 +- .../PhpSpreadsheetTests/Shared/Date2Test.php | 2 +- tests/PhpSpreadsheetTests/Shared/FileTest.php | 3 +- .../SpreadsheetCoverageTest.php | 4 +- tests/PhpSpreadsheetTests/SpreadsheetTest.php | 2 +- .../Style/AlignmentMiddleTest.php | 5 +- .../Style/AlignmentTest.php | 2 +- .../Style/ConditionalBoolTest.php | 3 +- .../ConditionalFormatting/CellMatcherTest.php | 2 +- .../Wizard/BlankWizardTest.php | 19 +- .../Wizard/CellValueWizardTest.php | 15 +- .../Wizard/DateValueWizardTest.php | 15 +- .../Wizard/DuplicatesWizardTest.php | 19 +- .../Wizard/ErrorWizardTest.php | 19 +- .../Wizard/ExpressionWizardTest.php | 15 +- .../Wizard/TextValueWizardTest.php | 19 +- .../Wizard/WizardFactoryTest.php | 5 +- .../Worksheet/AutoFilter/SetupTeardown.php | 9 +- .../ByColumnAndRowUndeprecatedTest.php | 2 +- .../Worksheet/ConditionalStyleTest.php | 5 +- .../Worksheet/MergeBehaviourTest.php | 10 +- .../Worksheet/RemoveTest.php | 2 +- .../Worksheet/Table/SetupTeardown.php | 9 +- .../Writer/Dompdf/PaperSizeArrayTest.php | 3 +- .../Writer/Html/HtmlCommentsTest.php | 5 +- .../Writer/Html/ImageCopyTest.php | 3 +- .../Writer/Mpdf/ImageCopyPdfTest.php | 3 +- .../Writer/Ods/ContentTest.php | 5 +- .../Writer/PreCalcTest.php | 3 +- .../Writer/Xls/FormulaErrTest.php | 4 +- .../Writer/Xls/ParserTest.php | 2 +- .../Writer/Xls/WorkbookTest.php | 7 +- .../Writer/Xls/XlsGifBmpTest.php | 5 +- .../Writer/Xlsx/CalculationErrorTest.php | 4 +- .../Writer/Xlsx/ConditionalTest.php | 10 +- .../Writer/Xlsx/LocaleFloatsTest.php | 4 +- .../Writer/Xlsx/Unparsed2396Test.php | 3 +- 263 files changed, 1895 insertions(+), 2355 deletions(-) diff --git a/infra/LocaleGenerator.php b/infra/LocaleGenerator.php index 5e570f7f0f..f7df3de553 100644 --- a/infra/LocaleGenerator.php +++ b/infra/LocaleGenerator.php @@ -28,38 +28,23 @@ class LocaleGenerator private const ENGLISH_REFERENCE_COLUMN = 'B'; private const EOL = "\n"; // not PHP_EOL - /** - * @var string - */ - protected $translationSpreadsheetName; + protected string $translationSpreadsheetName; - /** - * @var string - */ - protected $translationBaseFolder; + protected string $translationBaseFolder; protected $phpSpreadsheetFunctions; - /** - * @var Spreadsheet - */ - protected $translationSpreadsheet; + protected Spreadsheet $translationSpreadsheet; protected $verbose; - /** - * @var Worksheet - */ - protected $localeTranslations; + protected Worksheet $localeTranslations; protected $localeLanguageMap = []; protected $errorCodeMap = []; - /** - * @var Worksheet - */ - private $functionNameTranslations; + private Worksheet $functionNameTranslations; protected $functionNameLanguageMap = []; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ff99e79fcc..02b3e86709 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -225,20 +225,975 @@ parameters: count: 1 path: samples/Wizards/NumberFormat/Scientific.php + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselI.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselI.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselK.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselK.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselY.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BesselY.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Compare.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Compare.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Complex.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Complex.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ConvertBase.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ConvertBase.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Financial/Dollar.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Financial/Dollar.php + - message: "#^Cannot call method getTokenSubType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#" count: 4 - path: src/PhpSpreadsheet/Calculation/FormulaParser.php + path: src/PhpSpreadsheet/Calculation/FormulaParser.php + + - + message: "#^Cannot call method getTokenType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#" + count: 8 + path: src/PhpSpreadsheet/Calculation/FormulaParser.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/ErrorValue.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/ErrorValue.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/ExcelError.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/ExcelError.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/Value.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Information/Value.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Logical/Conditional.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Logical/Conditional.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Logical/Operations.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Logical/Operations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Address.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Address.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Selection.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/Selection.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Angle.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Angle.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Base.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Base.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php + + - + message: "#^Binary operation \"/\" between float and array\\|float\\|int\\|string results in an error\\.$#" + count: 1 + path: src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Exp.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Exp.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Floor.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Floor.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Operations.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Operations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Random.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Random.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Roman.php - - message: "#^Cannot call method getTokenType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#" - count: 8 - path: src/PhpSpreadsheet/Calculation/FormulaParser.php + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Roman.php - - message: "#^Binary operation \"/\" between float and array\\|float\\|int\\|string results in an error\\.$#" + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Round.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Round.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Sign.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Sign.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Confidence.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Confidence.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Permutations.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Permutations.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Standardize.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Standardize.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Concatenate.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Concatenate.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Extract.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Extract.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Format.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Format.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Replace.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Replace.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Search.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Search.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Text.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Text.php + + - + message: "#^Cannot call method arguments\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Trim.php + + - + message: "#^Parameter \\#1 \\$arrayArgumentHelper of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentProcessor\\:\\:processArguments\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper, PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\ArrayArgumentHelper\\|null given\\.$#" + count: 4 + path: src/PhpSpreadsheet/Calculation/TextData/Trim.php + + - + message: "#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\\.$#" count: 1 - path: src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php + path: src/PhpSpreadsheet/Chart/DataSeriesValues.php + + - + message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\:\\:getDataValues\\(\\) should return array but returns array\\|null\\.$#" + count: 1 + path: src/PhpSpreadsheet/Chart/DataSeriesValues.php + + - + message: "#^Offset 0 does not exist on array\\|null\\.$#" + count: 1 + path: src/PhpSpreadsheet/Chart/DataSeriesValues.php + + - + message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, array\\|null given\\.$#" + count: 1 + path: src/PhpSpreadsheet/Chart/DataSeriesValues.php + + - + message: "#^Cannot call method beforeCellAddress\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\CellReferenceHelper\\|null\\.$#" + count: 1 + path: src/PhpSpreadsheet/ReferenceHelper.php + + - + message: "#^Cannot call method cellAddressInDeleteRange\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\CellReferenceHelper\\|null\\.$#" + count: 3 + path: src/PhpSpreadsheet/ReferenceHelper.php + + - + message: "#^Cannot call method updateCellReference\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\CellReferenceHelper\\|null\\.$#" + count: 4 + path: src/PhpSpreadsheet/ReferenceHelper.php - message: "#^Offset 2 does not exist on array\\{int, int, int, int\\}\\|array\\{int, int\\}\\.$#" @@ -250,6 +1205,11 @@ parameters: count: 1 path: src/PhpSpreadsheet/Worksheet/Validations.php + - + message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:getChartType\\(\\) should return array\\ but returns array\\, string\\|null\\>\\.$#" + count: 1 + path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php + - message: "#^Parameter \\#2 \\$value of function ini_set expects string, int given\\.$#" count: 1 diff --git a/src/PhpSpreadsheet/Calculation/ArrayEnabled.php b/src/PhpSpreadsheet/Calculation/ArrayEnabled.php index e20203ad32..934813e813 100644 --- a/src/PhpSpreadsheet/Calculation/ArrayEnabled.php +++ b/src/PhpSpreadsheet/Calculation/ArrayEnabled.php @@ -7,10 +7,7 @@ trait ArrayEnabled { - /** - * @var ArrayArgumentHelper - */ - private static $arrayArgumentHelper; + private static ?ArrayArgumentHelper $arrayArgumentHelper = null; /** * @param array|false $arguments Can be changed to array for Php8.1+ diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index d8d0557399..4156051a52 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -62,15 +62,14 @@ class Calculation const FORMULA_CLOSE_MATRIX_BRACE = '}'; const FORMULA_STRING_QUOTE = '"'; - /** @var string */ - private static $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE; + private static string $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE; /** * Instance of this class. * * @var ?Calculation */ - private static $instance; + private static ?Calculation $instance = null; /** * Instance of the spreadsheet this Calculation Engine is using. @@ -79,24 +78,17 @@ class Calculation /** * Calculation cache. - * - * @var array */ - private $calculationCache = []; + private array $calculationCache = []; /** * Calculation cache enabled. - * - * @var bool */ - private $calculationCacheEnabled = true; + private bool $calculationCacheEnabled = true; private BranchPruner $branchPruner; - /** - * @var bool - */ - private $branchPruningEnabled = true; + private bool $branchPruningEnabled = true; /** * List of operators that can be used within formulae @@ -134,17 +126,14 @@ class Calculation * * @deprecated 1.25.2 use setSuppressFormulaErrors() instead */ - public $suppressFormulaErrors; + public ?bool $suppressFormulaErrors = null; - /** @var bool */ - private $suppressFormulaErrorsNew = false; + private bool $suppressFormulaErrorsNew = false; /** * Error message for any error that was raised/thrown by the calculation engine. - * - * @var null|string */ - public $formulaError; + public ?string $formulaError = null; /** * Reference Helper. @@ -156,34 +145,26 @@ class Calculation */ private CyclicReferenceStack $cyclicReferenceStack; - /** @var array */ - private $cellStack = []; + private array $cellStack = []; /** * Current iteration counter for cyclic formulae * If the value is 0 (or less) then cyclic formulae will throw an exception, * otherwise they will iterate to the limit defined here before returning a result. - * - * @var int */ - private $cyclicFormulaCounter = 1; + private int $cyclicFormulaCounter = 1; - /** @var string */ - private $cyclicFormulaCell = ''; + private string $cyclicFormulaCell = ''; /** * Number of iterations for cyclic formulae. - * - * @var int */ - public $cyclicFormulaCount = 1; + public int $cyclicFormulaCount = 1; /** * The current locale setting. - * - * @var string */ - private static $localeLanguage = 'en_us'; // US English (default locale) + private static string $localeLanguage = 'en_us'; // US English (default locale) /** * List of available locale settings @@ -191,26 +172,23 @@ class Calculation * * @var string[] */ - private static $validLocaleLanguages = [ + private static array $validLocaleLanguages = [ 'en', // English (default language) ]; /** * Locale-specific argument separator for function arguments. - * - * @var string */ - private static $localeArgumentSeparator = ','; + private static string $localeArgumentSeparator = ','; - /** @var array */ - private static $localeFunctions = []; + private static array $localeFunctions = []; /** * Locale-specific translations for Excel constants (True, False and Null). * * @var array */ - private static $localeBoolean = [ + private static array $localeBoolean = [ 'TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL', @@ -227,7 +205,7 @@ public static function getLocaleBoolean(string $index): string * * @var array */ - private static $excelConstants = [ + private static array $excelConstants = [ 'TRUE' => true, 'FALSE' => false, 'NULL' => null, @@ -248,10 +226,8 @@ public static function getExcelConstants(string $key) * Array of functions usable on Spreadsheet. * In theory, this could be const rather than static; * however, Phpstan breaks trying to analyze it when attempted. - * - *@var array */ - private static $phpSpreadsheetFunctions = [ + private static array $phpSpreadsheetFunctions = [ 'ABS' => [ 'category' => Category::CATEGORY_MATH_AND_TRIG, 'functionCall' => [MathTrig\Absolute::class, 'evaluate'], @@ -2891,10 +2867,8 @@ public static function getExcelConstants(string $key) /** * Internal functions used for special control purposes. - * - * @var array */ - private static $controlFunctions = [ + private static array $controlFunctions = [ 'MKMATRIX' => [ 'argumentCount' => '*', 'functionCall' => [Internal\MakeMatrix::class, 'make'], @@ -2945,7 +2919,7 @@ public static function getInstance(?Spreadsheet $spreadsheet = null): self } } - if (!isset(self::$instance) || (self::$instance === null)) { + if (!self::$instance) { self::$instance = new self(); } @@ -3321,10 +3295,10 @@ private static function translateFormula(array $from, array $to, string $formula } /** @var ?array */ - private static $functionReplaceFromExcel; + private static ?array $functionReplaceFromExcel; /** @var ?array */ - private static $functionReplaceToLocale; + private static ?array $functionReplaceToLocale; public function _translateFormulaToLocale(string $formula): string { @@ -3359,10 +3333,10 @@ public function _translateFormulaToLocale(string $formula): string } /** @var ?array */ - private static $functionReplaceFromLocale; + private static ?array $functionReplaceFromLocale; /** @var ?array */ - private static $functionReplaceToExcel; + private static ?array $functionReplaceToExcel; public function _translateFormulaToEnglish(string $formula): string { @@ -4034,10 +4008,8 @@ private function convertMatrixReferences(string $formula): false|string * Binary Operators. * These operators always work on two values. * Array key is the operator, the value indicates whether this is a left or right associative operator. - * - * @var array */ - private static $operatorAssociativity = [ + private static array $operatorAssociativity = [ '^' => 0, // Exponentiation '*' => 0, '/' => 0, // Multiplication and Division '+' => 0, '-' => 0, // Addition and Subtraction @@ -4049,19 +4021,15 @@ private function convertMatrixReferences(string $formula): false|string /** * Comparison (Boolean) Operators. * These operators work on two values, but always return a boolean result. - * - * @var array */ - private static $comparisonOperators = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true]; + private static array $comparisonOperators = ['>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true]; /** * Operator Precedence. * This list includes all valid operators, whether binary (including boolean) or unary (such as %). * Array key is the operator, the value is its precedence. - * - * @var array */ - private static $operatorPrecedence = [ + private static array $operatorPrecedence = [ ':' => 9, // Range '∩' => 8, // Intersect '∪' => 7, // Union diff --git a/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php b/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php index bd019ac8a9..29fc490234 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php +++ b/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentHelper.php @@ -6,30 +6,15 @@ class ArrayArgumentHelper { - /** - * @var int - */ - protected $indexStart = 0; - - /** - * @var array - */ - protected $arguments; - - /** - * @var int - */ - protected $argumentCount; - - /** - * @var array - */ - protected $rows; - - /** - * @var array - */ - protected $columns; + protected int $indexStart = 0; + + protected array $arguments; + + protected int $argumentCount; + + protected array $rows; + + protected array $columns; public function initialise(array $arguments): void { diff --git a/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php b/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php index 0b1ec58a83..fb2c853b3e 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php +++ b/src/PhpSpreadsheet/Calculation/Engine/ArrayArgumentProcessor.php @@ -6,10 +6,7 @@ class ArrayArgumentProcessor { - /** - * @var ArrayArgumentHelper - */ - private static $arrayArgumentHelper; + private static ArrayArgumentHelper $arrayArgumentHelper; public static function processArguments( ArrayArgumentHelper $arrayArgumentHelper, diff --git a/src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php b/src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php index 00328fb629..1c58d04ac9 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php +++ b/src/PhpSpreadsheet/Calculation/Engine/BranchPruner.php @@ -10,42 +10,40 @@ class BranchPruner /** * Used to generate unique store keys. - * - * @var int */ - private $branchStoreKeyCounter = 0; + private int $branchStoreKeyCounter = 0; /** * currently pending storeKey (last item of the storeKeysStack. * * @var ?string */ - protected $pendingStoreKey; + protected ?string $pendingStoreKey = null; /** * @var string[] */ - protected $storeKeysStack = []; + protected array $storeKeysStack = []; /** * @var bool[] */ - protected $conditionMap = []; + protected array $conditionMap = []; /** * @var bool[] */ - protected $thenMap = []; + protected array $thenMap = []; /** * @var bool[] */ - protected $elseMap = []; + protected array $elseMap = []; /** * @var int[] */ - protected $braceDepthMap = []; + protected array $braceDepthMap = []; protected ?string $currentCondition = null; @@ -53,10 +51,7 @@ class BranchPruner protected ?string $currentOnlyIfNot = null; - /** - * @var null|string - */ - protected $previousStoreKey; + protected ?string $previousStoreKey = null; public function __construct(bool $branchPruningEnabled) { diff --git a/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php index f76ced9119..b13865761f 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php +++ b/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php @@ -9,7 +9,7 @@ class CyclicReferenceStack * * @var mixed[] */ - private $stack = []; + private array $stack = []; /** * Return the number of entries on the stack. diff --git a/src/PhpSpreadsheet/Calculation/Engine/Logger.php b/src/PhpSpreadsheet/Calculation/Engine/Logger.php index 106731f2b0..20f8e92c0a 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/Logger.php +++ b/src/PhpSpreadsheet/Calculation/Engine/Logger.php @@ -24,7 +24,7 @@ class Logger * * @var string[] */ - private $debugLog = []; + private array $debugLog = []; /** * The calculation engine cell reference stack. diff --git a/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php b/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php index 9d897576f1..ac4787fda4 100644 --- a/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php +++ b/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php @@ -29,7 +29,7 @@ class ConvertUOM * * @var mixed[] */ - private static $conversionUnits = [ + private static array $conversionUnits = [ // Weight and Mass 'g' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'Unit Name' => 'Gram', 'AllowPrefix' => true], 'sg' => ['Group' => self::CATEGORY_WEIGHT_AND_MASS, 'Unit Name' => 'Slug', 'AllowPrefix' => false], @@ -203,7 +203,7 @@ class ConvertUOM * * @var mixed[] */ - private static $conversionMultipliers = [ + private static array $conversionMultipliers = [ 'Y' => ['multiplier' => 1E24, 'name' => 'yotta'], 'Z' => ['multiplier' => 1E21, 'name' => 'zetta'], 'E' => ['multiplier' => 1E18, 'name' => 'exa'], @@ -232,7 +232,7 @@ class ConvertUOM * * @var mixed[] */ - private static $binaryConversionMultipliers = [ + private static array $binaryConversionMultipliers = [ 'Yi' => ['multiplier' => 2 ** 80, 'name' => 'yobi'], 'Zi' => ['multiplier' => 2 ** 70, 'name' => 'zebi'], 'Ei' => ['multiplier' => 2 ** 60, 'name' => 'exbi'], @@ -248,7 +248,7 @@ class ConvertUOM * * @var mixed[] */ - private static $unitConversions = [ + private static array $unitConversions = [ // Conversion uses gram (g) as an intermediate unit self::CATEGORY_WEIGHT_AND_MASS => [ 'g' => 1.0, diff --git a/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php b/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php index b9396456f4..6ef1899957 100644 --- a/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php +++ b/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php @@ -8,8 +8,7 @@ class Depreciation { - /** @var float */ - private static $zeroPointZero = 0.0; + private static float $zeroPointZero = 0.0; /** * DB. diff --git a/src/PhpSpreadsheet/Calculation/FormulaParser.php b/src/PhpSpreadsheet/Calculation/FormulaParser.php index cffce179c6..40dfe52391 100644 --- a/src/PhpSpreadsheet/Calculation/FormulaParser.php +++ b/src/PhpSpreadsheet/Calculation/FormulaParser.php @@ -54,7 +54,7 @@ class FormulaParser * * @var FormulaToken[] */ - private $tokens = []; + private array $tokens = []; /** * Create a new FormulaParser. diff --git a/src/PhpSpreadsheet/Calculation/FormulaToken.php b/src/PhpSpreadsheet/Calculation/FormulaToken.php index 68e5eead81..8186a06703 100644 --- a/src/PhpSpreadsheet/Calculation/FormulaToken.php +++ b/src/PhpSpreadsheet/Calculation/FormulaToken.php @@ -54,24 +54,18 @@ class FormulaToken /** * Value. - * - * @var string */ - private $value; + private string $value; /** * Token Type (represented by TOKEN_TYPE_*). - * - * @var string */ - private $tokenType; + private string $tokenType; /** * Token SubType (represented by TOKEN_SUBTYPE_*). - * - * @var string */ - private $tokenSubType; + private string $tokenSubType; /** * Create a new FormulaToken. diff --git a/src/PhpSpreadsheet/Calculation/Functions.php b/src/PhpSpreadsheet/Calculation/Functions.php index 9cde3351c1..33a79ed606 100644 --- a/src/PhpSpreadsheet/Calculation/Functions.php +++ b/src/PhpSpreadsheet/Calculation/Functions.php @@ -28,17 +28,13 @@ class Functions /** * Compatibility mode to use for error checking and responses. - * - * @var string */ - protected static $compatibilityMode = self::COMPATIBILITY_EXCEL; + protected static string $compatibilityMode = self::COMPATIBILITY_EXCEL; /** * Data Type to use when returning date values. - * - * @var string */ - protected static $returnDateType = self::RETURNDATE_EXCEL; + protected static string $returnDateType = self::RETURNDATE_EXCEL; /** * Set the Compatibility Mode. diff --git a/src/PhpSpreadsheet/Calculation/Information/ExcelError.php b/src/PhpSpreadsheet/Calculation/Information/ExcelError.php index 083feee203..b1514cf9a5 100644 --- a/src/PhpSpreadsheet/Calculation/Information/ExcelError.php +++ b/src/PhpSpreadsheet/Calculation/Information/ExcelError.php @@ -39,7 +39,7 @@ class ExcelError * * @var array */ - public static $errorCodes = self::ERROR_CODES; + public static array $errorCodes = self::ERROR_CODES; public static function throwError(mixed $value): string { diff --git a/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php b/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php index fe18965f3a..16817ce6a5 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php +++ b/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php @@ -179,14 +179,12 @@ public static function incompleteBeta(float $x, float $p, float $q): float } // Function cache for logBeta function - /** @var float */ - private static $logBetaCacheP = 0.0; - /** @var float */ - private static $logBetaCacheQ = 0.0; + private static float $logBetaCacheP = 0.0; - /** @var float */ - private static $logBetaCacheResult = 0.0; + private static float $logBetaCacheQ = 0.0; + + private static float $logBetaCacheResult = 0.0; /** * The natural logarithm of the beta function. diff --git a/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php b/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php index f199bbfbef..01901a60c5 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php +++ b/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php @@ -217,11 +217,10 @@ public static function gammaValue(float $value): float private const PNT68 = 0.6796875; // Function cache for logGamma - /** @var float */ - private static $logGammaCacheResult = 0.0; - /** @var float */ - private static $logGammaCacheX = 0.0; + private static float $logGammaCacheResult = 0.0; + + private static float $logGammaCacheX = 0.0; /** * logGamma function. diff --git a/src/PhpSpreadsheet/Calculation/Token/Stack.php b/src/PhpSpreadsheet/Calculation/Token/Stack.php index 7617e3e868..13c6e5b1ac 100644 --- a/src/PhpSpreadsheet/Calculation/Token/Stack.php +++ b/src/PhpSpreadsheet/Calculation/Token/Stack.php @@ -14,14 +14,12 @@ class Stack * * @var mixed[] */ - private $stack = []; + private array $stack = []; /** * Count of entries in the parser stack. - * - * @var int */ - private $count = 0; + private int $count = 0; public function __construct(BranchPruner $branchPruner) { diff --git a/src/PhpSpreadsheet/Cell/Cell.php b/src/PhpSpreadsheet/Cell/Cell.php index 8ebc115a88..edff0aebf0 100644 --- a/src/PhpSpreadsheet/Cell/Cell.php +++ b/src/PhpSpreadsheet/Cell/Cell.php @@ -22,10 +22,8 @@ class Cell implements Stringable { /** * Value binder to use. - * - * @var IValueBinder */ - private static $valueBinder; + private static ?IValueBinder $valueBinder = null; /** * Value of the cell. @@ -60,10 +58,8 @@ class Cell implements Stringable /** * Index to the cellXf reference for the styling of this cell. - * - * @var int */ - private $xfIndex = 0; + private int $xfIndex = 0; /** * Attributes of the formula. @@ -310,15 +306,14 @@ public function setValueExplicit(mixed $value, string $dataType = DataType::TYPE public const CALCULATE_DATE_TIME_FLOAT = 1; public const CALCULATE_TIME_FLOAT = 2; - /** @var int */ - private static $calculateDateTimeType = self::CALCULATE_DATE_TIME_ASIS; + private static int $calculateDateTimeType = self::CALCULATE_DATE_TIME_ASIS; public static function getCalculateDateTimeType(): int { return self::$calculateDateTimeType; } - /** @throws CalculationException*/ + /** @throws CalculationException */ public static function setCalculateDateTimeType(int $calculateDateTimeType): void { self::$calculateDateTimeType = match ($calculateDateTimeType) { @@ -688,7 +683,7 @@ public function isInRange(string $range): bool // Verify if cell is in range return ($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn) - && ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow); + && ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow); } /** diff --git a/src/PhpSpreadsheet/Cell/CellRange.php b/src/PhpSpreadsheet/Cell/CellRange.php index 3063aa825d..c3445637de 100644 --- a/src/PhpSpreadsheet/Cell/CellRange.php +++ b/src/PhpSpreadsheet/Cell/CellRange.php @@ -8,15 +8,9 @@ class CellRange implements AddressRange, Stringable { - /** - * @var CellAddress - */ - protected $from; - - /** - * @var CellAddress - */ - protected $to; + protected CellAddress $from; + + protected CellAddress $to; public function __construct(CellAddress $from, CellAddress $to) { diff --git a/src/PhpSpreadsheet/Cell/DataType.php b/src/PhpSpreadsheet/Cell/DataType.php index c887d5f891..e24e694e2e 100644 --- a/src/PhpSpreadsheet/Cell/DataType.php +++ b/src/PhpSpreadsheet/Cell/DataType.php @@ -23,7 +23,7 @@ class DataType * * @var array */ - private static $errorCodes = [ + private static array $errorCodes = [ '#NULL!' => 0, '#DIV/0!' => 1, '#VALUE!' => 2, diff --git a/src/PhpSpreadsheet/Cell/DataValidation.php b/src/PhpSpreadsheet/Cell/DataValidation.php index 0c6b9a6599..1cea89d557 100644 --- a/src/PhpSpreadsheet/Cell/DataValidation.php +++ b/src/PhpSpreadsheet/Cell/DataValidation.php @@ -41,80 +41,58 @@ class DataValidation /** * Type. - * - * @var string */ - private $type = self::TYPE_NONE; + private string $type = self::TYPE_NONE; /** * Error style. - * - * @var string */ - private $errorStyle = self::STYLE_STOP; + private string $errorStyle = self::STYLE_STOP; /** * Operator. - * - * @var string */ - private $operator = self::OPERATOR_BETWEEN; + private string $operator = self::OPERATOR_BETWEEN; /** * Allow Blank. - * - * @var bool */ - private $allowBlank = false; + private bool $allowBlank = false; /** * Show DropDown. - * - * @var bool */ - private $showDropDown = false; + private bool $showDropDown = false; /** * Show InputMessage. - * - * @var bool */ - private $showInputMessage = false; + private bool $showInputMessage = false; /** * Show ErrorMessage. - * - * @var bool */ - private $showErrorMessage = false; + private bool $showErrorMessage = false; /** * Error title. - * - * @var string */ - private $errorTitle = ''; + private string $errorTitle = ''; /** * Error. - * - * @var string */ - private $error = ''; + private string $error = ''; /** * Prompt title. - * - * @var string */ - private $promptTitle = ''; + private string $promptTitle = ''; /** * Prompt. - * - * @var string */ - private $prompt = ''; + private string $prompt = ''; /** * Create a new DataValidation. diff --git a/src/PhpSpreadsheet/Cell/Hyperlink.php b/src/PhpSpreadsheet/Cell/Hyperlink.php index a296c6277d..e8e550603b 100644 --- a/src/PhpSpreadsheet/Cell/Hyperlink.php +++ b/src/PhpSpreadsheet/Cell/Hyperlink.php @@ -6,17 +6,13 @@ class Hyperlink { /** * URL to link the cell to. - * - * @var string */ - private $url; + private string $url; /** * Tooltip to display on the hyperlink. - * - * @var string */ - private $tooltip; + private string $tooltip; /** * Create a new Hyperlink. diff --git a/src/PhpSpreadsheet/Cell/IgnoredErrors.php b/src/PhpSpreadsheet/Cell/IgnoredErrors.php index ee4b515620..a7c4d19dd2 100644 --- a/src/PhpSpreadsheet/Cell/IgnoredErrors.php +++ b/src/PhpSpreadsheet/Cell/IgnoredErrors.php @@ -4,17 +4,13 @@ class IgnoredErrors { - /** @var bool */ - private $numberStoredAsText = false; + private bool $numberStoredAsText = false; - /** @var bool */ - private $formula = false; + private bool $formula = false; - /** @var bool */ - private $twoDigitTextYear = false; + private bool $twoDigitTextYear = false; - /** @var bool */ - private $evalError = false; + private bool $evalError = false; public function setNumberStoredAsText(bool $value): self { diff --git a/src/PhpSpreadsheet/Cell/StringValueBinder.php b/src/PhpSpreadsheet/Cell/StringValueBinder.php index f4c6321cba..30e6dfddea 100644 --- a/src/PhpSpreadsheet/Cell/StringValueBinder.php +++ b/src/PhpSpreadsheet/Cell/StringValueBinder.php @@ -10,25 +10,13 @@ class StringValueBinder implements IValueBinder { - /** - * @var bool - */ - protected $convertNull = true; + protected bool $convertNull = true; - /** - * @var bool - */ - protected $convertBoolean = true; + protected bool $convertBoolean = true; - /** - * @var bool - */ - protected $convertNumeric = true; + protected bool $convertNumeric = true; - /** - * @var bool - */ - protected $convertFormula = true; + protected bool $convertFormula = true; public function setNullConversion(bool $suppressConversion = false): self { diff --git a/src/PhpSpreadsheet/Chart/Axis.php b/src/PhpSpreadsheet/Chart/Axis.php index 3054759024..2b31baf1e7 100644 --- a/src/PhpSpreadsheet/Chart/Axis.php +++ b/src/PhpSpreadsheet/Chart/Axis.php @@ -39,7 +39,7 @@ public function __construct() * * @var mixed[] */ - private $axisNumber = [ + private array $axisNumber = [ 'format' => self::FORMAT_CODE_GENERAL, 'source_linked' => 1, 'numeric' => null, @@ -83,8 +83,7 @@ public function __construct() Properties::FORMAT_CODE_DATE_ISO8601, ]; - /** @var bool */ - private $noFill = false; + private bool $noFill = false; /** * Get Series Data Type. diff --git a/src/PhpSpreadsheet/Chart/Chart.php b/src/PhpSpreadsheet/Chart/Chart.php index b86b19cdd0..22feb14434 100644 --- a/src/PhpSpreadsheet/Chart/Chart.php +++ b/src/PhpSpreadsheet/Chart/Chart.php @@ -9,10 +9,8 @@ class Chart { /** * Chart Name. - * - * @var string */ - private $name = ''; + private string $name = ''; /** * Worksheet. @@ -46,17 +44,13 @@ class Chart /** * Plot Visible Only. - * - * @var bool */ - private $plotVisibleOnly = true; + private bool $plotVisibleOnly = true; /** * Display Blanks as. - * - * @var string */ - private $displayBlanksAs = DataSeries::EMPTY_AS_GAP; + private string $displayBlanksAs = DataSeries::EMPTY_AS_GAP; /** * Chart Asix Y as. @@ -70,24 +64,18 @@ class Chart /** * Top-Left Cell Position. - * - * @var string */ - private $topLeftCellRef = 'A1'; + private string $topLeftCellRef = 'A1'; /** * Top-Left X-Offset. - * - * @var int */ - private $topLeftXOffset = 0; + private int $topLeftXOffset = 0; /** * Top-Left Y-Offset. - * - * @var int */ - private $topLeftYOffset = 0; + private int $topLeftYOffset = 0; /** * Bottom-Right Cell Position. @@ -96,17 +84,13 @@ class Chart /** * Bottom-Right X-Offset. - * - * @var int */ - private $bottomRightXOffset = 10; + private int $bottomRightXOffset = 10; /** * Bottom-Right Y-Offset. - * - * @var int */ - private $bottomRightYOffset = 10; + private int $bottomRightYOffset = 10; private ?int $rotX = null; @@ -116,17 +100,13 @@ class Chart private ?int $perspective = null; - /** @var bool */ - private $oneCellAnchor = false; + private bool $oneCellAnchor = false; - /** @var bool */ - private $autoTitleDeleted = false; + private bool $autoTitleDeleted = false; - /** @var bool */ - private $noFill = false; + private bool $noFill = false; - /** @var bool */ - private $roundedCorners = false; + private bool $roundedCorners = false; private GridLines $borderLines; diff --git a/src/PhpSpreadsheet/Chart/DataSeries.php b/src/PhpSpreadsheet/Chart/DataSeries.php index d0391c22da..baadcf56a3 100644 --- a/src/PhpSpreadsheet/Chart/DataSeries.php +++ b/src/PhpSpreadsheet/Chart/DataSeries.php @@ -46,31 +46,23 @@ class DataSeries /** * Series Plot Type. - * - * @var string */ - private $plotType; + private ?string $plotType; /** * Plot Grouping Type. - * - * @var string */ - private $plotGrouping; + private ?string $plotGrouping; /** * Plot Direction. - * - * @var string */ - private $plotDirection; + private string $plotDirection; /** * Plot Style. - * - * @var null|string */ - private $plotStyle; + private ?string $plotStyle = null; /** * Order of plots in Series. @@ -95,10 +87,8 @@ class DataSeries /** * Smooth Line. Must be specified for both DataSeries and DataSeriesValues. - * - * @var bool */ - private $smoothLine; + private bool $smoothLine; /** * Plot Values. @@ -112,13 +102,12 @@ class DataSeries * * @var DataSeriesValues[] */ - private $plotBubbleSizes = []; + private array $plotBubbleSizes = []; /** * Create a new DataSeries. * * @param null|mixed $plotType - * @param null|mixed $plotGrouping * @param int[] $plotOrder * @param DataSeriesValues[] $plotLabel * @param DataSeriesValues[] $plotCategory @@ -129,7 +118,7 @@ class DataSeries */ public function __construct( $plotType = null, - $plotGrouping = null, + null|string $plotGrouping = null, array $plotOrder = [], array $plotLabel = [], array $plotCategory = [], @@ -164,10 +153,8 @@ public function __construct( /** * Get Plot Type. - * - * @return string */ - public function getPlotType() + public function getPlotType(): ?string { return $this->plotType; } @@ -175,11 +162,9 @@ public function getPlotType() /** * Set Plot Type. * - * @param string $plotType - * * @return $this */ - public function setPlotType($plotType): static + public function setPlotType(string $plotType): static { $this->plotType = $plotType; @@ -188,10 +173,8 @@ public function setPlotType($plotType): static /** * Get Plot Grouping Type. - * - * @return string */ - public function getPlotGrouping() + public function getPlotGrouping(): ?string { return $this->plotGrouping; } @@ -199,11 +182,9 @@ public function getPlotGrouping() /** * Set Plot Grouping Type. * - * @param string $groupingType - * * @return $this */ - public function setPlotGrouping($groupingType): static + public function setPlotGrouping(string $groupingType): static { $this->plotGrouping = $groupingType; diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php index d076391adb..fbdc3adfbc 100644 --- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php +++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -19,31 +19,25 @@ class DataSeriesValues extends Properties /** * Series Data Type. - * - * @var string */ - private $dataType; + private string $dataType; /** * Series Data Source. * * @var ?string */ - private $dataSource; + private ?string $dataSource; /** * Format Code. - * - * @var string */ - private $formatCode; + private ?string $formatCode; /** * Series Point Marker. - * - * @var string */ - private $pointMarker; + private ?string $pointMarker; private ChartColor $markerFillColor; @@ -51,24 +45,18 @@ class DataSeriesValues extends Properties /** * Series Point Size. - * - * @var int */ - private $pointSize = 3; + private int $pointSize = 3; /** * Point Count (The number of datapoints in the dataseries). - * - * @var int */ - private $pointCount = 0; + private int $pointCount; /** * Data Values. - * - * @var mixed[] */ - private $dataValues = []; + private ?array $dataValues; /** * Fill color (can be array with colors if dataseries have custom colors). @@ -77,30 +65,30 @@ class DataSeriesValues extends Properties */ private $fillColor; - /** @var bool */ - private $scatterLines = true; + private bool $scatterLines = true; - /** @var bool */ - private $bubble3D = false; + private bool $bubble3D = false; private ?Layout $labelLayout = null; /** @var TrendLine[] */ - private $trendLines = []; + private array $trendLines = []; /** * Create a new DataSeriesValues object. * - * @param string $dataType - * @param string $dataSource - * @param null|mixed $formatCode - * @param int $pointCount - * @param mixed $dataValues - * @param null|mixed $marker * @param null|ChartColor|ChartColor[]|string|string[] $fillColor */ - public function __construct($dataType = self::DATASERIES_TYPE_NUMBER, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = [], $marker = null, $fillColor = null, int|string $pointSize = '3') - { + public function __construct( + string $dataType = self::DATASERIES_TYPE_NUMBER, + ?string $dataSource = null, + ?string $formatCode = null, + int $pointCount = 0, + ?array $dataValues = [], + ?string $marker = null, + null|ChartColor|array|string $fillColor = null, + int|string $pointSize = 3 + ) { parent::__construct(); $this->markerFillColor = new ChartColor(); $this->markerBorderColor = new ChartColor(); @@ -176,10 +164,8 @@ public function setDataSource($dataSource): static /** * Get Point Marker. - * - * @return string */ - public function getPointMarker() + public function getPointMarker(): ?string { return $this->pointMarker; } @@ -187,11 +173,9 @@ public function getPointMarker() /** * Set Point Marker. * - * @param string $marker - * * @return $this */ - public function setPointMarker($marker): static + public function setPointMarker(string $marker): static { $this->pointMarker = $marker; @@ -230,10 +214,8 @@ public function setPointSize(int $size = 3): static /** * Get Series Format Code. - * - * @return string */ - public function getFormatCode() + public function getFormatCode(): ?string { return $this->formatCode; } @@ -241,11 +223,9 @@ public function getFormatCode() /** * Set Series Format Code. * - * @param string $formatCode - * * @return $this */ - public function setFormatCode($formatCode): static + public function setFormatCode(string $formatCode): static { $this->formatCode = $formatCode; @@ -534,10 +514,8 @@ public function setBubble3D(bool $bubble3D): self /** * Smooth Line. Must be specified for both DataSeries and DataSeriesValues. - * - * @var bool */ - private $smoothLine; + private bool $smoothLine = false; /** * Get Smooth Line. diff --git a/src/PhpSpreadsheet/Chart/Legend.php b/src/PhpSpreadsheet/Chart/Legend.php index 7c5fa1833f..f6cbfccb4b 100644 --- a/src/PhpSpreadsheet/Chart/Legend.php +++ b/src/PhpSpreadsheet/Chart/Legend.php @@ -29,17 +29,13 @@ class Legend /** * Legend position. - * - * @var string */ - private $position = self::POSITION_RIGHT; + private string $position = self::POSITION_RIGHT; /** * Allow overlay of other elements? - * - * @var bool */ - private $overlay = true; + private bool $overlay = true; /** * Legend Layout. diff --git a/src/PhpSpreadsheet/Chart/PlotArea.php b/src/PhpSpreadsheet/Chart/PlotArea.php index aa72fda165..91fc669cd6 100644 --- a/src/PhpSpreadsheet/Chart/PlotArea.php +++ b/src/PhpSpreadsheet/Chart/PlotArea.php @@ -8,10 +8,8 @@ class PlotArea { /** * No fill in plot area (show Excel gridlines through chart). - * - * @var bool */ - private $noFill = false; + private bool $noFill = false; /** * PlotArea Gradient Stop list. @@ -21,7 +19,7 @@ class PlotArea * * @var array[] */ - private $gradientFillStops = []; + private array $gradientFillStops = []; /** * PlotArea Gradient Angle. @@ -160,11 +158,9 @@ public function getGradientFillStops() private ?int $gapWidth = null; - /** @var bool */ - private $useUpBars = false; + private bool $useUpBars = false; - /** @var bool */ - private $useDownBars = false; + private bool $useDownBars = false; public function getGapWidth(): ?int { diff --git a/src/PhpSpreadsheet/Chart/Properties.php b/src/PhpSpreadsheet/Chart/Properties.php index ead6b3afc2..4245b114d5 100644 --- a/src/PhpSpreadsheet/Chart/Properties.php +++ b/src/PhpSpreadsheet/Chart/Properties.php @@ -112,21 +112,18 @@ abstract class Properties const ANGLE_MULTIPLIER = 60000; // direction and size-kx size-ky const PERCENTAGE_MULTIPLIER = 100000; // size sx and sy - /** @var bool */ - protected $objectState = false; // used only for minor gridlines + protected bool $objectState = false; // used only for minor gridlines /** @var ?float */ - protected $glowSize; + protected ?float $glowSize = null; protected ChartColor $glowColor; - /** @var array */ - protected $softEdges = [ + protected array $softEdges = [ 'size' => null, ]; - /** @var array */ - protected $shadowProperties = self::PRESETS_OPTIONS[0]; + protected array $shadowProperties = self::PRESETS_OPTIONS[0]; protected ChartColor $shadowColor; @@ -719,8 +716,7 @@ public function getShadowArray(): array protected ChartColor $lineColor; - /** @var array */ - protected $lineStyleProperties = [ + protected array $lineStyleProperties = [ 'width' => null, //'9525', 'compound' => '', //self::LINE_STYLE_COMPOUND_SIMPLE, 'dash' => '', //self::LINE_STYLE_DASH_SOLID, diff --git a/src/PhpSpreadsheet/Chart/Title.php b/src/PhpSpreadsheet/Chart/Title.php index d8e6e7497f..4d7c303cdf 100644 --- a/src/PhpSpreadsheet/Chart/Title.php +++ b/src/PhpSpreadsheet/Chart/Title.php @@ -15,10 +15,8 @@ class Title /** * Allow overlay of other elements? - * - * @var bool */ - private $overlay = true; + private bool $overlay = true; /** * Title Layout. diff --git a/src/PhpSpreadsheet/Chart/TrendLine.php b/src/PhpSpreadsheet/Chart/TrendLine.php index 7ea2bde815..5814fea470 100644 --- a/src/PhpSpreadsheet/Chart/TrendLine.php +++ b/src/PhpSpreadsheet/Chart/TrendLine.php @@ -21,28 +21,21 @@ class TrendLine extends Properties private string $trendLineType = 'linear'; // TRENDLINE_LINEAR - /** @var int */ - private $order = 2; + private int $order = 2; - /** @var int */ - private $period = 3; + private int $period = 3; - /** @var bool */ - private $dispRSqr = false; + private bool $dispRSqr = false; - /** @var bool */ - private $dispEq = false; + private bool $dispEq = false; private string $name = ''; - /** @var float */ - private $backward = 0.0; + private float $backward = 0.0; - /** @var float */ - private $forward = 0.0; + private float $forward = 0.0; - /** @var float */ - private $intercept = 0.0; + private float $intercept = 0.0; /** * Create a new TrendLine object. diff --git a/src/PhpSpreadsheet/Collection/Cells.php b/src/PhpSpreadsheet/Collection/Cells.php index c0a1dbaa56..a55bd6736d 100644 --- a/src/PhpSpreadsheet/Collection/Cells.php +++ b/src/PhpSpreadsheet/Collection/Cells.php @@ -18,31 +18,23 @@ class Cells /** * Parent worksheet. - * - * @var null|Worksheet */ - private $parent; + private ?Worksheet $parent = null; /** * The currently active Cell. - * - * @var null|Cell */ - private $currentCell; + private ?Cell $currentCell = null; /** * Coordinate of the currently active Cell. - * - * @var null|string */ - private $currentCoordinate; + private ?string $currentCoordinate = null; /** * Flag indicating whether the currently active Cell requires saving. - * - * @var bool */ - private $currentCellIsDirty = false; + private bool $currentCellIsDirty = false; /** * An index of existing cells. int pointer to the coordinate (0-base-indexed row * 16,384 + 1-base indexed column) @@ -50,7 +42,7 @@ class Cells * * @var int[] */ - private $index = []; + private array $index = []; /** * Prefix used to uniquely identify cache data for this worksheet. diff --git a/src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php b/src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php index a0eb6ec221..2dae6de81b 100644 --- a/src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php +++ b/src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php @@ -16,7 +16,7 @@ class SimpleCache1 implements CacheInterface /** * @var array Cell Cache */ - private $cache = []; + private array $cache = []; /** * @return bool diff --git a/src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php b/src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php index 34f644705c..dab9f4eedd 100644 --- a/src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php +++ b/src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php @@ -16,7 +16,7 @@ class SimpleCache3 implements CacheInterface /** * @var array Cell Cache */ - private $cache = []; + private array $cache = []; public function clear(): bool { diff --git a/src/PhpSpreadsheet/Comment.php b/src/PhpSpreadsheet/Comment.php index f61e1728bf..1c07b5154e 100644 --- a/src/PhpSpreadsheet/Comment.php +++ b/src/PhpSpreadsheet/Comment.php @@ -40,10 +40,8 @@ class Comment implements IComparable, Stringable /** * Visible. - * - * @var bool */ - private $visible = false; + private bool $visible = false; /** * Comment height (CSS style, i.e. XXpx or YYpt). diff --git a/src/PhpSpreadsheet/Document/Properties.php b/src/PhpSpreadsheet/Document/Properties.php index 4ec9a2b1b0..1ebf0bedea 100644 --- a/src/PhpSpreadsheet/Document/Properties.php +++ b/src/PhpSpreadsheet/Document/Properties.php @@ -83,7 +83,7 @@ class Properties * * @var array{value: mixed, type: string}[] */ - private $customProperties = []; + private array $customProperties = []; private string $hyperlinkBase = ''; diff --git a/src/PhpSpreadsheet/Document/Security.php b/src/PhpSpreadsheet/Document/Security.php index b542718fa0..31a32beb42 100644 --- a/src/PhpSpreadsheet/Document/Security.php +++ b/src/PhpSpreadsheet/Document/Security.php @@ -8,24 +8,18 @@ class Security { /** * LockRevision. - * - * @var bool */ - private $lockRevision = false; + private bool $lockRevision = false; /** * LockStructure. - * - * @var bool */ - private $lockStructure = false; + private bool $lockStructure = false; /** * LockWindows. - * - * @var bool */ - private $lockWindows = false; + private bool $lockWindows = false; /** * RevisionsPassword. diff --git a/src/PhpSpreadsheet/HashTable.php b/src/PhpSpreadsheet/HashTable.php index 3647332219..c9762ab478 100644 --- a/src/PhpSpreadsheet/HashTable.php +++ b/src/PhpSpreadsheet/HashTable.php @@ -12,14 +12,14 @@ class HashTable * * @var array */ - protected $items = []; + protected array $items = []; /** * HashTable key map. * * @var array */ - protected $keyMap = []; + protected array $keyMap = []; /** * Create a new HashTable. diff --git a/src/PhpSpreadsheet/Helper/Dimension.php b/src/PhpSpreadsheet/Helper/Dimension.php index 7afb803c40..cb053da836 100644 --- a/src/PhpSpreadsheet/Helper/Dimension.php +++ b/src/PhpSpreadsheet/Helper/Dimension.php @@ -50,10 +50,7 @@ class Dimension */ protected float|int $size; - /** - * @var null|string - */ - protected $unit; + protected ?string $unit = null; /** * Phpstan bug has been fixed; this function allows us to diff --git a/src/PhpSpreadsheet/Helper/Handler.php b/src/PhpSpreadsheet/Helper/Handler.php index d05197cef0..fb1b9a04d5 100644 --- a/src/PhpSpreadsheet/Helper/Handler.php +++ b/src/PhpSpreadsheet/Helper/Handler.php @@ -4,8 +4,7 @@ class Handler { - /** @var string */ - private static $invalidHex = 'Y'; + private static string $invalidHex = 'Y'; // A bunch of methods to show that we continue // to capture messages even using PhpUnit 10. diff --git a/src/PhpSpreadsheet/Helper/Html.php b/src/PhpSpreadsheet/Helper/Html.php index 9b2d1d5236..05b47176e8 100644 --- a/src/PhpSpreadsheet/Helper/Html.php +++ b/src/PhpSpreadsheet/Helper/Html.php @@ -533,34 +533,28 @@ class Html ]; /** @var ?string */ - private $face; + private ?string $face = null; /** @var ?string */ - private $size; + private ?string $size = null; /** @var ?string */ - private $color; + private ?string $color = null; - /** @var bool */ - private $bold = false; + private bool $bold = false; - /** @var bool */ - private $italic = false; + private bool $italic = false; - /** @var bool */ - private $underline = false; + private bool $underline = false; - /** @var bool */ - private $superscript = false; + private bool $superscript = false; - /** @var bool */ - private $subscript = false; + private bool $subscript = false; - /** @var bool */ - private $strikethrough = false; + private bool $strikethrough = false; /** @var callable[] */ - private $startTagCallbacks = [ + private array $startTagCallbacks = [ 'font' => [self::class, 'startFontTag'], 'b' => [self::class, 'startBoldTag'], 'strong' => [self::class, 'startBoldTag'], @@ -574,7 +568,7 @@ class Html ]; /** @var callable[] */ - private $endTagCallbacks = [ + private array $endTagCallbacks = [ 'font' => [self::class, 'endFontTag'], 'b' => [self::class, 'endBoldTag'], 'strong' => [self::class, 'endBoldTag'], @@ -595,15 +589,11 @@ class Html 'h6' => [self::class, 'breakTag'], ]; - /** @var array */ - private $stack = []; + private array $stack = []; public string $stringData = ''; - /** - * @var RichText - */ - private $richTextObject; + private RichText $richTextObject; private function initialise(): void { diff --git a/src/PhpSpreadsheet/Helper/TextGrid.php b/src/PhpSpreadsheet/Helper/TextGrid.php index 8088560d02..f706b58fbe 100644 --- a/src/PhpSpreadsheet/Helper/TextGrid.php +++ b/src/PhpSpreadsheet/Helper/TextGrid.php @@ -12,10 +12,7 @@ class TextGrid protected array $columns; - /** - * @var string - */ - private $gridDisplay; + private string $gridDisplay; public function __construct(array $matrix, bool $isCli = true) { diff --git a/src/PhpSpreadsheet/IOFactory.php b/src/PhpSpreadsheet/IOFactory.php index 454b2aae40..b895b6e603 100644 --- a/src/PhpSpreadsheet/IOFactory.php +++ b/src/PhpSpreadsheet/IOFactory.php @@ -31,7 +31,7 @@ abstract class IOFactory public const WRITER_HTML = 'Html'; /** @var string[] */ - private static $readers = [ + private static array $readers = [ self::READER_XLSX => Reader\Xlsx::class, self::READER_XLS => Reader\Xls::class, self::READER_XML => Reader\Xml::class, @@ -43,7 +43,7 @@ abstract class IOFactory ]; /** @var string[] */ - private static $writers = [ + private static array $writers = [ self::WRITER_XLS => Writer\Xls::class, self::WRITER_XLSX => Writer\Xlsx::class, self::WRITER_ODS => Writer\Ods::class, diff --git a/src/PhpSpreadsheet/Reader/BaseReader.php b/src/PhpSpreadsheet/Reader/BaseReader.php index 435926531f..23fdf9917c 100644 --- a/src/PhpSpreadsheet/Reader/BaseReader.php +++ b/src/PhpSpreadsheet/Reader/BaseReader.php @@ -14,27 +14,21 @@ abstract class BaseReader implements IReader * Read data only? * Identifies whether the Reader should only read data values for cells, and ignore any formatting information; * or whether it should read both data and formatting. - * - * @var bool */ - protected $readDataOnly = false; + protected bool $readDataOnly = false; /** * Read empty cells? * Identifies whether the Reader should read data values for cells all cells, or should ignore cells containing * null value or empty string. - * - * @var bool */ - protected $readEmptyCells = true; + protected bool $readEmptyCells = true; /** * Read charts that are defined in the workbook? * Identifies whether the Reader should read the definitions for any charts that exist in the workbook;. - * - * @var bool */ - protected $includeCharts = false; + protected bool $includeCharts = false; /** * Restrict which sheets should be loaded? @@ -43,14 +37,12 @@ abstract class BaseReader implements IReader * * @var null|string[] */ - protected $loadSheetsOnly; + protected ?array $loadSheetsOnly = null; /** * IReadFilter instance. - * - * @var IReadFilter */ - protected $readFilter; + protected IReadFilter $readFilter; /** @var resource */ protected $fileHandle; diff --git a/src/PhpSpreadsheet/Reader/Csv.php b/src/PhpSpreadsheet/Reader/Csv.php index a93bbcf4c7..35a4742002 100644 --- a/src/PhpSpreadsheet/Reader/Csv.php +++ b/src/PhpSpreadsheet/Reader/Csv.php @@ -37,10 +37,8 @@ class Csv extends BaseReader /** * Fallback encoding if guess strikes out. - * - * @var string */ - private $fallbackEncoding = self::DEFAULT_FALLBACK_ENCODING; + private string $fallbackEncoding = self::DEFAULT_FALLBACK_ENCODING; /** * Delimiter. @@ -54,17 +52,13 @@ class Csv extends BaseReader /** * Sheet index to read. - * - * @var int */ - private $sheetIndex = 0; + private int $sheetIndex = 0; /** * Load rows contiguously. - * - * @var bool */ - private $contiguous = false; + private bool $contiguous = false; /** * The character that can escape the enclosure. @@ -80,26 +74,16 @@ class Csv extends BaseReader /** * Attempt autodetect line endings (deprecated after PHP8.1)? - * - * @var bool */ - private $testAutodetect = true; + private bool $testAutodetect = true; - /** - * @var bool - */ - protected $castFormattedNumberToNumeric = false; + protected bool $castFormattedNumberToNumeric = false; - /** - * @var bool - */ - protected $preserveNumericFormatting = false; + protected bool $preserveNumericFormatting = false; - /** @var bool */ - private $preserveNullString = false; + private bool $preserveNullString = false; - /** @var bool */ - private $sheetNameIsFileName = false; + private bool $sheetNameIsFileName = false; private string $getTrue = 'true'; diff --git a/src/PhpSpreadsheet/Reader/Csv/Delimiter.php b/src/PhpSpreadsheet/Reader/Csv/Delimiter.php index 8721be164f..d13156f315 100644 --- a/src/PhpSpreadsheet/Reader/Csv/Delimiter.php +++ b/src/PhpSpreadsheet/Reader/Csv/Delimiter.php @@ -13,14 +13,12 @@ class Delimiter protected string $enclosure; - /** @var array */ - protected $counts = []; + protected array $counts = []; - /** @var int */ - protected $numberLines = 0; + protected int $numberLines = 0; /** @var ?string */ - protected $delimiter; + protected ?string $delimiter = null; /** * @param resource $fileHandle diff --git a/src/PhpSpreadsheet/Reader/Gnumeric.php b/src/PhpSpreadsheet/Reader/Gnumeric.php index 729745f140..ebf4aae037 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -36,22 +36,17 @@ class Gnumeric extends BaseReader /** * Shared Expressions. - * - * @var array */ - private $expressions = []; + private array $expressions = []; /** * Spreadsheet shared across all functions. - * - * @var Spreadsheet */ - private $spreadsheet; + private Spreadsheet $spreadsheet; private ReferenceHelper $referenceHelper; - /** @var array */ - public static $mappings = [ + public static array $mappings = [ 'dataType' => [ '10' => DataType::TYPE_NULL, '20' => DataType::TYPE_BOOL, diff --git a/src/PhpSpreadsheet/Reader/Gnumeric/Styles.php b/src/PhpSpreadsheet/Reader/Gnumeric/Styles.php index 4b75165879..f901c4a9bb 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric/Styles.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric/Styles.php @@ -18,8 +18,7 @@ class Styles protected bool $readDataOnly; - /** @var array */ - public static $mappings = [ + public static array $mappings = [ 'borderStyle' => [ '0' => Border::BORDER_NONE, '1' => Border::BORDER_THIN, diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index 6fcf31d7da..ad249cb1ce 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -30,24 +30,18 @@ class Html extends BaseReader /** * Input encoding. - * - * @var string */ - protected $inputEncoding = 'ANSI'; + protected string $inputEncoding = 'ANSI'; /** * Sheet index to read. - * - * @var int */ - protected $sheetIndex = 0; + protected int $sheetIndex = 0; /** * Formats. - * - * @var array */ - protected $formats = [ + protected array $formats = [ 'h1' => [ 'font' => [ 'bold' => true, @@ -124,8 +118,7 @@ class Html extends BaseReader ], // Italic ]; - /** @var array */ - protected $rowspan = []; + protected array $rowspan = []; /** * Create a new HTML Reader instance. @@ -246,14 +239,11 @@ public function getInputEncoding() // Data Array used for testing only, should write to Spreadsheet object on completion of tests - /** @var array */ - protected $dataArray = []; + protected array $dataArray = []; - /** @var int */ - protected $tableLevel = 0; + protected int $tableLevel = 0; - /** @var array */ - protected $nestedColumn = ['A']; + protected array $nestedColumn = ['A']; protected function setTableStartColumn(string $column): string { diff --git a/src/PhpSpreadsheet/Reader/Ods/PageSettings.php b/src/PhpSpreadsheet/Reader/Ods/PageSettings.php index 0abc1f00de..f3e956c91f 100644 --- a/src/PhpSpreadsheet/Reader/Ods/PageSettings.php +++ b/src/PhpSpreadsheet/Reader/Ods/PageSettings.php @@ -8,43 +8,30 @@ class PageSettings { - /** - * @var string - */ - private $officeNs = ''; + private string $officeNs = ''; - /** - * @var string - */ - private $stylesNs = ''; + private string $stylesNs = ''; - /** - * @var string - */ - private $stylesFo = ''; + private string $stylesFo = ''; - /** - * @var string - */ - private $tableNs = ''; + private string $tableNs = ''; /** * @var string[] */ - private $tableStylesCrossReference = []; + private array $tableStylesCrossReference = []; - /** @var array */ - private $pageLayoutStyles = []; + private array $pageLayoutStyles = []; /** * @var string[] */ - private $masterStylesCrossReference = []; + private array $masterStylesCrossReference = []; /** * @var string[] */ - private $masterPrintStylesCrossReference = []; + private array $masterPrintStylesCrossReference = []; public function __construct(DOMDocument $styleDom) { diff --git a/src/PhpSpreadsheet/Reader/Slk.php b/src/PhpSpreadsheet/Reader/Slk.php index 275d0971b9..466e6068c0 100644 --- a/src/PhpSpreadsheet/Reader/Slk.php +++ b/src/PhpSpreadsheet/Reader/Slk.php @@ -16,45 +16,33 @@ class Slk extends BaseReader { /** * Input encoding. - * - * @var string */ - private $inputEncoding = 'ANSI'; + private string $inputEncoding = 'ANSI'; /** * Sheet index to read. - * - * @var int */ - private $sheetIndex = 0; + private int $sheetIndex = 0; /** * Formats. - * - * @var array */ - private $formats = []; + private array $formats = []; /** * Format Count. - * - * @var int */ - private $format = 0; + private int $format = 0; /** * Fonts. - * - * @var array */ - private $fonts = []; + private array $fonts = []; /** * Font Count. - * - * @var int */ - private $fontcount = 0; + private int $fontcount = 0; /** * Create a new SYLK Reader instance. diff --git a/src/PhpSpreadsheet/Reader/Xls.php b/src/PhpSpreadsheet/Reader/Xls.php index 4b4a8e4844..b9cd6de0dd 100644 --- a/src/PhpSpreadsheet/Reader/Xls.php +++ b/src/PhpSpreadsheet/Reader/Xls.php @@ -164,56 +164,44 @@ class Xls extends BaseReader * * @var ?string */ - private $summaryInformation; + private ?string $summaryInformation = null; /** * Extended Summary Information stream data. * * @var ?string */ - private $documentSummaryInformation; + private ?string $documentSummaryInformation = null; /** * Workbook stream data. (Includes workbook globals substream as well as sheet substreams). - * - * @var string */ - private $data; + private string $data; /** * Size in bytes of $this->data. - * - * @var int */ - private $dataSize; + private int $dataSize; /** * Current position in stream. - * - * @var int */ - private $pos; + private int $pos; /** * Workbook to be returned by the reader. - * - * @var Spreadsheet */ - private $spreadsheet; + private Spreadsheet $spreadsheet; /** * Worksheet that is currently being built by the reader. - * - * @var Worksheet */ - private $phpSheet; + private Worksheet $phpSheet; /** * BIFF version. - * - * @var int */ - private $version = 0; + private int $version = 0; /** * Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95) @@ -223,200 +211,145 @@ class Xls extends BaseReader /** * Shared formats. - * - * @var array */ - private $formats; + private array $formats; /** * Shared fonts. * * @var Font[] */ - private $objFonts; + private array $objFonts; /** * Color palette. - * - * @var array */ - private $palette; + private array $palette; /** * Worksheets. - * - * @var array */ - private $sheets; + private array $sheets; /** * External books. - * - * @var array */ - private $externalBooks; + private array $externalBooks; /** * REF structures. Only applies to BIFF8. - * - * @var array */ - private $ref; + private array $ref; /** * External names. - * - * @var array */ - private $externalNames; + private array $externalNames; /** * Defined names. - * - * @var array */ - private $definedname; + private array $definedname; /** * Shared strings. Only applies to BIFF8. - * - * @var array */ - private $sst; + private array $sst; /** * Panes are frozen? (in sheet currently being read). See WINDOW2 record. - * - * @var bool */ - private $frozen; + private bool $frozen; /** * Fit printout to number of pages? (in sheet currently being read). See SHEETPR record. - * - * @var bool */ - private $isFitToPages; + private bool $isFitToPages; /** * Objects. One OBJ record contributes with one entry. - * - * @var array */ - private $objs; + private array $objs; /** * Text Objects. One TXO record corresponds with one entry. - * - * @var array */ - private $textObjects; + private array $textObjects; /** * Cell Annotations (BIFF8). - * - * @var array */ - private $cellNotes; + private array $cellNotes; /** * The combined MSODRAWINGGROUP data. - * - * @var string */ - private $drawingGroupData; + private string $drawingGroupData; /** * The combined MSODRAWING data (per sheet). - * - * @var string */ - private $drawingData; + private string $drawingData; /** * Keep track of XF index. - * - * @var int */ - private $xfIndex; + private int $xfIndex; /** * Mapping of XF index (that is a cell XF) to final index in cellXf collection. - * - * @var array */ - private $mapCellXfIndex; + private array $mapCellXfIndex; /** * Mapping of XF index (that is a style XF) to final index in cellStyleXf collection. - * - * @var array */ - private $mapCellStyleXfIndex; + private array $mapCellStyleXfIndex; /** * The shared formulas in a sheet. One SHAREDFMLA record contributes with one value. - * - * @var array */ - private $sharedFormulas; + private array $sharedFormulas; /** * The shared formula parts in a sheet. One FORMULA record contributes with one value if it * refers to a shared formula. - * - * @var array */ - private $sharedFormulaParts; + private array $sharedFormulaParts; /** * The type of encryption in use. - * - * @var int */ - private $encryption = 0; + private int $encryption = 0; /** * The position in the stream after which contents are encrypted. - * - * @var int */ - private $encryptionStartPos = 0; + private int $encryptionStartPos = 0; /** * The current RC4 decryption object. * * @var ?Xls\RC4 */ - private $rc4Key; + private ?Xls\RC4 $rc4Key = null; /** * The position in the stream that the RC4 decryption object was left at. - * - * @var int */ - private $rc4Pos = 0; + private int $rc4Pos = 0; /** * The current MD5 context state. * It is never set in the program, so code which uses it is suspect. - * - * @var string */ - private $md5Ctxt; // @phpstan-ignore-line + private string $md5Ctxt; // @phpstan-ignore-line - /** - * @var int - */ - private $textObjRef; + private int $textObjRef; - /** - * @var string - */ - private $baseCell; + private string $baseCell; - /** @var bool */ - private $activeSheetSet = false; + private bool $activeSheetSet = false; /** * Create a new Xls Reader instance. diff --git a/src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php b/src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php index 8400efb940..fbd31d565e 100644 --- a/src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php +++ b/src/PhpSpreadsheet/Reader/Xls/ConditionalFormatting.php @@ -9,7 +9,7 @@ class ConditionalFormatting /** * @var array */ - private static $types = [ + private static array $types = [ 0x01 => Conditional::CONDITION_CELLIS, 0x02 => Conditional::CONDITION_EXPRESSION, ]; @@ -17,7 +17,7 @@ class ConditionalFormatting /** * @var array */ - private static $operators = [ + private static array $operators = [ 0x00 => Conditional::OPERATOR_NONE, 0x01 => Conditional::OPERATOR_BETWEEN, 0x02 => Conditional::OPERATOR_NOTBETWEEN, diff --git a/src/PhpSpreadsheet/Reader/Xls/DataValidationHelper.php b/src/PhpSpreadsheet/Reader/Xls/DataValidationHelper.php index 02f844e314..874e6994fd 100644 --- a/src/PhpSpreadsheet/Reader/Xls/DataValidationHelper.php +++ b/src/PhpSpreadsheet/Reader/Xls/DataValidationHelper.php @@ -9,7 +9,7 @@ class DataValidationHelper /** * @var array */ - private static $types = [ + private static array $types = [ 0x00 => DataValidation::TYPE_NONE, 0x01 => DataValidation::TYPE_WHOLE, 0x02 => DataValidation::TYPE_DECIMAL, @@ -23,7 +23,7 @@ class DataValidationHelper /** * @var array */ - private static $errorStyles = [ + private static array $errorStyles = [ 0x00 => DataValidation::STYLE_STOP, 0x01 => DataValidation::STYLE_WARNING, 0x02 => DataValidation::STYLE_INFORMATION, @@ -32,7 +32,7 @@ class DataValidationHelper /** * @var array */ - private static $operators = [ + private static array $operators = [ 0x00 => DataValidation::OPERATOR_BETWEEN, 0x01 => DataValidation::OPERATOR_NOTBETWEEN, 0x02 => DataValidation::OPERATOR_EQUAL, diff --git a/src/PhpSpreadsheet/Reader/Xls/Escher.php b/src/PhpSpreadsheet/Reader/Xls/Escher.php index 66c6298ce4..feefb4fa43 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Escher.php +++ b/src/PhpSpreadsheet/Reader/Xls/Escher.php @@ -35,24 +35,18 @@ class Escher /** * Escher stream data (binary). - * - * @var string */ - private $data; + private string $data; /** * Size in bytes of the Escher stream data. - * - * @var int */ - private $dataSize; + private int $dataSize; /** * Current position of stream pointer in Escher stream data. - * - * @var int */ - private $pos; + private int $pos; /** * The object to be returned by the reader. Modified during load. diff --git a/src/PhpSpreadsheet/Reader/Xls/MD5.php b/src/PhpSpreadsheet/Reader/Xls/MD5.php index 8f02130fe4..7da2eeee5f 100644 --- a/src/PhpSpreadsheet/Reader/Xls/MD5.php +++ b/src/PhpSpreadsheet/Reader/Xls/MD5.php @@ -4,25 +4,13 @@ class MD5 { - /** - * @var int - */ - private $a; + private int $a; - /** - * @var int - */ - private $b; + private int $b; - /** - * @var int - */ - private $c; + private int $c; - /** - * @var int - */ - private $d; + private int $d; private static int $allOneBits; diff --git a/src/PhpSpreadsheet/Reader/Xls/RC4.php b/src/PhpSpreadsheet/Reader/Xls/RC4.php index b7c7c900c8..b5458f68b9 100644 --- a/src/PhpSpreadsheet/Reader/Xls/RC4.php +++ b/src/PhpSpreadsheet/Reader/Xls/RC4.php @@ -5,13 +5,11 @@ class RC4 { /** @var int[] */ - protected $s = []; // Context + protected array $s = []; // Context - /** @var int */ - protected $i = 0; + protected int $i = 0; - /** @var int */ - protected $j = 0; + protected int $j = 0; /** * RC4 stream decryption/encryption constrcutor. diff --git a/src/PhpSpreadsheet/Reader/Xls/Style/Border.php b/src/PhpSpreadsheet/Reader/Xls/Style/Border.php index d832eb020f..97cebbd44e 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Style/Border.php +++ b/src/PhpSpreadsheet/Reader/Xls/Style/Border.php @@ -9,7 +9,7 @@ class Border /** * @var array */ - protected static $borderStyleMap = [ + protected static array $borderStyleMap = [ 0x00 => StyleBorder::BORDER_NONE, 0x01 => StyleBorder::BORDER_THIN, 0x02 => StyleBorder::BORDER_MEDIUM, diff --git a/src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php b/src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php index f03d47fae6..6b89d27e0a 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php +++ b/src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php @@ -9,7 +9,7 @@ class CellAlignment /** * @var array */ - protected static $horizontalAlignmentMap = [ + protected static array $horizontalAlignmentMap = [ 0 => Alignment::HORIZONTAL_GENERAL, 1 => Alignment::HORIZONTAL_LEFT, 2 => Alignment::HORIZONTAL_CENTER, @@ -22,7 +22,7 @@ class CellAlignment /** * @var array */ - protected static $verticalAlignmentMap = [ + protected static array $verticalAlignmentMap = [ 0 => Alignment::VERTICAL_TOP, 1 => Alignment::VERTICAL_CENTER, 2 => Alignment::VERTICAL_BOTTOM, diff --git a/src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php b/src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php index e975be4dce..2c6d2f7f9e 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php +++ b/src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php @@ -23,7 +23,7 @@ public static function escapement(Font $font, int $escapement): void /** * @var array */ - protected static $underlineMap = [ + protected static array $underlineMap = [ 0x01 => Font::UNDERLINE_SINGLE, 0x02 => Font::UNDERLINE_DOUBLE, 0x21 => Font::UNDERLINE_SINGLEACCOUNTING, diff --git a/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php b/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php index 32ab5c859b..a688386889 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php +++ b/src/PhpSpreadsheet/Reader/Xls/Style/FillPattern.php @@ -9,7 +9,7 @@ class FillPattern /** * @var array */ - protected static $fillPatternMap = [ + protected static array $fillPatternMap = [ 0x00 => Fill::FILL_NONE, 0x01 => Fill::FILL_SOLID, 0x02 => Fill::FILL_PATTERN_MEDIUMGRAY, diff --git a/src/PhpSpreadsheet/Reader/Xlsx.php b/src/PhpSpreadsheet/Reader/Xlsx.php index 99fb3937d5..32b09bc19d 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx.php +++ b/src/PhpSpreadsheet/Reader/Xlsx.php @@ -52,18 +52,11 @@ class Xlsx extends BaseReader */ private ReferenceHelper $referenceHelper; - /** - * @var ZipArchive - */ - private $zip; + private ZipArchive $zip; - /** @var Styles */ - private $styleReader; + private Styles $styleReader; - /** - * @var array - */ - private $sharedFormulae = []; + private array $sharedFormulae = []; /** * Create a new Xlsx Reader instance. diff --git a/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php b/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php index 280c75eb09..d8a3dfb1f4 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php @@ -20,10 +20,7 @@ class ConditionalStyles private SimpleXMLElement $worksheetXml; - /** - * @var array - */ - private $ns; + private array $ns; private array $dxfs; diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php b/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php index e047f236ae..0c5b9a1ba0 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php @@ -11,8 +11,7 @@ class Hyperlinks { private Worksheet $worksheet; - /** @var array */ - private $hyperlinks = []; + private array $hyperlinks = []; public function __construct(Worksheet $workSheet) { diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Styles.php b/src/PhpSpreadsheet/Reader/Xlsx/Styles.php index 46ecd3e675..8158937fed 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Styles.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -22,22 +22,17 @@ class Styles extends BaseParserClass * * @var ?Theme */ - private $theme; + private ?Theme $theme = null; - /** @var array */ - private $workbookPalette = []; + private array $workbookPalette = []; - /** @var array */ - private $styles = []; + private array $styles = []; - /** @var array */ - private $cellStyles = []; + private array $cellStyles = []; - /** @var SimpleXMLElement */ - private $styleXml; + private SimpleXMLElement $styleXml; - /** @var string */ - private $namespace = ''; + private string $namespace = ''; public function setNamespace(string $namespace): void { diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Theme.php b/src/PhpSpreadsheet/Reader/Xlsx/Theme.php index 706c4d1931..bfd322126e 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Theme.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Theme.php @@ -6,24 +6,20 @@ class Theme { /** * Theme Name. - * - * @var string */ - private $themeName; + private string $themeName; /** * Colour Scheme Name. - * - * @var string */ - private $colourSchemeName; + private string $colourSchemeName; /** * Colour Map. * * @var string[] */ - private $colourMap; + private array $colourMap; /** * Create a new Theme. diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index 09baf33214..5199c44e9e 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -31,10 +31,8 @@ class Xml extends BaseReader /** * Formats. - * - * @var array */ - protected $styles = []; + protected array $styles = []; /** * Create a new Excel2003XML Reader instance. @@ -45,8 +43,7 @@ public function __construct() $this->securityScanner = XmlScanner::getInstance($this); } - /** @var string */ - private $fileContents = ''; + private string $fileContents = ''; public static function xmlMappings(): array { diff --git a/src/PhpSpreadsheet/Reader/Xml/Style.php b/src/PhpSpreadsheet/Reader/Xml/Style.php index 698acf6ac0..2ad2d6dfd1 100644 --- a/src/PhpSpreadsheet/Reader/Xml/Style.php +++ b/src/PhpSpreadsheet/Reader/Xml/Style.php @@ -9,10 +9,8 @@ class Style { /** * Formats. - * - * @var array */ - protected $styles = []; + protected array $styles = []; public function parseStyles(SimpleXMLElement $xml, array $namespaces): array { diff --git a/src/PhpSpreadsheet/ReferenceHelper.php b/src/PhpSpreadsheet/ReferenceHelper.php index 5ec7967084..827da85309 100644 --- a/src/PhpSpreadsheet/ReferenceHelper.php +++ b/src/PhpSpreadsheet/ReferenceHelper.php @@ -25,12 +25,9 @@ class ReferenceHelper * * @var ?ReferenceHelper */ - private static $instance; + private static ?ReferenceHelper $instance = null; - /** - * @var CellReferenceHelper - */ - private $cellReferenceHelper; + private ?CellReferenceHelper $cellReferenceHelper = null; /** * Get an instance of this class. diff --git a/src/PhpSpreadsheet/RichText/Run.php b/src/PhpSpreadsheet/RichText/Run.php index 4acc155c24..3a18b4a4a4 100644 --- a/src/PhpSpreadsheet/RichText/Run.php +++ b/src/PhpSpreadsheet/RichText/Run.php @@ -11,7 +11,7 @@ class Run extends TextElement implements ITextElement * * @var ?Font */ - private $font; + private ?Font $font = null; /** * Create a new Run instance. diff --git a/src/PhpSpreadsheet/RichText/TextElement.php b/src/PhpSpreadsheet/RichText/TextElement.php index 073dd7a8c9..c56fe51e66 100644 --- a/src/PhpSpreadsheet/RichText/TextElement.php +++ b/src/PhpSpreadsheet/RichText/TextElement.php @@ -8,10 +8,8 @@ class TextElement implements ITextElement { /** * Text. - * - * @var string */ - private $text; + private string $text; /** * Create a new TextElement instance. diff --git a/src/PhpSpreadsheet/Settings.php b/src/PhpSpreadsheet/Settings.php index 9f2ef0cd89..e8bcf61770 100644 --- a/src/PhpSpreadsheet/Settings.php +++ b/src/PhpSpreadsheet/Settings.php @@ -18,33 +18,28 @@ class Settings * * @var ?string */ - private static $chartRenderer; + private static ?string $chartRenderer = null; /** * Default options for libxml loader. * * @var ?int */ - private static $libXmlLoaderOptions; + private static ?int $libXmlLoaderOptions = null; /** * The cache implementation to be used for cell collection. * * @var ?CacheInterface */ - private static $cache; + private static ?CacheInterface $cache = null; /** * The HTTP client implementation to be used for network request. - * - * @var null|ClientInterface */ - private static $httpClient; + private static ?ClientInterface $httpClient = null; - /** - * @var null|RequestFactoryInterface - */ - private static $requestFactory; + private static ?RequestFactoryInterface $requestFactory = null; /** * Set the locale code to use for formula translations and any special formatting. diff --git a/src/PhpSpreadsheet/Shared/CodePage.php b/src/PhpSpreadsheet/Shared/CodePage.php index 8718a6135e..307f8d931b 100644 --- a/src/PhpSpreadsheet/Shared/CodePage.php +++ b/src/PhpSpreadsheet/Shared/CodePage.php @@ -8,8 +8,7 @@ class CodePage { public const DEFAULT_CODE_PAGE = 'CP1252'; - /** @var array */ - private static $pageArray = [ + private static array $pageArray = [ 0 => 'CP1252', // CodePage is not always correctly set when the xls file was saved by Apple's Numbers program 367 => 'ASCII', // ASCII 437 => 'CP437', // OEM US diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php index faa80cd064..66bbb801eb 100644 --- a/src/PhpSpreadsheet/Shared/Date.php +++ b/src/PhpSpreadsheet/Shared/Date.php @@ -25,7 +25,7 @@ class Date * * @var string[] */ - public static $monthNames = [ + public static array $monthNames = [ 'Jan' => 'January', 'Feb' => 'February', 'Mar' => 'March', @@ -43,7 +43,7 @@ class Date /** * @var string[] */ - public static $numberSuffixes = [ + public static array $numberSuffixes = [ 'st', 'nd', 'rd', @@ -53,17 +53,13 @@ class Date /** * Base calendar year to use for calculations * Value is either CALENDAR_WINDOWS_1900 (1900) or CALENDAR_MAC_1904 (1904). - * - * @var int */ - protected static $excelCalendar = self::CALENDAR_WINDOWS_1900; + protected static int $excelCalendar = self::CALENDAR_WINDOWS_1900; /** * Default timezone to use for DateTime objects. - * - * @var null|DateTimeZone */ - protected static $defaultTimeZone; + protected static ?DateTimeZone $defaultTimeZone = null; /** * Set the Excel calendar (Windows 1900 or Mac 1904). diff --git a/src/PhpSpreadsheet/Shared/Escher.php b/src/PhpSpreadsheet/Shared/Escher.php index 466e7e8254..49c1baabe9 100644 --- a/src/PhpSpreadsheet/Shared/Escher.php +++ b/src/PhpSpreadsheet/Shared/Escher.php @@ -9,14 +9,14 @@ class Escher * * @var ?Escher\DggContainer */ - private $dggContainer; + private ?Escher\DggContainer $dggContainer = null; /** * Drawing Container. * * @var ?Escher\DgContainer */ - private $dgContainer; + private ?Escher\DgContainer $dgContainer = null; /** * Get Drawing Group Container. diff --git a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php index 01cbecc26e..6f2751f7c9 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php @@ -11,10 +11,8 @@ class SpgrContainer /** * Shape Container collection. - * - * @var array */ - private $children = []; + private array $children = []; /** * Set parent Shape Group Container. diff --git a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php index 7f010c5c03..0a0333fb7b 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php @@ -8,87 +8,63 @@ class SpContainer { /** * Parent Shape Group Container. - * - * @var SpgrContainer */ - private $parent; + private SpgrContainer $parent; /** * Is this a group shape? - * - * @var bool */ - private $spgr = false; + private bool $spgr = false; /** * Shape type. - * - * @var int */ - private $spType; + private int $spType; /** * Shape flag. - * - * @var int */ - private $spFlag; + private int $spFlag; /** * Shape index (usually group shape has index 0, and the rest: 1,2,3...). - * - * @var int */ - private $spId; + private int $spId; /** * Array of options. - * - * @var array */ - private $OPT; + private array $OPT = []; /** * Cell coordinates of upper-left corner of shape, e.g. 'A1'. - * - * @var string */ - private $startCoordinates; + private string $startCoordinates = ''; /** * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width. - * - * @var int */ - private $startOffsetX; + private int $startOffsetX; /** * Vertical offset of upper-left corner of shape measured in 1/256 of row height. - * - * @var int */ - private $startOffsetY; + private int $startOffsetY; /** * Cell coordinates of bottom-right corner of shape, e.g. 'B2'. - * - * @var string */ - private $endCoordinates; + private string $endCoordinates; /** * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width. - * - * @var int */ - private $endOffsetX; + private int $endOffsetX; /** * Vertical offset of bottom-right corner of shape measured in 1/256 of row height. - * - * @var int */ - private $endOffsetY; + private int $endOffsetY; /** * Set parent Shape Group Container. diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer.php index 3a4011095f..36d9e30c0d 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer.php @@ -6,45 +6,35 @@ class DggContainer { /** * Maximum shape index of all shapes in all drawings increased by one. - * - * @var int */ - private $spIdMax; + private int $spIdMax; /** * Total number of drawings saved. - * - * @var int */ - private $cDgSaved; + private int $cDgSaved; /** * Total number of shapes saved (including group shapes). - * - * @var int */ - private $cSpSaved; + private int $cSpSaved; /** * BLIP Store Container. * * @var ?DggContainer\BstoreContainer */ - private $bstoreContainer; + private ?DggContainer\BstoreContainer $bstoreContainer = null; /** * Array of options for the drawing group. - * - * @var array */ - private $OPT = []; + private array $OPT = []; /** * Array of identifier clusters containg information about the maximum shape identifiers. - * - * @var array */ - private $IDCLs = []; + private array $IDCLs = []; /** * Get maximum shape index of all shapes in all drawings (plus one). diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php index 7203b66bea..a7ed4bae8b 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer.php @@ -9,7 +9,7 @@ class BstoreContainer * * @var BstoreContainer\BSE[] */ - private $BSECollection = []; + private array $BSECollection = []; /** * Add a BLIP Store Entry. diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php index 328ac6b6c2..9b175a0e7a 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php @@ -20,24 +20,20 @@ class BSE /** * The parent BLIP Store Entry Container. * Property is never currently read. - * - * @var BstoreContainer */ - private $parent; // @phpstan-ignore-line + private BstoreContainer $parent; // @phpstan-ignore-line /** * The BLIP (Big Large Image or Picture). * * @var ?BSE\Blip */ - private $blip; + private ?BSE\Blip $blip = null; /** * The BLIP type. - * - * @var int */ - private $blipType; + private int $blipType; /** * Set parent BLIP Store Entry Container. diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php index ea036afff2..849c6c2238 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php @@ -13,10 +13,8 @@ class Blip /** * Raw image data. - * - * @var string */ - private $data; + private string $data; /** * Get the raw image data. diff --git a/src/PhpSpreadsheet/Shared/File.php b/src/PhpSpreadsheet/Shared/File.php index 737a6eb591..ecd9cb575a 100644 --- a/src/PhpSpreadsheet/Shared/File.php +++ b/src/PhpSpreadsheet/Shared/File.php @@ -10,10 +10,8 @@ class File { /** * Use Temp or File Upload Temp for temporary files. - * - * @var bool */ - protected static $useUploadTempDirectory = false; + protected static bool $useUploadTempDirectory = false; /** * Set the flag indicating whether the File Upload Temp directory should be used for temporary files. diff --git a/src/PhpSpreadsheet/Shared/Font.php b/src/PhpSpreadsheet/Shared/Font.php index fb335a7f5b..dde5193d52 100644 --- a/src/PhpSpreadsheet/Shared/Font.php +++ b/src/PhpSpreadsheet/Shared/Font.php @@ -202,10 +202,8 @@ class Font /** * Array that can be used to supplement FONT_FILE_NAMES for calculating exact width. - * - * @var array */ - private static $extraFontArray = []; + private static array $extraFontArray = []; public static function setExtraFontArray(array $extraFontArray): void { @@ -219,17 +217,13 @@ public static function getExtraFontArray(): array /** * AutoSize method. - * - * @var string */ - private static $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX; + private static string $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX; /** * Path to folder containing TrueType font .ttf files. - * - * @var string */ - private static $trueTypeFontPath = ''; + private static string $trueTypeFontPath = ''; /** * How wide is a default column for a given default font and size? @@ -284,10 +278,8 @@ public static function getExtraFontArray(): array * user to make inappropriate alterations. * * @deprecated 1.25.0 Use DEFAULT_COLUMN_WIDTHS constant instead. - * - * @var array */ - public static $defaultColumnWidths = self::DEFAULT_COLUMN_WIDTHS; + public static array $defaultColumnWidths = self::DEFAULT_COLUMN_WIDTHS; /** * Set autoSize method. diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index 8db78c4065..4c29018cea 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -58,52 +58,46 @@ class OLE /** * Array of PPS's found on the OLE container. - * - * @var array */ - public $_list = []; + public array $_list = []; /** * Root directory of OLE container. - * - * @var Root */ - public $root; + public Root $root; /** * Big Block Allocation Table. * * @var array (blockId => nextBlockId) */ - public $bbat; + public array $bbat; /** * Short Block Allocation Table. * * @var array (blockId => nextBlockId) */ - public $sbat; + public array $sbat; /** * Size of big blocks. This is usually 512. * * @var int number of octets per block */ - public $bigBlockSize; + public int $bigBlockSize; /** * Size of small blocks. This is usually 64. * * @var int number of octets per block */ - public $smallBlockSize; + public int $smallBlockSize; /** * Threshold for big blocks. - * - * @var int */ - public $bigBlockThreshold; + public int $bigBlockThreshold; /** * Reads an OLE container from the contents of the file given. @@ -345,7 +339,7 @@ public function readPpsWks($blockId): bool $this->_list[] = $pps; // check if the PPS tree (starting from root) is complete - if (isset($this->root) && $this->ppsTreeComplete($this->root->No)) { //* @phpstan-ignore-line + if (isset($this->root) && $this->ppsTreeComplete($this->root->No)) { break; } } diff --git a/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php index f95c9025fd..4d13e68f18 100644 --- a/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php +++ b/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php @@ -11,31 +11,25 @@ class ChainedBlockStream /** * The OLE container of the file that is being read. - * - * @var null|OLE */ - public $ole; + public ?OLE $ole = null; /** * Parameters specified by fopen(). - * - * @var array */ - public $params; + public array $params = []; /** * The binary data of the file. - * - * @var string */ - public $data; + public string $data; /** * The file pointer. * * @var int byte offset */ - public $pos; + public int $pos = 0; /** * Implements support for fopen(). diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS.php b/src/PhpSpreadsheet/Shared/OLE/PPS.php index 76f6bf86e8..c033ebd79a 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS.php @@ -31,45 +31,33 @@ class PPS { /** * The PPS index. - * - * @var int */ - public $No; + public int $No; /** * The PPS name (in Unicode). - * - * @var string */ - public $Name; + public string $Name; /** * The PPS type. Dir, Root or File. - * - * @var int */ - public $Type; + public int $Type; /** * The index of the previous PPS. - * - * @var int */ - public $PrevPps; + public int $PrevPps; /** * The index of the next PPS. - * - * @var int */ - public $NextPps; + public int $NextPps; /** * The index of it's first child if this is a Dir or Root PPS. - * - * @var int */ - public $DirPps; + public int $DirPps; /** * A timestamp. @@ -90,35 +78,27 @@ class PPS * * @var ?int */ - public $startBlock; + public ?int $startBlock = null; /** * The size of the PPS's data (in bytes). - * - * @var int */ - public $Size; + public int $Size; /** * The PPS's data (only used if it's not using a temporary file). - * - * @var string */ - public $_data = ''; + public string $_data = ''; /** * Array of child PPS's (only used by Root and Dir PPS's). - * - * @var array */ - public $children = []; + public array $children = []; /** * Pointer to OLE container. - * - * @var OLE */ - public $ole; + public OLE $ole; /** * The constructor. diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php index 5cd43c1dcb..d25c535dbf 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php @@ -38,12 +38,12 @@ class Root extends PPS /** * @var ?int */ - private $smallBlockSize; + private ?int $smallBlockSize = null; /** * @var ?int */ - private $bigBlockSize; + private ?int $bigBlockSize = null; /** * @param null|float|int $time_1st A timestamp diff --git a/src/PhpSpreadsheet/Shared/OLERead.php b/src/PhpSpreadsheet/Shared/OLERead.php index f2718fc85a..ac22a18485 100644 --- a/src/PhpSpreadsheet/Shared/OLERead.php +++ b/src/PhpSpreadsheet/Shared/OLERead.php @@ -6,8 +6,7 @@ class OLERead { - /** @var string */ - private $data = ''; + private string $data = ''; // Size of a sector = 512 bytes const BIG_BLOCK_SIZE = 0x200; @@ -35,64 +34,31 @@ class OLERead const START_BLOCK_POS = 0x74; const SIZE_POS = 0x78; - /** @var int */ - public $wrkbook; + public ?int $wrkbook = null; - /** @var int */ - public $summaryInformation; + public ?int $summaryInformation = null; - /** @var int */ - public $documentSummaryInformation; + public ?int $documentSummaryInformation = null; - /** - * @var int - */ - private $numBigBlockDepotBlocks; + private int $numBigBlockDepotBlocks; - /** - * @var int - */ - private $rootStartBlock; + private int $rootStartBlock; - /** - * @var int - */ - private $sbdStartBlock; + private int $sbdStartBlock; - /** - * @var int - */ - private $extensionBlock; + private int $extensionBlock; - /** - * @var int - */ - private $numExtensionBlocks; + private int $numExtensionBlocks; - /** - * @var string - */ - private $bigBlockChain; + private string $bigBlockChain; - /** - * @var string - */ - private $smallBlockChain; + private string $smallBlockChain; - /** - * @var string - */ - private $entry; + private string $entry; - /** - * @var int - */ - private $rootentry; + private int $rootentry; - /** - * @var array - */ - private $props = []; + private array $props = []; /** * Read the file. diff --git a/src/PhpSpreadsheet/Shared/StringHelper.php b/src/PhpSpreadsheet/Shared/StringHelper.php index 9a8fa86551..3e9de1eea3 100644 --- a/src/PhpSpreadsheet/Shared/StringHelper.php +++ b/src/PhpSpreadsheet/Shared/StringHelper.php @@ -9,49 +9,43 @@ class StringHelper * * @var string[] */ - private static $controlCharacters = []; + private static array $controlCharacters = []; /** * SYLK Characters array. - * - * @var array */ - private static $SYLKCharacters = []; + private static array $SYLKCharacters = []; /** * Decimal separator. * * @var ?string */ - private static $decimalSeparator; + private static ?string $decimalSeparator; /** * Thousands separator. * * @var ?string */ - private static $thousandsSeparator; + private static ?string $thousandsSeparator; /** * Currency code. - * - * @var string */ - private static $currencyCode; + private static string $currencyCode; /** * Is iconv extension avalable? * * @var ?bool */ - private static $isIconvEnabled; + private static ?bool $isIconvEnabled; /** * iconv options. - * - * @var string */ - private static $iconvOptions = '//IGNORE//TRANSLIT'; + private static string $iconvOptions = '//IGNORE//TRANSLIT'; /** * Build control characters array. diff --git a/src/PhpSpreadsheet/Shared/TimeZone.php b/src/PhpSpreadsheet/Shared/TimeZone.php index 324e3424dd..f6e8500b86 100644 --- a/src/PhpSpreadsheet/Shared/TimeZone.php +++ b/src/PhpSpreadsheet/Shared/TimeZone.php @@ -9,10 +9,8 @@ class TimeZone { /** * Default Timezone used for date/time conversions. - * - * @var string */ - protected static $timezone = 'UTC'; + protected static string $timezone = 'UTC'; /** * Validate a Timezone name. diff --git a/src/PhpSpreadsheet/Shared/Trend/BestFit.php b/src/PhpSpreadsheet/Shared/Trend/BestFit.php index b2eb033ef5..731a677933 100644 --- a/src/PhpSpreadsheet/Shared/Trend/BestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/BestFit.php @@ -6,17 +6,13 @@ abstract class BestFit { /** * Indicator flag for a calculation error. - * - * @var bool */ - protected $error = false; + protected bool $error = false; /** * Algorithm type to use for best-fit. - * - * @var string */ - protected $bestFitType = 'undetermined'; + protected string $bestFitType = 'undetermined'; /** * Number of entries in the sets of x- and y-value arrays. @@ -28,70 +24,54 @@ abstract class BestFit * * @var float[] */ - protected $xValues = []; + protected array $xValues = []; /** * Y-value dataseries of values. * * @var float[] */ - protected $yValues = []; + protected array $yValues = []; /** * Flag indicating whether values should be adjusted to Y=0. - * - * @var bool */ - protected $adjustToZero = false; + protected bool $adjustToZero = false; /** * Y-value series of best-fit values. * * @var float[] */ - protected $yBestFitValues = []; + protected array $yBestFitValues = []; - /** @var float */ - protected $goodnessOfFit = 1; + protected float $goodnessOfFit = 1; - /** @var float */ - protected $stdevOfResiduals = 0; + protected float $stdevOfResiduals = 0; - /** @var float */ - protected $covariance = 0; + protected float $covariance = 0; - /** @var float */ - protected $correlation = 0; + protected float $correlation = 0; - /** @var float */ - protected $SSRegression = 0; + protected float $SSRegression = 0; - /** @var float */ - protected $SSResiduals = 0; + protected float $SSResiduals = 0; - /** @var float */ - protected $DFResiduals = 0; + protected float $DFResiduals = 0; - /** @var float */ - protected $f = 0; + protected float $f = 0; - /** @var float */ - protected $slope = 0; + protected float $slope = 0; - /** @var float */ - protected $slopeSE = 0; + protected float $slopeSE = 0; - /** @var float */ - protected $intersect = 0; + protected float $intersect = 0; - /** @var float */ - protected $intersectSE = 0; + protected float $intersectSE = 0; - /** @var float */ - protected $xOffset = 0; + protected float $xOffset = 0; - /** @var float */ - protected $yOffset = 0; + protected float $yOffset = 0; /** @return bool */ public function getError() diff --git a/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php b/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php index 67b96f56b7..62a7f95d7e 100644 --- a/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php @@ -7,10 +7,8 @@ class ExponentialBestFit extends BestFit /** * Algorithm type to use for best-fit * (Name of this Trend class). - * - * @var string */ - protected $bestFitType = 'exponential'; + protected string $bestFitType = 'exponential'; /** * Return the Y-Value for a specified value of X. diff --git a/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php b/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php index ef03b84050..54ba089fff 100644 --- a/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/LinearBestFit.php @@ -7,10 +7,8 @@ class LinearBestFit extends BestFit /** * Algorithm type to use for best-fit * (Name of this Trend class). - * - * @var string */ - protected $bestFitType = 'linear'; + protected string $bestFitType = 'linear'; /** * Return the Y-Value for a specified value of X. diff --git a/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php b/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php index e6981d5468..27238e7d6c 100644 --- a/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/LogarithmicBestFit.php @@ -7,10 +7,8 @@ class LogarithmicBestFit extends BestFit /** * Algorithm type to use for best-fit * (Name of this Trend class). - * - * @var string */ - protected $bestFitType = 'logarithmic'; + protected string $bestFitType = 'logarithmic'; /** * Return the Y-Value for a specified value of X. diff --git a/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php b/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php index 4089afccc7..205dbcf2a3 100644 --- a/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php @@ -13,17 +13,13 @@ class PolynomialBestFit extends BestFit /** * Algorithm type to use for best-fit * (Name of this Trend class). - * - * @var string */ - protected $bestFitType = 'polynomial'; + protected string $bestFitType = 'polynomial'; /** * Polynomial order. - * - * @var int */ - protected $order = 0; + protected int $order = 0; /** * Return the order of this polynomial. diff --git a/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php b/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php index bb3bf4f384..288e4bb6be 100644 --- a/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php @@ -7,10 +7,8 @@ class PowerBestFit extends BestFit /** * Algorithm type to use for best-fit * (Name of this Trend class). - * - * @var string */ - protected $bestFitType = 'power'; + protected string $bestFitType = 'power'; /** * Return the Y-Value for a specified value of X. diff --git a/src/PhpSpreadsheet/Shared/Trend/Trend.php b/src/PhpSpreadsheet/Shared/Trend/Trend.php index 62399ca3ad..abb80a57ea 100644 --- a/src/PhpSpreadsheet/Shared/Trend/Trend.php +++ b/src/PhpSpreadsheet/Shared/Trend/Trend.php @@ -21,7 +21,7 @@ class Trend * * @var string[] */ - private static $trendTypes = [ + private static array $trendTypes = [ self::TREND_LINEAR, self::TREND_LOGARITHMIC, self::TREND_EXPONENTIAL, @@ -33,7 +33,7 @@ class Trend * * @var string[] */ - private static $trendTypePolynomialOrders = [ + private static array $trendTypePolynomialOrders = [ self::TREND_POLYNOMIAL_2, self::TREND_POLYNOMIAL_3, self::TREND_POLYNOMIAL_4, @@ -46,7 +46,7 @@ class Trend * * @var BestFit[] */ - private static $trendCache = []; + private static array $trendCache = []; /** * @param array $yValues diff --git a/src/PhpSpreadsheet/Shared/XMLWriter.php b/src/PhpSpreadsheet/Shared/XMLWriter.php index 28a567fc19..44ca8f477e 100644 --- a/src/PhpSpreadsheet/Shared/XMLWriter.php +++ b/src/PhpSpreadsheet/Shared/XMLWriter.php @@ -6,8 +6,7 @@ class XMLWriter extends \XMLWriter { - /** @var bool */ - public static $debugEnabled = false; + public static bool $debugEnabled = false; /** Temporary storage method */ const STORAGE_MEMORY = 1; diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php index fa8cbcca7a..2618321d16 100644 --- a/src/PhpSpreadsheet/Spreadsheet.php +++ b/src/PhpSpreadsheet/Spreadsheet.php @@ -51,14 +51,12 @@ class Spreadsheet implements JsonSerializable * * @var Worksheet[] */ - private $workSheetCollection = []; + private array $workSheetCollection = []; /** * Calculation Engine. - * - * @var null|Calculation */ - private $calculationEngine; + private ?Calculation $calculationEngine = null; /** * Active sheet index. @@ -70,7 +68,7 @@ class Spreadsheet implements JsonSerializable * * @var DefinedName[] */ - private $definedNames = []; + private array $definedNames = []; /** * CellXf supervisor. @@ -82,119 +80,93 @@ class Spreadsheet implements JsonSerializable * * @var Style[] */ - private $cellXfCollection = []; + private array $cellXfCollection = []; /** * CellStyleXf collection. * * @var Style[] */ - private $cellStyleXfCollection = []; + private array $cellStyleXfCollection = []; /** * hasMacros : this workbook have macros ? - * - * @var bool */ - private $hasMacros = false; + private bool $hasMacros = false; /** * macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code, etc.), null if no macro. - * - * @var null|string */ - private $macrosCode; + private ?string $macrosCode = null; /** * macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed. - * - * @var null|string */ - private $macrosCertificate; + private ?string $macrosCertificate = null; /** * ribbonXMLData : null if workbook is'nt Excel 2007 or not contain a customized UI. * * @var null|array{target: string, data: string} */ - private $ribbonXMLData; + private ?array $ribbonXMLData = null; /** * ribbonBinObjects : null if workbook is'nt Excel 2007 or not contain embedded objects (picture(s)) for Ribbon Elements * ignored if $ribbonXMLData is null. - * - * @var null|array */ - private $ribbonBinObjects; + private ?array $ribbonBinObjects = null; /** * List of unparsed loaded data for export to same format with better compatibility. * It has to be minimized when the library start to support currently unparsed data. - * - * @var array */ - private $unparsedLoadedData = []; + private array $unparsedLoadedData = []; /** * Controls visibility of the horizonal scroll bar in the application. - * - * @var bool */ - private $showHorizontalScroll = true; + private bool $showHorizontalScroll = true; /** * Controls visibility of the horizonal scroll bar in the application. - * - * @var bool */ - private $showVerticalScroll = true; + private bool $showVerticalScroll = true; /** * Controls visibility of the sheet tabs in the application. - * - * @var bool */ - private $showSheetTabs = true; + private bool $showSheetTabs = true; /** * Specifies a boolean value that indicates whether the workbook window * is minimized. - * - * @var bool */ - private $minimized = false; + private bool $minimized = false; /** * Specifies a boolean value that indicates whether to group dates * when presenting the user with filtering optiomd in the user * interface. - * - * @var bool */ - private $autoFilterDateGrouping = true; + private bool $autoFilterDateGrouping = true; /** * Specifies the index to the first sheet in the book view. - * - * @var int */ - private $firstSheetIndex = 0; + private int $firstSheetIndex = 0; /** * Specifies the visible status of the workbook. - * - * @var string */ - private $visibility = self::VISIBILITY_VISIBLE; + private string $visibility = self::VISIBILITY_VISIBLE; /** * Specifies the ratio between the workbook tabs bar and the horizontal * scroll bar. TabRatio is assumed to be out of 1000 of the horizontal * window width. - * - * @var int */ - private $tabRatio = 600; + private int $tabRatio = 600; private Theme $theme; diff --git a/src/PhpSpreadsheet/Style/Alignment.php b/src/PhpSpreadsheet/Style/Alignment.php index 6f87fd6b5d..21bc447983 100644 --- a/src/PhpSpreadsheet/Style/Alignment.php +++ b/src/PhpSpreadsheet/Style/Alignment.php @@ -94,52 +94,38 @@ class Alignment extends Supervisor /** * Horizontal alignment. - * - * @var null|string */ - protected $horizontal = self::HORIZONTAL_GENERAL; + protected ?string $horizontal = self::HORIZONTAL_GENERAL; /** * Vertical alignment. - * - * @var null|string */ - protected $vertical = self::VERTICAL_BOTTOM; + protected ?string $vertical = self::VERTICAL_BOTTOM; /** * Text rotation. - * - * @var null|int */ - protected $textRotation = 0; + protected ?int $textRotation = 0; /** * Wrap text. - * - * @var bool */ - protected $wrapText = false; + protected bool $wrapText = false; /** * Shrink to fit. - * - * @var bool */ - protected $shrinkToFit = false; + protected bool $shrinkToFit = false; /** * Indent - only possible with horizontal alignment left and right. - * - * @var int */ - protected $indent = 0; + protected int $indent = 0; /** * Read order. - * - * @var int */ - protected $readOrder = 0; + protected int $readOrder = 0; /** * Create a new Alignment. diff --git a/src/PhpSpreadsheet/Style/Border.php b/src/PhpSpreadsheet/Style/Border.php index 691962d569..db14285ec8 100644 --- a/src/PhpSpreadsheet/Style/Border.php +++ b/src/PhpSpreadsheet/Style/Border.php @@ -25,20 +25,15 @@ class Border extends Supervisor /** * Border style. - * - * @var string */ - protected $borderStyle = self::BORDER_NONE; + protected string $borderStyle = self::BORDER_NONE; /** * Border color. */ protected Color $color; - /** - * @var null|int - */ - public $colorIndex; + public ?int $colorIndex = null; /** * Create a new Border. diff --git a/src/PhpSpreadsheet/Style/Borders.php b/src/PhpSpreadsheet/Style/Borders.php index 9189db8bd5..7f5fef02a3 100644 --- a/src/PhpSpreadsheet/Style/Borders.php +++ b/src/PhpSpreadsheet/Style/Borders.php @@ -44,38 +44,28 @@ class Borders extends Supervisor /** * All borders pseudo-border. Only applies to supervisor. - * - * @var Border */ - protected $allBorders; + protected Border $allBorders; /** * Outline pseudo-border. Only applies to supervisor. - * - * @var Border */ - protected $outline; + protected Border $outline; /** * Inside pseudo-border. Only applies to supervisor. - * - * @var Border */ - protected $inside; + protected Border $inside; /** * Vertical pseudo-border. Only applies to supervisor. - * - * @var Border */ - protected $vertical; + protected Border $vertical; /** * Horizontal pseudo-border. Only applies to supervisor. - * - * @var Border */ - protected $horizontal; + protected Border $horizontal; /** * Create a new Borders. diff --git a/src/PhpSpreadsheet/Style/Color.php b/src/PhpSpreadsheet/Style/Color.php index fdc0a971f8..7b5acc8879 100644 --- a/src/PhpSpreadsheet/Style/Color.php +++ b/src/PhpSpreadsheet/Style/Color.php @@ -106,13 +106,10 @@ class Color extends Supervisor /** * ARGB - Alpha RGB. - * - * @var null|string */ - protected $argb; + protected ?string $argb = null; - /** @var bool */ - private $hasChanged = false; + private bool $hasChanged = false; /** * Create a new Color. diff --git a/src/PhpSpreadsheet/Style/Conditional.php b/src/PhpSpreadsheet/Style/Conditional.php index 9f6e8c7dce..e3804e5dab 100644 --- a/src/PhpSpreadsheet/Style/Conditional.php +++ b/src/PhpSpreadsheet/Style/Conditional.php @@ -73,24 +73,18 @@ class Conditional implements IComparable /** * Condition type. - * - * @var string */ - private $conditionType = self::CONDITION_NONE; + private string $conditionType = self::CONDITION_NONE; /** * Operator type. - * - * @var string */ - private $operatorType = self::OPERATOR_NONE; + private string $operatorType = self::OPERATOR_NONE; /** * Text. - * - * @var string */ - private $text; + private string $text; /** * Stop on this condition, if it matches. @@ -102,7 +96,7 @@ class Conditional implements IComparable * * @var (bool|float|int|string)[] */ - private $condition = []; + private array $condition = []; private ?ConditionalDataBar $dataBar = null; diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php index 3c815e4ac7..d5cee1d24a 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/CellMatcher.php @@ -32,37 +32,19 @@ class CellMatcher protected Cell $cell; - /** - * @var int - */ - protected $cellRow; + protected int $cellRow; protected Worksheet $worksheet; - /** - * @var int - */ - protected $cellColumn; + protected int $cellColumn; - /** - * @var string - */ - protected $conditionalRange; + protected string $conditionalRange; - /** - * @var string - */ - protected $referenceCell; + protected string $referenceCell; - /** - * @var int - */ - protected $referenceRow; + protected int $referenceRow; - /** - * @var int - */ - protected $referenceColumn; + protected int $referenceColumn; protected Calculation $engine; diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php index 0260d731c2..dc71222f75 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php @@ -5,47 +5,33 @@ class ConditionalDataBarExtension { /** attributes */ + private int $minLength; - /** @var int */ - private $minLength; + private int $maxLength; - /** @var int */ - private $maxLength; + private ?bool $border = null; - /** @var null|bool */ - private $border; + private ?bool $gradient = null; - /** @var null|bool */ - private $gradient; + private ?string $direction = null; - /** @var string */ - private $direction; + private ?bool $negativeBarBorderColorSameAsPositive = null; - /** @var null|bool */ - private $negativeBarBorderColorSameAsPositive; - - /** @var string */ - private $axisPosition; + private ?string $axisPosition = null; // children - /** @var ConditionalFormatValueObject */ - private $maximumConditionalFormatValueObject; + private ConditionalFormatValueObject $maximumConditionalFormatValueObject; - /** @var ConditionalFormatValueObject */ - private $minimumConditionalFormatValueObject; + private ConditionalFormatValueObject $minimumConditionalFormatValueObject; - /** @var string */ - private $borderColor; + private ?string $borderColor = null; - /** @var string */ - private $negativeFillColor; + private ?string $negativeFillColor = null; - /** @var string */ - private $negativeBorderColor; + private ?string $negativeBorderColor = null; - /** @var array */ - private $axisColor = [ + private array $axisColor = [ 'rgb' => null, 'theme' => null, 'tint' => null, @@ -147,10 +133,7 @@ public function setGradient(bool $gradient): self return $this; } - /** - * @return string - */ - public function getDirection() + public function getDirection(): ?string { return $this->direction; } @@ -177,10 +160,7 @@ public function setNegativeBarBorderColorSameAsPositive(bool $negativeBarBorderC return $this; } - /** - * @return string - */ - public function getAxisPosition() + public function getAxisPosition(): ?string { return $this->axisPosition; } @@ -222,10 +202,7 @@ public function setMinimumConditionalFormatValueObject(ConditionalFormatValueObj return $this; } - /** - * @return string - */ - public function getBorderColor() + public function getBorderColor(): ?string { return $this->borderColor; } @@ -237,10 +214,7 @@ public function setBorderColor(string $borderColor): self return $this; } - /** - * @return string - */ - public function getNegativeFillColor() + public function getNegativeFillColor(): ?string { return $this->negativeFillColor; } @@ -252,10 +226,7 @@ public function setNegativeFillColor(string $negativeFillColor): self return $this; } - /** - * @return string - */ - public function getNegativeBorderColor() + public function getNegativeBorderColor(): ?string { return $this->negativeBorderColor; } diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php index ccdc081144..c58b0578d8 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/CellValue.php @@ -36,16 +36,14 @@ class CellValue extends WizardAbstract implements WizardInterface protected const RANGE_OPERATORS = CellMatcher::COMPARISON_RANGE_OPERATORS; - /** @var string */ - protected $operator = Conditional::OPERATOR_EQUAL; + protected string $operator = Conditional::OPERATOR_EQUAL; - /** @var array */ - protected $operand = [0]; + protected array $operand = [0]; /** * @var string[] */ - protected $operandValueType = []; + protected array $operandValueType = []; public function __construct(string $cellRange) { diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php index 453dcdf91b..be26466dcb 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/DateValue.php @@ -46,8 +46,7 @@ class DateValue extends WizardAbstract implements WizardInterface Conditional::TIMEPERIOD_NEXT_MONTH => 'AND(MONTH(%s)=MONTH(EDATE(TODAY(),0+1)),YEAR(%s)=YEAR(EDATE(TODAY(),0+1)))', ]; - /** @var string */ - protected $operator; + protected string $operator; public function __construct(string $cellRange) { diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php index 01ef47af45..38ab967d30 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Expression.php @@ -11,10 +11,7 @@ */ class Expression extends WizardAbstract implements WizardInterface { - /** - * @var string - */ - protected $expression; + protected string $expression; public function __construct(string $cellRange) { diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php index 0b845dd0c3..1867f86eaa 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/TextValue.php @@ -40,16 +40,11 @@ class TextValue extends WizardAbstract implements WizardInterface Conditional::OPERATOR_ENDSWITH => 'RIGHT(%s,LEN(%s))=%s', ]; - /** @var string */ - protected $operator; + protected string $operator; - /** @var string */ - protected $operand; + protected string $operand; - /** - * @var string - */ - protected $operandValueType; + protected string $operandValueType; public function __construct(string $cellRange) { diff --git a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php index 8f8848ca9e..02d0680932 100644 --- a/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php +++ b/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/WizardAbstract.php @@ -12,34 +12,19 @@ abstract class WizardAbstract /** * @var ?Style */ - protected $style; + protected ?Style $style = null; - /** - * @var string - */ - protected $expression; + protected string $expression; protected string $cellRange; - /** - * @var string - */ - protected $referenceCell; + protected string $referenceCell; - /** - * @var int - */ - protected $referenceRow; + protected int $referenceRow; - /** - * @var bool - */ - protected $stopIfTrue = false; + protected bool $stopIfTrue = false; - /** - * @var int - */ - protected $referenceColumn; + protected int $referenceColumn; public function __construct(string $cellRange) { diff --git a/src/PhpSpreadsheet/Style/Fill.php b/src/PhpSpreadsheet/Style/Fill.php index fe2adc3fad..828e0cbfe2 100644 --- a/src/PhpSpreadsheet/Style/Fill.php +++ b/src/PhpSpreadsheet/Style/Fill.php @@ -27,29 +27,19 @@ class Fill extends Supervisor const FILL_PATTERN_LIGHTVERTICAL = 'lightVertical'; const FILL_PATTERN_MEDIUMGRAY = 'mediumGray'; - /** - * @var null|int - */ - public $startcolorIndex; + public ?int $startcolorIndex = null; - /** - * @var null|int - */ - public $endcolorIndex; + public ?int $endcolorIndex = null; /** * Fill type. - * - * @var null|string */ - protected $fillType = self::FILL_NONE; + protected ?string $fillType = self::FILL_NONE; /** * Rotation. - * - * @var float */ - protected $rotation = 0.0; + protected float $rotation = 0.0; /** * Start color. @@ -61,8 +51,7 @@ class Fill extends Supervisor */ protected Color $endColor; - /** @var bool */ - private $colorChanged = false; + private bool $colorChanged = false; /** * Create a new Fill. diff --git a/src/PhpSpreadsheet/Style/Font.php b/src/PhpSpreadsheet/Style/Font.php index b2e73d1cfb..07a418ae0a 100644 --- a/src/PhpSpreadsheet/Style/Font.php +++ b/src/PhpSpreadsheet/Style/Font.php @@ -15,98 +15,72 @@ class Font extends Supervisor /** * Font Name. - * - * @var null|string */ - protected $name = 'Calibri'; + protected ?string $name = 'Calibri'; /** * The following 7 are used only for chart titles, I think. - * - *@var string */ - private $latin = ''; + private string $latin = ''; - /** @var string */ - private $eastAsian = ''; + private string $eastAsian = ''; - /** @var string */ - private $complexScript = ''; + private string $complexScript = ''; - /** @var int */ - private $baseLine = 0; + private int $baseLine = 0; - /** @var string */ - private $strikeType = ''; + private string $strikeType = ''; /** @var ?ChartColor */ - private $underlineColor; + private ?ChartColor $underlineColor = null; /** @var ?ChartColor */ - private $chartColor; + private ?ChartColor $chartColor = null; // end of chart title items /** * Font Size. - * - * @var null|float */ - protected $size = 11; + protected ?float $size = 11; /** * Bold. - * - * @var null|bool */ - protected $bold = false; + protected ?bool $bold = false; /** * Italic. - * - * @var null|bool */ - protected $italic = false; + protected ?bool $italic = false; /** * Superscript. - * - * @var null|bool */ - protected $superscript = false; + protected ?bool $superscript = false; /** * Subscript. - * - * @var null|bool */ - protected $subscript = false; + protected ?bool $subscript = false; /** * Underline. - * - * @var null|string */ - protected $underline = self::UNDERLINE_NONE; + protected ?string $underline = self::UNDERLINE_NONE; /** * Strikethrough. - * - * @var null|bool */ - protected $strikethrough = false; + protected ?bool $strikethrough = false; /** * Foreground color. */ protected Color $color; - /** - * @var null|int - */ - public $colorIndex; + public ?int $colorIndex = null; - /** @var string */ - protected $scheme = ''; + protected string $scheme = ''; /** * Create a new Font. diff --git a/src/PhpSpreadsheet/Style/NumberFormat.php b/src/PhpSpreadsheet/Style/NumberFormat.php index c494a38dc8..39395797c3 100644 --- a/src/PhpSpreadsheet/Style/NumberFormat.php +++ b/src/PhpSpreadsheet/Style/NumberFormat.php @@ -92,24 +92,18 @@ class NumberFormat extends Supervisor /** * Excel built-in number formats. - * - * @var array */ - protected static $builtInFormats; + protected static array $builtInFormats; /** * Excel built-in number formats (flipped, for faster lookups). - * - * @var array */ - protected static $flippedBuiltInFormats; + protected static array $flippedBuiltInFormats; /** * Format Code. - * - * @var null|string */ - protected $formatCode = self::FORMAT_GENERAL; + protected ?string $formatCode = self::FORMAT_GENERAL; /** * Built-in format Code. diff --git a/src/PhpSpreadsheet/Style/Style.php b/src/PhpSpreadsheet/Style/Style.php index 45b6fef3dc..553b81f90a 100644 --- a/src/PhpSpreadsheet/Style/Style.php +++ b/src/PhpSpreadsheet/Style/Style.php @@ -42,17 +42,13 @@ class Style extends Supervisor /** * Index of style in collection. Only used for real style. - * - * @var int */ - protected $index; + protected int $index; /** * Use Quote Prefix when displaying in cell editor. Only used for real style. - * - * @var bool */ - protected $quotePrefix = false; + protected bool $quotePrefix = false; /** * Internal cache for styles @@ -71,7 +67,7 @@ class Style extends Supervisor * * @var null|array */ - private static $cachedStyles; + private static ?array $cachedStyles = null; /** * Create a new Style. diff --git a/src/PhpSpreadsheet/Style/Supervisor.php b/src/PhpSpreadsheet/Style/Supervisor.php index 2929a71c5f..346bee7e1d 100644 --- a/src/PhpSpreadsheet/Style/Supervisor.php +++ b/src/PhpSpreadsheet/Style/Supervisor.php @@ -10,10 +10,8 @@ abstract class Supervisor implements IComparable { /** * Supervisor? - * - * @var bool */ - protected $isSupervisor; + protected bool $isSupervisor; /** * Parent. Only used for supervisor. @@ -24,10 +22,8 @@ abstract class Supervisor implements IComparable /** * Parent property name. - * - * @var null|string */ - protected $parentPropertyName; + protected ?string $parentPropertyName = null; /** * Create a new Supervisor. diff --git a/src/PhpSpreadsheet/Theme.php b/src/PhpSpreadsheet/Theme.php index ac4dbe560c..081009708f 100644 --- a/src/PhpSpreadsheet/Theme.php +++ b/src/PhpSpreadsheet/Theme.php @@ -41,7 +41,7 @@ class Theme ]; /** @var string[] */ - private $themeColors = self::COLOR_SCHEME_2007_2010; + private array $themeColors = self::COLOR_SCHEME_2007_2010; private string $majorFontLatin = 'Cambria'; @@ -60,14 +60,14 @@ class Theme * * @var string[] */ - private $majorFontSubstitutions = self::FONTS_TIMES_SUBSTITUTIONS; + private array $majorFontSubstitutions = self::FONTS_TIMES_SUBSTITUTIONS; /** * Map of Minor (body) fonts to write. * * @var string[] */ - private $minorFontSubstitutions = self::FONTS_ARIAL_SUBSTITUTIONS; + private array $minorFontSubstitutions = self::FONTS_ARIAL_SUBSTITUTIONS; public const FONTS_TIMES_SUBSTITUTIONS = [ 'Jpan' => 'MS Pゴシック', diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/src/PhpSpreadsheet/Worksheet/AutoFilter.php index 58c19f97de..a0d9167726 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -31,10 +31,9 @@ class AutoFilter implements Stringable * * @var AutoFilter\Column[] */ - private $columns = []; + private array $columns = []; - /** @var bool */ - private $evaluated = false; + private bool $evaluated = false; public function getEvaluated(): bool { diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php index 361ccf045b..1fe05ac8d4 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php @@ -21,7 +21,7 @@ class Column * * @var string[] */ - private static $filterTypes = [ + private static array $filterTypes = [ // Currently we're not handling // colorFilter // extLst @@ -41,7 +41,7 @@ class Column * * @var string[] */ - private static $ruleJoins = [ + private static array $ruleJoins = [ self::AUTOFILTER_COLUMN_JOIN_AND, self::AUTOFILTER_COLUMN_JOIN_OR, ]; @@ -53,38 +53,32 @@ class Column /** * Autofilter Column Index. - * - * @var string */ - private $columnIndex = ''; + private string $columnIndex = ''; /** * Autofilter Column Filter Type. - * - * @var string */ - private $filterType = self::AUTOFILTER_FILTERTYPE_FILTER; + private string $filterType = self::AUTOFILTER_FILTERTYPE_FILTER; /** * Autofilter Multiple Rules And/Or. - * - * @var string */ - private $join = self::AUTOFILTER_COLUMN_JOIN_OR; + private string $join = self::AUTOFILTER_COLUMN_JOIN_OR; /** * Autofilter Column Rules. * * @var Column\Rule[] */ - private $ruleset = []; + private array $ruleset = []; /** * Autofilter Column Dynamic Attributes. * * @var mixed[] */ - private $attributes = []; + private array $attributes = []; /** * Create a new Column. diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php index 276bb28576..b70bccd26f 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php @@ -176,10 +176,8 @@ class Rule /** * Autofilter Rule Type. - * - * @var string */ - private $ruleType = self::AUTOFILTER_RULETYPE_FILTER; + private string $ruleType = self::AUTOFILTER_RULETYPE_FILTER; /** * Autofilter Rule Value. @@ -190,17 +188,13 @@ class Rule /** * Autofilter Rule Operator. - * - * @var string */ - private $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL; + private string $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL; /** * DateTimeGrouping Group Value. - * - * @var string */ - private $grouping = ''; + private string $grouping = ''; /** * Create a new Rule. diff --git a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php index 2310e64ea2..530744fe1b 100644 --- a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php +++ b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php @@ -26,10 +26,8 @@ class BaseDrawing implements IComparable /** * Image counter. - * - * @var int */ - private static $imageCounter = 0; + private static int $imageCounter = 0; /** * Image index. @@ -58,17 +56,13 @@ class BaseDrawing implements IComparable /** * Offset X. - * - * @var int */ - protected $offsetX = 0; + protected int $offsetX = 0; /** * Offset Y. - * - * @var int */ - protected $offsetY = 0; + protected int $offsetY = 0; /** * Coordinates2. @@ -77,59 +71,43 @@ class BaseDrawing implements IComparable /** * Offset X2. - * - * @var int */ - protected $offsetX2 = 0; + protected int $offsetX2 = 0; /** * Offset Y2. - * - * @var int */ - protected $offsetY2 = 0; + protected int $offsetY2 = 0; /** * Width. - * - * @var int */ - protected $width = 0; + protected int $width = 0; /** * Height. - * - * @var int */ - protected $height = 0; + protected int $height = 0; /** * Pixel width of image. See $width for the size the Drawing will be in the sheet. - * - * @var int */ - protected $imageWidth = 0; + protected int $imageWidth = 0; /** * Pixel width of image. See $height for the size the Drawing will be in the sheet. - * - * @var int */ - protected $imageHeight = 0; + protected int $imageHeight = 0; /** * Proportional resize. - * - * @var bool */ - protected $resizeProportional = true; + protected bool $resizeProportional = true; /** * Rotation. - * - * @var int */ - protected $rotation = 0; + protected int $rotation = 0; /** * Shadow. @@ -143,10 +121,8 @@ class BaseDrawing implements IComparable /** * Image type. - * - * @var int */ - protected $type = IMAGETYPE_UNKNOWN; + protected int $type = IMAGETYPE_UNKNOWN; /** @var null|SimpleXMLElement|string[] */ protected $srcRect = []; diff --git a/src/PhpSpreadsheet/Worksheet/CellIterator.php b/src/PhpSpreadsheet/Worksheet/CellIterator.php index 96adee7882..2522c336f6 100644 --- a/src/PhpSpreadsheet/Worksheet/CellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/CellIterator.php @@ -23,32 +23,24 @@ abstract class CellIterator implements NativeIterator /** * Worksheet to iterate. - * - * @var Worksheet */ - protected $worksheet; + protected Worksheet $worksheet; /** * Cell Collection to iterate. - * - * @var Cells */ - protected $cellCollection; + protected Cells $cellCollection; /** * Iterate only existing cells. - * - * @var bool */ - protected $onlyExistingCells = false; + protected bool $onlyExistingCells = false; /** * If iterating all cells, and a cell doesn't exist, identifies whether a new cell should be created, * or if the iterator should return a null value. - * - * @var bool */ - protected $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW; + protected bool $ifNotExists = self::IF_NOT_EXISTS_CREATE_NEW; /** * Destructor. diff --git a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php index 309cb411a3..2d77835e91 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -23,17 +23,13 @@ class ColumnCellIterator extends CellIterator /** * Start position. - * - * @var int */ - private $startRow = 1; + private int $startRow = 1; /** * End position. - * - * @var int */ - private $endRow = 1; + private int $endRow = 1; /** * Create a new row iterator. diff --git a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php index 07f7413426..5b76d1f44b 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php @@ -16,17 +16,13 @@ class ColumnDimension extends Dimension * Column width. * * When this is set to a negative value, the column width should be ignored by IWriter - * - * @var float */ - private $width = -1; + private float $width = -1; /** * Auto size? - * - * @var bool */ - private $autoSize = false; + private bool $autoSize = false; /** * Create a new ColumnDimension. diff --git a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php index b788caa7cd..5bd7b70234 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php @@ -14,31 +14,23 @@ class ColumnIterator implements NativeIterator { /** * Worksheet to iterate. - * - * @var Worksheet */ - private $worksheet; + private Worksheet $worksheet; /** * Current iterator position. - * - * @var int */ - private $currentColumnIndex = 1; + private int $currentColumnIndex = 1; /** * Start position. - * - * @var int */ - private $startColumnIndex = 1; + private int $startColumnIndex = 1; /** * End position. - * - * @var int */ - private $endColumnIndex = 1; + private int $endColumnIndex = 1; /** * Create a new column iterator. diff --git a/src/PhpSpreadsheet/Worksheet/Dimension.php b/src/PhpSpreadsheet/Worksheet/Dimension.php index 8549b16954..76eeb1bfe0 100644 --- a/src/PhpSpreadsheet/Worksheet/Dimension.php +++ b/src/PhpSpreadsheet/Worksheet/Dimension.php @@ -8,24 +8,18 @@ abstract class Dimension { /** * Visible? - * - * @var bool */ - private $visible = true; + private bool $visible = true; /** * Outline level. - * - * @var int */ - private $outlineLevel = 0; + private int $outlineLevel = 0; /** * Collapsed. - * - * @var bool */ - private $collapsed = false; + private bool $collapsed = false; /** * Index to cellXf. Null value means row has no explicit cellXf format. diff --git a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php index 5772afc608..4421cc5f2f 100644 --- a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php +++ b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php @@ -75,80 +75,60 @@ class HeaderFooter /** * OddHeader. - * - * @var string */ - private $oddHeader = ''; + private string $oddHeader = ''; /** * OddFooter. - * - * @var string */ - private $oddFooter = ''; + private string $oddFooter = ''; /** * EvenHeader. - * - * @var string */ - private $evenHeader = ''; + private string $evenHeader = ''; /** * EvenFooter. - * - * @var string */ - private $evenFooter = ''; + private string $evenFooter = ''; /** * FirstHeader. - * - * @var string */ - private $firstHeader = ''; + private string $firstHeader = ''; /** * FirstFooter. - * - * @var string */ - private $firstFooter = ''; + private string $firstFooter = ''; /** * Different header for Odd/Even, defaults to false. - * - * @var bool */ - private $differentOddEven = false; + private bool $differentOddEven = false; /** * Different header for first page, defaults to false. - * - * @var bool */ - private $differentFirst = false; + private bool $differentFirst = false; /** * Scale with document, defaults to true. - * - * @var bool */ - private $scaleWithDocument = true; + private bool $scaleWithDocument = true; /** * Align with margins, defaults to true. - * - * @var bool */ - private $alignWithMargins = true; + private bool $alignWithMargins = true; /** * Header/footer images. * * @var HeaderFooterDrawing[] */ - private $headerFooterImages = []; + private array $headerFooterImages = []; /** * Create a new HeaderFooter. diff --git a/src/PhpSpreadsheet/Worksheet/Iterator.php b/src/PhpSpreadsheet/Worksheet/Iterator.php index a56404642d..9223718484 100644 --- a/src/PhpSpreadsheet/Worksheet/Iterator.php +++ b/src/PhpSpreadsheet/Worksheet/Iterator.php @@ -16,10 +16,8 @@ class Iterator implements \Iterator /** * Current iterator position. - * - * @var int */ - private $position = 0; + private int $position = 0; /** * Create a new worksheet iterator. diff --git a/src/PhpSpreadsheet/Worksheet/PageMargins.php b/src/PhpSpreadsheet/Worksheet/PageMargins.php index 8039cc3303..d19834c616 100644 --- a/src/PhpSpreadsheet/Worksheet/PageMargins.php +++ b/src/PhpSpreadsheet/Worksheet/PageMargins.php @@ -6,45 +6,33 @@ class PageMargins { /** * Left. - * - * @var float */ - private $left = 0.7; + private float $left = 0.7; /** * Right. - * - * @var float */ - private $right = 0.7; + private float $right = 0.7; /** * Top. - * - * @var float */ - private $top = 0.75; + private float $top = 0.75; /** * Bottom. - * - * @var float */ - private $bottom = 0.75; + private float $bottom = 0.75; /** * Header. - * - * @var float */ - private $header = 0.3; + private float $header = 0.3; /** * Footer. - * - * @var float */ - private $footer = 0.3; + private float $footer = 0.3; /** * Create a new PageMargins. diff --git a/src/PhpSpreadsheet/Worksheet/PageSetup.php b/src/PhpSpreadsheet/Worksheet/PageSetup.php index 92e24c438b..17c8a0edb6 100644 --- a/src/PhpSpreadsheet/Worksheet/PageSetup.php +++ b/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -161,110 +161,89 @@ class PageSetup /** * Paper size default. - * - * @var int */ - private static $paperSizeDefault = self::PAPERSIZE_LETTER; + private static int $paperSizeDefault = self::PAPERSIZE_LETTER; /** * Paper size. * * @var ?int */ - private $paperSize; + private ?int $paperSize = null; /** * Orientation default. - * - * @var string */ - private static $orientationDefault = self::ORIENTATION_DEFAULT; + private static string $orientationDefault = self::ORIENTATION_DEFAULT; /** * Orientation. - * - * @var string */ - private $orientation; + private string $orientation; /** * Scale (Print Scale). * * Print scaling. Valid values range from 10 to 400 * This setting is overridden when fitToWidth and/or fitToHeight are in use - * - * @var null|int */ - private $scale = 100; + private ?int $scale = 100; /** * Fit To Page * Whether scale or fitToWith / fitToHeight applies. - * - * @var bool */ - private $fitToPage = false; + private bool $fitToPage = false; /** * Fit To Height * Number of vertical pages to fit on. - * - * @var null|int */ - private $fitToHeight = 1; + private ?int $fitToHeight = 1; /** * Fit To Width * Number of horizontal pages to fit on. - * - * @var null|int */ - private $fitToWidth = 1; + private ?int $fitToWidth = 1; /** * Columns to repeat at left. * * @var array Containing start column and end column, empty array if option unset */ - private $columnsToRepeatAtLeft = ['', '']; + private array $columnsToRepeatAtLeft = ['', '']; /** * Rows to repeat at top. * * @var array Containing start row number and end row number, empty array if option unset */ - private $rowsToRepeatAtTop = [0, 0]; + private array $rowsToRepeatAtTop = [0, 0]; /** * Center page horizontally. - * - * @var bool */ - private $horizontalCentered = false; + private bool $horizontalCentered = false; /** * Center page vertically. - * - * @var bool */ - private $verticalCentered = false; + private bool $verticalCentered = false; /** * Print area. - * - * @var null|string */ - private $printArea; + private ?string $printArea = null; /** * First page number. * * @var ?int */ - private $firstPageNumber; + private ?int $firstPageNumber = null; - /** @var string */ - private $pageOrder = self::PAGEORDER_DOWN_THEN_OVER; + private string $pageOrder = self::PAGEORDER_DOWN_THEN_OVER; /** * Create a new PageSetup. diff --git a/src/PhpSpreadsheet/Worksheet/Protection.php b/src/PhpSpreadsheet/Worksheet/Protection.php index a6bb4aabf7..4f347902ce 100644 --- a/src/PhpSpreadsheet/Worksheet/Protection.php +++ b/src/PhpSpreadsheet/Worksheet/Protection.php @@ -99,10 +99,8 @@ class Protection /** * Hashed password. - * - * @var string */ - private $password = ''; + private string $password = ''; /** * Algorithm name. @@ -116,10 +114,8 @@ class Protection /** * Spin count. - * - * @var int */ - private $spinCount = 10000; + private int $spinCount = 10000; /** * Create a new Protection. diff --git a/src/PhpSpreadsheet/Worksheet/Row.php b/src/PhpSpreadsheet/Worksheet/Row.php index ae05b0ffaf..0f974271ba 100644 --- a/src/PhpSpreadsheet/Worksheet/Row.php +++ b/src/PhpSpreadsheet/Worksheet/Row.php @@ -8,10 +8,8 @@ class Row /** * Row index. - * - * @var int */ - private $rowIndex = 0; + private int $rowIndex = 0; /** * Create a new row. diff --git a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php index 7998ba9c0a..4524e54168 100644 --- a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -18,24 +18,18 @@ class RowCellIterator extends CellIterator /** * Row index. - * - * @var int */ - private $rowIndex = 1; + private int $rowIndex = 1; /** * Start position. - * - * @var int */ - private $startColumnIndex = 1; + private int $startColumnIndex = 1; /** * End position. - * - * @var int */ - private $endColumnIndex = 1; + private int $endColumnIndex = 1; /** * Create a new column iterator. diff --git a/src/PhpSpreadsheet/Worksheet/RowDimension.php b/src/PhpSpreadsheet/Worksheet/RowDimension.php index b3c213a96b..f18686863c 100644 --- a/src/PhpSpreadsheet/Worksheet/RowDimension.php +++ b/src/PhpSpreadsheet/Worksheet/RowDimension.php @@ -15,17 +15,13 @@ class RowDimension extends Dimension * Row height (in pt). * * When this is set to a negative value, the row height should be ignored by IWriter - * - * @var float */ - private $height = -1; + private float $height = -1; /** * ZeroHeight for Row? - * - * @var bool */ - private $zeroHeight = false; + private bool $zeroHeight = false; /** * Create a new RowDimension. diff --git a/src/PhpSpreadsheet/Worksheet/RowIterator.php b/src/PhpSpreadsheet/Worksheet/RowIterator.php index 377a078f1b..1a256879d2 100644 --- a/src/PhpSpreadsheet/Worksheet/RowIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowIterator.php @@ -12,31 +12,23 @@ class RowIterator implements NativeIterator { /** * Worksheet to iterate. - * - * @var Worksheet */ - private $subject; + private Worksheet $subject; /** * Current iterator position. - * - * @var int */ - private $position = 1; + private int $position = 1; /** * Start position. - * - * @var int */ - private $startRow = 1; + private int $startRow = 1; /** * End position. - * - * @var int */ - private $endRow = 1; + private int $endRow = 1; /** * Create a new row iterator. diff --git a/src/PhpSpreadsheet/Worksheet/SheetView.php b/src/PhpSpreadsheet/Worksheet/SheetView.php index f61fe6a690..fda64e68ca 100644 --- a/src/PhpSpreadsheet/Worksheet/SheetView.php +++ b/src/PhpSpreadsheet/Worksheet/SheetView.php @@ -24,7 +24,7 @@ class SheetView * * @var ?int */ - private $zoomScale = 100; + private ?int $zoomScale = 100; /** * ZoomScaleNormal. @@ -33,26 +33,22 @@ class SheetView * * @var ?int */ - private $zoomScaleNormal = 100; + private ?int $zoomScaleNormal = 100; /** * ShowZeros. * * If true, "null" values from a calculation will be shown as "0". This is the default Excel behaviour and can be changed * with the advanced worksheet option "Show a zero in cells that have zero value" - * - * @var bool */ - private $showZeros = true; + private bool $showZeros = true; /** * View. * * Valid values range from 10 to 400. - * - * @var string */ - private $sheetviewType = self::SHEETVIEW_NORMAL; + private string $sheetviewType = self::SHEETVIEW_NORMAL; /** * Create a new SheetView. diff --git a/src/PhpSpreadsheet/Worksheet/Table.php b/src/PhpSpreadsheet/Worksheet/Table.php index 8f8b7be987..c5699e4c82 100644 --- a/src/PhpSpreadsheet/Worksheet/Table.php +++ b/src/PhpSpreadsheet/Worksheet/Table.php @@ -20,17 +20,13 @@ class Table implements Stringable /** * Show Header Row. - * - * @var bool */ - private $showHeaderRow = true; + private bool $showHeaderRow = true; /** * Show Totals Row. - * - * @var bool */ - private $showTotalsRow = false; + private bool $showTotalsRow = false; /** * Table Range. @@ -44,17 +40,15 @@ class Table implements Stringable /** * Table allow filter. - * - * @var bool */ - private $allowFilter = true; + private bool $allowFilter = true; /** * Table Column. * * @var Table\Column[] */ - private $columns = []; + private array $columns = []; /** * Table Style. diff --git a/src/PhpSpreadsheet/Worksheet/Table/Column.php b/src/PhpSpreadsheet/Worksheet/Table/Column.php index f697423894..65e6363643 100644 --- a/src/PhpSpreadsheet/Worksheet/Table/Column.php +++ b/src/PhpSpreadsheet/Worksheet/Table/Column.php @@ -17,10 +17,8 @@ class Column /** * Show Filter Button. - * - * @var bool */ - private $showFilterButton = true; + private bool $showFilterButton = true; /** * Total Row Label. diff --git a/src/PhpSpreadsheet/Worksheet/Table/TableStyle.php b/src/PhpSpreadsheet/Worksheet/Table/TableStyle.php index c0744c995b..81153027da 100644 --- a/src/PhpSpreadsheet/Worksheet/Table/TableStyle.php +++ b/src/PhpSpreadsheet/Worksheet/Table/TableStyle.php @@ -75,31 +75,23 @@ class TableStyle /** * Show First Column. - * - * @var bool */ - private $showFirstColumn = false; + private bool $showFirstColumn = false; /** * Show Last Column. - * - * @var bool */ - private $showLastColumn = false; + private bool $showLastColumn = false; /** * Show Row Stripes. - * - * @var bool */ - private $showRowStripes = false; + private bool $showRowStripes = false; /** * Show Column Stripes. - * - * @var bool */ - private $showColumnStripes = false; + private bool $showColumnStripes = false; /** * Table. diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 45c1c02f52..fa557daebb 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -61,10 +61,8 @@ class Worksheet implements IComparable /** * Invalid characters in sheet title. - * - * @var array */ - private static $invalidCharacters = ['*', ':', '/', '\\', '?', '[', ']']; + private static array $invalidCharacters = ['*', ':', '/', '\\', '?', '[', ']']; /** * Parent spreadsheet. @@ -81,7 +79,7 @@ class Worksheet implements IComparable * * @var RowDimension[] */ - private $rowDimensions = []; + private array $rowDimensions = []; /** * Default row dimension. @@ -93,7 +91,7 @@ class Worksheet implements IComparable * * @var ColumnDimension[] */ - private $columnDimensions = []; + private array $columnDimensions = []; /** * Default column dimension. @@ -123,17 +121,13 @@ class Worksheet implements IComparable /** * Worksheet title. - * - * @var string */ - private $title; + private string $title = ''; /** * Sheet state. - * - * @var string */ - private $sheetState; + private string $sheetState; /** * Page setup. @@ -165,42 +159,40 @@ class Worksheet implements IComparable * * @var Style[] */ - private $styles = []; + private array $styles = []; /** * Conditional styles. Indexed by cell coordinate, e.g. 'A1'. - * - * @var array */ - private $conditionalStylesCollection = []; + private array $conditionalStylesCollection = []; /** * Collection of row breaks. * * @var PageBreak[] */ - private $rowBreaks = []; + private array $rowBreaks = []; /** * Collection of column breaks. * * @var PageBreak[] */ - private $columnBreaks = []; + private array $columnBreaks = []; /** * Collection of merged cell ranges. * * @var string[] */ - private $mergeCells = []; + private array $mergeCells = []; /** * Collection of protected cell ranges. * * @var string[] */ - private $protectedCells = []; + private array $protectedCells = []; /** * Autofilter Range and selection. @@ -209,17 +201,13 @@ class Worksheet implements IComparable /** * Freeze pane. - * - * @var null|string */ - private $freezePane; + private ?string $freezePane = null; /** * Default position of the right bottom pane. - * - * @var null|string */ - private $topLeftCell; + private ?string $topLeftCell = null; private string $paneTopLeftCell = ''; @@ -236,7 +224,7 @@ class Worksheet implements IComparable * * @var (null|Pane)[] */ - private $panes = [ + private array $panes = [ 'bottomRight' => null, 'bottomLeft' => null, 'topRight' => null, @@ -245,122 +233,90 @@ class Worksheet implements IComparable /** * Show gridlines? - * - * @var bool */ - private $showGridlines = true; + private bool $showGridlines = true; /** * Print gridlines? - * - * @var bool */ - private $printGridlines = false; + private bool $printGridlines = false; /** * Show row and column headers? - * - * @var bool */ - private $showRowColHeaders = true; + private bool $showRowColHeaders = true; /** * Show summary below? (Row/Column outline). - * - * @var bool */ - private $showSummaryBelow = true; + private bool $showSummaryBelow = true; /** * Show summary right? (Row/Column outline). - * - * @var bool */ - private $showSummaryRight = true; + private bool $showSummaryRight = true; /** * Collection of comments. * * @var Comment[] */ - private $comments = []; + private array $comments = []; /** * Active cell. (Only one!). - * - * @var string */ - private $activeCell = 'A1'; + private string $activeCell = 'A1'; /** * Selected cells. - * - * @var string */ - private $selectedCells = 'A1'; + private string $selectedCells = 'A1'; /** * Cached highest column. - * - * @var int */ - private $cachedHighestColumn = 1; + private int $cachedHighestColumn = 1; /** * Cached highest row. - * - * @var int */ - private $cachedHighestRow = 1; + private int $cachedHighestRow = 1; /** * Right-to-left? - * - * @var bool */ - private $rightToLeft = false; + private bool $rightToLeft = false; /** * Hyperlinks. Indexed by cell coordinate, e.g. 'A1'. - * - * @var array */ - private $hyperlinkCollection = []; + private array $hyperlinkCollection = []; /** * Data validation objects. Indexed by cell coordinate, e.g. 'A1'. - * - * @var array */ - private $dataValidationCollection = []; + private array $dataValidationCollection = []; /** * Tab color. - * - * @var null|Color */ - private $tabColor; + private ?Color $tabColor = null; /** * Dirty flag. - * - * @var bool */ - private $dirty = true; + private bool $dirty = true; /** * Hash. - * - * @var string */ - private $hash; + private string $hash; /** * CodeName. - * - * @var string */ - private $codeName; + private ?string $codeName = null; /** * Create a new worksheet. diff --git a/src/PhpSpreadsheet/Writer/BaseWriter.php b/src/PhpSpreadsheet/Writer/BaseWriter.php index df862f7c55..3883244156 100644 --- a/src/PhpSpreadsheet/Writer/BaseWriter.php +++ b/src/PhpSpreadsheet/Writer/BaseWriter.php @@ -7,43 +7,32 @@ abstract class BaseWriter implements IWriter /** * Write charts that are defined in the workbook? * Identifies whether the Writer should write definitions for any charts that exist in the PhpSpreadsheet object. - * - * @var bool */ - protected $includeCharts = false; + protected bool $includeCharts = false; /** * Pre-calculate formulas * Forces PhpSpreadsheet to recalculate all formulae in a workbook when saving, so that the pre-calculated values are * immediately available to MS Excel or other office spreadsheet viewer when opening the file. - * - * @var bool */ - protected $preCalculateFormulas = true; + protected bool $preCalculateFormulas = true; /** * Use disk caching where possible? - * - * @var bool */ - private $useDiskCaching = false; + private bool $useDiskCaching = false; /** * Disk caching directory. - * - * @var string */ - private $diskCachingDirectory = './'; + private string $diskCachingDirectory = './'; /** * @var resource */ protected $fileHandle; - /** - * @var bool - */ - private $shouldCloseFile; + private bool $shouldCloseFile; public function getIncludeCharts(): bool { diff --git a/src/PhpSpreadsheet/Writer/Csv.php b/src/PhpSpreadsheet/Writer/Csv.php index d43feda9da..73165d67c2 100644 --- a/src/PhpSpreadsheet/Writer/Csv.php +++ b/src/PhpSpreadsheet/Writer/Csv.php @@ -24,39 +24,29 @@ class Csv extends BaseWriter /** * Line ending. - * - * @var string */ - private $lineEnding = PHP_EOL; + private string $lineEnding = PHP_EOL; /** * Sheet index to write. - * - * @var int */ - private $sheetIndex = 0; + private int $sheetIndex = 0; /** * Whether to write a UTF8 BOM. - * - * @var bool */ - private $useBOM = false; + private bool $useBOM = false; /** * Whether to write a Separator line as the first line of the file * sep=x. - * - * @var bool */ - private $includeSeparatorLine = false; + private bool $includeSeparatorLine = false; /** * Whether to write a fully Excel compatible CSV file. - * - * @var bool */ - private $excelCompatibility = false; + private bool $excelCompatibility = false; /** * Output encoding. @@ -243,8 +233,7 @@ public function setOutputEncoding(string $outputEnconding): self return $this; } - /** @var bool */ - private $enclosureRequired = true; + private bool $enclosureRequired = true; public function setEnclosureRequired(bool $value): self { diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index ecb99219d1..a523d80f6f 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -42,52 +42,38 @@ class Html extends BaseWriter /** * Sheet index to write. - * - * @var null|int */ - private $sheetIndex = 0; + private ?int $sheetIndex = 0; /** * Images root. - * - * @var string */ - private $imagesRoot = ''; + private string $imagesRoot = ''; /** * embed images, or link to images. - * - * @var bool */ - protected $embedImages = false; + protected bool $embedImages = false; /** * Use inline CSS? - * - * @var bool */ - private $useInlineCss = false; + private bool $useInlineCss = false; /** * Use embedded CSS? - * - * @var bool */ - private $useEmbeddedCSS = true; + private bool $useEmbeddedCSS = true; /** * Array of CSS styles. - * - * @var array */ - private $cssStyles; + private ?array $cssStyles = null; /** * Array of column widths in points. - * - * @var array */ - private $columnWidths; + private array $columnWidths; /** * Default font. @@ -96,52 +82,38 @@ class Html extends BaseWriter /** * Flag whether spans have been calculated. - * - * @var bool */ - private $spansAreCalculated = false; + private bool $spansAreCalculated = false; /** * Excel cells that should not be written as HTML cells. - * - * @var array */ - private $isSpannedCell = []; + private array $isSpannedCell = []; /** * Excel cells that are upper-left corner in a cell merge. - * - * @var array */ - private $isBaseCell = []; + private array $isBaseCell = []; /** * Excel rows that should not be written as HTML rows. - * - * @var array */ - private $isSpannedRow = []; + private array $isSpannedRow = []; /** * Is the current writer creating PDF? - * - * @var bool */ - protected $isPdf = false; + protected bool $isPdf = false; /** * Is the current writer creating mPDF? - * - * @var bool */ - protected $isMPdf = false; + protected bool $isMPdf = false; /** * Generate the Navigation block. - * - * @var bool */ - private $generateSheetNavigationBlock = true; + private bool $generateSheetNavigationBlock = true; /** * Callback for editing generated html. diff --git a/src/PhpSpreadsheet/Writer/Ods.php b/src/PhpSpreadsheet/Writer/Ods.php index 4b229b78e1..fd5a8a825e 100644 --- a/src/PhpSpreadsheet/Writer/Ods.php +++ b/src/PhpSpreadsheet/Writer/Ods.php @@ -18,10 +18,8 @@ class Ods extends BaseWriter { /** * Private PhpSpreadsheet. - * - * @var Spreadsheet */ - private $spreadSheet; + private Spreadsheet $spreadSheet; private Content $writerPartContent; diff --git a/src/PhpSpreadsheet/Writer/Ods/Formula.php b/src/PhpSpreadsheet/Writer/Ods/Formula.php index f0b5d78f53..9385607be4 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Formula.php +++ b/src/PhpSpreadsheet/Writer/Ods/Formula.php @@ -7,8 +7,7 @@ class Formula { - /** @var array */ - private $definedNames = []; + private array $definedNames = []; /** * @param DefinedName[] $definedNames diff --git a/src/PhpSpreadsheet/Writer/Pdf.php b/src/PhpSpreadsheet/Writer/Pdf.php index e74bb8f38a..0ba4ba5379 100644 --- a/src/PhpSpreadsheet/Writer/Pdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf.php @@ -16,10 +16,8 @@ abstract class Pdf extends Html /** * Font. - * - * @var string */ - protected $font = 'freesans'; + protected string $font = 'freesans'; /** * Orientation (Over-ride). @@ -31,14 +29,12 @@ abstract class Pdf extends Html * * @var ?int */ - protected $paperSize; + protected ?int $paperSize = null; /** * Paper Sizes xRef List. - * - * @var array */ - protected static $paperSizes = [ + protected static array $paperSizes = [ PageSetup::PAPERSIZE_LETTER => 'LETTER', // (8.5 in. by 11 in.) PageSetup::PAPERSIZE_LETTER_SMALL => 'LETTER', // (8.5 in. by 11 in.) PageSetup::PAPERSIZE_TABLOID => [792.00, 1224.00], // (11 in. by 17 in.) diff --git a/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php b/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php index 690b0c54a3..f9cafb043b 100644 --- a/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php @@ -9,10 +9,8 @@ class Dompdf extends Pdf { /** * embed images, or link to images. - * - * @var bool */ - protected $embedImages = true; + protected bool $embedImages = true; /** * Gets the implementation of external PDF library that should be used. diff --git a/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php b/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php index 3e9e94ebeb..53b79d2ad1 100644 --- a/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php @@ -10,8 +10,7 @@ class Mpdf extends Pdf public const SIMULATED_BODY_START = ''; private const BODY_TAG = ''; - /** @var bool */ - protected $isMPdf = true; + protected bool $isMPdf = true; /** * Gets the implementation of external PDF library that should be used. diff --git a/src/PhpSpreadsheet/Writer/Xls.php b/src/PhpSpreadsheet/Writer/Xls.php index 1b96579e03..49835e9fd3 100644 --- a/src/PhpSpreadsheet/Writer/Xls.php +++ b/src/PhpSpreadsheet/Writer/Xls.php @@ -36,31 +36,23 @@ class Xls extends BaseWriter /** * Total number of shared strings in workbook. - * - * @var int */ - private $strTotal = 0; + private int $strTotal = 0; /** * Number of unique shared strings in workbook. - * - * @var int */ - private $strUnique = 0; + private int $strUnique = 0; /** * Array of unique shared strings in workbook. - * - * @var array */ - private $strTable = []; + private array $strTable = []; /** * Color cache. Mapping between RGB value and color index. - * - * @var array */ - private $colors; + private array $colors; /** * Formula parser. @@ -69,34 +61,25 @@ class Xls extends BaseWriter /** * Identifier clusters for drawings. Used in MSODRAWINGGROUP record. - * - * @var array */ - private $IDCLs; + private array $IDCLs; /** * Basic OLE object summary information. - * - * @var string */ - private $summaryInformation; + private string $summaryInformation; /** * Extended OLE object document summary information. - * - * @var string */ - private $documentSummaryInformation; + private string $documentSummaryInformation; - /** - * @var Workbook - */ - private $writerWorkbook; + private Workbook $writerWorkbook; /** * @var Worksheet[] */ - private $writerWorksheets; + private array $writerWorksheets; /** * Create a new Xls Writer. diff --git a/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php b/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php index 9d961b7128..b4fcb208b1 100644 --- a/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php +++ b/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php @@ -44,30 +44,24 @@ class BIFFwriter * * @var ?int */ - private static $byteOrder; + private static ?int $byteOrder; /** * The string containing the data of the BIFF stream. - * - * @var null|string */ - public $_data; + public ?string $_data; /** * The size of the data in bytes. Should be the same as strlen($this->_data). - * - * @var int */ - public $_datasize; + public int $_datasize; /** * The maximum length for a BIFF record (excluding record header and length field). See addContinue(). * - * @var int - * * @see addContinue() */ - private $limit = 8224; + private int $limit = 8224; /** * Constructor. diff --git a/src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php b/src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php index 7e9b3cfa4e..fee123f551 100644 --- a/src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php +++ b/src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php @@ -9,7 +9,7 @@ class CellDataValidation /** * @var array */ - protected static $validationTypeMap = [ + protected static array $validationTypeMap = [ DataValidation::TYPE_NONE => 0x00, DataValidation::TYPE_WHOLE => 0x01, DataValidation::TYPE_DECIMAL => 0x02, @@ -23,7 +23,7 @@ class CellDataValidation /** * @var array */ - protected static $errorStyleMap = [ + protected static array $errorStyleMap = [ DataValidation::STYLE_STOP => 0x00, DataValidation::STYLE_WARNING => 0x01, DataValidation::STYLE_INFORMATION => 0x02, @@ -32,7 +32,7 @@ class CellDataValidation /** * @var array */ - protected static $operatorMap = [ + protected static array $operatorMap = [ DataValidation::OPERATOR_BETWEEN => 0x00, DataValidation::OPERATOR_NOTBETWEEN => 0x01, DataValidation::OPERATOR_EQUAL => 0x02, diff --git a/src/PhpSpreadsheet/Writer/Xls/ConditionalHelper.php b/src/PhpSpreadsheet/Writer/Xls/ConditionalHelper.php index 1bbac2aa19..b38b287a24 100644 --- a/src/PhpSpreadsheet/Writer/Xls/ConditionalHelper.php +++ b/src/PhpSpreadsheet/Writer/Xls/ConditionalHelper.php @@ -17,10 +17,7 @@ class ConditionalHelper */ protected $condition; - /** - * @var string - */ - protected $cellRange; + protected string $cellRange; protected ?string $tokens = null; diff --git a/src/PhpSpreadsheet/Writer/Xls/ErrorCode.php b/src/PhpSpreadsheet/Writer/Xls/ErrorCode.php index 7a864f50f3..e74f4f405a 100644 --- a/src/PhpSpreadsheet/Writer/Xls/ErrorCode.php +++ b/src/PhpSpreadsheet/Writer/Xls/ErrorCode.php @@ -7,7 +7,7 @@ class ErrorCode /** * @var array */ - protected static $errorCodeMap = [ + protected static array $errorCodeMap = [ '#NULL!' => 0x00, '#DIV/0!' => 0x07, '#VALUE!' => 0x0F, diff --git a/src/PhpSpreadsheet/Writer/Xls/Escher.php b/src/PhpSpreadsheet/Writer/Xls/Escher.php index ec07a71aa7..118fd80d71 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Escher.php +++ b/src/PhpSpreadsheet/Writer/Xls/Escher.php @@ -23,24 +23,18 @@ class Escher /** * The written binary data. - * - * @var string */ - private $data; + private string $data; /** * Shape offsets. Positions in binary stream where a new shape record begins. - * - * @var array */ - private $spOffsets; + private array $spOffsets; /** * Shape types. - * - * @var array */ - private $spTypes; + private array $spTypes; /** * Constructor. diff --git a/src/PhpSpreadsheet/Writer/Xls/Font.php b/src/PhpSpreadsheet/Writer/Xls/Font.php index e3b7923a48..5cd68debb6 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Font.php +++ b/src/PhpSpreadsheet/Writer/Xls/Font.php @@ -35,8 +35,7 @@ public function setColorIndex($colorIndex): void $this->colorIndex = $colorIndex; } - /** @var int */ - private static $notImplemented = 0; + private static int $notImplemented = 0; /** * Get font record data. @@ -114,7 +113,7 @@ private static function mapBold(?bool $bold): int * * @var int[] */ - private static $mapUnderline = [ + private static array $mapUnderline = [ \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_NONE => 0x00, \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_SINGLE => 0x01, \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE => 0x02, diff --git a/src/PhpSpreadsheet/Writer/Xls/Parser.php b/src/PhpSpreadsheet/Writer/Xls/Parser.php index b30834050e..93d94630a0 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -49,17 +49,13 @@ class Parser /** * The index of the character we are currently looking at. - * - * @var int */ - public $currentCharacter; + public int $currentCharacter; /** * The token we are working on. - * - * @var string */ - public $currentToken; + public string $currentToken; /** * The formula to parse. @@ -68,10 +64,8 @@ class Parser /** * The character ahead of the current char. - * - * @var string */ - public $lookAhead; + public string $lookAhead; /** * The parse tree to be generated. @@ -87,17 +81,13 @@ class Parser /** * Array of sheet references in the form of REF structures. - * - * @var array */ - public $references; + public array $references; /** * The Excel ptg indices. - * - * @var array */ - private $ptg = [ + private array $ptg = [ 'ptgExp' => 0x01, 'ptgTbl' => 0x02, 'ptgAdd' => 0x03, @@ -208,10 +198,8 @@ class Parser * -1 is a variable number of arguments. * class: The reference, value or array class of the function args. * vol: The function is volatile. - * - * @var array */ - private $functions = [ + private array $functions = [ // function ptg args class vol 'COUNT' => [0, -1, 0, 0], 'IF' => [1, -1, 1, 0], @@ -751,8 +739,7 @@ private function convertError($errorCode): string }; } - /** @var bool */ - private $tryDefinedName = false; + private bool $tryDefinedName = false; private function convertDefinedName(string $name): string { diff --git a/src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php b/src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php index 711d88d209..81da6353a9 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php +++ b/src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php @@ -9,7 +9,7 @@ class CellAlignment /** * @var array */ - private static $horizontalMap = [ + private static array $horizontalMap = [ Alignment::HORIZONTAL_GENERAL => 0, Alignment::HORIZONTAL_LEFT => 1, Alignment::HORIZONTAL_RIGHT => 3, @@ -21,7 +21,7 @@ class CellAlignment /** * @var array */ - private static $verticalMap = [ + private static array $verticalMap = [ Alignment::VERTICAL_BOTTOM => 2, Alignment::VERTICAL_TOP => 0, Alignment::VERTICAL_CENTER => 1, diff --git a/src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php b/src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php index bc14920654..e97a1f7914 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php +++ b/src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php @@ -9,7 +9,7 @@ class CellBorder /** * @var array */ - protected static $styleMap = [ + protected static array $styleMap = [ Border::BORDER_NONE => 0x00, Border::BORDER_THIN => 0x01, Border::BORDER_MEDIUM => 0x02, diff --git a/src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php b/src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php index f5a8c4700e..a0a932a967 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php +++ b/src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php @@ -9,7 +9,7 @@ class CellFill /** * @var array */ - protected static $fillStyleMap = [ + protected static array $fillStyleMap = [ Fill::FILL_NONE => 0x00, Fill::FILL_SOLID => 0x01, Fill::FILL_PATTERN_MEDIUMGRAY => 0x02, diff --git a/src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php b/src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php index caf85c0499..46f7bd5b48 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php +++ b/src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php @@ -9,7 +9,7 @@ class ColorMap /** * @var array */ - private static $colorMap = [ + private static array $colorMap = [ '#000000' => 0x08, '#FFFFFF' => 0x09, '#FF0000' => 0x0A, diff --git a/src/PhpSpreadsheet/Writer/Xls/Workbook.php b/src/PhpSpreadsheet/Writer/Xls/Workbook.php index 1f7b28f2a5..030f68654b 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Workbook.php +++ b/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -64,14 +64,12 @@ class Workbook extends BIFFwriter * * @var Xf[] */ - private $xfWriters = []; + private array $xfWriters = []; /** * Array containing the colour palette. - * - * @var array */ - private $palette; + private array $palette; /** * The codepage indicates the text encoding used for strings. @@ -93,70 +91,52 @@ class Workbook extends BIFFwriter * * @var Font[] */ - private $fontWriters = []; + private array $fontWriters = []; /** * Added fonts. Maps from font's hash => index in workbook. - * - * @var array */ - private $addedFonts = []; + private array $addedFonts = []; /** * Shared number formats. - * - * @var array */ - private $numberFormats = []; + private array $numberFormats = []; /** * Added number formats. Maps from numberFormat's hash => index in workbook. - * - * @var array */ - private $addedNumberFormats = []; + private array $addedNumberFormats = []; /** * Sizes of the binary worksheet streams. - * - * @var array */ - private $worksheetSizes = []; + private array $worksheetSizes = []; /** * Offsets of the binary worksheet streams relative to the start of the global workbook stream. - * - * @var array */ - private $worksheetOffsets = []; + private array $worksheetOffsets = []; /** * Total number of shared strings in workbook. - * - * @var int */ - private $stringTotal; + private int $stringTotal; /** * Number of unique shared strings in workbook. - * - * @var int */ - private $stringUnique; + private int $stringUnique; /** * Array of unique shared strings in workbook. - * - * @var array */ - private $stringTable; + private array $stringTable; /** * Color cache. - * - * @var array */ - private $colors; + private array $colors; /** * Escher object corresponding to MSODRAWINGGROUP. diff --git a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php index 288c1222fe..d925d21b7d 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -54,11 +54,9 @@ // */ class Worksheet extends BIFFwriter { - /** @var int */ - private static $always0 = 0; + private static int $always0 = 0; - /** @var int */ - private static $always1 = 1; + private static int $always1 = 1; /** * Formula parser. @@ -67,10 +65,8 @@ class Worksheet extends BIFFwriter /** * Array containing format information for columns. - * - * @var array */ - private $columnInfo; + private array $columnInfo; /** * The active pane for the worksheet. @@ -101,31 +97,23 @@ class Worksheet extends BIFFwriter /** * Reference to the total number of strings in the workbook. - * - * @var int */ - private $stringTotal; + private int $stringTotal; /** * Reference to the number of unique strings in the workbook. - * - * @var int */ - private $stringUnique; + private int $stringUnique; /** * Reference to the array containing all the unique strings in the workbook. - * - * @var array */ - private $stringTable; + private array $stringTable; /** * Color cache. - * - * @var array */ - private $colors; + private array $colors; /** * Index of first used row (at least 0). @@ -149,10 +137,8 @@ class Worksheet extends BIFFwriter /** * Sheet object. - * - * @var \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet */ - public $phpSheet; + public \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $phpSheet; /** * Escher object corresponding to MSODRAWING. @@ -161,15 +147,10 @@ class Worksheet extends BIFFwriter /** * Array of font hashes associated to FONT records index. - * - * @var array */ - public $fontHashIndex; + public array $fontHashIndex; - /** - * @var bool - */ - private $preCalculateFormulas; + private bool $preCalculateFormulas; private int $printHeaders; @@ -765,8 +746,7 @@ private function writeBoolErr(int $row, int $col, $value, int $isError, int $xfI const WRITE_FORMULA_RANGE = -2; const WRITE_FORMULA_EXCEPTION = -3; - /** @var bool */ - private static $allowThrow = false; + private static bool $allowThrow = false; public static function setAllowThrow(bool $allowThrow): void { diff --git a/src/PhpSpreadsheet/Writer/Xlsx.php b/src/PhpSpreadsheet/Writer/Xlsx.php index c18bc85862..b276cddfab 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx.php +++ b/src/PhpSpreadsheet/Writer/Xlsx.php @@ -37,24 +37,20 @@ class Xlsx extends BaseWriter { /** * Office2003 compatibility. - * - * @var bool */ - private $office2003compatibility = false; + private bool $office2003compatibility = false; /** * Private Spreadsheet. - * - * @var Spreadsheet */ - private $spreadSheet; + private Spreadsheet $spreadSheet; /** * Private string table. * * @var string[] */ - private $stringTable = []; + private array $stringTable = []; /** * Private unique Conditional HashTable. @@ -107,10 +103,8 @@ class Xlsx extends BaseWriter /** * Private handle for zip stream. - * - * @var ZipStream */ - private $zip; + private ZipStream $zip; private Chart $writerPartChart; @@ -648,8 +642,7 @@ public function setOffice2003Compatibility($office2003compatibility): static return $this; } - /** @var array */ - private $pathNames = []; + private array $pathNames = []; private function addZipFile(string $path, string $content): void { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php index f27156507a..d25ec4bcb2 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -19,10 +19,7 @@ class Chart extends WriterPart { - /** - * @var int - */ - private $seriesIndex; + private int $seriesIndex; /** * Write charts to XML format. diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php index 7efaaf9396..0c1561de98 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -20,17 +20,13 @@ class Worksheet extends WriterPart { - /** @var string */ - private $numberStoredAsText = ''; + private string $numberStoredAsText = ''; - /** @var string */ - private $formula = ''; + private string $formula = ''; - /** @var string */ - private $twoDigitTextYear = ''; + private string $twoDigitTextYear = ''; - /** @var string */ - private $evalError = ''; + private string $evalError = ''; /** * Write worksheet to XML format. diff --git a/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php b/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php index 3d7967c0e6..74f46d4bfd 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php @@ -11,8 +11,7 @@ class RangeTest extends TestCase { - /** @var string */ - private $incompleteMessage = 'Must be revisited'; + private string $incompleteMessage = 'Must be revisited'; private \PhpOffice\PhpSpreadsheet\Spreadsheet $spreadSheet; diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/SetupTeardownDatabases.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/SetupTeardownDatabases.php index c280b6725b..5094d8ea4b 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Database/SetupTeardownDatabases.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Database/SetupTeardownDatabases.php @@ -17,12 +17,12 @@ class SetupTeardownDatabases extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AllSetupTeardown.php index 6fd236934b..b51a8509a7 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Financial/AllSetupTeardown.php @@ -18,12 +18,12 @@ class AllSetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AllSetupTeardown.php index 709535dc9c..9d41cedc3e 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Logical/AllSetupTeardown.php @@ -18,12 +18,12 @@ class AllSetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AllSetupTeardown.php index 46947d7d1f..93240fa008 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/AllSetupTeardown.php @@ -13,20 +13,17 @@ class AllSetupTeardown extends TestCase { - /** - * @var string - */ - protected $compatibilityMode; + protected string $compatibilityMode; /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php index ed91c19360..7514023e23 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/LookupRef/IndirectTest.php @@ -174,8 +174,7 @@ public static function providerRelative(): array ]; } - /** @var bool */ - private static $definedFormulaWorking = false; + private static bool $definedFormulaWorking = false; public function testAboveCell(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AllSetupTeardown.php index a73de31c0f..d4594cc67d 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AllSetupTeardown.php @@ -18,12 +18,12 @@ class AllSetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php index 37266eec5e..5b728fefa7 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/AllSetupTeardown.php @@ -18,12 +18,12 @@ class AllSetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/AllSetupTeardown.php b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/AllSetupTeardown.php index 63f2e01c82..a24822476d 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/AllSetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/TextData/AllSetupTeardown.php @@ -21,12 +21,12 @@ class AllSetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php index a5ef6e6cd4..6c05513a90 100644 --- a/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/Functions/Web/WebServiceTest.php @@ -16,7 +16,7 @@ class WebServiceTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php b/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php index 1219583643..e34f8c87ed 100644 --- a/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/RowColumnReferenceTest.php @@ -10,10 +10,7 @@ class RowColumnReferenceTest extends TestCase { - /** - * @var Spreadsheet - */ - protected $spreadSheet; + protected Spreadsheet $spreadSheet; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php b/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php index 388d3ad713..efd2dca04d 100644 --- a/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php +++ b/tests/PhpSpreadsheetTests/Cell/CellDetachTest.php @@ -12,7 +12,7 @@ class CellDetachTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php b/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php index 083e9a6c3d..0937345cd0 100644 --- a/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php +++ b/tests/PhpSpreadsheetTests/Chart/Charts32CatAxValAxTest.php @@ -22,8 +22,7 @@ class Charts32CatAxValAxTest extends TestCase // These tests can only be performed by examining xml. // They are based on sample 33_Chart_Create_Scatter2. - /** @var string */ - private $outputFileName = ''; + private string $outputFileName = ''; private const FORMAT_CODE_DATE_ISO8601_SLASH = 'yyyy/mm/dd'; // not automatically treated as numeric diff --git a/tests/PhpSpreadsheetTests/Custom/ComplexAssert.php b/tests/PhpSpreadsheetTests/Custom/ComplexAssert.php index 73c98afe2d..7efef03023 100644 --- a/tests/PhpSpreadsheetTests/Custom/ComplexAssert.php +++ b/tests/PhpSpreadsheetTests/Custom/ComplexAssert.php @@ -11,8 +11,7 @@ class ComplexAssert extends TestCase { private string $errorMessage = ''; - /** @var float */ - private $delta = 0.0; + private float $delta = 0.0; public function __construct() { diff --git a/tests/PhpSpreadsheetTests/Document/PropertiesTest.php b/tests/PhpSpreadsheetTests/Document/PropertiesTest.php index 12de9c1220..0ada722002 100644 --- a/tests/PhpSpreadsheetTests/Document/PropertiesTest.php +++ b/tests/PhpSpreadsheetTests/Document/PropertiesTest.php @@ -12,13 +12,9 @@ class PropertiesTest extends TestCase { - /** - * @var Properties - */ - private $properties; + private Properties $properties; - /** @var float */ - private $startTime; + private float $startTime; protected function setup(): void { diff --git a/tests/PhpSpreadsheetTests/NamedRange2Test.php b/tests/PhpSpreadsheetTests/NamedRange2Test.php index 6c20e145dd..dcf038c52f 100644 --- a/tests/PhpSpreadsheetTests/NamedRange2Test.php +++ b/tests/PhpSpreadsheetTests/NamedRange2Test.php @@ -13,7 +13,7 @@ class NamedRange2Test extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousFilter.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousFilter.php index 7ee93665e4..c6bb2ccaba 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousFilter.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousFilter.php @@ -9,20 +9,11 @@ /** Define a Read Filter class implementing IReadFilter */ class CsvContiguousFilter implements IReadFilter { - /** - * @var int - */ - private $startRow = 0; + private int $startRow = 0; - /** - * @var int - */ - private $endRow = 0; + private int $endRow = 0; - /** - * @var int - */ - private $filterType = 0; + private int $filterType = 0; /** * Set the list of rows that we want to read. diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousTest.php index abb85d73e8..148a30cf51 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvContiguousTest.php @@ -10,10 +10,7 @@ class CsvContiguousTest extends TestCase { - /** - * @var string - */ - private $inputFileName = 'samples/Reader/sampleData/example2.csv'; + private string $inputFileName = 'samples/Reader/sampleData/example2.csv'; public function testContiguous(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php index 64dd48cb58..f58e1809a8 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvLineEndingTest.php @@ -10,8 +10,7 @@ class CsvLineEndingTest extends TestCase { - /** @var string */ - private $tempFile = ''; + private string $tempFile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php index 9550636b3c..9fc15f1e48 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatLocaleTest.php @@ -17,15 +17,9 @@ class CsvNumberFormatLocaleTest extends TestCase */ private $currentLocale; - /** - * @var string - */ - protected $filename; + protected string $filename; - /** - * @var Csv - */ - protected $csvReader; + protected Csv $csvReader; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php index 3cf4047092..5b3e7a0626 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvNumberFormatTest.php @@ -10,15 +10,9 @@ class CsvNumberFormatTest extends TestCase { - /** - * @var string - */ - protected $filename; + protected string $filename; - /** - * @var Csv - */ - protected $csvReader; + protected Csv $csvReader; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Ods/EmptyFileTest.php b/tests/PhpSpreadsheetTests/Reader/Ods/EmptyFileTest.php index 9e7c15515d..7506ea0160 100644 --- a/tests/PhpSpreadsheetTests/Reader/Ods/EmptyFileTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Ods/EmptyFileTest.php @@ -11,8 +11,7 @@ class EmptyFileTest extends TestCase { - /** @var string */ - private $tempfile = ''; + private string $tempfile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php b/tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php index ade0093e70..840646d7f1 100644 --- a/tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php @@ -21,8 +21,7 @@ class OdsTest extends TestCase private const ODS_DATA_FILE = 'tests/data/Reader/Ods/data.ods'; - /** @var string */ - private $incompleteMessage = 'Features not implemented yet'; + private string $incompleteMessage = 'Features not implemented yet'; private string $timeZone; diff --git a/tests/PhpSpreadsheetTests/Reader/Slk/SlkTest.php b/tests/PhpSpreadsheetTests/Reader/Slk/SlkTest.php index ac8b381df4..371bfb457e 100644 --- a/tests/PhpSpreadsheetTests/Reader/Slk/SlkTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Slk/SlkTest.php @@ -13,15 +13,9 @@ class SlkTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = __DIR__ . '/../../../../samples/templates/SylkTest.slk'; - - /** - * @var string - */ - private $filename = ''; + private static string $testbook = __DIR__ . '/../../../../samples/templates/SylkTest.slk'; + + private string $filename = ''; protected function teardown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xls/LoadSheetsOnlyTest.php b/tests/PhpSpreadsheetTests/Reader/Xls/LoadSheetsOnlyTest.php index e723dbda24..5edcbe6d39 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xls/LoadSheetsOnlyTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xls/LoadSheetsOnlyTest.php @@ -12,12 +12,9 @@ class LoadSheetsOnlyTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLS/HiddenSheet.xls'; + private static string $testbook = 'tests/data/Reader/XLS/HiddenSheet.xls'; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/EmptyFileTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/EmptyFileTest.php index 2136b3a7a7..9da7f79d60 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/EmptyFileTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/EmptyFileTest.php @@ -11,8 +11,7 @@ class EmptyFileTest extends TestCase { - /** @var string */ - private $tempfile = ''; + private string $tempfile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/ExplicitDateTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/ExplicitDateTest.php index 919e617aa7..adad99aff9 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/ExplicitDateTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/ExplicitDateTest.php @@ -8,10 +8,7 @@ class ExplicitDateTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/explicitdate.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/explicitdate.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1482Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1482Test.php index e1d0875504..bfaa580843 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1482Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue1482Test.php @@ -8,10 +8,7 @@ class Issue1482Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.1482.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.1482.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2301Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2301Test.php index 1d876a0ff8..95dc2228d0 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2301Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2301Test.php @@ -9,10 +9,7 @@ class Issue2301Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2301.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2301.xlsx'; public static function testReadRichText(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2488Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2488Test.php index 6595cb5b42..c4f4e1def9 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2488Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2488Test.php @@ -9,10 +9,7 @@ class Issue2488Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2488.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2488.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2490Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2490Test.php index 8307ce1db6..4cd14973d8 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2490Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2490Test.php @@ -9,15 +9,9 @@ class Issue2490Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2490.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2490.xlsx'; - /** - * @var string - */ - private static $testbook3093 = 'tests/data/Reader/XLSX/issue.3093.xlsx'; + private static string $testbook3093 = 'tests/data/Reader/XLSX/issue.3093.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2501Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2501Test.php index 011d00b8fb..fb8e7bec34 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2501Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2501Test.php @@ -9,10 +9,7 @@ class Issue2501Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2501.b.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2501.b.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2516Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2516Test.php index e091d2a79d..c4333d6f37 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2516Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2516Test.php @@ -9,10 +9,7 @@ class Issue2516Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2516b.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2516b.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2542Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2542Test.php index 34027522fe..1bf7993d68 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2542Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2542Test.php @@ -10,10 +10,7 @@ class Issue2542Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2542.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2542.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2778Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2778Test.php index b672f9c1c7..cdfcacf3d5 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2778Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2778Test.php @@ -9,10 +9,7 @@ class Issue2778Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2778.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2778.xlsx'; public function testIssue2778(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2885Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2885Test.php index 9f2783ce82..ec332e0414 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2885Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue2885Test.php @@ -9,10 +9,7 @@ class Issue2885Test extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.2885.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.2885.xlsx'; public function testIssue2885(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3435Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3435Test.php index 0962724019..333016e66c 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3435Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3435Test.php @@ -8,10 +8,7 @@ class Issue3435Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3435.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3435.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3464Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3464Test.php index f466dc725d..2dc1d8d44d 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3464Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3464Test.php @@ -9,10 +9,7 @@ class Issue3464Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3464.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3464.xlsx'; public function testReadFontColor(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3495Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3495Test.php index 5c0b71facf..8148d95e70 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3495Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3495Test.php @@ -8,10 +8,7 @@ class Issue3495Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3495d.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3495d.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3534Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3534Test.php index 3a0146e74f..833a30ed2e 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3534Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3534Test.php @@ -9,10 +9,7 @@ class Issue3534Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3534.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3534.xlsx'; public function testReadColumnStyles(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3552Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3552Test.php index de3e738cc0..197a7bbc6b 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3552Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3552Test.php @@ -11,10 +11,7 @@ class Issue3552Test extends AbstractFunctional { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3552.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3552.xlsx'; public function testRowBreaks(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3553Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3553Test.php index 73c19f7e7e..be1042dffe 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3553Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3553Test.php @@ -8,10 +8,7 @@ class Issue3553Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3553.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3553.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3665Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3665Test.php index f4990bc676..d3e68adf37 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3665Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/Issue3665Test.php @@ -8,10 +8,7 @@ class Issue3665Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue.3665.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue.3665.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/LoadSheetsOnlyTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/LoadSheetsOnlyTest.php index 3513fd981a..93739b6352 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/LoadSheetsOnlyTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/LoadSheetsOnlyTest.php @@ -12,12 +12,9 @@ class LoadSheetsOnlyTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/HiddenSheet.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/HiddenSheet.xlsx'; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceIssue2109bTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceIssue2109bTest.php index 6c0e6b1e31..40c6b01446 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceIssue2109bTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceIssue2109bTest.php @@ -9,10 +9,7 @@ class NamespaceIssue2109bTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/issue2109b.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/issue2109b.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceNonStdTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceNonStdTest.php index c1b6bbb478..15576dae7d 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceNonStdTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceNonStdTest.php @@ -11,10 +11,7 @@ class NamespaceNonStdTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/namespacenonstd.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/namespacenonstd.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceOpenpyxl35Test.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceOpenpyxl35Test.php index d582530c62..c9ae6535d6 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceOpenpyxl35Test.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceOpenpyxl35Test.php @@ -9,10 +9,7 @@ class NamespaceOpenpyxl35Test extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/namespaces.openpyxl35.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/namespaces.openpyxl35.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespacePurlTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespacePurlTest.php index 7d7ff3fe35..5e1e6a5671 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespacePurlTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespacePurlTest.php @@ -8,10 +8,7 @@ class NamespacePurlTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/namespacepurl.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/namespacepurl.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php index 62e95b4102..ff9ef8864c 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/NamespaceStdTest.php @@ -11,10 +11,7 @@ class NamespaceStdTest extends \PHPUnit\Framework\TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/namespacestd.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/namespacestd.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaTest.php index b7e4532162..dfa6f34000 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/SharedFormulaTest.php @@ -10,10 +10,7 @@ class SharedFormulaTest extends TestCase { - /** - * @var string - */ - private static $testbook = 'samples/templates/32readwriteAreaChart1.xlsx'; + private static string $testbook = 'samples/templates/32readwriteAreaChart1.xlsx'; public function testPreliminaries(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/SplitsTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/SplitsTest.php index ddea4ae0cc..e852b0e7bb 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/SplitsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/SplitsTest.php @@ -9,10 +9,7 @@ class SplitsTest extends AbstractFunctional { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/splits.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/splits.xlsx'; public function testSplits(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxRootZipFilesTest.php b/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxRootZipFilesTest.php index 1142c0c80e..f83e7989d4 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxRootZipFilesTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xlsx/XlsxRootZipFilesTest.php @@ -9,10 +9,7 @@ class XlsxRootZipFilesTest extends TestCase { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/XLSX/rootZipFiles.xlsx'; + private static string $testbook = 'tests/data/Reader/XLSX/rootZipFiles.xlsx'; public function testXlsxRootZipFiles(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/DataValidationsTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/DataValidationsTest.php index 151fc4235b..63810408c5 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/DataValidationsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/DataValidationsTest.php @@ -11,8 +11,7 @@ class DataValidationsTest extends AbstractFunctional { - /** @var string */ - private $filename = 'tests/data/Reader/Xml/datavalidations.xml'; + private string $filename = 'tests/data/Reader/Xml/datavalidations.xml'; public function testValidation(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php index b5d8a33d54..47d831241d 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/PageSetupTest.php @@ -18,10 +18,9 @@ class PageSetupTest extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; - /** @var string */ - private $filename = 'tests/data/Reader/Xml/PageSetup.xml'; + private string $filename = 'tests/data/Reader/Xml/PageSetup.xml'; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/SplitsTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/SplitsTest.php index 7f6b7f6fa6..3ef4238de5 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/SplitsTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/SplitsTest.php @@ -9,10 +9,7 @@ class SplitsTest extends AbstractFunctional { - /** - * @var string - */ - private static $testbook = 'tests/data/Reader/Xml/splits.xml'; + private static string $testbook = 'tests/data/Reader/Xml/splits.xml'; public function testSplits(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlLoadTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlLoadTest.php index befac3b9ec..cf815e5ab1 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlLoadTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlLoadTest.php @@ -15,7 +15,7 @@ class XmlLoadTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; private string $locale; diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php index d479449cf7..bda6fc5723 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlOddTest.php @@ -10,10 +10,7 @@ class XmlOddTest extends TestCase { - /** - * @var string - */ - private $filename = ''; + private string $filename = ''; protected function teardown(): void { diff --git a/tests/PhpSpreadsheetTests/Reader/Xml/XmlPropertiesTest.php b/tests/PhpSpreadsheetTests/Reader/Xml/XmlPropertiesTest.php index bcc23813e1..481f038a22 100644 --- a/tests/PhpSpreadsheetTests/Reader/Xml/XmlPropertiesTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Xml/XmlPropertiesTest.php @@ -10,8 +10,7 @@ class XmlPropertiesTest extends AbstractFunctional { - /** @var string */ - private $filename = 'tests/data/Reader/Xml/hyperlinkbase.xml'; + private string $filename = 'tests/data/Reader/Xml/hyperlinkbase.xml'; public function testProperties(): void { diff --git a/tests/PhpSpreadsheetTests/ReferenceHelper3Test.php b/tests/PhpSpreadsheetTests/ReferenceHelper3Test.php index 4a437a0104..a50ee92289 100644 --- a/tests/PhpSpreadsheetTests/ReferenceHelper3Test.php +++ b/tests/PhpSpreadsheetTests/ReferenceHelper3Test.php @@ -81,8 +81,7 @@ public function testCompletelyRelative(): void $spreadsheet->disconnectWorksheets(); } - /** @var bool */ - private static $sumFormulaWorking = false; + private static bool $sumFormulaWorking = false; public function testSumAboveCell(): void { diff --git a/tests/PhpSpreadsheetTests/Shared/Date2Test.php b/tests/PhpSpreadsheetTests/Shared/Date2Test.php index 7d66fe8717..687a34e230 100644 --- a/tests/PhpSpreadsheetTests/Shared/Date2Test.php +++ b/tests/PhpSpreadsheetTests/Shared/Date2Test.php @@ -13,7 +13,7 @@ class Date2Test extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; private int $calculateDateTimeType; diff --git a/tests/PhpSpreadsheetTests/Shared/FileTest.php b/tests/PhpSpreadsheetTests/Shared/FileTest.php index c4baf51ce2..e8d370e22d 100644 --- a/tests/PhpSpreadsheetTests/Shared/FileTest.php +++ b/tests/PhpSpreadsheetTests/Shared/FileTest.php @@ -12,8 +12,7 @@ class FileTest extends TestCase { private bool $uploadFlag = false; - /** @var string */ - private $tempfile = ''; + private string $tempfile = ''; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php b/tests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php index 196dabd336..f9a6d126c6 100644 --- a/tests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php +++ b/tests/PhpSpreadsheetTests/SpreadsheetCoverageTest.php @@ -11,10 +11,10 @@ class SpreadsheetCoverageTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** @var ?Spreadsheet */ - private $spreadsheet2; + private ?Spreadsheet $spreadsheet2 = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/SpreadsheetTest.php b/tests/PhpSpreadsheetTests/SpreadsheetTest.php index fe4e986439..f7d9d86f81 100644 --- a/tests/PhpSpreadsheetTests/SpreadsheetTest.php +++ b/tests/PhpSpreadsheetTests/SpreadsheetTest.php @@ -12,7 +12,7 @@ class SpreadsheetTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Style/AlignmentMiddleTest.php b/tests/PhpSpreadsheetTests/Style/AlignmentMiddleTest.php index 2fcb719185..7e61f83a5d 100644 --- a/tests/PhpSpreadsheetTests/Style/AlignmentMiddleTest.php +++ b/tests/PhpSpreadsheetTests/Style/AlignmentMiddleTest.php @@ -15,10 +15,9 @@ class AlignmentMiddleTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; - /** @var string */ - private $outputFileName = ''; + private string $outputFileName = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Style/AlignmentTest.php b/tests/PhpSpreadsheetTests/Style/AlignmentTest.php index 0f0ba5e15d..1b93800047 100644 --- a/tests/PhpSpreadsheetTests/Style/AlignmentTest.php +++ b/tests/PhpSpreadsheetTests/Style/AlignmentTest.php @@ -12,7 +12,7 @@ class AlignmentTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalBoolTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalBoolTest.php index e4b0c7fcf8..f0d16058db 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalBoolTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalBoolTest.php @@ -14,8 +14,7 @@ class ConditionalBoolTest extends TestCase { - /** @var string */ - private $outfile = ''; + private string $outfile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php index 505991d4e4..ac0ba30d88 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/CellMatcherTest.php @@ -17,7 +17,7 @@ class CellMatcherTest extends TestCase /** * @var ?Spreadsheet */ - protected $spreadsheet; + protected ?Spreadsheet $spreadsheet = null; protected function loadSpreadsheet(): Spreadsheet { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/BlankWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/BlankWizardTest.php index 027c0674eb..d9a64fd5c0 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/BlankWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/BlankWizardTest.php @@ -12,20 +12,11 @@ class BlankWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; - - /** - * @var string - */ - protected $range = '$C$3:$E$5'; - - /** - * @var Wizard - */ - protected $wizardFactory; + protected Style $style; + + protected string $range = '$C$3:$E$5'; + + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php index 7ccc860fc0..d16ca99ea5 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/CellValueWizardTest.php @@ -12,20 +12,11 @@ class CellValueWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; + protected Style $style; - /** - * @var string - */ - protected $range = '$C$3:$E$5'; + protected string $range = '$C$3:$E$5'; - /** - * @var Wizard - */ - protected $wizardFactory; + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php index 824066cb98..57778fc8d3 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DateValueWizardTest.php @@ -12,20 +12,11 @@ class DateValueWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; + protected Style $style; - /** - * @var string - */ - protected $range = '$C$3:$E$5'; + protected string $range = '$C$3:$E$5'; - /** - * @var Wizard - */ - protected $wizardFactory; + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DuplicatesWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DuplicatesWizardTest.php index 2b280a7aad..8c5082a30a 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DuplicatesWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/DuplicatesWizardTest.php @@ -12,20 +12,11 @@ class DuplicatesWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; - - /** - * @var string - */ - protected $range = '$C$3:$E$5'; - - /** - * @var Wizard - */ - protected $wizardFactory; + protected Style $style; + + protected string $range = '$C$3:$E$5'; + + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ErrorWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ErrorWizardTest.php index b845318fe3..8026135aa7 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ErrorWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ErrorWizardTest.php @@ -12,20 +12,11 @@ class ErrorWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; - - /** - * @var string - */ - protected $range = '$C$3:$E$5'; - - /** - * @var Wizard - */ - protected $wizardFactory; + protected Style $style; + + protected string $range = '$C$3:$E$5'; + + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php index 7ce0c2be01..770af66af1 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/ExpressionWizardTest.php @@ -12,20 +12,11 @@ class ExpressionWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; + protected Style $style; - /** - * @var string - */ - protected $range = '$C$3:$E$5'; + protected string $range = '$C$3:$E$5'; - /** - * @var Wizard - */ - protected $wizardFactory; + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/TextValueWizardTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/TextValueWizardTest.php index de6d22aafa..cd89dd347d 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/TextValueWizardTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/TextValueWizardTest.php @@ -12,20 +12,11 @@ class TextValueWizardTest extends TestCase { - /** - * @var Style - */ - protected $style; - - /** - * @var string - */ - protected $range = '$C$3:$E$5'; - - /** - * @var Wizard - */ - protected $wizardFactory; + protected Style $style; + + protected string $range = '$C$3:$E$5'; + + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php index e3c71387e3..04681b39a0 100644 --- a/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php +++ b/tests/PhpSpreadsheetTests/Style/ConditionalFormatting/Wizard/WizardFactoryTest.php @@ -12,10 +12,7 @@ class WizardFactoryTest extends TestCase { - /** - * @var Wizard - */ - protected $wizardFactory; + protected Wizard $wizardFactory; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/SetupTeardown.php b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/SetupTeardown.php index 925c97c462..ef3cfb4b3a 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/SetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/SetupTeardown.php @@ -13,17 +13,14 @@ class SetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; - /** - * @var int - */ - protected $maxRow = 4; + protected int $maxRow = 4; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowUndeprecatedTest.php b/tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowUndeprecatedTest.php index 40f1d03e2d..66862e98de 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowUndeprecatedTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/ByColumnAndRowUndeprecatedTest.php @@ -15,7 +15,7 @@ class ByColumnAndRowUndeprecatedTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Worksheet/ConditionalStyleTest.php b/tests/PhpSpreadsheetTests/Worksheet/ConditionalStyleTest.php index e884740391..44ce5bcb86 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/ConditionalStyleTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/ConditionalStyleTest.php @@ -11,10 +11,7 @@ class ConditionalStyleTest extends TestCase { - /** - * @var Spreadsheet - */ - protected $spreadsheet; + protected Spreadsheet $spreadsheet; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Worksheet/MergeBehaviourTest.php b/tests/PhpSpreadsheetTests/Worksheet/MergeBehaviourTest.php index 7f0b04df64..4147f86353 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/MergeBehaviourTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/MergeBehaviourTest.php @@ -10,19 +10,13 @@ class MergeBehaviourTest extends AbstractFunctional { - /** - * @var array - */ - private static $testDataRaw = [ + private static array $testDataRaw = [ [1.1, 2.2, '=ROUND(A1+B1, 1)'], [4.4, 5.5, '=ROUND(A2+B2, 1)'], ['=ROUND(A1+A2, 1)', '=ROUND(B1+B2, 1)', '=ROUND(A3+B3, 1)'], ]; - /** - * @var array - */ - private $testDataFormatted = [ + private array $testDataFormatted = [ ['=DATE(1960, 12, 19)', '=DATE(2022, 09, 15)'], ]; diff --git a/tests/PhpSpreadsheetTests/Worksheet/RemoveTest.php b/tests/PhpSpreadsheetTests/Worksheet/RemoveTest.php index 0dcab2d10d..9778aa9b0e 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/RemoveTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/RemoveTest.php @@ -21,7 +21,7 @@ public function testRemoveRow(): void 'FF00FF00', 'FF0000FF', ]; - $rowHeights = [-1, -1, 1.2, 1.3, 1.4, 1.5, -1, -1, -1]; + $rowHeights = [-1.0, -1.0, 1.2, 1.3, 1.4, 1.5, -1.0, -1.0, -1.0]; for ($row = 1; $row < 10; ++$row) { $sheet->getCell("B$row") ->getStyle() diff --git a/tests/PhpSpreadsheetTests/Worksheet/Table/SetupTeardown.php b/tests/PhpSpreadsheetTests/Worksheet/Table/SetupTeardown.php index 41bf86ed23..192e76e4c8 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/Table/SetupTeardown.php +++ b/tests/PhpSpreadsheetTests/Worksheet/Table/SetupTeardown.php @@ -13,17 +13,14 @@ class SetupTeardown extends TestCase /** * @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** * @var ?Worksheet */ - private $sheet; + private ?Worksheet $sheet = null; - /** - * @var int - */ - protected $maxRow = 4; + protected int $maxRow = 4; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php b/tests/PhpSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php index adf2aa19a1..4c0b86b637 100644 --- a/tests/PhpSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Dompdf/PaperSizeArrayTest.php @@ -12,8 +12,7 @@ class PaperSizeArrayTest extends TestCase { - /** @var string */ - private $outfile = ''; + private string $outfile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php b/tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php index 53c62ece0f..15378e12b1 100644 --- a/tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php @@ -10,10 +10,7 @@ class HtmlCommentsTest extends Functional\AbstractFunctional { - /** - * @var Spreadsheet - */ - private $spreadsheet; + private Spreadsheet $spreadsheet; public static function providerCommentRichText(): array { diff --git a/tests/PhpSpreadsheetTests/Writer/Html/ImageCopyTest.php b/tests/PhpSpreadsheetTests/Writer/Html/ImageCopyTest.php index 83e8bdf041..ddd3200919 100644 --- a/tests/PhpSpreadsheetTests/Writer/Html/ImageCopyTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Html/ImageCopyTest.php @@ -13,8 +13,7 @@ class ImageCopyTest extends Functional\AbstractFunctional { - /** @var string */ - private $xlsxFile = ''; + private string $xlsxFile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Mpdf/ImageCopyPdfTest.php b/tests/PhpSpreadsheetTests/Writer/Mpdf/ImageCopyPdfTest.php index c9aae25b71..5fec6b5adf 100644 --- a/tests/PhpSpreadsheetTests/Writer/Mpdf/ImageCopyPdfTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Mpdf/ImageCopyPdfTest.php @@ -13,8 +13,7 @@ class ImageCopyPdfTest extends Functional\AbstractFunctional { - /** @var string */ - private $xlsxFile = ''; + private string $xlsxFile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php b/tests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php index e18857e3ec..50e7bc7d58 100644 --- a/tests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Ods/ContentTest.php @@ -22,10 +22,7 @@ class ContentTest extends TestCase { - /** - * @var string - */ - private $samplesPath = 'tests/data/Writer/Ods'; + private string $samplesPath = 'tests/data/Writer/Ods'; private string $compatibilityMode; diff --git a/tests/PhpSpreadsheetTests/Writer/PreCalcTest.php b/tests/PhpSpreadsheetTests/Writer/PreCalcTest.php index 8dd6ee4a3f..98fc58f9cf 100644 --- a/tests/PhpSpreadsheetTests/Writer/PreCalcTest.php +++ b/tests/PhpSpreadsheetTests/Writer/PreCalcTest.php @@ -13,8 +13,7 @@ class PreCalcTest extends AbstractFunctional { - /** @var string */ - private $outfile = ''; + private string $outfile = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xls/FormulaErrTest.php b/tests/PhpSpreadsheetTests/Writer/Xls/FormulaErrTest.php index 9dc7281b69..23398bf060 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xls/FormulaErrTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xls/FormulaErrTest.php @@ -13,10 +13,10 @@ class FormulaErrTest extends AbstractFunctional { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** @var ?Spreadsheet */ - private $reloadedSpreadsheet; + private ?Spreadsheet $reloadedSpreadsheet = null; private bool $allowThrow; diff --git a/tests/PhpSpreadsheetTests/Writer/Xls/ParserTest.php b/tests/PhpSpreadsheetTests/Writer/Xls/ParserTest.php index 9a283ddbee..73e7239ce0 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xls/ParserTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xls/ParserTest.php @@ -12,7 +12,7 @@ class ParserTest extends TestCase { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php b/tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php index 532f22b0be..01a68974e7 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php @@ -12,13 +12,10 @@ class WorkbookTest extends TestCase { - /** - * @var Workbook - */ - private $workbook; + private Workbook $workbook; /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xls/XlsGifBmpTest.php b/tests/PhpSpreadsheetTests/Writer/Xls/XlsGifBmpTest.php index 5f9c5d91d6..74901dd40c 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xls/XlsGifBmpTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xls/XlsGifBmpTest.php @@ -13,10 +13,7 @@ class XlsGifBmpTest extends AbstractFunctional { - /** - * @var string - */ - private $filename = ''; + private string $filename = ''; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/CalculationErrorTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/CalculationErrorTest.php index 9b61bf6360..85d246fb00 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/CalculationErrorTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/CalculationErrorTest.php @@ -12,10 +12,10 @@ class CalculationErrorTest extends AbstractFunctional { /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** @var ?Spreadsheet */ - private $reloadedSpreadsheet; + private ?Spreadsheet $reloadedSpreadsheet = null; protected function tearDown(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php index bceed1050f..a8616aada9 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/ConditionalTest.php @@ -14,15 +14,9 @@ class ConditionalTest extends AbstractFunctional { - /** - * @var string - */ - protected $cellRange; + protected string $cellRange; - /** - * @var Style - */ - protected $style; + protected Style $style; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php index 185154e1bd..e4fe3690ae 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php @@ -17,10 +17,10 @@ class LocaleFloatsTest extends AbstractFunctional private $currentLocale; /** @var ?Spreadsheet */ - private $spreadsheet; + private ?Spreadsheet $spreadsheet = null; /** @var ?Spreadsheet */ - private $reloadedSpreadsheet; + private ?Spreadsheet $reloadedSpreadsheet = null; protected function setUp(): void { diff --git a/tests/PhpSpreadsheetTests/Writer/Xlsx/Unparsed2396Test.php b/tests/PhpSpreadsheetTests/Writer/Xlsx/Unparsed2396Test.php index a27758b38c..549b5a164f 100644 --- a/tests/PhpSpreadsheetTests/Writer/Xlsx/Unparsed2396Test.php +++ b/tests/PhpSpreadsheetTests/Writer/Xlsx/Unparsed2396Test.php @@ -13,8 +13,7 @@ class Unparsed2396Test extends TestCase { - /** @var string */ - private $filename = ''; + private string $filename = ''; protected function tearDown(): void {