From 07e5b95bb1a3490d9ed8bf52c88cc276b702b23b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=93=9C=E5=93=A5?=
Date: Wed, 16 Jun 2021 14:15:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
composer.lock | 2299 -----
vendor/composer/ClassLoader.php | 4 +-
vendor/composer/InstalledVersions.php | 890 +-
vendor/composer/autoload_files.php | 36 +-
vendor/composer/autoload_static.php | 36 +-
vendor/composer/installed.json | 190 +-
vendor/composer/installed.php | 653 +-
.../complex/.github/workflows/main.yml | 150 +
.../markbaker/complex/classes/src/Complex.php | 2 +-
.../complex/classes/src/functions/abs.php | 8 +-
.../complex/classes/src/functions/acos.php | 36 +-
.../complex/classes/src/functions/acosh.php | 28 +-
.../complex/classes/src/functions/acot.php | 10 +-
.../complex/classes/src/functions/acoth.php | 10 +-
.../complex/classes/src/functions/acsc.php | 16 +-
.../complex/classes/src/functions/acsch.php | 16 +-
.../classes/src/functions/argument.php | 8 +-
.../complex/classes/src/functions/asec.php | 16 +-
.../complex/classes/src/functions/asech.php | 16 +-
.../complex/classes/src/functions/asin.php | 34 +-
.../complex/classes/src/functions/asinh.php | 26 +-
.../complex/classes/src/functions/atan.php | 42 +-
.../complex/classes/src/functions/atanh.php | 34 +-
.../classes/src/functions/conjugate.php | 18 +-
.../complex/classes/src/functions/cos.php | 28 +-
.../complex/classes/src/functions/cosh.php | 24 +-
.../complex/classes/src/functions/cot.php | 16 +-
.../complex/classes/src/functions/coth.php | 10 +-
.../complex/classes/src/functions/csc.php | 16 +-
.../complex/classes/src/functions/csch.php | 16 +-
.../complex/classes/src/functions/exp.php | 28 +-
.../complex/classes/src/functions/inverse.php | 16 +-
.../complex/classes/src/functions/ln.php | 24 +-
.../complex/classes/src/functions/log10.php | 22 +-
.../complex/classes/src/functions/log2.php | 22 +-
.../classes/src/functions/negative.php | 18 +-
.../complex/classes/src/functions/pow.php | 38 +-
.../complex/classes/src/functions/rho.php | 16 +-
.../complex/classes/src/functions/sec.php | 10 +-
.../complex/classes/src/functions/sech.php | 10 +-
.../complex/classes/src/functions/sin.php | 24 +-
.../complex/classes/src/functions/sinh.php | 24 +-
.../complex/classes/src/functions/sqrt.php | 18 +-
.../complex/classes/src/functions/tan.php | 38 +-
.../complex/classes/src/functions/tanh.php | 30 +-
.../complex/classes/src/functions/theta.php | 30 +-
.../complex/classes/src/operations/add.php | 50 +-
.../classes/src/operations/divideby.php | 68 +-
.../classes/src/operations/divideinto.php | 68 +-
.../classes/src/operations/multiply.php | 54 +-
.../classes/src/operations/subtract.php | 50 +-
vendor/markbaker/complex/composer.json | 7 -
.../markbaker/matrix/classes/src/Builder.php | 4 +-
.../matrix/classes/src/Div0Exception.php | 13 +
.../matrix/classes/src/Functions.php | 6 +-
.../matrix/classes/src/Operators/Division.php | 15 +-
.../classes/src/Operators/Multiplication.php | 37 +-
.../matrix/classes/src/functions/adjoint.php | 20 +-
.../classes/src/functions/antidiagonal.php | 20 +-
.../classes/src/functions/cofactors.php | 20 +-
.../classes/src/functions/determinant.php | 20 +-
.../matrix/classes/src/functions/diagonal.php | 20 +-
.../matrix/classes/src/functions/identity.php | 20 +-
.../matrix/classes/src/functions/inverse.php | 20 +-
.../matrix/classes/src/functions/minors.php | 20 +-
.../matrix/classes/src/functions/trace.php | 20 +-
.../classes/src/functions/transpose.php | 20 +-
.../matrix/classes/src/operations/add.php | 44 +-
.../classes/src/operations/directsum.php | 44 +-
.../classes/src/operations/divideby.php | 44 +-
.../classes/src/operations/divideinto.php | 46 +-
.../classes/src/operations/multiply.php | 44 +-
.../classes/src/operations/subtract.php | 44 +-
vendor/phpoffice/phpspreadsheet/CHANGELOG.md | 39 +-
.../phpoffice/phpspreadsheet/CONTRIBUTING.md | 9 +
vendor/phpoffice/phpspreadsheet/composer.json | 41 +-
.../phpspreadsheet/phpstan-baseline.neon | 7602 +++++++++++++++++
.../phpspreadsheet/phpstan.neon.dist | 29 +
.../Calculation/Calculation.php | 1065 ++-
.../PhpSpreadsheet/Calculation/Database.php | 40 +-
.../Calculation/Database/DAverage.php | 2 +-
.../Calculation/Database/DMax.php | 4 +-
.../Calculation/Database/DMin.php | 4 +-
.../Calculation/Database/DProduct.php | 4 +-
.../Calculation/Database/DStDev.php | 2 +-
.../Calculation/Database/DStDevP.php | 2 +-
.../Calculation/Database/DSum.php | 4 +-
.../Calculation/Database/DVar.php | 2 +-
.../Calculation/Database/DVarP.php | 2 +-
.../Calculation/Database/DatabaseAbstract.php | 2 +-
.../PhpSpreadsheet/Calculation/DateTime.php | 1380 +--
.../Calculation/DateTimeExcel/Constants.php | 38 +
.../Calculation/DateTimeExcel/Current.php | 59 +
.../Calculation/DateTimeExcel/Date.php | 168 +
.../Calculation/DateTimeExcel/DateParts.php | 127 +
.../Calculation/DateTimeExcel/DateValue.php | 151 +
.../Calculation/DateTimeExcel/Days.php | 51 +
.../Calculation/DateTimeExcel/Days360.php | 106 +
.../Calculation/DateTimeExcel/Difference.php | 146 +
.../Calculation/DateTimeExcel/Helpers.php | 285 +
.../Calculation/DateTimeExcel/Month.php | 82 +
.../Calculation/DateTimeExcel/NetworkDays.php | 102 +
.../Calculation/DateTimeExcel/Time.php | 119 +
.../Calculation/DateTimeExcel/TimeParts.php | 112 +
.../Calculation/DateTimeExcel/TimeValue.php | 61 +
.../Calculation/DateTimeExcel/Week.php | 254 +
.../Calculation/DateTimeExcel/WorkDay.php | 189 +
.../Calculation/DateTimeExcel/YearFrac.php | 120 +
.../Calculation/Engineering.php | 344 +-
.../Calculation/Engineering/BesselI.php | 129 +-
.../Calculation/Engineering/BesselJ.php | 167 +-
.../Calculation/Engineering/BesselK.php | 83 +-
.../Calculation/Engineering/BesselY.php | 108 +-
.../Calculation/Engineering/BitWise.php | 103 +-
.../Calculation/Engineering/Compare.php | 15 +-
.../Calculation/Engineering/Complex.php | 99 +
.../Engineering/ComplexFunctions.php | 513 ++
.../Engineering/ComplexOperations.php | 120 +
.../Calculation/Engineering/Constants.php | 11 +
.../Calculation/Engineering/ConvertBase.php | 10 +-
.../Calculation/Engineering/ConvertBinary.php | 20 +-
.../Engineering/ConvertDecimal.php | 51 +-
.../Calculation/Engineering/ConvertHex.php | 11 +-
.../Calculation/Engineering/ConvertOctal.php | 10 +-
.../Calculation/Engineering/ConvertUOM.php | 4 +-
.../Engineering/EngineeringValidations.php | 33 +
.../Calculation/Engineering/Erf.php | 8 +-
.../Calculation/Engineering/ErfC.php | 2 +-
.../PhpSpreadsheet/Calculation/Financial.php | 1994 +----
.../Calculation/Financial/Amortization.php | 210 +
.../CashFlow/CashFlowValidations.php | 56 +
.../Financial/CashFlow/Constant/Periodic.php | 199 +
.../CashFlow/Constant/Periodic/Cumulative.php | 141 +
.../CashFlow/Constant/Periodic/Interest.php | 216 +
.../Periodic/InterestAndPrincipal.php | 44 +
.../CashFlow/Constant/Periodic/Payments.php | 115 +
.../Calculation/Financial/CashFlow/Single.php | 108 +
.../CashFlow/Variable/NonPeriodic.php | 225 +
.../Financial/CashFlow/Variable/Periodic.php | 160 +
.../Calculation/Financial/Constants.php | 19 +
.../Calculation/Financial/Coupons.php | 415 +
.../Calculation/Financial/Depreciation.php | 266 +
.../Calculation/Financial/Dollar.php | 97 +
.../Financial/FinancialValidations.php | 158 +
.../Calculation/Financial/Helpers.php | 58 +
.../Calculation/Financial/InterestRate.php | 72 +
.../Financial/Securities/AccruedInterest.php | 151 +
.../Financial/Securities/Price.php | 283 +
.../Financial/Securities/Rates.php | 137 +
.../Securities/SecurityValidations.php | 42 +
.../Financial/Securities/Yields.php | 153 +
.../Calculation/Financial/TreasuryBill.php | 147 +
.../Calculation/FormulaParser.php | 4 +-
.../PhpSpreadsheet/Calculation/Functions.php | 6 +-
.../Calculation/Logical/Conditional.php | 14 +-
.../PhpSpreadsheet/Calculation/LookupRef.php | 888 +-
.../Calculation/LookupRef/Address.php | 98 +
.../Calculation/LookupRef/ExcelMatch.php | 198 +
.../Calculation/LookupRef/Formula.php | 43 +
.../Calculation/LookupRef/HLookup.php | 86 +
.../Calculation/LookupRef/Helpers.php | 74 +
.../Calculation/LookupRef/Hyperlink.php | 40 +
.../Calculation/LookupRef/Indirect.php | 97 +
.../Calculation/LookupRef/Lookup.php | 105 +
.../Calculation/LookupRef/LookupBase.php | 48 +
.../LookupRef/LookupRefValidations.php | 39 +
.../Calculation/LookupRef/Matrix.php | 110 +
.../Calculation/LookupRef/Offset.php | 136 +
.../LookupRef/RowColumnInformation.php | 209 +
.../Calculation/LookupRef/Selection.php | 46 +
.../Calculation/LookupRef/VLookup.php | 105 +
.../PhpSpreadsheet/Calculation/MathTrig.php | 1455 +---
.../Calculation/MathTrig/Absolute.php | 28 +
.../Calculation/MathTrig/Angle.php | 48 +
.../Calculation/MathTrig/Arabic.php | 103 +
.../Calculation/MathTrig/Base.php | 49 +
.../Calculation/MathTrig/Ceiling.php | 92 +-
.../Calculation/MathTrig/CeilingMath.php | 55 -
.../Calculation/MathTrig/CeilingPrecise.php | 39 -
.../Calculation/MathTrig/Combinations.php | 74 +
.../Calculation/MathTrig/Exp.php | 28 +
.../Calculation/MathTrig/Factorial.php | 110 +
.../Calculation/MathTrig/Floor.php | 123 +-
.../Calculation/MathTrig/FloorMath.php | 68 -
.../Calculation/MathTrig/FloorPrecise.php | 51 -
.../Calculation/MathTrig/Gcd.php | 69 +
.../Calculation/MathTrig/Helpers.php | 129 +
.../Calculation/MathTrig/IntClass.php | 14 +-
.../Calculation/MathTrig/Lcm.php | 110 +
.../Calculation/MathTrig/Logarithms.php | 77 +
.../Calculation/MathTrig/MatrixFunctions.php | 138 +
.../Calculation/MathTrig/Mround.php | 42 -
.../Calculation/MathTrig/Operations.php | 136 +
.../Calculation/MathTrig/Random.php | 39 +
.../Calculation/MathTrig/Roman.php | 46 +-
.../Calculation/MathTrig/Round.php | 163 +-
.../Calculation/MathTrig/RoundDown.php | 39 -
.../Calculation/MathTrig/RoundUp.php | 39 -
.../Calculation/MathTrig/SeriesSum.php | 46 +
.../Calculation/MathTrig/Sign.php | 29 +
.../Calculation/MathTrig/Sqrt.php | 49 +
.../Calculation/MathTrig/Subtotal.php | 111 +
.../Calculation/MathTrig/Sum.php | 115 +
.../Calculation/MathTrig/SumSquares.php | 142 +
.../Calculation/MathTrig/Trig/Cosecant.php | 49 +
.../Calculation/MathTrig/Trig/Cosine.php | 89 +
.../Calculation/MathTrig/Trig/Cotangent.php | 91 +
.../Calculation/MathTrig/Trig/Secant.php | 49 +
.../Calculation/MathTrig/Trig/Sine.php | 89 +
.../Calculation/MathTrig/Trig/Tangent.php | 127 +
.../Calculation/MathTrig/Trunc.php | 19 +-
.../Calculation/Statistical.php | 2374 +----
.../Calculation/Statistical/Averages.php | 130 +-
.../Calculation/Statistical/Averages/Mean.php | 131 +
.../Calculation/Statistical/Conditional.php | 2 +-
.../Calculation/Statistical/Confidence.php | 41 +
.../Calculation/Statistical/Deviations.php | 141 +
.../Statistical/Distributions/Beta.php | 260 +
.../Statistical/Distributions/Binomial.php | 202 +
.../Statistical/Distributions/ChiSquared.php | 311 +
.../Distributions/DistributionValidations.php | 24 +
.../Statistical/Distributions/Exponential.php | 47 +
.../Statistical/Distributions/F.php | 56 +
.../Statistical/Distributions/Fisher.php | 61 +
.../Statistical/Distributions/Gamma.php | 127 +
.../Statistical/Distributions/GammaBase.php | 381 +
.../Distributions/HyperGeometric.php | 59 +
.../Statistical/Distributions/LogNormal.php | 119 +
.../Distributions/NewtonRaphson.php | 62 +
.../Statistical/Distributions/Normal.php | 166 +
.../Statistical/Distributions/Poisson.php | 53 +
.../Distributions/StandardNormal.php | 110 +
.../Statistical/Distributions/StudentT.php | 125 +
.../Statistical/Distributions/Weibull.php | 49 +
.../Calculation/Statistical/Maximum.php | 4 +-
.../Calculation/Statistical/Minimum.php | 4 +-
.../Calculation/Statistical/Percentiles.php | 205 +
.../Calculation/Statistical/Permutations.php | 54 +-
.../Calculation/Statistical/Size.php | 96 +
.../Statistical/StandardDeviations.php | 120 +-
.../Calculation/Statistical/Standardize.php | 41 +
.../Statistical/StatisticalValidations.php | 45 +
.../Calculation/Statistical/Trends.php | 421 +
.../Calculation/Statistical/VarianceBase.php | 4 +-
.../Calculation/Statistical/Variances.php | 2 +
.../PhpSpreadsheet/Calculation/TextData.php | 511 +-
.../Calculation/TextData/CaseConvert.php | 64 +
.../Calculation/TextData/CharacterConvert.php | 69 +
.../Calculation/TextData/Concatenate.php | 82 +
.../Calculation/TextData/Extract.php | 77 +
.../Calculation/TextData/Format.php | 198 +
.../Calculation/TextData/Replace.php | 64 +
.../Calculation/TextData/Search.php | 80 +
.../Calculation/TextData/Text.php | 59 +
.../Calculation/TextData/Trim.php | 58 +
.../src/PhpSpreadsheet/Calculation/Web.php | 40 +-
.../Calculation/Web/Service.php | 75 +
.../Calculation/functionlist.txt | 2 +
.../Calculation/locale/Translations.xlsx | Bin 0 -> 109827 bytes
.../Calculation/locale/cs/config | 31 +-
.../Calculation/locale/cs/functions | 856 +-
.../Calculation/locale/da/config | 33 +-
.../Calculation/locale/da/functions | 873 +-
.../Calculation/locale/de/config | 32 +-
.../Calculation/locale/de/functions | 869 +-
.../Calculation/locale/es/config | 32 +-
.../Calculation/locale/es/functions | 873 +-
.../Calculation/locale/fi/config | 32 +-
.../Calculation/locale/fi/functions | 873 +-
.../Calculation/locale/fr/config | 32 +-
.../Calculation/locale/fr/functions | 860 +-
.../Calculation/locale/hu/config | 31 +-
.../Calculation/locale/hu/functions | 873 +-
.../Calculation/locale/it/config | 32 +-
.../Calculation/locale/it/functions | 873 +-
.../Calculation/locale/nb/config | 20 +
.../Calculation/locale/nb/functions | 538 ++
.../Calculation/locale/nl/config | 32 +-
.../Calculation/locale/nl/functions | 872 +-
.../Calculation/locale/no/config | 24 -
.../Calculation/locale/no/functions | 416 -
.../Calculation/locale/pl/config | 32 +-
.../Calculation/locale/pl/functions | 872 +-
.../Calculation/locale/pt/br/config | 32 +-
.../Calculation/locale/pt/br/functions | 863 +-
.../Calculation/locale/pt/config | 32 +-
.../Calculation/locale/pt/functions | 873 +-
.../Calculation/locale/ru/config | 32 +-
.../Calculation/locale/ru/functions | 872 +-
.../Calculation/locale/sv/config | 32 +-
.../Calculation/locale/sv/functions | 868 +-
.../Calculation/locale/tr/config | 32 +-
.../Calculation/locale/tr/functions | 873 +-
.../src/PhpSpreadsheet/Cell/AddressHelper.php | 91 +-
.../src/PhpSpreadsheet/Cell/Cell.php | 9 +-
.../src/PhpSpreadsheet/Cell/Coordinate.php | 29 +-
.../src/PhpSpreadsheet/Chart/Axis.php | 22 +-
.../src/PhpSpreadsheet/Chart/Chart.php | 2 +-
.../src/PhpSpreadsheet/Chart/DataSeries.php | 20 +-
.../PhpSpreadsheet/Chart/DataSeriesValues.php | 4 +-
.../src/PhpSpreadsheet/Chart/GridLines.php | 2 +-
.../src/PhpSpreadsheet/Chart/Legend.php | 10 +-
.../src/PhpSpreadsheet/Chart/PlotArea.php | 6 +-
.../PhpSpreadsheet/Chart/Renderer/JpGraph.php | 4 +
.../src/PhpSpreadsheet/Collection/Cells.php | 12 +-
.../src/PhpSpreadsheet/DefinedName.php | 13 +-
.../PhpSpreadsheet/Document/Properties.php | 435 +-
.../src/PhpSpreadsheet/Document/Security.php | 129 +-
.../src/PhpSpreadsheet/DocumentGenerator.php | 97 -
.../src/PhpSpreadsheet/HashTable.php | 30 +-
.../src/PhpSpreadsheet/Helper/Sample.php | 19 +-
.../src/PhpSpreadsheet/IOFactory.php | 2 +-
.../src/PhpSpreadsheet/Reader/BaseReader.php | 2 +-
.../src/PhpSpreadsheet/Reader/Csv.php | 296 +-
.../PhpSpreadsheet/Reader/Csv/Delimiter.php | 151 +
.../src/PhpSpreadsheet/Reader/Gnumeric.php | 631 +-
.../Reader/Gnumeric/PageSetup.php | 11 +-
.../Reader/Gnumeric/Properties.php | 162 +
.../PhpSpreadsheet/Reader/Gnumeric/Styles.php | 282 +
.../src/PhpSpreadsheet/Reader/Html.php | 34 +-
.../src/PhpSpreadsheet/Reader/Ods.php | 175 +-
.../PhpSpreadsheet/Reader/Ods/AutoFilter.php | 45 +
.../PhpSpreadsheet/Reader/Ods/BaseReader.php | 77 +
.../Reader/Ods/DefinedNames.php | 66 +
.../PhpSpreadsheet/Reader/Ods/Properties.php | 7 +-
.../Reader/Security/XmlScanner.php | 10 +-
.../src/PhpSpreadsheet/Reader/Slk.php | 6 +-
.../src/PhpSpreadsheet/Reader/Xls.php | 202 +-
.../src/PhpSpreadsheet/Reader/Xls/Color.php | 2 +-
.../PhpSpreadsheet/Reader/Xls/Color/BIFF8.php | 112 +-
.../src/PhpSpreadsheet/Reader/Xls/MD5.php | 27 +-
.../Reader/Xls/Style/Border.php | 19 +-
.../Reader/Xls/Style/CellAlignment.php | 50 +
.../Reader/Xls/Style/CellFont.php | 39 +
.../Reader/Xls/Style/FillPattern.php | 9 +-
.../src/PhpSpreadsheet/Reader/Xlsx.php | 269 +-
.../src/PhpSpreadsheet/Reader/Xlsx/Chart.php | 8 +-
.../Reader/Xlsx/ConditionalStyles.php | 15 +-
.../PhpSpreadsheet/Reader/Xlsx/Properties.php | 6 +-
.../src/PhpSpreadsheet/Reader/Xlsx/Styles.php | 63 +-
.../src/PhpSpreadsheet/Reader/Xlsx/Theme.php | 12 +-
.../src/PhpSpreadsheet/Reader/Xml.php | 516 +-
.../PhpSpreadsheet/Reader/Xml/Properties.php | 157 +
.../src/PhpSpreadsheet/Reader/Xml/Style.php | 74 +
.../Reader/Xml/Style/Alignment.php | 58 +
.../Reader/Xml/Style/Border.php | 98 +
.../PhpSpreadsheet/Reader/Xml/Style/Fill.php | 63 +
.../PhpSpreadsheet/Reader/Xml/Style/Font.php | 79 +
.../Reader/Xml/Style/NumberFormat.php | 33 +
.../Reader/Xml/Style/StyleBase.php | 32 +
.../src/PhpSpreadsheet/ReferenceHelper.php | 43 +-
.../PhpSpreadsheet/RichText/ITextElement.php | 2 +-
.../PhpSpreadsheet/RichText/TextElement.php | 2 +-
.../src/PhpSpreadsheet/Settings.php | 2 +-
.../src/PhpSpreadsheet/Shared/Date.php | 72 +-
.../src/PhpSpreadsheet/Shared/Drawing.php | 8 +-
.../src/PhpSpreadsheet/Shared/File.php | 11 +
.../src/PhpSpreadsheet/Shared/Font.php | 57 +-
.../src/PhpSpreadsheet/Shared/IntOrFloat.php | 21 +
.../Shared/JAMA/CholeskyDecomposition.php | 4 +-
.../Shared/JAMA/EigenvalueDecomposition.php | 15 +-
.../Shared/JAMA/LUDecomposition.php | 4 +-
.../src/PhpSpreadsheet/Shared/JAMA/Matrix.php | 19 +-
.../Shared/JAMA/QRDecomposition.php | 78 +-
.../JAMA/SingularValueDecomposition.php | 3 +-
.../src/PhpSpreadsheet/Shared/OLE.php | 17 +-
.../Shared/OLE/ChainedBlockStream.php | 6 +-
.../src/PhpSpreadsheet/Shared/OLE/PPS.php | 14 +-
.../PhpSpreadsheet/Shared/OLE/PPS/Root.php | 8 +-
.../src/PhpSpreadsheet/Shared/OLERead.php | 6 +-
.../PhpSpreadsheet/Shared/StringHelper.php | 2 +-
.../src/PhpSpreadsheet/Shared/TimeZone.php | 20 +-
.../PhpSpreadsheet/Shared/Trend/BestFit.php | 88 +-
.../Shared/Trend/ExponentialBestFit.php | 21 +-
.../Shared/Trend/LinearBestFit.php | 5 +-
.../Shared/Trend/LogarithmicBestFit.php | 23 +-
.../Shared/Trend/PolynomialBestFit.php | 8 +-
.../Shared/Trend/PowerBestFit.php | 35 +-
.../src/PhpSpreadsheet/Shared/Trend/Trend.php | 13 +-
.../src/PhpSpreadsheet/Shared/Xls.php | 13 +-
.../src/PhpSpreadsheet/Spreadsheet.php | 34 +-
.../src/PhpSpreadsheet/Style/Alignment.php | 15 +-
.../src/PhpSpreadsheet/Style/Border.php | 19 +-
.../src/PhpSpreadsheet/Style/Borders.php | 15 +-
.../src/PhpSpreadsheet/Style/Color.php | 19 +-
.../src/PhpSpreadsheet/Style/Conditional.php | 20 +
.../ConditionalFormatValueObject.php | 2 -
.../ConditionalFormattingRuleExtension.php | 15 +-
.../src/PhpSpreadsheet/Style/Fill.php | 8 +-
.../src/PhpSpreadsheet/Style/Font.php | 65 +-
.../src/PhpSpreadsheet/Style/NumberFormat.php | 494 +-
.../Style/NumberFormat/BaseFormatter.php | 12 +
.../Style/NumberFormat/DateFormatter.php | 129 +
.../Style/NumberFormat/Formatter.php | 162 +
.../Style/NumberFormat/FractionFormatter.php | 45 +
.../Style/NumberFormat/NumberFormatter.php | 187 +
.../NumberFormat/PercentageFormatter.php | 42 +
.../src/PhpSpreadsheet/Style/Style.php | 143 +-
.../PhpSpreadsheet/Worksheet/AutoFilter.php | 15 +-
.../Worksheet/AutoFilter/Column.php | 10 +-
.../Worksheet/AutoFilter/Column/Rule.php | 4 +-
.../PhpSpreadsheet/Worksheet/BaseDrawing.php | 12 +-
.../PhpSpreadsheet/Worksheet/CellIterator.php | 1 +
.../src/PhpSpreadsheet/Worksheet/Column.php | 1 +
.../Worksheet/ColumnCellIterator.php | 2 +-
.../Worksheet/ColumnIterator.php | 1 +
.../Worksheet/Drawing/Shadow.php | 6 +-
.../src/PhpSpreadsheet/Worksheet/Iterator.php | 8 -
.../Worksheet/MemoryDrawing.php | 67 +-
.../PhpSpreadsheet/Worksheet/PageSetup.php | 2 +-
.../src/PhpSpreadsheet/Worksheet/Row.php | 1 +
.../PhpSpreadsheet/Worksheet/RowIterator.php | 8 -
.../PhpSpreadsheet/Worksheet/Worksheet.php | 227 +-
.../src/PhpSpreadsheet/Writer/Csv.php | 34 +
.../src/PhpSpreadsheet/Writer/Html.php | 41 +-
.../src/PhpSpreadsheet/Writer/Ods.php | 120 +-
.../PhpSpreadsheet/Writer/Ods/AutoFilters.php | 63 +
.../src/PhpSpreadsheet/Writer/Ods/Content.php | 3 +-
.../src/PhpSpreadsheet/Writer/Ods/Meta.php | 71 +-
.../src/PhpSpreadsheet/Writer/Ods/MetaInf.php | 2 +-
.../PhpSpreadsheet/Writer/Ods/Mimetype.php | 6 +-
.../Writer/Ods/NamedExpressions.php | 4 +-
.../PhpSpreadsheet/Writer/Ods/Settings.php | 56 +-
.../src/PhpSpreadsheet/Writer/Ods/Styles.php | 5 +-
.../PhpSpreadsheet/Writer/Ods/Thumbnails.php | 6 +-
.../PhpSpreadsheet/Writer/Ods/WriterPart.php | 2 +
.../src/PhpSpreadsheet/Writer/Pdf.php | 2 +-
.../src/PhpSpreadsheet/Writer/Xls.php | 28 +-
.../PhpSpreadsheet/Writer/Xls/BIFFwriter.php | 2 +-
.../Writer/Xls/CellDataValidation.php | 78 +
.../PhpSpreadsheet/Writer/Xls/ErrorCode.php | 28 +
.../src/PhpSpreadsheet/Writer/Xls/Escher.php | 8 +-
.../src/PhpSpreadsheet/Writer/Xls/Font.php | 2 +-
.../src/PhpSpreadsheet/Writer/Xls/Parser.php | 39 +-
.../Writer/Xls/Style/CellAlignment.php | 59 +
.../Writer/Xls/Style/CellBorder.php | 39 +
.../Writer/Xls/Style/CellFill.php | 46 +
.../Writer/Xls/Style/ColorMap.php | 90 +
.../PhpSpreadsheet/Writer/Xls/Workbook.php | 17 +-
.../PhpSpreadsheet/Writer/Xls/Worksheet.php | 1625 +---
.../src/PhpSpreadsheet/Writer/Xls/Xf.php | 219 +-
.../src/PhpSpreadsheet/Writer/Xlsx.php | 346 +-
.../src/PhpSpreadsheet/Writer/Xlsx/Chart.php | 17 +-
.../PhpSpreadsheet/Writer/Xlsx/Comments.php | 5 +-
.../Writer/Xlsx/DefinedNames.php | 107 +-
.../PhpSpreadsheet/Writer/Xlsx/DocProps.php | 25 +-
.../PhpSpreadsheet/Writer/Xlsx/Drawing.php | 17 +-
.../src/PhpSpreadsheet/Writer/Xlsx/Rels.php | 4 +-
.../src/PhpSpreadsheet/Writer/Xlsx/Theme.php | 20 +-
.../PhpSpreadsheet/Writer/Xlsx/Worksheet.php | 17 +-
vendor/services.php | 2 +-
vendor/symfony/polyfill-mbstring/Mbstring.php | 46 +-
.../Resources/unidata/lowerCase.php | 2 +-
.../Resources/unidata/upperCase.php | 129 +-
.../symfony/polyfill-mbstring/bootstrap.php | 2 +-
.../symfony/polyfill-mbstring/bootstrap80.php | 6 +-
.../symfony/polyfill-mbstring/composer.json | 2 +-
vendor/symfony/polyfill-php72/Php72.php | 2 +-
vendor/symfony/polyfill-php72/composer.json | 2 +-
vendor/symfony/polyfill-php80/composer.json | 2 +-
vendor/symfony/var-dumper/README.md | 10 +-
461 files changed, 41005 insertions(+), 23943 deletions(-)
delete mode 100755 composer.lock
create mode 100644 vendor/markbaker/complex/.github/workflows/main.yml
create mode 100644 vendor/markbaker/matrix/classes/src/Div0Exception.php
create mode 100644 vendor/phpoffice/phpspreadsheet/phpstan-baseline.neon
create mode 100644 vendor/phpoffice/phpspreadsheet/phpstan.neon.dist
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Constants.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Current.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Constants.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/EngineeringValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Amortization.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Constants.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Coupons.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Dollar.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/FinancialValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Helpers.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/InterestRate.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Address.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Formula.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Hyperlink.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/LookupRefValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Selection.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Angle.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Base.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/CeilingMath.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/CeilingPrecise.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/FloorMath.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/FloorPrecise.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Gcd.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Mround.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Operations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Random.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/RoundDown.php
delete mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/RoundUp.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/SeriesSum.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sign.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Confidence.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Deviations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/DistributionValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/StudentT.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Size.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Standardize.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StatisticalValidations.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Trends.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Format.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Replace.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Search.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Trim.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web/Service.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/Translations.xlsx
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nb/config
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/nb/functions
delete mode 100755 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/config
delete mode 100755 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/no/functions
delete mode 100755 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/DocumentGenerator.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Csv/Delimiter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric/Properties.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric/Styles.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/AutoFilter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/BaseReader.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods/DefinedNames.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/CellAlignment.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls/Style/CellFont.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Properties.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Alignment.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Border.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Fill.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Font.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/NumberFormat.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/StyleBase.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/IntOrFloat.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/BaseFormatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/PercentageFormatter.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/AutoFilters.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/CellDataValidation.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/ErrorCode.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Style/CellAlignment.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Style/CellBorder.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Style/CellFill.php
create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Style/ColorMap.php
diff --git a/composer.lock b/composer.lock
deleted file mode 100755
index 4e0162c0..00000000
--- a/composer.lock
+++ /dev/null
@@ -1,2299 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "91223e260218162e4310061726c4eaf7",
- "packages": [
- {
- "name": "ezyang/htmlpurifier",
- "version": "v4.13.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ezyang/htmlpurifier.git",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
- "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.2"
- },
- "require-dev": {
- "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "HTMLPurifier": "library/"
- },
- "files": [
- "library/HTMLPurifier.composer.php"
- ],
- "exclude-from-classmap": [
- "/library/HTMLPurifier/Language/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "LGPL-2.1-or-later"
- ],
- "authors": [
- {
- "name": "Edward Z. Yang",
- "email": "admin@htmlpurifier.org",
- "homepage": "http://ezyang.com"
- }
- ],
- "description": "Standards compliant HTML filter written in PHP",
- "homepage": "http://htmlpurifier.org/",
- "keywords": [
- "html"
- ],
- "support": {
- "issues": "https://github.com/ezyang/htmlpurifier/issues",
- "source": "https://github.com/ezyang/htmlpurifier/tree/master"
- },
- "time": "2020-06-29T00:56:53+00:00"
- },
- {
- "name": "league/flysystem",
- "version": "1.1.3",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/flysystem.git",
- "reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
- "reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-fileinfo": "*",
- "league/mime-type-detection": "^1.3",
- "php": "^7.2.5 || ^8.0"
- },
- "conflict": {
- "league/flysystem-sftp": "<1.0.6"
- },
- "require-dev": {
- "phpspec/prophecy": "^1.11.1",
- "phpunit/phpunit": "^8.5.8"
- },
- "suggest": {
- "ext-fileinfo": "Required for MimeType",
- "ext-ftp": "Allows you to use FTP server storage",
- "ext-openssl": "Allows you to use FTPS server storage",
- "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
- "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
- "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
- "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
- "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
- "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
- "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
- "league/flysystem-webdav": "Allows you to use WebDAV storage",
- "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
- "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
- "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "League\\Flysystem\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frenky.net"
- }
- ],
- "description": "Filesystem abstraction: Many filesystems, one API.",
- "keywords": [
- "Cloud Files",
- "WebDAV",
- "abstraction",
- "aws",
- "cloud",
- "copy.com",
- "dropbox",
- "file systems",
- "files",
- "filesystem",
- "filesystems",
- "ftp",
- "rackspace",
- "remote",
- "s3",
- "sftp",
- "storage"
- ],
- "support": {
- "issues": "https://github.com/thephpleague/flysystem/issues",
- "source": "https://github.com/thephpleague/flysystem/tree/1.x"
- },
- "funding": [
- {
- "url": "https://offset.earth/frankdejonge",
- "type": "other"
- }
- ],
- "time": "2020-08-23T07:39:11+00:00"
- },
- {
- "name": "league/flysystem-cached-adapter",
- "version": "1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
- "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
- "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "league/flysystem": "~1.0",
- "psr/cache": "^1.0.0"
- },
- "require-dev": {
- "mockery/mockery": "~0.9",
- "phpspec/phpspec": "^3.4",
- "phpunit/phpunit": "^5.7",
- "predis/predis": "~1.0",
- "tedivm/stash": "~0.12"
- },
- "suggest": {
- "ext-phpredis": "Pure C implemented extension for PHP"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "League\\Flysystem\\Cached\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "frankdejonge",
- "email": "info@frenky.net"
- }
- ],
- "description": "An adapter decorator to enable meta-data caching.",
- "support": {
- "issues": "https://github.com/thephpleague/flysystem-cached-adapter/issues",
- "source": "https://github.com/thephpleague/flysystem-cached-adapter/tree/master"
- },
- "time": "2020-07-25T15:56:04+00:00"
- },
- {
- "name": "league/mime-type-detection",
- "version": "1.7.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/mime-type-detection.git",
- "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3",
- "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-fileinfo": "*",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^2.18",
- "phpstan/phpstan": "^0.12.68",
- "phpunit/phpunit": "^8.5.8 || ^9.3"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "League\\MimeTypeDetection\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Frank de Jonge",
- "email": "info@frankdejonge.nl"
- }
- ],
- "description": "Mime-type detection for Flysystem",
- "support": {
- "issues": "https://github.com/thephpleague/mime-type-detection/issues",
- "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0"
- },
- "funding": [
- {
- "url": "https://github.com/frankdejonge",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/league/flysystem",
- "type": "tidelift"
- }
- ],
- "time": "2021-01-18T20:58:21+00:00"
- },
- {
- "name": "liliuwei/thinkphp-auth",
- "version": "v2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/liliuwei/thinkphp-auth.git",
- "reference": "1eddf9fe6c549c11f1b3a212aaaf7a50165412c9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/liliuwei/thinkphp-auth/zipball/1eddf9fe6c549c11f1b3a212aaaf7a50165412c9",
- "reference": "1eddf9fe6c549c11f1b3a212aaaf7a50165412c9",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/framework": "^6.0"
- },
- "type": "think-extend",
- "extra": {
- "think": {
- "config": {
- "auth": "src/config/auth.php"
- }
- }
- },
- "autoload": {
- "psr-4": {
- "liliuwei\\think\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liliuwei",
- "email": "974829947@qq.com"
- }
- ],
- "description": "适用于thinkphp6.0的Auth权限扩展",
- "keywords": [
- "think-auth",
- "thinkphp"
- ],
- "support": {
- "issues": "https://github.com/liliuwei/thinkphp-auth/issues",
- "source": "https://github.com/liliuwei/thinkphp-auth/tree/v2.0.0"
- },
- "time": "2019-12-04T14:17:14+00:00"
- },
- {
- "name": "liliuwei/thinkphp-jump",
- "version": "v1.5",
- "source": {
- "type": "git",
- "url": "https://github.com/liliuwei/thinkphp-jump.git",
- "reference": "481d41b922095f08230609919be5d19354c50540"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/liliuwei/thinkphp-jump/zipball/481d41b922095f08230609919be5d19354c50540",
- "reference": "481d41b922095f08230609919be5d19354c50540",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/framework": "^6.0",
- "topthink/think-view": "^1.0"
- },
- "type": "think-extend",
- "extra": {
- "think": {
- "config": {
- "jump": "src/config/jump.php"
- }
- }
- },
- "autoload": {
- "psr-4": {
- "liliuwei\\think\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liliuwei",
- "email": "974829947@qq.com"
- }
- ],
- "description": "适用于thinkphp6.0的跳转扩展",
- "keywords": [
- "error",
- "redirect",
- "result",
- "success",
- "think-jump",
- "thinkphp"
- ],
- "support": {
- "issues": "https://github.com/liliuwei/thinkphp-jump/issues",
- "source": "https://github.com/liliuwei/thinkphp-jump/tree/v1.5"
- },
- "time": "2020-03-20T15:11:56+00:00"
- },
- {
- "name": "maennchen/zipstream-php",
- "version": "2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/maennchen/ZipStream-PHP.git",
- "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
- "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "myclabs/php-enum": "^1.5",
- "php": ">= 7.1",
- "psr/http-message": "^1.0",
- "symfony/polyfill-mbstring": "^1.0"
- },
- "require-dev": {
- "ext-zip": "*",
- "guzzlehttp/guzzle": ">= 6.3",
- "mikey179/vfsstream": "^1.6",
- "phpunit/phpunit": ">= 7.5"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "ZipStream\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paul Duncan",
- "email": "pabs@pablotron.org"
- },
- {
- "name": "Jonatan Männchen",
- "email": "jonatan@maennchen.ch"
- },
- {
- "name": "Jesse Donat",
- "email": "donatj@gmail.com"
- },
- {
- "name": "András Kolesár",
- "email": "kolesar@kolesar.hu"
- }
- ],
- "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
- "keywords": [
- "stream",
- "zip"
- ],
- "support": {
- "issues": "https://github.com/maennchen/ZipStream-PHP/issues",
- "source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
- },
- "funding": [
- {
- "url": "https://opencollective.com/zipstream",
- "type": "open_collective"
- }
- ],
- "time": "2020-05-30T13:11:16+00:00"
- },
- {
- "name": "markbaker/complex",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/MarkBaker/PHPComplex.git",
- "reference": "9999f1432fae467bc93c53f357105b4c31bb994c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c",
- "reference": "9999f1432fae467bc93c53f357105b4c31bb994c",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "phpcompatibility/php-compatibility": "^9.0",
- "phpdocumentor/phpdocumentor": "2.*",
- "phploc/phploc": "^4.0",
- "phpmd/phpmd": "2.*",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
- "sebastian/phpcpd": "^4.0",
- "squizlabs/php_codesniffer": "^3.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Complex\\": "classes/src/"
- },
- "files": [
- "classes/src/functions/abs.php",
- "classes/src/functions/acos.php",
- "classes/src/functions/acosh.php",
- "classes/src/functions/acot.php",
- "classes/src/functions/acoth.php",
- "classes/src/functions/acsc.php",
- "classes/src/functions/acsch.php",
- "classes/src/functions/argument.php",
- "classes/src/functions/asec.php",
- "classes/src/functions/asech.php",
- "classes/src/functions/asin.php",
- "classes/src/functions/asinh.php",
- "classes/src/functions/atan.php",
- "classes/src/functions/atanh.php",
- "classes/src/functions/conjugate.php",
- "classes/src/functions/cos.php",
- "classes/src/functions/cosh.php",
- "classes/src/functions/cot.php",
- "classes/src/functions/coth.php",
- "classes/src/functions/csc.php",
- "classes/src/functions/csch.php",
- "classes/src/functions/exp.php",
- "classes/src/functions/inverse.php",
- "classes/src/functions/ln.php",
- "classes/src/functions/log2.php",
- "classes/src/functions/log10.php",
- "classes/src/functions/negative.php",
- "classes/src/functions/pow.php",
- "classes/src/functions/rho.php",
- "classes/src/functions/sec.php",
- "classes/src/functions/sech.php",
- "classes/src/functions/sin.php",
- "classes/src/functions/sinh.php",
- "classes/src/functions/sqrt.php",
- "classes/src/functions/tan.php",
- "classes/src/functions/tanh.php",
- "classes/src/functions/theta.php",
- "classes/src/operations/add.php",
- "classes/src/operations/subtract.php",
- "classes/src/operations/multiply.php",
- "classes/src/operations/divideby.php",
- "classes/src/operations/divideinto.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mark Baker",
- "email": "mark@lange.demon.co.uk"
- }
- ],
- "description": "PHP Class for working with complex numbers",
- "homepage": "https://github.com/MarkBaker/PHPComplex",
- "keywords": [
- "complex",
- "mathematics"
- ],
- "support": {
- "issues": "https://github.com/MarkBaker/PHPComplex/issues",
- "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8"
- },
- "time": "2020-08-26T10:42:07+00:00"
- },
- {
- "name": "markbaker/matrix",
- "version": "2.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/MarkBaker/PHPMatrix.git",
- "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a",
- "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "phpcompatibility/php-compatibility": "^9.0",
- "phpdocumentor/phpdocumentor": "2.*",
- "phploc/phploc": "^4.0",
- "phpmd/phpmd": "2.*",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
- "sebastian/phpcpd": "^4.0",
- "squizlabs/php_codesniffer": "^3.4"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Matrix\\": "classes/src/"
- },
- "files": [
- "classes/src/Functions/adjoint.php",
- "classes/src/Functions/antidiagonal.php",
- "classes/src/Functions/cofactors.php",
- "classes/src/Functions/determinant.php",
- "classes/src/Functions/diagonal.php",
- "classes/src/Functions/identity.php",
- "classes/src/Functions/inverse.php",
- "classes/src/Functions/minors.php",
- "classes/src/Functions/trace.php",
- "classes/src/Functions/transpose.php",
- "classes/src/Operations/add.php",
- "classes/src/Operations/directsum.php",
- "classes/src/Operations/subtract.php",
- "classes/src/Operations/multiply.php",
- "classes/src/Operations/divideby.php",
- "classes/src/Operations/divideinto.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Mark Baker",
- "email": "mark@demon-angel.eu"
- }
- ],
- "description": "PHP Class for working with matrices",
- "homepage": "https://github.com/MarkBaker/PHPMatrix",
- "keywords": [
- "mathematics",
- "matrix",
- "vector"
- ],
- "support": {
- "issues": "https://github.com/MarkBaker/PHPMatrix/issues",
- "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2"
- },
- "time": "2021-01-23T16:37:31+00:00"
- },
- {
- "name": "myclabs/php-enum",
- "version": "1.8.0",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/php-enum.git",
- "reference": "46cf3d8498b095bd33727b13fd5707263af99421"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421",
- "reference": "46cf3d8498b095bd33727b13fd5707263af99421",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-json": "*",
- "php": "^7.3 || ^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.5",
- "squizlabs/php_codesniffer": "1.*",
- "vimeo/psalm": "^4.5.1"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "MyCLabs\\Enum\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP Enum contributors",
- "homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
- }
- ],
- "description": "PHP Enum implementation",
- "homepage": "http://github.com/myclabs/php-enum",
- "keywords": [
- "enum"
- ],
- "support": {
- "issues": "https://github.com/myclabs/php-enum/issues",
- "source": "https://github.com/myclabs/php-enum/tree/1.8.0"
- },
- "funding": [
- {
- "url": "https://github.com/mnapoli",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum",
- "type": "tidelift"
- }
- ],
- "time": "2021-02-15T16:11:48+00:00"
- },
- {
- "name": "overtrue/pinyin",
- "version": "4.0.7",
- "source": {
- "type": "git",
- "url": "https://github.com/overtrue/pinyin.git",
- "reference": "083de406907d42df2e0feaaeb83f1a3c2e0095eb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/overtrue/pinyin/zipball/083de406907d42df2e0feaaeb83f1a3c2e0095eb",
- "reference": "083de406907d42df2e0feaaeb83f1a3c2e0095eb",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "brainmaestro/composer-git-hooks": "^2.7",
- "friendsofphp/php-cs-fixer": "^2.16",
- "phpunit/phpunit": "~8.0"
- },
- "type": "library",
- "extra": {
- "hooks": {
- "pre-commit": [
- "composer test",
- "composer fix-style"
- ],
- "pre-push": [
- "composer test",
- "composer check-style"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "Overtrue\\Pinyin\\": "src/"
- },
- "files": [
- "src/const.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "overtrue",
- "email": "anzhengchao@gmail.com",
- "homepage": "http://github.com/overtrue"
- }
- ],
- "description": "Chinese to pinyin translator.",
- "homepage": "https://github.com/overtrue/pinyin",
- "keywords": [
- "Chinese",
- "Pinyin",
- "cn2pinyin"
- ],
- "support": {
- "issues": "https://github.com/overtrue/pinyin/issues",
- "source": "https://github.com/overtrue/pinyin/tree/4.0.7"
- },
- "funding": [
- {
- "url": "https://www.patreon.com/overtrue",
- "type": "patreon"
- }
- ],
- "time": "2021-04-16T11:13:48+00:00"
- },
- {
- "name": "phpoffice/phpspreadsheet",
- "version": "1.17.1",
- "source": {
- "type": "git",
- "url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c55269cb06911575a126dc225a05c0e4626e5fb4",
- "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-ctype": "*",
- "ext-dom": "*",
- "ext-fileinfo": "*",
- "ext-gd": "*",
- "ext-iconv": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "ext-simplexml": "*",
- "ext-xml": "*",
- "ext-xmlreader": "*",
- "ext-xmlwriter": "*",
- "ext-zip": "*",
- "ext-zlib": "*",
- "ezyang/htmlpurifier": "^4.13",
- "maennchen/zipstream-php": "^2.1",
- "markbaker/complex": "^1.5||^2.0",
- "markbaker/matrix": "^1.2||^2.0",
- "php": "^7.2||^8.0",
- "psr/http-client": "^1.0",
- "psr/http-factory": "^1.0",
- "psr/simple-cache": "^1.0"
- },
- "require-dev": {
- "dompdf/dompdf": "^0.8.5",
- "friendsofphp/php-cs-fixer": "^2.18",
- "jpgraph/jpgraph": "^4.0",
- "mpdf/mpdf": "^8.0",
- "phpcompatibility/php-compatibility": "^9.3",
- "phpunit/phpunit": "^8.5||^9.3",
- "squizlabs/php_codesniffer": "^3.5",
- "tecnickcom/tcpdf": "^6.3"
- },
- "suggest": {
- "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
- "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
- "mpdf/mpdf": "Option for rendering PDF with PDF Writer",
- "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Maarten Balliauw",
- "homepage": "https://blog.maartenballiauw.be"
- },
- {
- "name": "Mark Baker",
- "homepage": "https://markbakeruk.net"
- },
- {
- "name": "Franck Lefevre",
- "homepage": "https://rootslabs.net"
- },
- {
- "name": "Erik Tilt"
- },
- {
- "name": "Adrien Crivelli"
- }
- ],
- "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
- "homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
- "keywords": [
- "OpenXML",
- "excel",
- "gnumeric",
- "ods",
- "php",
- "spreadsheet",
- "xls",
- "xlsx"
- ],
- "support": {
- "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.17.1"
- },
- "time": "2021-03-02T17:54:11+00:00"
- },
- {
- "name": "psr/cache",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/cache.git",
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
- "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Cache\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for caching libraries",
- "keywords": [
- "cache",
- "psr",
- "psr-6"
- ],
- "support": {
- "source": "https://github.com/php-fig/cache/tree/master"
- },
- "time": "2016-08-06T20:24:11+00:00"
- },
- {
- "name": "psr/container",
- "version": "1.1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
- "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.2.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ],
- "support": {
- "issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/1.1.1"
- },
- "time": "2021-03-05T17:36:06+00:00"
- },
- {
- "name": "psr/http-client",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-client.git",
- "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
- "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": "^7.0 || ^8.0",
- "psr/http-message": "^1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Client\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP clients",
- "homepage": "https://github.com/php-fig/http-client",
- "keywords": [
- "http",
- "http-client",
- "psr",
- "psr-18"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-client/tree/master"
- },
- "time": "2020-06-29T06:28:15+00:00"
- },
- {
- "name": "psr/http-factory",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-factory.git",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.0.0",
- "psr/http-message": "^1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interfaces for PSR-7 HTTP message factories",
- "keywords": [
- "factory",
- "http",
- "message",
- "psr",
- "psr-17",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-factory/tree/master"
- },
- "time": "2019-04-30T12:38:16+00:00"
- },
- {
- "name": "psr/http-message",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP messages",
- "homepage": "https://github.com/php-fig/http-message",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-message/tree/master"
- },
- "time": "2016-08-06T14:39:51+00:00"
- },
- {
- "name": "psr/log",
- "version": "1.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Log\\": "Psr/Log/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "https://www.php-fig.org/"
- }
- ],
- "description": "Common interface for logging libraries",
- "homepage": "https://github.com/php-fig/log",
- "keywords": [
- "log",
- "psr",
- "psr-3"
- ],
- "support": {
- "source": "https://github.com/php-fig/log/tree/1.1.4"
- },
- "time": "2021-05-03T11:20:27+00:00"
- },
- {
- "name": "psr/simple-cache",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/simple-cache.git",
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
- "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\SimpleCache\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interfaces for simple caching",
- "keywords": [
- "cache",
- "caching",
- "psr",
- "psr-16",
- "simple-cache"
- ],
- "support": {
- "source": "https://github.com/php-fig/simple-cache/tree/master"
- },
- "time": "2017-10-23T01:57:42+00:00"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.22.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.22-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-01-22T09:19:47+00:00"
- },
- {
- "name": "topthink/framework",
- "version": "v6.0.8",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/framework.git",
- "reference": "4789343672aef06d571d556da369c0e156609bce"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/framework/zipball/4789343672aef06d571d556da369c0e156609bce",
- "reference": "4789343672aef06d571d556da369c0e156609bce",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-json": "*",
- "ext-mbstring": "*",
- "league/flysystem": "^1.0",
- "league/flysystem-cached-adapter": "^1.0",
- "php": ">=7.1.0",
- "psr/container": "~1.0",
- "psr/log": "~1.0",
- "psr/simple-cache": "^1.0",
- "topthink/think-helper": "^3.1.1",
- "topthink/think-orm": "^2.0"
- },
- "require-dev": {
- "mikey179/vfsstream": "^1.6",
- "mockery/mockery": "^1.2",
- "phpunit/phpunit": "^7.0"
- },
- "type": "library",
- "autoload": {
- "files": [],
- "psr-4": {
- "think\\": "src/think/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- },
- {
- "name": "yunwuxin",
- "email": "448901948@qq.com"
- }
- ],
- "description": "The ThinkPHP Framework.",
- "homepage": "http://thinkphp.cn/",
- "keywords": [
- "framework",
- "orm",
- "thinkphp"
- ],
- "support": {
- "issues": "https://github.com/top-think/framework/issues",
- "source": "https://github.com/top-think/framework/tree/v6.0.8"
- },
- "time": "2021-04-27T00:41:08+00:00"
- },
- {
- "name": "topthink/think-captcha",
- "version": "v3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-captcha.git",
- "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-captcha/zipball/1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55",
- "reference": "1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "topthink/framework": "^6.0.0"
- },
- "type": "library",
- "extra": {
- "think": {
- "services": [
- "think\\captcha\\CaptchaService"
- ],
- "config": {
- "captcha": "src/config.php"
- }
- }
- },
- "autoload": {
- "psr-4": {
- "think\\captcha\\": "src/"
- },
- "files": [
- "src/helper.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "yunwuxin",
- "email": "448901948@qq.com"
- }
- ],
- "description": "captcha package for thinkphp",
- "support": {
- "issues": "https://github.com/top-think/think-captcha/issues",
- "source": "https://github.com/top-think/think-captcha/tree/v3.0.3"
- },
- "time": "2020-05-19T10:55:45+00:00"
- },
- {
- "name": "topthink/think-helper",
- "version": "v3.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-helper.git",
- "reference": "c28d37743bda4a0455286ca85b17b5791d626e10"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10",
- "reference": "c28d37743bda4a0455286ca85b17b5791d626e10",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "think\\": "src"
- },
- "files": [
- "src/helper.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "yunwuxin",
- "email": "448901948@qq.com"
- }
- ],
- "description": "The ThinkPHP6 Helper Package",
- "support": {
- "issues": "https://github.com/top-think/think-helper/issues",
- "source": "https://github.com/top-think/think-helper/tree/3.0"
- },
- "time": "2019-11-08T08:01:10+00:00"
- },
- {
- "name": "topthink/think-migration",
- "version": "v3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-migration.git",
- "reference": "5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-migration/zipball/5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79",
- "reference": "5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "topthink/framework": "^6.0.0",
- "topthink/think-helper": "^3.0.3"
- },
- "require-dev": {
- "fzaninotto/faker": "^1.8"
- },
- "suggest": {
- "fzaninotto/faker": "Required to use the factory builder (^1.8)."
- },
- "type": "library",
- "extra": {
- "think": {
- "services": [
- "think\\migration\\Service"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "Phinx\\": "phinx/src/Phinx",
- "think\\migration\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "yunwuxin",
- "email": "448901948@qq.com"
- }
- ],
- "support": {
- "issues": "https://github.com/top-think/think-migration/issues",
- "source": "https://github.com/top-think/think-migration/tree/v3.0.3"
- },
- "time": "2020-12-07T05:54:22+00:00"
- },
- {
- "name": "topthink/think-multi-app",
- "version": "v1.0.14",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-multi-app.git",
- "reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
- "reference": "ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/framework": "^6.0.0"
- },
- "type": "library",
- "extra": {
- "think": {
- "services": [
- "think\\app\\Service"
- ]
- }
- },
- "autoload": {
- "psr-4": {
- "think\\app\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- }
- ],
- "description": "thinkphp6 multi app support",
- "support": {
- "issues": "https://github.com/top-think/think-multi-app/issues",
- "source": "https://github.com/top-think/think-multi-app/tree/master"
- },
- "time": "2020-07-12T13:50:37+00:00"
- },
- {
- "name": "topthink/think-orm",
- "version": "v2.0.40",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-orm.git",
- "reference": "1119d979b850849f3725856460cf108eec1c3eb8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-orm/zipball/1119d979b850849f3725856460cf108eec1c3eb8",
- "reference": "1119d979b850849f3725856460cf108eec1c3eb8",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "ext-json": "*",
- "ext-pdo": "*",
- "php": ">=7.1.0",
- "psr/log": "~1.0",
- "psr/simple-cache": "^1.0",
- "topthink/think-helper": "^3.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7|^8|^9.5"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "think\\": "src"
- },
- "files": [
- "stubs/load_stubs.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- }
- ],
- "description": "think orm",
- "keywords": [
- "database",
- "orm"
- ],
- "support": {
- "issues": "https://github.com/top-think/think-orm/issues",
- "source": "https://github.com/top-think/think-orm/tree/v2.0.40"
- },
- "time": "2021-04-19T13:29:37+00:00"
- },
- {
- "name": "topthink/think-template",
- "version": "v2.0.8",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-template.git",
- "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-template/zipball/abfc293f74f9ef5127b5c416310a01fe42e59368",
- "reference": "abfc293f74f9ef5127b5c416310a01fe42e59368",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "psr/simple-cache": "^1.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "think\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- }
- ],
- "description": "the php template engine",
- "support": {
- "issues": "https://github.com/top-think/think-template/issues",
- "source": "https://github.com/top-think/think-template/tree/v2.0.8"
- },
- "time": "2020-12-10T07:52:03+00:00"
- },
- {
- "name": "topthink/think-view",
- "version": "v1.0.14",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-view.git",
- "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d",
- "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/think-template": "^2.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "think\\view\\driver\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- }
- ],
- "description": "thinkphp template driver",
- "support": {
- "issues": "https://github.com/top-think/think-view/issues",
- "source": "https://github.com/top-think/think-view/tree/v1.0.14"
- },
- "time": "2019-11-06T11:40:13+00:00"
- },
- {
- "name": "wamkj/thinkphp6.0-databackup",
- "version": "v1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/wamkj/thinkphp6.0-databackup.git",
- "reference": "28a0e406d827132942723a3c9f69bb20c98e652f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/wamkj/thinkphp6.0-databackup/zipball/28a0e406d827132942723a3c9f69bb20c98e652f",
- "reference": "28a0e406d827132942723a3c9f69bb20c98e652f",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/framework": "^6.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "wamkj\\thinkphp\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "wamkj",
- "email": "1149183529@qq.com"
- }
- ],
- "description": "thinkphp6.0的数据库自动备份扩展",
- "keywords": [
- "think-databackup",
- "thinkphp"
- ],
- "support": {
- "issues": "https://github.com/wamkj/thinkphp6.0-databackup/issues",
- "source": "https://github.com/wamkj/thinkphp6.0-databackup/tree/v1.0"
- },
- "time": "2020-02-15T13:04:16+00:00"
- },
- {
- "name": "whitehat101/apr1-md5",
- "version": "v1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/whitehat101/apr1-md5.git",
- "reference": "8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/whitehat101/apr1-md5/zipball/8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819",
- "reference": "8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "4.0.*"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "WhiteHat101\\Crypt\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jeremy Ebler",
- "email": "jebler@gmail.com"
- }
- ],
- "description": "Apache's APR1-MD5 algorithm in pure PHP",
- "homepage": "https://github.com/whitehat101/apr1-md5",
- "keywords": [
- "MD5",
- "apr1"
- ],
- "support": {
- "issues": "https://github.com/whitehat101/apr1-md5/issues",
- "source": "https://github.com/whitehat101/apr1-md5/tree/master"
- },
- "time": "2015-02-11T11:06:42+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "symfony/polyfill-php72",
- "version": "v1.22.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
- "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.22-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php72\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-01-07T16:49:33+00:00"
- },
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.22.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.22-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php80\\": ""
- },
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "ion.bazan@gmail.com"
- },
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-01-07T16:49:33+00:00"
- },
- {
- "name": "symfony/var-dumper",
- "version": "v4.4.22",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/var-dumper.git",
- "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
- "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.3",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php72": "~1.5",
- "symfony/polyfill-php80": "^1.15"
- },
- "conflict": {
- "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
- "symfony/console": "<3.4"
- },
- "require-dev": {
- "ext-iconv": "*",
- "symfony/console": "^3.4|^4.0|^5.0",
- "symfony/process": "^4.4|^5.0",
- "twig/twig": "^1.43|^2.13|^3.0.4"
- },
- "suggest": {
- "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
- "ext-intl": "To show region name in time zone dump",
- "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
- },
- "bin": [
- "Resources/bin/var-dump-server"
- ],
- "type": "library",
- "autoload": {
- "files": [
- "Resources/functions/dump.php"
- ],
- "psr-4": {
- "Symfony\\Component\\VarDumper\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Provides mechanisms for walking through any arbitrary PHP variable",
- "homepage": "https://symfony.com",
- "keywords": [
- "debug",
- "dump"
- ],
- "support": {
- "source": "https://github.com/symfony/var-dumper/tree/v4.4.22"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-04-19T13:36:17+00:00"
- },
- {
- "name": "topthink/think-trace",
- "version": "v1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/top-think/think-trace.git",
- "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/top-think/think-trace/zipball/9a9fa8f767b6c66c5a133ad21ca1bc96ad329444",
- "reference": "9a9fa8f767b6c66c5a133ad21ca1bc96ad329444",
- "shasum": "",
- "mirrors": [
- {
- "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
- "preferred": true
- }
- ]
- },
- "require": {
- "php": ">=7.1.0",
- "topthink/framework": "^6.0.0"
- },
- "type": "library",
- "extra": {
- "think": {
- "services": [
- "think\\trace\\Service"
- ],
- "config": {
- "trace": "src/config.php"
- }
- }
- },
- "autoload": {
- "psr-4": {
- "think\\trace\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "Apache-2.0"
- ],
- "authors": [
- {
- "name": "liu21st",
- "email": "liu21st@gmail.com"
- }
- ],
- "description": "thinkphp debug trace",
- "support": {
- "issues": "https://github.com/top-think/think-trace/issues",
- "source": "https://github.com/top-think/think-trace/tree/v1.4"
- },
- "time": "2020-06-29T05:27:28+00:00"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": {
- "php": ">=7.1.0"
- },
- "platform-dev": [],
- "plugin-api-version": "2.0.0"
-}
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 247294d6..6d0c3f2d 100755
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -338,7 +338,7 @@ class ClassLoader
* Loads the given class or interface.
*
* @param string $class The name of the class
- * @return bool|null True if loaded, null otherwise
+ * @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
@@ -347,6 +347,8 @@ class ClassLoader
return true;
}
+
+ return null;
}
/**
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index e802a0fd..b3a4e161 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -1,589 +1,337 @@
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
-
-
-
-
-
+/**
+ * This class is copied in every Composer installed project and available to all
+ *
+ * See also https://getcomposer.org/doc/07-runtime.md#installed-versions
+ *
+ * To require it's presence, you can require `composer-runtime-api ^2.0`
+ */
class InstalledVersions
{
-private static $installed = array (
- 'root' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => '53590dcebadeaef2726a03243c62a47718ed6b02',
- 'name' => 'topthink/think',
- ),
- 'versions' =>
- array (
- 'ezyang/htmlpurifier' =>
- array (
- 'pretty_version' => 'v4.13.0',
- 'version' => '4.13.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
- ),
- 'league/flysystem' =>
- array (
- 'pretty_version' => '1.1.3',
- 'version' => '1.1.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
- ),
- 'league/flysystem-cached-adapter' =>
- array (
- 'pretty_version' => '1.1.0',
- 'version' => '1.1.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
- ),
- 'league/mime-type-detection' =>
- array (
- 'pretty_version' => '1.7.0',
- 'version' => '1.7.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
- ),
- 'liliuwei/thinkphp-auth' =>
- array (
- 'pretty_version' => 'v2.0.0',
- 'version' => '2.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1eddf9fe6c549c11f1b3a212aaaf7a50165412c9',
- ),
- 'liliuwei/thinkphp-jump' =>
- array (
- 'pretty_version' => '1.5',
- 'version' => '1.5.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '481d41b922095f08230609919be5d19354c50540',
- ),
- 'maennchen/zipstream-php' =>
- array (
- 'pretty_version' => '2.1.0',
- 'version' => '2.1.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c4c5803cc1f93df3d2448478ef79394a5981cc58',
- ),
- 'markbaker/complex' =>
- array (
- 'pretty_version' => '2.0.0',
- 'version' => '2.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9999f1432fae467bc93c53f357105b4c31bb994c',
- ),
- 'markbaker/matrix' =>
- array (
- 'pretty_version' => '2.1.2',
- 'version' => '2.1.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '361c0f545c3172ee26c3d596a0aa03f0cef65e6a',
- ),
- 'myclabs/php-enum' =>
- array (
- 'pretty_version' => '1.8.0',
- 'version' => '1.8.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '46cf3d8498b095bd33727b13fd5707263af99421',
- ),
- 'overtrue/pinyin' =>
- array (
- 'pretty_version' => '4.0.7',
- 'version' => '4.0.7.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '083de406907d42df2e0feaaeb83f1a3c2e0095eb',
- ),
- 'phpoffice/phpspreadsheet' =>
- array (
- 'pretty_version' => '1.17.1',
- 'version' => '1.17.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c55269cb06911575a126dc225a05c0e4626e5fb4',
- ),
- 'psr/cache' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
- ),
- 'psr/container' =>
- array (
- 'pretty_version' => '1.1.1',
- 'version' => '1.1.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
- ),
- 'psr/http-client' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
- ),
- 'psr/http-factory' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
- ),
- 'psr/http-message' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
- ),
- 'psr/log' =>
- array (
- 'pretty_version' => '1.1.4',
- 'version' => '1.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
- ),
- 'psr/simple-cache' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
- ),
- 'symfony/polyfill-mbstring' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
- ),
- 'symfony/polyfill-php72' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
- ),
- 'symfony/polyfill-php80' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
- ),
- 'symfony/var-dumper' =>
- array (
- 'pretty_version' => 'v4.4.22',
- 'version' => '4.4.22.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c194bcedde6295f3ec3e9eba1f5d484ea97c41a7',
- ),
- 'topthink/framework' =>
- array (
- 'pretty_version' => 'v6.0.8',
- 'version' => '6.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '4789343672aef06d571d556da369c0e156609bce',
- ),
- 'topthink/think' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => '53590dcebadeaef2726a03243c62a47718ed6b02',
- ),
- 'topthink/think-captcha' =>
- array (
- 'pretty_version' => 'v3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
- ),
- 'topthink/think-helper' =>
- array (
- 'pretty_version' => 'v3.1.4',
- 'version' => '3.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
- ),
- 'topthink/think-migration' =>
- array (
- 'pretty_version' => 'v3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79',
- ),
- 'topthink/think-multi-app' =>
- array (
- 'pretty_version' => 'v1.0.14',
- 'version' => '1.0.14.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
- ),
- 'topthink/think-orm' =>
- array (
- 'pretty_version' => 'v2.0.40',
- 'version' => '2.0.40.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
- ),
- 'topthink/think-template' =>
- array (
- 'pretty_version' => 'v2.0.8',
- 'version' => '2.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
- ),
- 'topthink/think-trace' =>
- array (
- 'pretty_version' => 'v1.4',
- 'version' => '1.4.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
- ),
- 'topthink/think-view' =>
- array (
- 'pretty_version' => 'v1.0.14',
- 'version' => '1.0.14.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
- ),
- 'wamkj/thinkphp6.0-databackup' =>
- array (
- 'pretty_version' => 'v1.0',
- 'version' => '1.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
- ),
- 'whitehat101/apr1-md5' =>
- array (
- 'pretty_version' => 'v1.0.0',
- 'version' => '1.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819',
- ),
- ),
-);
-private static $canGetVendors;
-private static $installedByVendor = array();
+ private static $installed;
+ private static $canGetVendors;
+ private static $installedByVendor = array();
+ /**
+ * Returns a list of all package names which are present, either by being installed, replaced or provided
+ *
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackages()
+ {
+ $packages = array();
+ foreach (self::getInstalled() as $installed) {
+ $packages[] = array_keys($installed['versions']);
+ }
+ if (1 === \count($packages)) {
+ return $packages[0];
+ }
+ return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
+ }
+ /**
+ * Returns a list of all package names with a specific type e.g. 'library'
+ *
+ * @param string $type
+ * @return string[]
+ * @psalm-return list
+ */
+ public static function getInstalledPackagesByType($type)
+ {
+ $packagesByType = array();
+ foreach (self::getInstalled() as $installed) {
+ foreach ($installed['versions'] as $name => $package) {
+ if (isset($package['type']) && $package['type'] === $type) {
+ $packagesByType[] = $name;
+ }
+ }
+ }
+ return $packagesByType;
+ }
-public static function getInstalledPackages()
-{
-$packages = array();
-foreach (self::getInstalled() as $installed) {
-$packages[] = array_keys($installed['versions']);
-}
-
-
-if (1 === \count($packages)) {
-return $packages[0];
-}
-
-return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
-}
-
-
-
-
-
-
-
-
-
-public static function isInstalled($packageName)
-{
-foreach (self::getInstalled() as $installed) {
-if (isset($installed['versions'][$packageName])) {
-return true;
-}
-}
-
-return false;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-public static function satisfies(VersionParser $parser, $packageName, $constraint)
-{
-$constraint = $parser->parseConstraints($constraint);
-$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
-
-return $provided->matches($constraint);
-}
-
-
-
-
-
-
-
-
-
-
-public static function getVersionRanges($packageName)
-{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
-}
-
-$ranges = array();
-if (isset($installed['versions'][$packageName]['pretty_version'])) {
-$ranges[] = $installed['versions'][$packageName]['pretty_version'];
-}
-if (array_key_exists('aliases', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
-}
-if (array_key_exists('replaced', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
-}
-if (array_key_exists('provided', $installed['versions'][$packageName])) {
-$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
-}
-
-return implode(' || ', $ranges);
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
-}
-
-
-
-
-
-public static function getVersion($packageName)
-{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
-}
-
-if (!isset($installed['versions'][$packageName]['version'])) {
-return null;
-}
-
-return $installed['versions'][$packageName]['version'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
-}
-
-
-
-
-
-public static function getPrettyVersion($packageName)
-{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
-}
-
-if (!isset($installed['versions'][$packageName]['pretty_version'])) {
-return null;
-}
-
-return $installed['versions'][$packageName]['pretty_version'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
-}
-
-
-
-
-
-public static function getReference($packageName)
-{
-foreach (self::getInstalled() as $installed) {
-if (!isset($installed['versions'][$packageName])) {
-continue;
-}
-
-if (!isset($installed['versions'][$packageName]['reference'])) {
-return null;
-}
-
-return $installed['versions'][$packageName]['reference'];
-}
-
-throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
-}
-
-
-
-
-
-public static function getRootPackage()
-{
-$installed = self::getInstalled();
-
-return $installed[0]['root'];
-}
-
-
-
-
-
-
-
-public static function getRawData()
-{
-return self::$installed;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-public static function reload($data)
-{
-self::$installed = $data;
-self::$installedByVendor = array();
-}
-
-
-
-
-private static function getInstalled()
-{
-if (null === self::$canGetVendors) {
-self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
-}
-
-$installed = array();
-
-if (self::$canGetVendors) {
-foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
-if (isset(self::$installedByVendor[$vendorDir])) {
-$installed[] = self::$installedByVendor[$vendorDir];
-} elseif (is_file($vendorDir.'/composer/installed.php')) {
-$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
-}
-}
-}
-
-$installed[] = self::$installed;
-
-return $installed;
-}
+ /**
+ * Checks whether the given package is installed
+ *
+ * This also returns true if the package name is provided or replaced by another package
+ *
+ * @param string $packageName
+ * @param bool $includeDevRequirements
+ * @return bool
+ */
+ public static function isInstalled($packageName, $includeDevRequirements = true)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (isset($installed['versions'][$packageName])) {
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Checks whether the given package satisfies a version constraint
+ *
+ * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
+ *
+ * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
+ *
+ * @param VersionParser $parser Install composer/semver to have access to this class and functionality
+ * @param string $packageName
+ * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
+ * @return bool
+ */
+ public static function satisfies(VersionParser $parser, $packageName, $constraint)
+ {
+ $constraint = $parser->parseConstraints($constraint);
+ $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
+
+ return $provided->matches($constraint);
+ }
+
+ /**
+ * Returns a version constraint representing all the range(s) which are installed for a given package
+ *
+ * It is easier to use this via isInstalled() with the $constraint argument if you need to check
+ * whether a given version of a package is installed, and not just whether it exists
+ *
+ * @param string $packageName
+ * @return string Version constraint usable with composer/semver
+ */
+ public static function getVersionRanges($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ $ranges = array();
+ if (isset($installed['versions'][$packageName]['pretty_version'])) {
+ $ranges[] = $installed['versions'][$packageName]['pretty_version'];
+ }
+ if (array_key_exists('aliases', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
+ }
+ if (array_key_exists('replaced', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
+ }
+ if (array_key_exists('provided', $installed['versions'][$packageName])) {
+ $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
+ }
+
+ return implode(' || ', $ranges);
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
+ */
+ public static function getPrettyVersion($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['pretty_version'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['pretty_version'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
+ */
+ public static function getReference($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ if (!isset($installed['versions'][$packageName]['reference'])) {
+ return null;
+ }
+
+ return $installed['versions'][$packageName]['reference'];
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @param string $packageName
+ * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
+ */
+ public static function getInstallPath($packageName)
+ {
+ foreach (self::getInstalled() as $installed) {
+ if (!isset($installed['versions'][$packageName])) {
+ continue;
+ }
+
+ return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
+ }
+
+ throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
+ }
+
+ /**
+ * @return array
+ * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
+ */
+ public static function getRootPackage()
+ {
+ $installed = self::getInstalled();
+
+ return $installed[0]['root'];
+ }
+
+ /**
+ * Returns the raw installed.php data for custom implementations
+ *
+ * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
+ * @return array[]
+ * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array}
+ */
+ public static function getRawData()
+ {
+ @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = include __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+
+ return self::$installed;
+ }
+
+ /**
+ * Returns the raw data of all installed.php which are currently loaded for custom implementations
+ *
+ * @return array[]
+ * @psalm-return list}>
+ */
+ public static function getAllRawData()
+ {
+ return self::getInstalled();
+ }
+
+ /**
+ * Lets you reload the static array from another file
+ *
+ * This is only useful for complex integrations in which a project needs to use
+ * this class but then also needs to execute another project's autoloader in process,
+ * and wants to ensure both projects have access to their version of installed.php.
+ *
+ * A typical case would be PHPUnit, where it would need to make sure it reads all
+ * the data it needs from this class, then call reload() with
+ * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
+ * the project in which it runs can then also use this class safely, without
+ * interference between PHPUnit's dependencies and the project's dependencies.
+ *
+ * @param array[] $data A vendor/composer/installed.php data set
+ * @return void
+ *
+ * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array} $data
+ */
+ public static function reload($data)
+ {
+ self::$installed = $data;
+ self::$installedByVendor = array();
+ }
+
+ /**
+ * @return array[]
+ * @psalm-return list}>
+ */
+ private static function getInstalled()
+ {
+ if (null === self::$canGetVendors) {
+ self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
+ }
+
+ $installed = array();
+
+ if (self::$canGetVendors) {
+ foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
+ if (isset(self::$installedByVendor[$vendorDir])) {
+ $installed[] = self::$installedByVendor[$vendorDir];
+ } elseif (is_file($vendorDir.'/composer/installed.php')) {
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
+ if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+ self::$installed = $installed[count($installed) - 1];
+ }
+ }
+ }
+ }
+
+ if (null === self::$installed) {
+ // only require the installed.php file if this file is loaded from its dumped location,
+ // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
+ if (substr(__DIR__, -8, 1) !== 'C') {
+ self::$installed = require __DIR__ . '/installed.php';
+ } else {
+ self::$installed = array();
+ }
+ }
+ $installed[] = self::$installed;
+
+ return $installed;
+ }
}
diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php
index a552d4fe..1f9426ac 100755
--- a/vendor/composer/autoload_files.php
+++ b/vendor/composer/autoload_files.php
@@ -10,6 +10,22 @@ return array(
'35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
+ '3af723442581d6c310bf44543f9f5c60' => $vendorDir . '/markbaker/matrix/classes/src/Functions/adjoint.php',
+ 'd803221834c8b57fec95debb5406a797' => $vendorDir . '/markbaker/matrix/classes/src/Functions/antidiagonal.php',
+ '4714cafbd3be4c72c274a25eae9396bb' => $vendorDir . '/markbaker/matrix/classes/src/Functions/cofactors.php',
+ '89719dc7c77436609d1c1c31f0797b8f' => $vendorDir . '/markbaker/matrix/classes/src/Functions/determinant.php',
+ 'c28af79ec7730859d83f2d4310b8dd0b' => $vendorDir . '/markbaker/matrix/classes/src/Functions/diagonal.php',
+ 'c5d82bf1ac485e445f911e55789ab4e6' => $vendorDir . '/markbaker/matrix/classes/src/Functions/identity.php',
+ '0d2d594de24a247f7a33499e933aa21e' => $vendorDir . '/markbaker/matrix/classes/src/Functions/inverse.php',
+ 'f37c25880804a014ef40c8bffbab1b10' => $vendorDir . '/markbaker/matrix/classes/src/Functions/minors.php',
+ 'd6e4e42171df0dbea253b3067fefda38' => $vendorDir . '/markbaker/matrix/classes/src/Functions/trace.php',
+ '2c9b19fa954fd3e6fcc7e7a1383caddd' => $vendorDir . '/markbaker/matrix/classes/src/Functions/transpose.php',
+ '0a538fc9b897450ec362480ebbebe94f' => $vendorDir . '/markbaker/matrix/classes/src/Operations/add.php',
+ 'f0843f7f4089ec2343c7445544356385' => $vendorDir . '/markbaker/matrix/classes/src/Operations/directsum.php',
+ 'ad3e8c29aa16d134661a414265677b61' => $vendorDir . '/markbaker/matrix/classes/src/Operations/subtract.php',
+ '8d37dad4703fab45bfec9dd0bbf3278e' => $vendorDir . '/markbaker/matrix/classes/src/Operations/multiply.php',
+ '4888a6f58c08148ebe17682f9ce9b2a8' => $vendorDir . '/markbaker/matrix/classes/src/Operations/divideby.php',
+ 'eef6fa3879d3efa347cd24d5eb348f85' => $vendorDir . '/markbaker/matrix/classes/src/Operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php',
@@ -52,25 +68,9 @@ return array(
'883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php',
- '3af723442581d6c310bf44543f9f5c60' => $vendorDir . '/markbaker/matrix/classes/src/Functions/adjoint.php',
- 'd803221834c8b57fec95debb5406a797' => $vendorDir . '/markbaker/matrix/classes/src/Functions/antidiagonal.php',
- '4714cafbd3be4c72c274a25eae9396bb' => $vendorDir . '/markbaker/matrix/classes/src/Functions/cofactors.php',
- '89719dc7c77436609d1c1c31f0797b8f' => $vendorDir . '/markbaker/matrix/classes/src/Functions/determinant.php',
- 'c28af79ec7730859d83f2d4310b8dd0b' => $vendorDir . '/markbaker/matrix/classes/src/Functions/diagonal.php',
- 'c5d82bf1ac485e445f911e55789ab4e6' => $vendorDir . '/markbaker/matrix/classes/src/Functions/identity.php',
- '0d2d594de24a247f7a33499e933aa21e' => $vendorDir . '/markbaker/matrix/classes/src/Functions/inverse.php',
- 'f37c25880804a014ef40c8bffbab1b10' => $vendorDir . '/markbaker/matrix/classes/src/Functions/minors.php',
- 'd6e4e42171df0dbea253b3067fefda38' => $vendorDir . '/markbaker/matrix/classes/src/Functions/trace.php',
- '2c9b19fa954fd3e6fcc7e7a1383caddd' => $vendorDir . '/markbaker/matrix/classes/src/Functions/transpose.php',
- '0a538fc9b897450ec362480ebbebe94f' => $vendorDir . '/markbaker/matrix/classes/src/Operations/add.php',
- 'f0843f7f4089ec2343c7445544356385' => $vendorDir . '/markbaker/matrix/classes/src/Operations/directsum.php',
- 'ad3e8c29aa16d134661a414265677b61' => $vendorDir . '/markbaker/matrix/classes/src/Operations/subtract.php',
- '8d37dad4703fab45bfec9dd0bbf3278e' => $vendorDir . '/markbaker/matrix/classes/src/Operations/multiply.php',
- '4888a6f58c08148ebe17682f9ce9b2a8' => $vendorDir . '/markbaker/matrix/classes/src/Operations/divideby.php',
- 'eef6fa3879d3efa347cd24d5eb348f85' => $vendorDir . '/markbaker/matrix/classes/src/Operations/divideinto.php',
- '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php',
'dc1275c308c5b416beb314b6317daca2' => $vendorDir . '/overtrue/pinyin/src/const.php',
- '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
+ '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 24a0a77e..ac5ee8d4 100755
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -11,6 +11,22 @@ class ComposerStaticInitb9e4f0134ed78dbdc8a5ce7a1ab58175
'35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
+ '3af723442581d6c310bf44543f9f5c60' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/adjoint.php',
+ 'd803221834c8b57fec95debb5406a797' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/antidiagonal.php',
+ '4714cafbd3be4c72c274a25eae9396bb' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/cofactors.php',
+ '89719dc7c77436609d1c1c31f0797b8f' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/determinant.php',
+ 'c28af79ec7730859d83f2d4310b8dd0b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/diagonal.php',
+ 'c5d82bf1ac485e445f911e55789ab4e6' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/identity.php',
+ '0d2d594de24a247f7a33499e933aa21e' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/inverse.php',
+ 'f37c25880804a014ef40c8bffbab1b10' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/minors.php',
+ 'd6e4e42171df0dbea253b3067fefda38' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/trace.php',
+ '2c9b19fa954fd3e6fcc7e7a1383caddd' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/transpose.php',
+ '0a538fc9b897450ec362480ebbebe94f' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/add.php',
+ 'f0843f7f4089ec2343c7445544356385' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/directsum.php',
+ 'ad3e8c29aa16d134661a414265677b61' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/subtract.php',
+ '8d37dad4703fab45bfec9dd0bbf3278e' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/multiply.php',
+ '4888a6f58c08148ebe17682f9ce9b2a8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/divideby.php',
+ 'eef6fa3879d3efa347cd24d5eb348f85' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/divideinto.php',
'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php',
'21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php',
'1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php',
@@ -53,27 +69,11 @@ class ComposerStaticInitb9e4f0134ed78dbdc8a5ce7a1ab58175
'883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php',
'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php',
'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php',
- '3af723442581d6c310bf44543f9f5c60' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/adjoint.php',
- 'd803221834c8b57fec95debb5406a797' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/antidiagonal.php',
- '4714cafbd3be4c72c274a25eae9396bb' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/cofactors.php',
- '89719dc7c77436609d1c1c31f0797b8f' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/determinant.php',
- 'c28af79ec7730859d83f2d4310b8dd0b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/diagonal.php',
- 'c5d82bf1ac485e445f911e55789ab4e6' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/identity.php',
- '0d2d594de24a247f7a33499e933aa21e' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/inverse.php',
- 'f37c25880804a014ef40c8bffbab1b10' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/minors.php',
- 'd6e4e42171df0dbea253b3067fefda38' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/trace.php',
- '2c9b19fa954fd3e6fcc7e7a1383caddd' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Functions/transpose.php',
- '0a538fc9b897450ec362480ebbebe94f' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/add.php',
- 'f0843f7f4089ec2343c7445544356385' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/directsum.php',
- 'ad3e8c29aa16d134661a414265677b61' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/subtract.php',
- '8d37dad4703fab45bfec9dd0bbf3278e' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/multiply.php',
- '4888a6f58c08148ebe17682f9ce9b2a8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/divideby.php',
- 'eef6fa3879d3efa347cd24d5eb348f85' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/Operations/divideinto.php',
- '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
+ '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
'dc1275c308c5b416beb314b6317daca2' => __DIR__ . '/..' . '/overtrue/pinyin/src/const.php',
- '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
+ '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php',
);
public static $prefixLengthsPsr4 = array (
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 633cb3c1..9e90a976 100755
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -453,18 +453,24 @@
},
{
"name": "markbaker/complex",
- "version": "2.0.0",
- "version_normalized": "2.0.0.0",
+ "version": "2.0.3",
+ "version_normalized": "2.0.3.0",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
- "reference": "9999f1432fae467bc93c53f357105b4c31bb994c"
+ "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c",
- "reference": "9999f1432fae467bc93c53f357105b4c31bb994c",
- "shasum": ""
+ "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/6f724d7e04606fd8adaa4e3bb381c3e9db09c946",
+ "reference": "6f724d7e04606fd8adaa4e3bb381c3e9db09c946",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
},
"require": {
"php": "^7.2 || ^8.0"
@@ -472,14 +478,10 @@
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"phpcompatibility/php-compatibility": "^9.0",
- "phpdocumentor/phpdocumentor": "2.*",
- "phploc/phploc": "^4.0",
- "phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
- "sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.4"
},
- "time": "2020-08-26T10:42:07+00:00",
+ "time": "2021-06-02T09:44:11+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -549,24 +551,30 @@
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
- "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8"
+ "source": "https://github.com/MarkBaker/PHPComplex/tree/2.0.3"
},
"install-path": "../markbaker/complex"
},
{
"name": "markbaker/matrix",
- "version": "2.1.2",
- "version_normalized": "2.1.2.0",
+ "version": "2.1.3",
+ "version_normalized": "2.1.3.0",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
- "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a"
+ "reference": "174395a901b5ba0925f1d790fa91bab531074b61"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a",
- "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a",
- "shasum": ""
+ "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/174395a901b5ba0925f1d790fa91bab531074b61",
+ "reference": "174395a901b5ba0925f1d790fa91bab531074b61",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
},
"require": {
"php": "^7.1 || ^8.0"
@@ -581,7 +589,7 @@
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.4"
},
- "time": "2021-01-23T16:37:31+00:00",
+ "time": "2021-05-25T15:42:17+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -626,7 +634,7 @@
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
- "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2"
+ "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.3"
},
"install-path": "../markbaker/matrix"
},
@@ -771,18 +779,24 @@
},
{
"name": "phpoffice/phpspreadsheet",
- "version": "1.17.1",
- "version_normalized": "1.17.1.0",
+ "version": "1.18.0",
+ "version_normalized": "1.18.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4"
+ "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c55269cb06911575a126dc225a05c0e4626e5fb4",
- "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4",
- "shasum": ""
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/418cd304e8e6b417ea79c3b29126a25dc4b1170c",
+ "reference": "418cd304e8e6b417ea79c3b29126a25dc4b1170c",
+ "shasum": "",
+ "mirrors": [
+ {
+ "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
+ "preferred": true
+ }
+ ]
},
"require": {
"ext-ctype": "*",
@@ -800,20 +814,23 @@
"ext-zlib": "*",
"ezyang/htmlpurifier": "^4.13",
"maennchen/zipstream-php": "^2.1",
- "markbaker/complex": "^1.5||^2.0",
- "markbaker/matrix": "^1.2||^2.0",
- "php": "^7.2||^8.0",
+ "markbaker/complex": "^2.0",
+ "markbaker/matrix": "^2.0",
+ "php": "^7.2 || ^8.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0"
},
"require-dev": {
- "dompdf/dompdf": "^0.8.5",
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
+ "dompdf/dompdf": "^1.0",
"friendsofphp/php-cs-fixer": "^2.18",
"jpgraph/jpgraph": "^4.0",
"mpdf/mpdf": "^8.0",
"phpcompatibility/php-compatibility": "^9.3",
- "phpunit/phpunit": "^8.5||^9.3",
+ "phpstan/phpstan": "^0.12.82",
+ "phpstan/phpstan-phpunit": "^0.12.18",
+ "phpunit/phpunit": "^8.5",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "^6.3"
},
@@ -823,7 +840,7 @@
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)"
},
- "time": "2021-03-02T17:54:11+00:00",
+ "time": "2021-05-31T18:21:15+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -869,7 +886,7 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.17.1"
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.18.0"
},
"install-path": "../phpoffice/phpspreadsheet"
},
@@ -1268,17 +1285,17 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.22.1",
- "version_normalized": "1.22.1.0",
+ "version": "v1.23.0",
+ "version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
+ "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
- "reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
+ "reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
"shasum": "",
"mirrors": [
{
@@ -1293,11 +1310,11 @@
"suggest": {
"ext-mbstring": "For best performance"
},
- "time": "2021-01-22T09:19:47+00:00",
+ "time": "2021-05-27T09:27:20+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1336,21 +1353,38 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"install-path": "../symfony/polyfill-mbstring"
},
{
"name": "symfony/polyfill-php72",
- "version": "v1.22.1",
- "version_normalized": "1.22.1.0",
+ "version": "v1.23.0",
+ "version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
- "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9"
+ "reference": "9a142215a36a3888e30d0a9eeea9766764e96976"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
- "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976",
+ "reference": "9a142215a36a3888e30d0a9eeea9766764e96976",
"shasum": "",
"mirrors": [
{
@@ -1362,11 +1396,11 @@
"require": {
"php": ">=7.1"
},
- "time": "2021-01-07T16:49:33+00:00",
+ "time": "2021-05-27T09:17:38+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1404,21 +1438,38 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"install-path": "../symfony/polyfill-php72"
},
{
"name": "symfony/polyfill-php80",
- "version": "v1.22.1",
- "version_normalized": "1.22.1.0",
+ "version": "v1.23.0",
+ "version_normalized": "1.23.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91"
+ "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91",
- "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
+ "reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
"shasum": "",
"mirrors": [
{
@@ -1430,11 +1481,11 @@
"require": {
"php": ">=7.1"
},
- "time": "2021-01-07T16:49:33+00:00",
+ "time": "2021-02-19T12:13:01+00:00",
"type": "library",
"extra": {
"branch-alias": {
- "dev-main": "1.22-dev"
+ "dev-main": "1.23-dev"
},
"thanks": {
"name": "symfony/polyfill",
@@ -1479,21 +1530,38 @@
"portable",
"shim"
],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
"install-path": "../symfony/polyfill-php80"
},
{
"name": "symfony/var-dumper",
- "version": "v4.4.22",
- "version_normalized": "4.4.22.0",
+ "version": "v4.4.25",
+ "version_normalized": "4.4.25.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7"
+ "reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
- "reference": "c194bcedde6295f3ec3e9eba1f5d484ea97c41a7",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
+ "reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
"shasum": "",
"mirrors": [
{
@@ -1523,7 +1591,7 @@
"ext-intl": "To show region name in time zone dump",
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
},
- "time": "2021-04-19T13:36:17+00:00",
+ "time": "2021-05-27T09:48:32+00:00",
"bin": [
"Resources/bin/var-dump-server"
],
@@ -1561,7 +1629,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v4.4.22"
+ "source": "https://github.com/symfony/var-dumper/tree/v4.4.25"
},
"funding": [
{
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 066918f5..ecd688e8 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,330 +1,329 @@
-
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
+ array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'type' => 'project',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '4ab739f22948c6e8fc43224a2e630f205aca5a88',
+ 'name' => 'topthink/think',
+ 'dev' => true,
),
- 'reference' => '53590dcebadeaef2726a03243c62a47718ed6b02',
- 'name' => 'topthink/think',
- ),
- 'versions' =>
- array (
- 'ezyang/htmlpurifier' =>
- array (
- 'pretty_version' => 'v4.13.0',
- 'version' => '4.13.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
+ 'versions' => array(
+ 'ezyang/htmlpurifier' => array(
+ 'pretty_version' => 'v4.13.0',
+ 'version' => '4.13.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../ezyang/htmlpurifier',
+ 'aliases' => array(),
+ 'reference' => '08e27c97e4c6ed02f37c5b2b20488046c8d90d75',
+ 'dev_requirement' => false,
+ ),
+ 'league/flysystem' => array(
+ 'pretty_version' => '1.1.3',
+ 'version' => '1.1.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../league/flysystem',
+ 'aliases' => array(),
+ 'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
+ 'dev_requirement' => false,
+ ),
+ 'league/flysystem-cached-adapter' => array(
+ 'pretty_version' => '1.1.0',
+ 'version' => '1.1.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../league/flysystem-cached-adapter',
+ 'aliases' => array(),
+ 'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
+ 'dev_requirement' => false,
+ ),
+ 'league/mime-type-detection' => array(
+ 'pretty_version' => '1.7.0',
+ 'version' => '1.7.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../league/mime-type-detection',
+ 'aliases' => array(),
+ 'reference' => '3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
+ 'dev_requirement' => false,
+ ),
+ 'liliuwei/thinkphp-auth' => array(
+ 'pretty_version' => 'v2.0.0',
+ 'version' => '2.0.0.0',
+ 'type' => 'think-extend',
+ 'install_path' => __DIR__ . '/../liliuwei/thinkphp-auth',
+ 'aliases' => array(),
+ 'reference' => '1eddf9fe6c549c11f1b3a212aaaf7a50165412c9',
+ 'dev_requirement' => false,
+ ),
+ 'liliuwei/thinkphp-jump' => array(
+ 'pretty_version' => '1.5',
+ 'version' => '1.5.0.0',
+ 'type' => 'think-extend',
+ 'install_path' => __DIR__ . '/../liliuwei/thinkphp-jump',
+ 'aliases' => array(),
+ 'reference' => '481d41b922095f08230609919be5d19354c50540',
+ 'dev_requirement' => false,
+ ),
+ 'maennchen/zipstream-php' => array(
+ 'pretty_version' => '2.1.0',
+ 'version' => '2.1.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../maennchen/zipstream-php',
+ 'aliases' => array(),
+ 'reference' => 'c4c5803cc1f93df3d2448478ef79394a5981cc58',
+ 'dev_requirement' => false,
+ ),
+ 'markbaker/complex' => array(
+ 'pretty_version' => '2.0.3',
+ 'version' => '2.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../markbaker/complex',
+ 'aliases' => array(),
+ 'reference' => '6f724d7e04606fd8adaa4e3bb381c3e9db09c946',
+ 'dev_requirement' => false,
+ ),
+ 'markbaker/matrix' => array(
+ 'pretty_version' => '2.1.3',
+ 'version' => '2.1.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../markbaker/matrix',
+ 'aliases' => array(),
+ 'reference' => '174395a901b5ba0925f1d790fa91bab531074b61',
+ 'dev_requirement' => false,
+ ),
+ 'myclabs/php-enum' => array(
+ 'pretty_version' => '1.8.0',
+ 'version' => '1.8.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../myclabs/php-enum',
+ 'aliases' => array(),
+ 'reference' => '46cf3d8498b095bd33727b13fd5707263af99421',
+ 'dev_requirement' => false,
+ ),
+ 'overtrue/pinyin' => array(
+ 'pretty_version' => '4.0.7',
+ 'version' => '4.0.7.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../overtrue/pinyin',
+ 'aliases' => array(),
+ 'reference' => '083de406907d42df2e0feaaeb83f1a3c2e0095eb',
+ 'dev_requirement' => false,
+ ),
+ 'phpoffice/phpspreadsheet' => array(
+ 'pretty_version' => '1.18.0',
+ 'version' => '1.18.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
+ 'aliases' => array(),
+ 'reference' => '418cd304e8e6b417ea79c3b29126a25dc4b1170c',
+ 'dev_requirement' => false,
+ ),
+ 'psr/cache' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/cache',
+ 'aliases' => array(),
+ 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
+ 'dev_requirement' => false,
+ ),
+ 'psr/container' => array(
+ 'pretty_version' => '1.1.1',
+ 'version' => '1.1.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/container',
+ 'aliases' => array(),
+ 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-client' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-client',
+ 'aliases' => array(),
+ 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-factory' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-factory',
+ 'aliases' => array(),
+ 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
+ 'dev_requirement' => false,
+ ),
+ 'psr/http-message' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/http-message',
+ 'aliases' => array(),
+ 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
+ 'dev_requirement' => false,
+ ),
+ 'psr/log' => array(
+ 'pretty_version' => '1.1.4',
+ 'version' => '1.1.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/log',
+ 'aliases' => array(),
+ 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
+ 'dev_requirement' => false,
+ ),
+ 'psr/simple-cache' => array(
+ 'pretty_version' => '1.0.1',
+ 'version' => '1.0.1.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../psr/simple-cache',
+ 'aliases' => array(),
+ 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-mbstring' => array(
+ 'pretty_version' => 'v1.23.0',
+ 'version' => '1.23.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
+ 'aliases' => array(),
+ 'reference' => '2df51500adbaebdc4c38dea4c89a2e131c45c8a1',
+ 'dev_requirement' => false,
+ ),
+ 'symfony/polyfill-php72' => array(
+ 'pretty_version' => 'v1.23.0',
+ 'version' => '1.23.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php72',
+ 'aliases' => array(),
+ 'reference' => '9a142215a36a3888e30d0a9eeea9766764e96976',
+ 'dev_requirement' => true,
+ ),
+ 'symfony/polyfill-php80' => array(
+ 'pretty_version' => 'v1.23.0',
+ 'version' => '1.23.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
+ 'aliases' => array(),
+ 'reference' => 'eca0bf41ed421bed1b57c4958bab16aa86b757d0',
+ 'dev_requirement' => true,
+ ),
+ 'symfony/var-dumper' => array(
+ 'pretty_version' => 'v4.4.25',
+ 'version' => '4.4.25.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../symfony/var-dumper',
+ 'aliases' => array(),
+ 'reference' => '31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0',
+ 'dev_requirement' => true,
+ ),
+ 'topthink/framework' => array(
+ 'pretty_version' => 'v6.0.8',
+ 'version' => '6.0.8.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/framework',
+ 'aliases' => array(),
+ 'reference' => '4789343672aef06d571d556da369c0e156609bce',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think' => array(
+ 'pretty_version' => 'dev-master',
+ 'version' => 'dev-master',
+ 'type' => 'project',
+ 'install_path' => __DIR__ . '/../../',
+ 'aliases' => array(),
+ 'reference' => '4ab739f22948c6e8fc43224a2e630f205aca5a88',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-captcha' => array(
+ 'pretty_version' => 'v3.0.3',
+ 'version' => '3.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-captcha',
+ 'aliases' => array(),
+ 'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-helper' => array(
+ 'pretty_version' => 'v3.1.4',
+ 'version' => '3.1.4.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-helper',
+ 'aliases' => array(),
+ 'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-migration' => array(
+ 'pretty_version' => 'v3.0.3',
+ 'version' => '3.0.3.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-migration',
+ 'aliases' => array(),
+ 'reference' => '5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-multi-app' => array(
+ 'pretty_version' => 'v1.0.14',
+ 'version' => '1.0.14.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-multi-app',
+ 'aliases' => array(),
+ 'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-orm' => array(
+ 'pretty_version' => 'v2.0.40',
+ 'version' => '2.0.40.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-orm',
+ 'aliases' => array(),
+ 'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-template' => array(
+ 'pretty_version' => 'v2.0.8',
+ 'version' => '2.0.8.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-template',
+ 'aliases' => array(),
+ 'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
+ 'dev_requirement' => false,
+ ),
+ 'topthink/think-trace' => array(
+ 'pretty_version' => 'v1.4',
+ 'version' => '1.4.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-trace',
+ 'aliases' => array(),
+ 'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
+ 'dev_requirement' => true,
+ ),
+ 'topthink/think-view' => array(
+ 'pretty_version' => 'v1.0.14',
+ 'version' => '1.0.14.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../topthink/think-view',
+ 'aliases' => array(),
+ 'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
+ 'dev_requirement' => false,
+ ),
+ 'wamkj/thinkphp6.0-databackup' => array(
+ 'pretty_version' => 'v1.0',
+ 'version' => '1.0.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../wamkj/thinkphp6.0-databackup',
+ 'aliases' => array(),
+ 'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
+ 'dev_requirement' => false,
+ ),
+ 'whitehat101/apr1-md5' => array(
+ 'pretty_version' => 'v1.0.0',
+ 'version' => '1.0.0.0',
+ 'type' => 'library',
+ 'install_path' => __DIR__ . '/../whitehat101/apr1-md5',
+ 'aliases' => array(),
+ 'reference' => '8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819',
+ 'dev_requirement' => false,
+ ),
),
- 'league/flysystem' =>
- array (
- 'pretty_version' => '1.1.3',
- 'version' => '1.1.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
- ),
- 'league/flysystem-cached-adapter' =>
- array (
- 'pretty_version' => '1.1.0',
- 'version' => '1.1.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd1925efb2207ac4be3ad0c40b8277175f99ffaff',
- ),
- 'league/mime-type-detection' =>
- array (
- 'pretty_version' => '1.7.0',
- 'version' => '1.7.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3',
- ),
- 'liliuwei/thinkphp-auth' =>
- array (
- 'pretty_version' => 'v2.0.0',
- 'version' => '2.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1eddf9fe6c549c11f1b3a212aaaf7a50165412c9',
- ),
- 'liliuwei/thinkphp-jump' =>
- array (
- 'pretty_version' => '1.5',
- 'version' => '1.5.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '481d41b922095f08230609919be5d19354c50540',
- ),
- 'maennchen/zipstream-php' =>
- array (
- 'pretty_version' => '2.1.0',
- 'version' => '2.1.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c4c5803cc1f93df3d2448478ef79394a5981cc58',
- ),
- 'markbaker/complex' =>
- array (
- 'pretty_version' => '2.0.0',
- 'version' => '2.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9999f1432fae467bc93c53f357105b4c31bb994c',
- ),
- 'markbaker/matrix' =>
- array (
- 'pretty_version' => '2.1.2',
- 'version' => '2.1.2.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '361c0f545c3172ee26c3d596a0aa03f0cef65e6a',
- ),
- 'myclabs/php-enum' =>
- array (
- 'pretty_version' => '1.8.0',
- 'version' => '1.8.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '46cf3d8498b095bd33727b13fd5707263af99421',
- ),
- 'overtrue/pinyin' =>
- array (
- 'pretty_version' => '4.0.7',
- 'version' => '4.0.7.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '083de406907d42df2e0feaaeb83f1a3c2e0095eb',
- ),
- 'phpoffice/phpspreadsheet' =>
- array (
- 'pretty_version' => '1.17.1',
- 'version' => '1.17.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c55269cb06911575a126dc225a05c0e4626e5fb4',
- ),
- 'psr/cache' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd11b50ad223250cf17b86e38383413f5a6764bf8',
- ),
- 'psr/container' =>
- array (
- 'pretty_version' => '1.1.1',
- 'version' => '1.1.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
- ),
- 'psr/http-client' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621',
- ),
- 'psr/http-factory' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '12ac7fcd07e5b077433f5f2bee95b3a771bf61be',
- ),
- 'psr/http-message' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'f6561bf28d520154e4b0ec72be95418abe6d9363',
- ),
- 'psr/log' =>
- array (
- 'pretty_version' => '1.1.4',
- 'version' => '1.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
- ),
- 'psr/simple-cache' =>
- array (
- 'pretty_version' => '1.0.1',
- 'version' => '1.0.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '408d5eafb83c57f6365a3ca330ff23aa4a5fa39b',
- ),
- 'symfony/polyfill-mbstring' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
- ),
- 'symfony/polyfill-php72' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9',
- ),
- 'symfony/polyfill-php80' =>
- array (
- 'pretty_version' => 'v1.22.1',
- 'version' => '1.22.1.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'dc3063ba22c2a1fd2f45ed856374d79114998f91',
- ),
- 'symfony/var-dumper' =>
- array (
- 'pretty_version' => 'v4.4.22',
- 'version' => '4.4.22.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c194bcedde6295f3ec3e9eba1f5d484ea97c41a7',
- ),
- 'topthink/framework' =>
- array (
- 'pretty_version' => 'v6.0.8',
- 'version' => '6.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '4789343672aef06d571d556da369c0e156609bce',
- ),
- 'topthink/think' =>
- array (
- 'pretty_version' => 'dev-master',
- 'version' => 'dev-master',
- 'aliases' =>
- array (
- ),
- 'reference' => '53590dcebadeaef2726a03243c62a47718ed6b02',
- ),
- 'topthink/think-captcha' =>
- array (
- 'pretty_version' => 'v3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1eef3717c1bcf4f5bbe2d1a1c704011d330a8b55',
- ),
- 'topthink/think-helper' =>
- array (
- 'pretty_version' => 'v3.1.4',
- 'version' => '3.1.4.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
- ),
- 'topthink/think-migration' =>
- array (
- 'pretty_version' => 'v3.0.3',
- 'version' => '3.0.3.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '5717d9e5f3ea745f6dbfd1e30b4402aaadff9a79',
- ),
- 'topthink/think-multi-app' =>
- array (
- 'pretty_version' => 'v1.0.14',
- 'version' => '1.0.14.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'ccaad7c2d33f42cb1cc2a78d6610aaec02cea4c3',
- ),
- 'topthink/think-orm' =>
- array (
- 'pretty_version' => 'v2.0.40',
- 'version' => '2.0.40.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
- ),
- 'topthink/think-template' =>
- array (
- 'pretty_version' => 'v2.0.8',
- 'version' => '2.0.8.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'abfc293f74f9ef5127b5c416310a01fe42e59368',
- ),
- 'topthink/think-trace' =>
- array (
- 'pretty_version' => 'v1.4',
- 'version' => '1.4.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '9a9fa8f767b6c66c5a133ad21ca1bc96ad329444',
- ),
- 'topthink/think-view' =>
- array (
- 'pretty_version' => 'v1.0.14',
- 'version' => '1.0.14.0',
- 'aliases' =>
- array (
- ),
- 'reference' => 'edce0ae2c9551ab65f9e94a222604b0dead3576d',
- ),
- 'wamkj/thinkphp6.0-databackup' =>
- array (
- 'pretty_version' => 'v1.0',
- 'version' => '1.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '28a0e406d827132942723a3c9f69bb20c98e652f',
- ),
- 'whitehat101/apr1-md5' =>
- array (
- 'pretty_version' => 'v1.0.0',
- 'version' => '1.0.0.0',
- 'aliases' =>
- array (
- ),
- 'reference' => '8b261c9fc0481b4e9fa9d01c6ca70867b5d5e819',
- ),
- ),
);
diff --git a/vendor/markbaker/complex/.github/workflows/main.yml b/vendor/markbaker/complex/.github/workflows/main.yml
new file mode 100644
index 00000000..43d5bf04
--- /dev/null
+++ b/vendor/markbaker/complex/.github/workflows/main.yml
@@ -0,0 +1,150 @@
+name: main
+on: [ push, pull_request ]
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ experimental:
+ - false
+ php-version:
+ - '7.2'
+ - '7.3'
+ - '7.4'
+ - '8.0'
+
+ include:
+ - php-version: '8.1'
+ experimental: true
+
+ name: PHP ${{ matrix.php-version }}
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-version }}
+ coverage: none
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Delete composer lock file
+ id: composer-lock
+ if: ${{ matrix.php-version == '8.1' }}
+ run: |
+ echo "::set-output name=flags::--ignore-platform-reqs"
+
+ - name: Install dependencies
+ run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }}
+
+ - name: Setup problem matchers for PHP
+ run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
+
+ - name: Setup problem matchers for PHPUnit
+ run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
+
+ - name: "Run PHPUnit tests (Experimental: ${{ matrix.experimental }})"
+ env:
+ FAILURE_ACTION: "${{ matrix.experimental == true }}"
+ run: vendor/bin/phpunit --verbose || $FAILURE_ACTION
+
+ phpcs:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 7.4
+ coverage: none
+ tools: cs2pr
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Install dependencies
+ run: composer install --no-progress --prefer-dist --optimize-autoloader
+
+ - name: Code style with PHP_CodeSniffer
+ run: ./vendor/bin/phpcs -q --report=checkstyle classes/src/ | cs2pr
+
+ versions:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 7.4
+ coverage: none
+ tools: cs2pr
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Install dependencies
+ run: composer install --no-progress --prefer-dist --optimize-autoloader
+
+ - name: Code Version Compatibility check with PHP_CodeSniffer
+ run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full classes/src/ --standard=PHPCompatibility --runtime-set testVersion 7.2-
+
+ coverage:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP, with composer and extensions
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 7.4
+ coverage: pcov
+
+ - name: Get composer cache directory
+ id: composer-cache
+ run: echo "::set-output name=dir::$(composer config cache-files-dir)"
+
+ - name: Cache composer dependencies
+ uses: actions/cache@v2
+ with:
+ path: ${{ steps.composer-cache.outputs.dir }}
+ key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
+ restore-keys: ${{ runner.os }}-composer-
+
+ - name: Install dependencies
+ run: composer install --no-progress --prefer-dist --optimize-autoloader
+
+ - name: Test Coverage
+ run: ./vendor/bin/phpunit --verbose --coverage-text
diff --git a/vendor/markbaker/complex/classes/src/Complex.php b/vendor/markbaker/complex/classes/src/Complex.php
index f7ba1621..6be84d23 100755
--- a/vendor/markbaker/complex/classes/src/Complex.php
+++ b/vendor/markbaker/complex/classes/src/Complex.php
@@ -186,7 +186,7 @@ class Complex
// Set parsed values in our properties
$this->realPart = (float) $realPart;
$this->imaginaryPart = (float) $imaginaryPart;
- $this->suffix = strtolower($suffix);
+ $this->suffix = strtolower($suffix ?? '');
}
/**
diff --git a/vendor/markbaker/complex/classes/src/functions/abs.php b/vendor/markbaker/complex/classes/src/functions/abs.php
index 6e2729a8..98a90a75 100755
--- a/vendor/markbaker/complex/classes/src/functions/abs.php
+++ b/vendor/markbaker/complex/classes/src/functions/abs.php
@@ -23,7 +23,9 @@ namespace Complex;
* @see rho
*
*/
-function abs($complex): float
-{
- return rho($complex);
+if (!function_exists(__NAMESPACE__ . '\\abs')) {
+ function abs($complex): float
+ {
+ return rho($complex);
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acos.php b/vendor/markbaker/complex/classes/src/functions/acos.php
index 19e8c2a1..1bf4587c 100755
--- a/vendor/markbaker/complex/classes/src/functions/acos.php
+++ b/vendor/markbaker/complex/classes/src/functions/acos.php
@@ -16,23 +16,25 @@ namespace Complex;
* @return Complex The inverse cosine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function acos($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acos')) {
+ function acos($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- $square = clone $complex;
- $square = multiply($square, $complex);
- $invsqrt = new Complex(1.0);
- $invsqrt = subtract($invsqrt, $square);
- $invsqrt = sqrt($invsqrt);
- $adjust = new Complex(
- $complex->getReal() - $invsqrt->getImaginary(),
- $complex->getImaginary() + $invsqrt->getReal()
- );
- $log = ln($adjust);
+ $square = clone $complex;
+ $square = multiply($square, $complex);
+ $invsqrt = new Complex(1.0);
+ $invsqrt = subtract($invsqrt, $square);
+ $invsqrt = sqrt($invsqrt);
+ $adjust = new Complex(
+ $complex->getReal() - $invsqrt->getImaginary(),
+ $complex->getImaginary() + $invsqrt->getReal()
+ );
+ $log = ln($adjust);
- return new Complex(
- $log->getImaginary(),
- -1 * $log->getReal()
- );
+ return new Complex(
+ $log->getImaginary(),
+ -1 * $log->getReal()
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acosh.php b/vendor/markbaker/complex/classes/src/functions/acosh.php
index 18a992e4..21ed6649 100755
--- a/vendor/markbaker/complex/classes/src/functions/acosh.php
+++ b/vendor/markbaker/complex/classes/src/functions/acosh.php
@@ -16,19 +16,21 @@ namespace Complex;
* @return Complex The inverse hyperbolic cosine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function acosh($complex)
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acosh')) {
+ function acosh($complex)
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal() && ($complex->getReal() > 1)) {
- return new Complex(\acosh($complex->getReal()));
+ if ($complex->isReal() && ($complex->getReal() > 1)) {
+ return new Complex(\acosh($complex->getReal()));
+ }
+
+ $acosh = acos($complex)
+ ->reverse();
+ if ($acosh->getReal() < 0.0) {
+ $acosh = $acosh->invertReal();
+ }
+
+ return $acosh;
}
-
- $acosh = acos($complex)
- ->reverse();
- if ($acosh->getReal() < 0.0) {
- $acosh = $acosh->invertReal();
- }
-
- return $acosh;
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acot.php b/vendor/markbaker/complex/classes/src/functions/acot.php
index 4ddc2ddb..61ea3a30 100755
--- a/vendor/markbaker/complex/classes/src/functions/acot.php
+++ b/vendor/markbaker/complex/classes/src/functions/acot.php
@@ -17,9 +17,11 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function acot($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acot')) {
+ function acot($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return atan(inverse($complex));
+ return atan(inverse($complex));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acoth.php b/vendor/markbaker/complex/classes/src/functions/acoth.php
index 9939a462..1b48d82a 100755
--- a/vendor/markbaker/complex/classes/src/functions/acoth.php
+++ b/vendor/markbaker/complex/classes/src/functions/acoth.php
@@ -17,9 +17,11 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function acoth($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acoth')) {
+ function acoth($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return atanh(inverse($complex));
+ return atanh(inverse($complex));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acsc.php b/vendor/markbaker/complex/classes/src/functions/acsc.php
index dd5d5c80..6d4fda77 100755
--- a/vendor/markbaker/complex/classes/src/functions/acsc.php
+++ b/vendor/markbaker/complex/classes/src/functions/acsc.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function acsc($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acsc')) {
+ function acsc($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return asin(inverse($complex));
}
-
- return asin(inverse($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/acsch.php b/vendor/markbaker/complex/classes/src/functions/acsch.php
index 66d9bdf2..9f03bb7e 100755
--- a/vendor/markbaker/complex/classes/src/functions/acsch.php
+++ b/vendor/markbaker/complex/classes/src/functions/acsch.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function acsch($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\acsch')) {
+ function acsch($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return asinh(inverse($complex));
}
-
- return asinh(inverse($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/argument.php b/vendor/markbaker/complex/classes/src/functions/argument.php
index 17217bb3..e0a00910 100755
--- a/vendor/markbaker/complex/classes/src/functions/argument.php
+++ b/vendor/markbaker/complex/classes/src/functions/argument.php
@@ -22,7 +22,9 @@ namespace Complex;
*
* @see theta
*/
-function argument($complex): float
-{
- return theta($complex);
+if (!function_exists(__NAMESPACE__ . '\\argument')) {
+ function argument($complex): float
+ {
+ return theta($complex);
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/asec.php b/vendor/markbaker/complex/classes/src/functions/asec.php
index d4eb1f7d..27897183 100755
--- a/vendor/markbaker/complex/classes/src/functions/asec.php
+++ b/vendor/markbaker/complex/classes/src/functions/asec.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function asec($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\asec')) {
+ function asec($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return acos(inverse($complex));
}
-
- return acos(inverse($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/asech.php b/vendor/markbaker/complex/classes/src/functions/asech.php
index 929b0d19..4ca50486 100755
--- a/vendor/markbaker/complex/classes/src/functions/asech.php
+++ b/vendor/markbaker/complex/classes/src/functions/asech.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function asech($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\asech')) {
+ function asech($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return acosh(inverse($complex));
}
-
- return acosh(inverse($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/asin.php b/vendor/markbaker/complex/classes/src/functions/asin.php
index b675046a..28347472 100755
--- a/vendor/markbaker/complex/classes/src/functions/asin.php
+++ b/vendor/markbaker/complex/classes/src/functions/asin.php
@@ -16,22 +16,24 @@ namespace Complex;
* @return Complex The inverse sine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function asin($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\asin')) {
+ function asin($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- $square = multiply($complex, $complex);
- $invsqrt = new Complex(1.0);
- $invsqrt = subtract($invsqrt, $square);
- $invsqrt = sqrt($invsqrt);
- $adjust = new Complex(
- $invsqrt->getReal() - $complex->getImaginary(),
- $invsqrt->getImaginary() + $complex->getReal()
- );
- $log = ln($adjust);
+ $square = multiply($complex, $complex);
+ $invsqrt = new Complex(1.0);
+ $invsqrt = subtract($invsqrt, $square);
+ $invsqrt = sqrt($invsqrt);
+ $adjust = new Complex(
+ $invsqrt->getReal() - $complex->getImaginary(),
+ $invsqrt->getImaginary() + $complex->getReal()
+ );
+ $log = ln($adjust);
- return new Complex(
- $log->getImaginary(),
- -1 * $log->getReal()
- );
+ return new Complex(
+ $log->getImaginary(),
+ -1 * $log->getReal()
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/asinh.php b/vendor/markbaker/complex/classes/src/functions/asinh.php
index 3e5c2944..78868b73 100755
--- a/vendor/markbaker/complex/classes/src/functions/asinh.php
+++ b/vendor/markbaker/complex/classes/src/functions/asinh.php
@@ -16,18 +16,20 @@ namespace Complex;
* @return Complex The inverse hyperbolic sine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function asinh($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\asinh')) {
+ function asinh($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal() && ($complex->getReal() > 1)) {
- return new Complex(\asinh($complex->getReal()));
+ if ($complex->isReal() && ($complex->getReal() > 1)) {
+ return new Complex(\asinh($complex->getReal()));
+ }
+
+ $asinh = clone $complex;
+ $asinh = $asinh->reverse()
+ ->invertReal();
+ $asinh = asin($asinh);
+ return $asinh->reverse()
+ ->invertImaginary();
}
-
- $asinh = clone $complex;
- $asinh = $asinh->reverse()
- ->invertReal();
- $asinh = asin($asinh);
- return $asinh->reverse()
- ->invertImaginary();
}
diff --git a/vendor/markbaker/complex/classes/src/functions/atan.php b/vendor/markbaker/complex/classes/src/functions/atan.php
index ecbea801..3f4d3d77 100755
--- a/vendor/markbaker/complex/classes/src/functions/atan.php
+++ b/vendor/markbaker/complex/classes/src/functions/atan.php
@@ -20,26 +20,28 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function atan($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\atan')) {
+ function atan($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\atan($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\atan($complex->getReal()));
+ }
+
+ $t1Value = new Complex(-1 * $complex->getImaginary(), $complex->getReal());
+ $uValue = new Complex(1, 0);
+
+ $d1Value = clone $uValue;
+ $d1Value = subtract($d1Value, $t1Value);
+ $d2Value = add($t1Value, $uValue);
+ $uResult = $d1Value->divideBy($d2Value);
+ $uResult = ln($uResult);
+
+ return new Complex(
+ (($uResult->getImaginary() == M_PI) ? -M_PI : $uResult->getImaginary()) * -0.5,
+ $uResult->getReal() * 0.5,
+ $complex->getSuffix()
+ );
}
-
- $t1Value = new Complex(-1 * $complex->getImaginary(), $complex->getReal());
- $uValue = new Complex(1, 0);
-
- $d1Value = clone $uValue;
- $d1Value = subtract($d1Value, $t1Value);
- $d2Value = add($t1Value, $uValue);
- $uResult = $d1Value->divideBy($d2Value);
- $uResult = ln($uResult);
-
- return new Complex(
- (($uResult->getImaginary() == M_PI) ? -M_PI : $uResult->getImaginary()) * -0.5,
- $uResult->getReal() * 0.5,
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/atanh.php b/vendor/markbaker/complex/classes/src/functions/atanh.php
index 189493b8..65311ec2 100755
--- a/vendor/markbaker/complex/classes/src/functions/atanh.php
+++ b/vendor/markbaker/complex/classes/src/functions/atanh.php
@@ -16,23 +16,25 @@ namespace Complex;
* @return Complex The inverse hyperbolic tangent of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function atanh($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\atanh')) {
+ function atanh($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- $real = $complex->getReal();
- if ($real >= -1.0 && $real <= 1.0) {
- return new Complex(\atanh($real));
- } else {
- return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2));
+ if ($complex->isReal()) {
+ $real = $complex->getReal();
+ if ($real >= -1.0 && $real <= 1.0) {
+ return new Complex(\atanh($real));
+ } else {
+ return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2));
+ }
}
- }
- $iComplex = clone $complex;
- $iComplex = $iComplex->invertImaginary()
- ->reverse();
- return atan($iComplex)
- ->invertReal()
- ->reverse();
+ $iComplex = clone $complex;
+ $iComplex = $iComplex->invertImaginary()
+ ->reverse();
+ return atan($iComplex)
+ ->invertReal()
+ ->reverse();
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/conjugate.php b/vendor/markbaker/complex/classes/src/functions/conjugate.php
index 52666176..b8ec0407 100755
--- a/vendor/markbaker/complex/classes/src/functions/conjugate.php
+++ b/vendor/markbaker/complex/classes/src/functions/conjugate.php
@@ -16,13 +16,15 @@ namespace Complex;
* @return Complex The conjugate of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function conjugate($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\conjugate')) {
+ function conjugate($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return new Complex(
- $complex->getReal(),
- -1 * $complex->getImaginary(),
- $complex->getSuffix()
- );
+ return new Complex(
+ $complex->getReal(),
+ -1 * $complex->getImaginary(),
+ $complex->getSuffix()
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/cos.php b/vendor/markbaker/complex/classes/src/functions/cos.php
index 0c6ea1a8..720299d4 100755
--- a/vendor/markbaker/complex/classes/src/functions/cos.php
+++ b/vendor/markbaker/complex/classes/src/functions/cos.php
@@ -16,19 +16,21 @@ namespace Complex;
* @return Complex The cosine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function cos($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\cos')) {
+ function cos($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\cos($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\cos($complex->getReal()));
+ }
+
+ return conjugate(
+ new Complex(
+ \cos($complex->getReal()) * \cosh($complex->getImaginary()),
+ \sin($complex->getReal()) * \sinh($complex->getImaginary()),
+ $complex->getSuffix()
+ )
+ );
}
-
- return conjugate(
- new Complex(
- \cos($complex->getReal()) * \cosh($complex->getImaginary()),
- \sin($complex->getReal()) * \sinh($complex->getImaginary()),
- $complex->getSuffix()
- )
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/cosh.php b/vendor/markbaker/complex/classes/src/functions/cosh.php
index ee674c27..73aadde4 100755
--- a/vendor/markbaker/complex/classes/src/functions/cosh.php
+++ b/vendor/markbaker/complex/classes/src/functions/cosh.php
@@ -16,17 +16,19 @@ namespace Complex;
* @return Complex The hyperbolic cosine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function cosh($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\cosh')) {
+ function cosh($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\cosh($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\cosh($complex->getReal()));
+ }
+
+ return new Complex(
+ \cosh($complex->getReal()) * \cos($complex->getImaginary()),
+ \sinh($complex->getReal()) * \sin($complex->getImaginary()),
+ $complex->getSuffix()
+ );
}
-
- return new Complex(
- \cosh($complex->getReal()) * \cos($complex->getImaginary()),
- \sinh($complex->getReal()) * \sin($complex->getImaginary()),
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/cot.php b/vendor/markbaker/complex/classes/src/functions/cot.php
index 693d0f7c..a52810b5 100755
--- a/vendor/markbaker/complex/classes/src/functions/cot.php
+++ b/vendor/markbaker/complex/classes/src/functions/cot.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function cot($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\cot')) {
+ function cot($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return inverse(tan($complex));
}
-
- return inverse(tan($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/coth.php b/vendor/markbaker/complex/classes/src/functions/coth.php
index 1ff1ad50..ffc32974 100755
--- a/vendor/markbaker/complex/classes/src/functions/coth.php
+++ b/vendor/markbaker/complex/classes/src/functions/coth.php
@@ -17,8 +17,10 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function coth($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
- return inverse(tanh($complex));
+if (!function_exists(__NAMESPACE__ . '\\coth')) {
+ function coth($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
+ return inverse(tanh($complex));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/csc.php b/vendor/markbaker/complex/classes/src/functions/csc.php
index 8017bb56..b9b2768a 100755
--- a/vendor/markbaker/complex/classes/src/functions/csc.php
+++ b/vendor/markbaker/complex/classes/src/functions/csc.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function csc($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\csc')) {
+ function csc($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return inverse(sin($complex));
}
-
- return inverse(sin($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/csch.php b/vendor/markbaker/complex/classes/src/functions/csch.php
index acaa6c0c..b94a22a9 100755
--- a/vendor/markbaker/complex/classes/src/functions/csch.php
+++ b/vendor/markbaker/complex/classes/src/functions/csch.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function csch($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\csch')) {
+ function csch($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return new Complex(INF);
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return new Complex(INF);
+ }
+
+ return inverse(sinh($complex));
}
-
- return inverse(sinh($complex));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/exp.php b/vendor/markbaker/complex/classes/src/functions/exp.php
index 8ab3b3e5..6bfd5298 100755
--- a/vendor/markbaker/complex/classes/src/functions/exp.php
+++ b/vendor/markbaker/complex/classes/src/functions/exp.php
@@ -16,19 +16,21 @@ namespace Complex;
* @return Complex The exponential of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function exp($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\exp')) {
+ function exp($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if (($complex->getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) {
- return new Complex(-1.0, 0.0);
+ if (($complex->getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) {
+ return new Complex(-1.0, 0.0);
+ }
+
+ $rho = \exp($complex->getReal());
+
+ return new Complex(
+ $rho * \cos($complex->getImaginary()),
+ $rho * \sin($complex->getImaginary()),
+ $complex->getSuffix()
+ );
}
-
- $rho = \exp($complex->getReal());
-
- return new Complex(
- $rho * \cos($complex->getImaginary()),
- $rho * \sin($complex->getImaginary()),
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/inverse.php b/vendor/markbaker/complex/classes/src/functions/inverse.php
index 563e3fd8..07c342a4 100755
--- a/vendor/markbaker/complex/classes/src/functions/inverse.php
+++ b/vendor/markbaker/complex/classes/src/functions/inverse.php
@@ -17,13 +17,15 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function inverse($complex): Complex
-{
- $complex = clone Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\inverse')) {
+ function inverse($complex): Complex
+ {
+ $complex = clone Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- throw new \InvalidArgumentException('Division by zero');
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ throw new \InvalidArgumentException('Division by zero');
+ }
+
+ return $complex->divideInto(1.0);
}
-
- return $complex->divideInto(1.0);
}
diff --git a/vendor/markbaker/complex/classes/src/functions/ln.php b/vendor/markbaker/complex/classes/src/functions/ln.php
index d57bb7af..6b070cf4 100755
--- a/vendor/markbaker/complex/classes/src/functions/ln.php
+++ b/vendor/markbaker/complex/classes/src/functions/ln.php
@@ -17,17 +17,19 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If the real and the imaginary parts are both zero
*/
-function ln($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\ln')) {
+ function ln($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
- throw new \InvalidArgumentException();
+ if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
+ throw new \InvalidArgumentException();
+ }
+
+ return new Complex(
+ \log(rho($complex)),
+ theta($complex),
+ $complex->getSuffix()
+ );
}
-
- return new Complex(
- \log(rho($complex)),
- theta($complex),
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/log10.php b/vendor/markbaker/complex/classes/src/functions/log10.php
index ce4d001f..e18c9840 100755
--- a/vendor/markbaker/complex/classes/src/functions/log10.php
+++ b/vendor/markbaker/complex/classes/src/functions/log10.php
@@ -17,16 +17,18 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If the real and the imaginary parts are both zero
*/
-function log10($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\log10')) {
+ function log10($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
- throw new \InvalidArgumentException();
- } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) {
- return new Complex(\log10($complex->getReal()), 0.0, $complex->getSuffix());
+ if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
+ throw new \InvalidArgumentException();
+ } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) {
+ return new Complex(\log10($complex->getReal()), 0.0, $complex->getSuffix());
+ }
+
+ return ln($complex)
+ ->multiply(\log10(Complex::EULER));
}
-
- return ln($complex)
- ->multiply(\log10(Complex::EULER));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/log2.php b/vendor/markbaker/complex/classes/src/functions/log2.php
index 21b3e2aa..e3198130 100755
--- a/vendor/markbaker/complex/classes/src/functions/log2.php
+++ b/vendor/markbaker/complex/classes/src/functions/log2.php
@@ -17,16 +17,18 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If the real and the imaginary parts are both zero
*/
-function log2($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\log2')) {
+ function log2($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
- throw new \InvalidArgumentException();
- } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) {
- return new Complex(\log($complex->getReal(), 2), 0.0, $complex->getSuffix());
+ if (($complex->getReal() == 0.0) && ($complex->getImaginary() == 0.0)) {
+ throw new \InvalidArgumentException();
+ } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) {
+ return new Complex(\log($complex->getReal(), 2), 0.0, $complex->getSuffix());
+ }
+
+ return ln($complex)
+ ->multiply(\log(Complex::EULER, 2));
}
-
- return ln($complex)
- ->multiply(\log(Complex::EULER, 2));
}
diff --git a/vendor/markbaker/complex/classes/src/functions/negative.php b/vendor/markbaker/complex/classes/src/functions/negative.php
index 232e178a..35bec44e 100755
--- a/vendor/markbaker/complex/classes/src/functions/negative.php
+++ b/vendor/markbaker/complex/classes/src/functions/negative.php
@@ -19,13 +19,15 @@ namespace Complex;
* @see rho
*
*/
-function negative($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\negative')) {
+ function negative($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return new Complex(
- -1 * $complex->getReal(),
- -1 * $complex->getImaginary(),
- $complex->getSuffix()
- );
+ return new Complex(
+ -1 * $complex->getReal(),
+ -1 * $complex->getImaginary(),
+ $complex->getSuffix()
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/pow.php b/vendor/markbaker/complex/classes/src/functions/pow.php
index da3340fe..dc0ae8bb 100755
--- a/vendor/markbaker/complex/classes/src/functions/pow.php
+++ b/vendor/markbaker/complex/classes/src/functions/pow.php
@@ -17,24 +17,26 @@ namespace Complex;
* @return Complex The complex argument raised to the real power.
* @throws Exception If the power argument isn't a valid real
*/
-function pow($complex, $power): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\pow')) {
+ function pow($complex, $power): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if (!is_numeric($power)) {
- throw new Exception('Power argument must be a real number');
+ if (!is_numeric($power)) {
+ throw new Exception('Power argument must be a real number');
+ }
+
+ if ($complex->getImaginary() == 0.0 && $complex->getReal() >= 0.0) {
+ return new Complex(\pow($complex->getReal(), $power));
+ }
+
+ $rValue = \sqrt(($complex->getReal() * $complex->getReal()) + ($complex->getImaginary() * $complex->getImaginary()));
+ $rPower = \pow($rValue, $power);
+ $theta = $complex->argument() * $power;
+ if ($theta == 0) {
+ return new Complex(1);
+ }
+
+ return new Complex($rPower * \cos($theta), $rPower * \sin($theta), $complex->getSuffix());
}
-
- if ($complex->getImaginary() == 0.0 && $complex->getReal() >= 0.0) {
- return new Complex(\pow($complex->getReal(), $power));
- }
-
- $rValue = \sqrt(($complex->getReal() * $complex->getReal()) + ($complex->getImaginary() * $complex->getImaginary()));
- $rPower = \pow($rValue, $power);
- $theta = $complex->argument() * $power;
- if ($theta == 0) {
- return new Complex(1);
- }
-
- return new Complex($rPower * \cos($theta), $rPower * \sin($theta), $complex->getSuffix());
}
diff --git a/vendor/markbaker/complex/classes/src/functions/rho.php b/vendor/markbaker/complex/classes/src/functions/rho.php
index d5264a76..b799f6f2 100755
--- a/vendor/markbaker/complex/classes/src/functions/rho.php
+++ b/vendor/markbaker/complex/classes/src/functions/rho.php
@@ -17,12 +17,14 @@ namespace Complex;
* @return float The rho value of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function rho($complex): float
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\rho')) {
+ function rho($complex): float
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return \sqrt(
- ($complex->getReal() * $complex->getReal()) +
- ($complex->getImaginary() * $complex->getImaginary())
- );
+ return \sqrt(
+ ($complex->getReal() * $complex->getReal()) +
+ ($complex->getImaginary() * $complex->getImaginary())
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/sec.php b/vendor/markbaker/complex/classes/src/functions/sec.php
index 1c7768d4..48f8d53f 100755
--- a/vendor/markbaker/complex/classes/src/functions/sec.php
+++ b/vendor/markbaker/complex/classes/src/functions/sec.php
@@ -17,9 +17,11 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function sec($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\sec')) {
+ function sec($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return inverse(cos($complex));
+ return inverse(cos($complex));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/sech.php b/vendor/markbaker/complex/classes/src/functions/sech.php
index a86bb474..8d32af83 100755
--- a/vendor/markbaker/complex/classes/src/functions/sech.php
+++ b/vendor/markbaker/complex/classes/src/functions/sech.php
@@ -17,9 +17,11 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function sech($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\sech')) {
+ function sech($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- return inverse(cosh($complex));
+ return inverse(cosh($complex));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/sin.php b/vendor/markbaker/complex/classes/src/functions/sin.php
index 14423b91..6d9fd1d7 100755
--- a/vendor/markbaker/complex/classes/src/functions/sin.php
+++ b/vendor/markbaker/complex/classes/src/functions/sin.php
@@ -16,17 +16,19 @@ namespace Complex;
* @return Complex The sine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function sin($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\sin')) {
+ function sin($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\sin($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\sin($complex->getReal()));
+ }
+
+ return new Complex(
+ \sin($complex->getReal()) * \cosh($complex->getImaginary()),
+ \cos($complex->getReal()) * \sinh($complex->getImaginary()),
+ $complex->getSuffix()
+ );
}
-
- return new Complex(
- \sin($complex->getReal()) * \cosh($complex->getImaginary()),
- \cos($complex->getReal()) * \sinh($complex->getImaginary()),
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/sinh.php b/vendor/markbaker/complex/classes/src/functions/sinh.php
index f051a8e2..b178befa 100755
--- a/vendor/markbaker/complex/classes/src/functions/sinh.php
+++ b/vendor/markbaker/complex/classes/src/functions/sinh.php
@@ -16,17 +16,19 @@ namespace Complex;
* @return Complex The hyperbolic sine of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function sinh($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\sinh')) {
+ function sinh($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\sinh($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\sinh($complex->getReal()));
+ }
+
+ return new Complex(
+ \sinh($complex->getReal()) * \cos($complex->getImaginary()),
+ \cosh($complex->getReal()) * \sin($complex->getImaginary()),
+ $complex->getSuffix()
+ );
}
-
- return new Complex(
- \sinh($complex->getReal()) * \cos($complex->getImaginary()),
- \cosh($complex->getReal()) * \sin($complex->getImaginary()),
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/sqrt.php b/vendor/markbaker/complex/classes/src/functions/sqrt.php
index 17c19c70..ebf67730 100755
--- a/vendor/markbaker/complex/classes/src/functions/sqrt.php
+++ b/vendor/markbaker/complex/classes/src/functions/sqrt.php
@@ -16,14 +16,16 @@ namespace Complex;
* @return Complex The Square root of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function sqrt($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\sqrt')) {
+ function sqrt($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- $theta = theta($complex);
- $delta1 = \cos($theta / 2);
- $delta2 = \sin($theta / 2);
- $rho = \sqrt(rho($complex));
+ $theta = theta($complex);
+ $delta1 = \cos($theta / 2);
+ $delta2 = \sin($theta / 2);
+ $rho = \sqrt(rho($complex));
- return new Complex($delta1 * $rho, $delta2 * $rho, $complex->getSuffix());
+ return new Complex($delta1 * $rho, $delta2 * $rho, $complex->getSuffix());
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/tan.php b/vendor/markbaker/complex/classes/src/functions/tan.php
index 6996a3a6..0e6d6246 100755
--- a/vendor/markbaker/complex/classes/src/functions/tan.php
+++ b/vendor/markbaker/complex/classes/src/functions/tan.php
@@ -17,24 +17,26 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function tan($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\tan')) {
+ function tan($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->isReal()) {
- return new Complex(\tan($complex->getReal()));
+ if ($complex->isReal()) {
+ return new Complex(\tan($complex->getReal()));
+ }
+
+ $real = $complex->getReal();
+ $imaginary = $complex->getImaginary();
+ $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2);
+ if ($divisor == 0.0) {
+ throw new \InvalidArgumentException('Division by zero');
+ }
+
+ return new Complex(
+ \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor,
+ \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor,
+ $complex->getSuffix()
+ );
}
-
- $real = $complex->getReal();
- $imaginary = $complex->getImaginary();
- $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2);
- if ($divisor == 0.0) {
- throw new \InvalidArgumentException('Division by zero');
- }
-
- return new Complex(
- \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor,
- \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor,
- $complex->getSuffix()
- );
}
diff --git a/vendor/markbaker/complex/classes/src/functions/tanh.php b/vendor/markbaker/complex/classes/src/functions/tanh.php
index a401042a..84547d8f 100755
--- a/vendor/markbaker/complex/classes/src/functions/tanh.php
+++ b/vendor/markbaker/complex/classes/src/functions/tanh.php
@@ -17,19 +17,21 @@ namespace Complex;
* @throws Exception If argument isn't a valid real or complex number.
* @throws \InvalidArgumentException If function would result in a division by zero
*/
-function tanh($complex): Complex
-{
- $complex = Complex::validateComplexArgument($complex);
- $real = $complex->getReal();
- $imaginary = $complex->getImaginary();
- $divisor = \cos($imaginary) * \cos($imaginary) + \sinh($real) * \sinh($real);
- if ($divisor == 0.0) {
- throw new \InvalidArgumentException('Division by zero');
- }
+if (!function_exists(__NAMESPACE__ . '\\tanh')) {
+ function tanh($complex): Complex
+ {
+ $complex = Complex::validateComplexArgument($complex);
+ $real = $complex->getReal();
+ $imaginary = $complex->getImaginary();
+ $divisor = \cos($imaginary) * \cos($imaginary) + \sinh($real) * \sinh($real);
+ if ($divisor == 0.0) {
+ throw new \InvalidArgumentException('Division by zero');
+ }
- return new Complex(
- \sinh($real) * \cosh($real) / $divisor,
- 0.5 * \sin(2 * $imaginary) / $divisor,
- $complex->getSuffix()
- );
+ return new Complex(
+ \sinh($real) * \cosh($real) / $divisor,
+ 0.5 * \sin(2 * $imaginary) / $divisor,
+ $complex->getSuffix()
+ );
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/functions/theta.php b/vendor/markbaker/complex/classes/src/functions/theta.php
index f022abb4..ef925c12 100755
--- a/vendor/markbaker/complex/classes/src/functions/theta.php
+++ b/vendor/markbaker/complex/classes/src/functions/theta.php
@@ -17,22 +17,24 @@ namespace Complex;
* @return float The theta value of the complex argument.
* @throws Exception If argument isn't a valid real or complex number.
*/
-function theta($complex): float
-{
- $complex = Complex::validateComplexArgument($complex);
+if (!function_exists(__NAMESPACE__ . '\\theta')) {
+ function theta($complex): float
+ {
+ $complex = Complex::validateComplexArgument($complex);
- if ($complex->getReal() == 0.0) {
- if ($complex->isReal()) {
- return 0.0;
+ if ($complex->getReal() == 0.0) {
+ if ($complex->isReal()) {
+ return 0.0;
+ } elseif ($complex->getImaginary() < 0.0) {
+ return M_PI / -2;
+ }
+ return M_PI / 2;
+ } elseif ($complex->getReal() > 0.0) {
+ return \atan($complex->getImaginary() / $complex->getReal());
} elseif ($complex->getImaginary() < 0.0) {
- return M_PI / -2;
+ return -(M_PI - \atan(\abs($complex->getImaginary()) / \abs($complex->getReal())));
}
- return M_PI / 2;
- } elseif ($complex->getReal() > 0.0) {
- return \atan($complex->getImaginary() / $complex->getReal());
- } elseif ($complex->getImaginary() < 0.0) {
- return -(M_PI - \atan(\abs($complex->getImaginary()) / \abs($complex->getReal())));
- }
- return M_PI - \atan($complex->getImaginary() / \abs($complex->getReal()));
+ return M_PI - \atan($complex->getImaginary() / \abs($complex->getReal()));
+ }
}
diff --git a/vendor/markbaker/complex/classes/src/operations/add.php b/vendor/markbaker/complex/classes/src/operations/add.php
index 6963bb04..9bbc5a55 100755
--- a/vendor/markbaker/complex/classes/src/operations/add.php
+++ b/vendor/markbaker/complex/classes/src/operations/add.php
@@ -15,32 +15,34 @@ namespace Complex;
* @param array of string|integer|float|Complex $complexValues The numbers to add
* @return Complex
*/
-function add(...$complexValues): Complex
-{
- if (count($complexValues) < 2) {
- throw new \Exception('This function requires at least 2 arguments');
- }
-
- $base = array_shift($complexValues);
- $result = clone Complex::validateComplexArgument($base);
-
- foreach ($complexValues as $complex) {
- $complex = Complex::validateComplexArgument($complex);
-
- if ($result->isComplex() && $complex->isComplex() &&
- $result->getSuffix() !== $complex->getSuffix()) {
- throw new Exception('Suffix Mismatch');
+if (!function_exists(__NAMESPACE__ . '\\add')) {
+ function add(...$complexValues): Complex
+ {
+ if (count($complexValues) < 2) {
+ throw new \Exception('This function requires at least 2 arguments');
}
- $real = $result->getReal() + $complex->getReal();
- $imaginary = $result->getImaginary() + $complex->getImaginary();
+ $base = array_shift($complexValues);
+ $result = clone Complex::validateComplexArgument($base);
- $result = new Complex(
- $real,
- $imaginary,
- ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
- );
+ foreach ($complexValues as $complex) {
+ $complex = Complex::validateComplexArgument($complex);
+
+ if ($result->isComplex() && $complex->isComplex() &&
+ $result->getSuffix() !== $complex->getSuffix()) {
+ throw new Exception('Suffix Mismatch');
+ }
+
+ $real = $result->getReal() + $complex->getReal();
+ $imaginary = $result->getImaginary() + $complex->getImaginary();
+
+ $result = new Complex(
+ $real,
+ $imaginary,
+ ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
+ );
+ }
+
+ return $result;
}
-
- return $result;
}
diff --git a/vendor/markbaker/complex/classes/src/operations/divideby.php b/vendor/markbaker/complex/classes/src/operations/divideby.php
index a680931c..32b91b2b 100755
--- a/vendor/markbaker/complex/classes/src/operations/divideby.php
+++ b/vendor/markbaker/complex/classes/src/operations/divideby.php
@@ -15,42 +15,44 @@ namespace Complex;
* @param array of string|integer|float|Complex $complexValues The numbers to divide
* @return Complex
*/
-function divideby(...$complexValues): Complex
-{
- if (count($complexValues) < 2) {
- throw new \Exception('This function requires at least 2 arguments');
- }
-
- $base = array_shift($complexValues);
- $result = clone Complex::validateComplexArgument($base);
-
- foreach ($complexValues as $complex) {
- $complex = Complex::validateComplexArgument($complex);
-
- if ($result->isComplex() && $complex->isComplex() &&
- $result->getSuffix() !== $complex->getSuffix()) {
- throw new Exception('Suffix Mismatch');
- }
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- throw new \InvalidArgumentException('Division by zero');
+if (!function_exists(__NAMESPACE__ . '\\divideby')) {
+ function divideby(...$complexValues): Complex
+ {
+ if (count($complexValues) < 2) {
+ throw new \Exception('This function requires at least 2 arguments');
}
- $delta1 = ($result->getReal() * $complex->getReal()) +
- ($result->getImaginary() * $complex->getImaginary());
- $delta2 = ($result->getImaginary() * $complex->getReal()) -
- ($result->getReal() * $complex->getImaginary());
- $delta3 = ($complex->getReal() * $complex->getReal()) +
- ($complex->getImaginary() * $complex->getImaginary());
+ $base = array_shift($complexValues);
+ $result = clone Complex::validateComplexArgument($base);
- $real = $delta1 / $delta3;
- $imaginary = $delta2 / $delta3;
+ foreach ($complexValues as $complex) {
+ $complex = Complex::validateComplexArgument($complex);
- $result = new Complex(
- $real,
- $imaginary,
- ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
- );
+ if ($result->isComplex() && $complex->isComplex() &&
+ $result->getSuffix() !== $complex->getSuffix()) {
+ throw new Exception('Suffix Mismatch');
+ }
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ throw new \InvalidArgumentException('Division by zero');
+ }
+
+ $delta1 = ($result->getReal() * $complex->getReal()) +
+ ($result->getImaginary() * $complex->getImaginary());
+ $delta2 = ($result->getImaginary() * $complex->getReal()) -
+ ($result->getReal() * $complex->getImaginary());
+ $delta3 = ($complex->getReal() * $complex->getReal()) +
+ ($complex->getImaginary() * $complex->getImaginary());
+
+ $real = $delta1 / $delta3;
+ $imaginary = $delta2 / $delta3;
+
+ $result = new Complex(
+ $real,
+ $imaginary,
+ ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
+ );
+ }
+
+ return $result;
}
-
- return $result;
}
diff --git a/vendor/markbaker/complex/classes/src/operations/divideinto.php b/vendor/markbaker/complex/classes/src/operations/divideinto.php
index 70869933..5e67ade2 100755
--- a/vendor/markbaker/complex/classes/src/operations/divideinto.php
+++ b/vendor/markbaker/complex/classes/src/operations/divideinto.php
@@ -15,42 +15,44 @@ namespace Complex;
* @param array of string|integer|float|Complex $complexValues The numbers to divide
* @return Complex
*/
-function divideinto(...$complexValues): Complex
-{
- if (count($complexValues) < 2) {
- throw new \Exception('This function requires at least 2 arguments');
- }
-
- $base = array_shift($complexValues);
- $result = clone Complex::validateComplexArgument($base);
-
- foreach ($complexValues as $complex) {
- $complex = Complex::validateComplexArgument($complex);
-
- if ($result->isComplex() && $complex->isComplex() &&
- $result->getSuffix() !== $complex->getSuffix()) {
- throw new Exception('Suffix Mismatch');
- }
- if ($result->getReal() == 0.0 && $result->getImaginary() == 0.0) {
- throw new \InvalidArgumentException('Division by zero');
+if (!function_exists(__NAMESPACE__ . '\\divideinto')) {
+ function divideinto(...$complexValues): Complex
+ {
+ if (count($complexValues) < 2) {
+ throw new \Exception('This function requires at least 2 arguments');
}
- $delta1 = ($complex->getReal() * $result->getReal()) +
- ($complex->getImaginary() * $result->getImaginary());
- $delta2 = ($complex->getImaginary() * $result->getReal()) -
- ($complex->getReal() * $result->getImaginary());
- $delta3 = ($result->getReal() * $result->getReal()) +
- ($result->getImaginary() * $result->getImaginary());
+ $base = array_shift($complexValues);
+ $result = clone Complex::validateComplexArgument($base);
- $real = $delta1 / $delta3;
- $imaginary = $delta2 / $delta3;
+ foreach ($complexValues as $complex) {
+ $complex = Complex::validateComplexArgument($complex);
- $result = new Complex(
- $real,
- $imaginary,
- ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
- );
+ if ($result->isComplex() && $complex->isComplex() &&
+ $result->getSuffix() !== $complex->getSuffix()) {
+ throw new Exception('Suffix Mismatch');
+ }
+ if ($result->getReal() == 0.0 && $result->getImaginary() == 0.0) {
+ throw new \InvalidArgumentException('Division by zero');
+ }
+
+ $delta1 = ($complex->getReal() * $result->getReal()) +
+ ($complex->getImaginary() * $result->getImaginary());
+ $delta2 = ($complex->getImaginary() * $result->getReal()) -
+ ($complex->getReal() * $result->getImaginary());
+ $delta3 = ($result->getReal() * $result->getReal()) +
+ ($result->getImaginary() * $result->getImaginary());
+
+ $real = $delta1 / $delta3;
+ $imaginary = $delta2 / $delta3;
+
+ $result = new Complex(
+ $real,
+ $imaginary,
+ ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
+ );
+ }
+
+ return $result;
}
-
- return $result;
}
diff --git a/vendor/markbaker/complex/classes/src/operations/multiply.php b/vendor/markbaker/complex/classes/src/operations/multiply.php
index 06a52b27..259ad002 100755
--- a/vendor/markbaker/complex/classes/src/operations/multiply.php
+++ b/vendor/markbaker/complex/classes/src/operations/multiply.php
@@ -15,34 +15,36 @@ namespace Complex;
* @param array of string|integer|float|Complex $complexValues The numbers to multiply
* @return Complex
*/
-function multiply(...$complexValues): Complex
-{
- if (count($complexValues) < 2) {
- throw new \Exception('This function requires at least 2 arguments');
- }
-
- $base = array_shift($complexValues);
- $result = clone Complex::validateComplexArgument($base);
-
- foreach ($complexValues as $complex) {
- $complex = Complex::validateComplexArgument($complex);
-
- if ($result->isComplex() && $complex->isComplex() &&
- $result->getSuffix() !== $complex->getSuffix()) {
- throw new Exception('Suffix Mismatch');
+if (!function_exists(__NAMESPACE__ . '\\multiply')) {
+ function multiply(...$complexValues): Complex
+ {
+ if (count($complexValues) < 2) {
+ throw new \Exception('This function requires at least 2 arguments');
}
- $real = ($result->getReal() * $complex->getReal()) -
- ($result->getImaginary() * $complex->getImaginary());
- $imaginary = ($result->getReal() * $complex->getImaginary()) +
- ($result->getImaginary() * $complex->getReal());
+ $base = array_shift($complexValues);
+ $result = clone Complex::validateComplexArgument($base);
- $result = new Complex(
- $real,
- $imaginary,
- ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
- );
+ foreach ($complexValues as $complex) {
+ $complex = Complex::validateComplexArgument($complex);
+
+ if ($result->isComplex() && $complex->isComplex() &&
+ $result->getSuffix() !== $complex->getSuffix()) {
+ throw new Exception('Suffix Mismatch');
+ }
+
+ $real = ($result->getReal() * $complex->getReal()) -
+ ($result->getImaginary() * $complex->getImaginary());
+ $imaginary = ($result->getReal() * $complex->getImaginary()) +
+ ($result->getImaginary() * $complex->getReal());
+
+ $result = new Complex(
+ $real,
+ $imaginary,
+ ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
+ );
+ }
+
+ return $result;
}
-
- return $result;
}
diff --git a/vendor/markbaker/complex/classes/src/operations/subtract.php b/vendor/markbaker/complex/classes/src/operations/subtract.php
index 0d9985cc..3ca34f28 100755
--- a/vendor/markbaker/complex/classes/src/operations/subtract.php
+++ b/vendor/markbaker/complex/classes/src/operations/subtract.php
@@ -15,32 +15,34 @@ namespace Complex;
* @param array of string|integer|float|Complex $complexValues The numbers to subtract
* @return Complex
*/
-function subtract(...$complexValues): Complex
-{
- if (count($complexValues) < 2) {
- throw new \Exception('This function requires at least 2 arguments');
- }
-
- $base = array_shift($complexValues);
- $result = clone Complex::validateComplexArgument($base);
-
- foreach ($complexValues as $complex) {
- $complex = Complex::validateComplexArgument($complex);
-
- if ($result->isComplex() && $complex->isComplex() &&
- $result->getSuffix() !== $complex->getSuffix()) {
- throw new Exception('Suffix Mismatch');
+if (!function_exists(__NAMESPACE__ . '\\subtract')) {
+ function subtract(...$complexValues): Complex
+ {
+ if (count($complexValues) < 2) {
+ throw new \Exception('This function requires at least 2 arguments');
}
- $real = $result->getReal() - $complex->getReal();
- $imaginary = $result->getImaginary() - $complex->getImaginary();
+ $base = array_shift($complexValues);
+ $result = clone Complex::validateComplexArgument($base);
- $result = new Complex(
- $real,
- $imaginary,
- ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
- );
+ foreach ($complexValues as $complex) {
+ $complex = Complex::validateComplexArgument($complex);
+
+ if ($result->isComplex() && $complex->isComplex() &&
+ $result->getSuffix() !== $complex->getSuffix()) {
+ throw new Exception('Suffix Mismatch');
+ }
+
+ $real = $result->getReal() - $complex->getReal();
+ $imaginary = $result->getImaginary() - $complex->getImaginary();
+
+ $result = new Complex(
+ $real,
+ $imaginary,
+ ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix())
+ );
+ }
+
+ return $result;
}
-
- return $result;
}
diff --git a/vendor/markbaker/complex/composer.json b/vendor/markbaker/complex/composer.json
index a343d6e8..4037f1c6 100755
--- a/vendor/markbaker/complex/composer.json
+++ b/vendor/markbaker/complex/composer.json
@@ -16,10 +16,6 @@
},
"require-dev": {
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.3",
- "phpdocumentor/phpdocumentor": "2.*",
- "phpmd/phpmd": "2.*",
- "sebastian/phpcpd": "^4.0",
- "phploc/phploc": "^4.0",
"squizlabs/php_codesniffer": "^3.4",
"phpcompatibility/php-compatibility": "^9.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0"
@@ -75,9 +71,6 @@
},
"scripts": {
"style": "phpcs --report-width=200 --standard=PSR2 --report=summary,full classes/src/ unitTests/classes/src -n",
- "mess": "phpmd classes/src/ xml codesize,unusedcode,design,naming -n",
- "lines": "phploc classes/src/ -n",
- "cpd": "phpcpd classes/src/ -n",
"versions": "phpcs --report-width=200 --standard=PHPCompatibility --report=summary,full classes/src/ --runtime-set testVersion 7.2- -n"
},
"minimum-stability": "dev"
diff --git a/vendor/markbaker/matrix/classes/src/Builder.php b/vendor/markbaker/matrix/classes/src/Builder.php
index 90eb6fc9..161bb688 100755
--- a/vendor/markbaker/matrix/classes/src/Builder.php
+++ b/vendor/markbaker/matrix/classes/src/Builder.php
@@ -57,9 +57,9 @@ class Builder
* @return Matrix
* @throws Exception
*/
- public static function createIdentityMatrix($dimensions)
+ public static function createIdentityMatrix($dimensions, $fillValue = null)
{
- $grid = static::createFilledMatrix(null, $dimensions)->toArray();
+ $grid = static::createFilledMatrix($fillValue, $dimensions)->toArray();
for ($x = 0; $x < $dimensions; ++$x) {
$grid[$x][$x] = 1;
diff --git a/vendor/markbaker/matrix/classes/src/Div0Exception.php b/vendor/markbaker/matrix/classes/src/Div0Exception.php
new file mode 100644
index 00000000..eba28f8a
--- /dev/null
+++ b/vendor/markbaker/matrix/classes/src/Div0Exception.php
@@ -0,0 +1,13 @@
+isSquare()) {
- throw new Exception('Inverse can only be calculated for a square matrix');
+ throw new Exception(ucfirst($type) . ' can only be calculated for a square matrix');
}
$determinant = self::getDeterminant($matrix);
if ($determinant == 0.0) {
- throw new Exception('Inverse can only be calculated for a matrix with a non-zero determinant');
+ throw new Div0Exception(ucfirst($type) . ' can only be calculated for a matrix with a non-zero determinant');
}
if ($matrix->rows == 1) {
diff --git a/vendor/markbaker/matrix/classes/src/Operators/Division.php b/vendor/markbaker/matrix/classes/src/Operators/Division.php
index b262f596..dbfec9d3 100755
--- a/vendor/markbaker/matrix/classes/src/Operators/Division.php
+++ b/vendor/markbaker/matrix/classes/src/Operators/Division.php
@@ -2,9 +2,10 @@
namespace Matrix\Operators;
+use Matrix\Div0Exception;
+use Matrix\Exception;
use \Matrix\Matrix;
use \Matrix\Functions;
-use Matrix\Exception;
class Division extends Multiplication
{
@@ -15,22 +16,18 @@ class Division extends Multiplication
* @throws Exception If the provided argument is not appropriate for the operation
* @return $this The operation object, allowing multiple divisions to be chained
**/
- public function execute($value): Operator
+ public function execute($value, string $type = 'division'): Operator
{
if (is_array($value)) {
$value = new Matrix($value);
}
if (is_object($value) && ($value instanceof Matrix)) {
- try {
- $value = Functions::inverse($value);
- } catch (Exception $e) {
- throw new Exception('Division can only be calculated using a matrix with a non-zero determinant');
- }
+ $value = Functions::inverse($value, $type);
- return $this->multiplyMatrix($value);
+ return $this->multiplyMatrix($value, $type);
} elseif (is_numeric($value)) {
- return $this->multiplyScalar(1 / $value);
+ return $this->multiplyScalar(1 / $value, $type);
}
throw new Exception('Invalid argument for division');
diff --git a/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php b/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php
index e75d0ade..0761e466 100755
--- a/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php
+++ b/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php
@@ -5,6 +5,7 @@ namespace Matrix\Operators;
use Matrix\Matrix;
use \Matrix\Builder;
use Matrix\Exception;
+use Throwable;
class Multiplication extends Operator
{
@@ -15,19 +16,19 @@ class Multiplication extends Operator
* @throws Exception If the provided argument is not appropriate for the operation
* @return $this The operation object, allowing multiple multiplications to be chained
**/
- public function execute($value): Operator
+ public function execute($value, string $type = 'multiplication'): Operator
{
if (is_array($value)) {
$value = new Matrix($value);
}
if (is_object($value) && ($value instanceof Matrix)) {
- return $this->multiplyMatrix($value);
+ return $this->multiplyMatrix($value, $type);
} elseif (is_numeric($value)) {
- return $this->multiplyScalar($value);
+ return $this->multiplyScalar($value, $type);
}
- throw new Exception('Invalid argument for multiplication');
+ throw new Exception("Invalid argument for $type");
}
/**
@@ -36,12 +37,16 @@ class Multiplication extends Operator
* @param mixed $value The numeric value to multiply with the current base value
* @return $this The operation object, allowing multiple mutiplications to be chained
**/
- protected function multiplyScalar($value): Operator
+ protected function multiplyScalar($value, string $type = 'multiplication'): Operator
{
- for ($row = 0; $row < $this->rows; ++$row) {
- for ($column = 0; $column < $this->columns; ++$column) {
- $this->matrix[$row][$column] *= $value;
+ try {
+ for ($row = 0; $row < $this->rows; ++$row) {
+ for ($column = 0; $column < $this->columns; ++$column) {
+ $this->matrix[$row][$column] *= $value;
+ }
}
+ } catch (Throwable $e) {
+ throw new Exception("Invalid argument for $type");
}
return $this;
@@ -54,7 +59,7 @@ class Multiplication extends Operator
* @return $this The operation object, allowing multiple mutiplications to be chained
* @throws Exception If the provided argument is not appropriate for the operation
**/
- protected function multiplyMatrix(Matrix $value): Operator
+ protected function multiplyMatrix(Matrix $value, string $type = 'multiplication'): Operator
{
$this->validateReflectingDimensions($value);
@@ -62,13 +67,17 @@ class Multiplication extends Operator
$newColumns = $value->columns;
$matrix = Builder::createFilledMatrix(0, $newRows, $newColumns)
->toArray();
- for ($row = 0; $row < $newRows; ++$row) {
- for ($column = 0; $column < $newColumns; ++$column) {
- $columnData = $value->getColumns($column + 1)->toArray();
- foreach ($this->matrix[$row] as $key => $valueData) {
- $matrix[$row][$column] += $valueData * $columnData[$key][0];
+ try {
+ for ($row = 0; $row < $newRows; ++$row) {
+ for ($column = 0; $column < $newColumns; ++$column) {
+ $columnData = $value->getColumns($column + 1)->toArray();
+ foreach ($this->matrix[$row] as $key => $valueData) {
+ $matrix[$row][$column] += $valueData * $columnData[$key][0];
+ }
}
}
+ } catch (Throwable $e) {
+ throw new Exception("Invalid argument for $type");
}
$this->matrix = $matrix;
diff --git a/vendor/markbaker/matrix/classes/src/functions/adjoint.php b/vendor/markbaker/matrix/classes/src/functions/adjoint.php
index ec1933f1..eef0bb70 100755
--- a/vendor/markbaker/matrix/classes/src/functions/adjoint.php
+++ b/vendor/markbaker/matrix/classes/src/functions/adjoint.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function adjoint($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\adjoint')) {
+ function adjoint($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::adjoint($matrix);
+ return Functions::adjoint($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/antidiagonal.php b/vendor/markbaker/matrix/classes/src/functions/antidiagonal.php
index efeae536..ac308ed3 100755
--- a/vendor/markbaker/matrix/classes/src/functions/antidiagonal.php
+++ b/vendor/markbaker/matrix/classes/src/functions/antidiagonal.php
@@ -16,14 +16,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function antidiagonal($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\antidiagonal')) {
+ function antidiagonal($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::antidiagonal($matrix);
+ return Functions::antidiagonal($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/cofactors.php b/vendor/markbaker/matrix/classes/src/functions/cofactors.php
index 5b3ce93b..7eed4a34 100755
--- a/vendor/markbaker/matrix/classes/src/functions/cofactors.php
+++ b/vendor/markbaker/matrix/classes/src/functions/cofactors.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function cofactors($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\cofactors')) {
+ function cofactors($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::cofactors($matrix);
+ return Functions::cofactors($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/determinant.php b/vendor/markbaker/matrix/classes/src/functions/determinant.php
index cda4144a..a3896ad6 100755
--- a/vendor/markbaker/matrix/classes/src/functions/determinant.php
+++ b/vendor/markbaker/matrix/classes/src/functions/determinant.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return float Matrix determinant
* @throws Exception If argument isn't a valid matrix or array.
*/
-function determinant($matrix): float
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\determinant')) {
+ function determinant($matrix): float
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::determinant($matrix);
+ return Functions::determinant($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/diagonal.php b/vendor/markbaker/matrix/classes/src/functions/diagonal.php
index be536c3c..48f6059f 100755
--- a/vendor/markbaker/matrix/classes/src/functions/diagonal.php
+++ b/vendor/markbaker/matrix/classes/src/functions/diagonal.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function diagonal($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\diagonal')) {
+ function diagonal($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::diagonal($matrix);
+ return Functions::diagonal($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/identity.php b/vendor/markbaker/matrix/classes/src/functions/identity.php
index a261e28f..3589f3f9 100755
--- a/vendor/markbaker/matrix/classes/src/functions/identity.php
+++ b/vendor/markbaker/matrix/classes/src/functions/identity.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The identity matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function identity($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\identity')) {
+ function identity($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::identity($matrix);
+ return Functions::identity($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/inverse.php b/vendor/markbaker/matrix/classes/src/functions/inverse.php
index 82ff6d40..ada1bbf2 100755
--- a/vendor/markbaker/matrix/classes/src/functions/inverse.php
+++ b/vendor/markbaker/matrix/classes/src/functions/inverse.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function inverse($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\inverse')) {
+ function inverse($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::inverse($matrix);
+ return Functions::inverse($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/minors.php b/vendor/markbaker/matrix/classes/src/functions/minors.php
index fc798b6b..21a53e7d 100755
--- a/vendor/markbaker/matrix/classes/src/functions/minors.php
+++ b/vendor/markbaker/matrix/classes/src/functions/minors.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The new matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function minors($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\minors')) {
+ function minors($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::minors($matrix);
+ return Functions::minors($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/trace.php b/vendor/markbaker/matrix/classes/src/functions/trace.php
index 6f9df903..67201740 100755
--- a/vendor/markbaker/matrix/classes/src/functions/trace.php
+++ b/vendor/markbaker/matrix/classes/src/functions/trace.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return float The trace of the matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function trace($matrix): float
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\trace')) {
+ function trace($matrix): float
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::trace($matrix);
+ return Functions::trace($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/functions/transpose.php b/vendor/markbaker/matrix/classes/src/functions/transpose.php
index 7daebee7..e020a5bf 100755
--- a/vendor/markbaker/matrix/classes/src/functions/transpose.php
+++ b/vendor/markbaker/matrix/classes/src/functions/transpose.php
@@ -17,14 +17,16 @@ namespace Matrix;
* @return Matrix The transposed matrix
* @throws Exception If argument isn't a valid matrix or array.
*/
-function transpose($matrix): Matrix
-{
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Must be Matrix or array');
- }
+if (!function_exists(__NAMESPACE__ . '\\transpose')) {
+ function transpose($matrix): Matrix
+ {
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Must be Matrix or array');
+ }
- return Functions::transpose($matrix);
+ return Functions::transpose($matrix);
+ }
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/add.php b/vendor/markbaker/matrix/classes/src/operations/add.php
index 6ce150f3..28bcac18 100755
--- a/vendor/markbaker/matrix/classes/src/operations/add.php
+++ b/vendor/markbaker/matrix/classes/src/operations/add.php
@@ -19,26 +19,28 @@ use Matrix\Operators\Addition;
* @return Matrix
* @throws Exception
*/
-function add(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('Addition operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\add')) {
+ function add(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('Addition operation requires at least 2 arguments');
+ }
+
+ $matrix = array_shift($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Addition arguments must be Matrix or array');
+ }
+
+ $result = new Addition($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_shift($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Addition arguments must be Matrix or array');
- }
-
- $result = new Addition($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/directsum.php b/vendor/markbaker/matrix/classes/src/operations/directsum.php
index 0fb540d7..dc2d3da6 100755
--- a/vendor/markbaker/matrix/classes/src/operations/directsum.php
+++ b/vendor/markbaker/matrix/classes/src/operations/directsum.php
@@ -19,26 +19,28 @@ use Matrix\Operators\DirectSum;
* @return Matrix
* @throws Exception
*/
-function directsum(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('DirectSum operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\directsum')) {
+ function directsum(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('DirectSum operation requires at least 2 arguments');
+ }
+
+ $matrix = array_shift($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('DirectSum arguments must be Matrix or array');
+ }
+
+ $result = new DirectSum($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_shift($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('DirectSum arguments must be Matrix or array');
- }
-
- $result = new DirectSum($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/divideby.php b/vendor/markbaker/matrix/classes/src/operations/divideby.php
index 3c6074bb..f74b14eb 100755
--- a/vendor/markbaker/matrix/classes/src/operations/divideby.php
+++ b/vendor/markbaker/matrix/classes/src/operations/divideby.php
@@ -19,26 +19,28 @@ use Matrix\Operators\Division;
* @return Matrix
* @throws Exception
*/
-function divideby(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('Division operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\divideby')) {
+ function divideby(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('Division operation requires at least 2 arguments');
+ }
+
+ $matrix = array_shift($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Division arguments must be Matrix or array');
+ }
+
+ $result = new Division($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_shift($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Division arguments must be Matrix or array');
- }
-
- $result = new Division($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/divideinto.php b/vendor/markbaker/matrix/classes/src/operations/divideinto.php
index 0567d3d9..8ffef561 100755
--- a/vendor/markbaker/matrix/classes/src/operations/divideinto.php
+++ b/vendor/markbaker/matrix/classes/src/operations/divideinto.php
@@ -19,27 +19,29 @@ use Matrix\Operators\Division;
* @return Matrix
* @throws Exception
*/
-function divideinto(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('Division operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\divideinto')) {
+ function divideinto(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('Division operation requires at least 2 arguments');
+ }
+
+ $matrix = array_pop($matrixValues);
+ $matrixValues = array_reverse($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Division arguments must be Matrix or array');
+ }
+
+ $result = new Division($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_pop($matrixValues);
- $matrixValues = array_reverse($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Division arguments must be Matrix or array');
- }
-
- $result = new Division($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/multiply.php b/vendor/markbaker/matrix/classes/src/operations/multiply.php
index 10bca05f..7afc5a07 100755
--- a/vendor/markbaker/matrix/classes/src/operations/multiply.php
+++ b/vendor/markbaker/matrix/classes/src/operations/multiply.php
@@ -19,26 +19,28 @@ use Matrix\Operators\Multiplication;
* @return Matrix
* @throws Exception
*/
-function multiply(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('Multiplication operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\multiply')) {
+ function multiply(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('Multiplication operation requires at least 2 arguments');
+ }
+
+ $matrix = array_shift($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Multiplication arguments must be Matrix or array');
+ }
+
+ $result = new Multiplication($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_shift($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Multiplication arguments must be Matrix or array');
- }
-
- $result = new Multiplication($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/markbaker/matrix/classes/src/operations/subtract.php b/vendor/markbaker/matrix/classes/src/operations/subtract.php
index 55a827f6..95c4e828 100755
--- a/vendor/markbaker/matrix/classes/src/operations/subtract.php
+++ b/vendor/markbaker/matrix/classes/src/operations/subtract.php
@@ -19,26 +19,28 @@ use Matrix\Operators\Subtraction;
* @return Matrix
* @throws Exception
*/
-function subtract(...$matrixValues): Matrix
-{
- if (count($matrixValues) < 2) {
- throw new Exception('Subtraction operation requires at least 2 arguments');
+if (!function_exists(__NAMESPACE__ . '\\subtract')) {
+ function subtract(...$matrixValues): Matrix
+ {
+ if (count($matrixValues) < 2) {
+ throw new Exception('Subtraction operation requires at least 2 arguments');
+ }
+
+ $matrix = array_shift($matrixValues);
+
+ if (is_array($matrix)) {
+ $matrix = new Matrix($matrix);
+ }
+ if (!$matrix instanceof Matrix) {
+ throw new Exception('Subtraction arguments must be Matrix or array');
+ }
+
+ $result = new Subtraction($matrix);
+
+ foreach ($matrixValues as $matrix) {
+ $result->execute($matrix);
+ }
+
+ return $result->result();
}
-
- $matrix = array_shift($matrixValues);
-
- if (is_array($matrix)) {
- $matrix = new Matrix($matrix);
- }
- if (!$matrix instanceof Matrix) {
- throw new Exception('Subtraction arguments must be Matrix or array');
- }
-
- $result = new Subtraction($matrix);
-
- foreach ($matrixValues as $matrix) {
- $result->execute($matrix);
- }
-
- return $result->result();
}
diff --git a/vendor/phpoffice/phpspreadsheet/CHANGELOG.md b/vendor/phpoffice/phpspreadsheet/CHANGELOG.md
index 419869bd..42a88024 100755
--- a/vendor/phpoffice/phpspreadsheet/CHANGELOG.md
+++ b/vendor/phpoffice/phpspreadsheet/CHANGELOG.md
@@ -5,27 +5,45 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com)
and this project adheres to [Semantic Versioning](https://semver.org).
-## Unreleased - TBD
+## 1.18.0 - 2021-05-31
### Added
-
-- Nothing.
+- Enhancements to CSV Reader, allowing options to be set when using `IOFactory::load()` with a callback to set delimiter, enclosure, charset etc. [PR #2103](https://github.com/PHPOffice/PhpSpreadsheet/pull/2103) - See [documentation](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/docs/topics/reading-and-writing-to-file.md#csv-comma-separated-values) for details.
+- Implemented basic AutoFiltering for Ods Reader and Writer [PR #2053](https://github.com/PHPOffice/PhpSpreadsheet/pull/2053)
+- Implemented basic AutoFiltering for Gnumeric Reader [PR #2055](https://github.com/PHPOffice/PhpSpreadsheet/pull/2055)
+- Improved support for Row and Column ranges in formulae [Issue #1755](https://github.com/PHPOffice/PhpSpreadsheet/issues/1755) [PR #2028](https://github.com/PHPOffice/PhpSpreadsheet/pull/2028)
+- Implemented URLENCODE() Web Function
+- Implemented the CHITEST(), CHISQ.DIST() and CHISQ.INV() and equivalent Statistical functions, for both left- and right-tailed distributions.
+- Support for ActiveSheet and SelectedCells in the ODS Reader and Writer. [PR #1908](https://github.com/PHPOffice/PhpSpreadsheet/pull/1908)
+- Support for notContainsText Conditional Style in xlsx [Issue #984](https://github.com/PHPOffice/PhpSpreadsheet/issues/984)
### Changed
-- Nothing.
+- Use of `nb` rather than `no` as the locale code for Norsk Bokmål.
### Deprecated
-- Nothing.
+- All Excel Function implementations in `Calculation\Database`, `Calculation\DateTime`, `Calculation\Engineering`, `Calculation\Financial`, `Calculation\Logical`, `Calculation\LookupRef`, `Calculation\MathTrig`, `Calculation\Statistical`, `Calculation\TextData` and `Calculation\Web` have been moved to dedicated classes for individual functions or groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.
### Removed
-- Nothing.
+- Use of `nb` rather than `no` as the locale language code for Norsk Bokmål.
### Fixed
-
-- Nothing.
+- Fixed error in COUPNCD() calculation for end of month [Issue #2116](https://github.com/PHPOffice/PhpSpreadsheet/issues/2116) - [PR #2119](https://github.com/PHPOffice/PhpSpreadsheet/pull/2119)
+- Resolve default values when a null argument is passed for HLOOKUP(), VLOOKUP() and ADDRESS() functions [Issue #2120](https://github.com/PHPOffice/PhpSpreadsheet/issues/2120) - [PR #2121](https://github.com/PHPOffice/PhpSpreadsheet/pull/2121)
+- Fixed incorrect R1C1 to A1 subtraction formula conversion (`R[-2]C-R[2]C`) [Issue #2076](https://github.com/PHPOffice/PhpSpreadsheet/pull/2076) [PR #2086](https://github.com/PHPOffice/PhpSpreadsheet/pull/2086)
+- Correctly handle absolute A1 references when converting to R1C1 format [PR #2060](https://github.com/PHPOffice/PhpSpreadsheet/pull/2060)
+- Correct default fill style for conditional without a pattern defined [Issue #2035](https://github.com/PHPOffice/PhpSpreadsheet/issues/2035) [PR #2050](https://github.com/PHPOffice/PhpSpreadsheet/pull/2050)
+- Fixed issue where array key check for existince before accessing arrays in Xlsx.php. [PR #1970](https://github.com/PHPOffice/PhpSpreadsheet/pull/1970)
+- Fixed issue with quoted strings in number format mask rendered with toFormattedString() [Issue 1972#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1972) [PR #1978](https://github.com/PHPOffice/PhpSpreadsheet/pull/1978)
+- Fixed issue with percentage formats in number format mask rendered with toFormattedString() [Issue 1929#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1929) [PR #1928](https://github.com/PHPOffice/PhpSpreadsheet/pull/1928)
+- Fixed issue with _ spacing character in number format mask corrupting output from toFormattedString() [Issue 1924#](https://github.com/PHPOffice/PhpSpreadsheet/issues/1924) [PR #1927](https://github.com/PHPOffice/PhpSpreadsheet/pull/1927)
+- Fix for [Issue #1887](https://github.com/PHPOffice/PhpSpreadsheet/issues/1887) - Lose Track of Selected Cells After Save
+- Fixed issue with Xlsx@listWorksheetInfo not returning any data
+- Fixed invalid arguments triggering mb_substr() error in LEFT(), MID() and RIGHT() text functions. [Issue #640](https://github.com/PHPOffice/PhpSpreadsheet/issues/640)
+- Fix for [Issue #1916](https://github.com/PHPOffice/PhpSpreadsheet/issues/1916) - Invalid signature check for XML files
+- Fix change in `Font::setSize()` behavior for PHP8. [PR #2100](https://github.com/PHPOffice/PhpSpreadsheet/pull/2100)
## 1.17.1 - 2021-03-01
@@ -94,7 +112,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
### Deprecated
-- Nothing.
+- All Excel Function implementations in `Calculation\Database`, `Calculation\DateTime`, `Calculation\Engineering`, `Calculation\Financial`, `Calculation\Logical`, `Calculation\LookupRef`, `Calculation\MathTrig`, `Calculation\Statistical`, `Calculation\TextData` and `Calculation\Web` have been moved to dedicated classes for individual functions or groups of related functions. See the docblocks against all the deprecated methods for details of the new methods to call instead. At some point, these old classes will be deleted.
### Removed
@@ -102,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
### Fixed
+- Fixed issue with absolute path in worksheets' Target. [PR #1769](https://github.com/PHPOffice/PhpSpreadsheet/pull/1769)
- Fix for Xls Reader when SST has a bad length [#1592](https://github.com/PHPOffice/PhpSpreadsheet/issues/1592)
- Resolve Xlsx loader issue whe hyperlinks don't have a destination
- Resolve issues when printer settings resources IDs clash with drawing IDs
@@ -697,4 +716,4 @@ For a comprehensive list of all class changes, and a semi-automated migration pa
## Previous versions of PHPExcel
-The changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md).
\ No newline at end of file
+The changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md).
diff --git a/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md b/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md
index aed13fe2..f5953533 100755
--- a/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md
+++ b/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md
@@ -9,3 +9,12 @@ If you would like to contribute, here are some notes and guidelines:
- All code changes must be validated by `composer check`
- [Helpful article about forking](https://help.github.com/articles/fork-a-repo/ "Forking a GitHub repository")
- [Helpful article about pull requests](https://help.github.com/articles/using-pull-requests/ "Pull Requests")
+
+## How to release
+
+1. Complete CHANGELOG.md and commit
+2. Create an annotated tag
+ 1. `git tag -a 1.2.3`
+ 2. Tag subject must be the version number, eg: `1.2.3`
+ 3. Tag body must be a copy-paste of the changelog entries
+3. Push tag with `git push --tags`, GitHub Actions will create a GitHub release automatically
diff --git a/vendor/phpoffice/phpspreadsheet/composer.json b/vendor/phpoffice/phpspreadsheet/composer.json
index 483c3828..57ec895e 100755
--- a/vendor/phpoffice/phpspreadsheet/composer.json
+++ b/vendor/phpoffice/phpspreadsheet/composer.json
@@ -1,7 +1,19 @@
{
"name": "phpoffice/phpspreadsheet",
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
- "keywords": ["PHP", "OpenXML", "Excel", "xlsx", "xls", "ods", "gnumeric", "spreadsheet"],
+ "keywords": [
+ "PHP",
+ "OpenXML",
+ "Excel",
+ "xlsx",
+ "xls",
+ "ods",
+ "gnumeric",
+ "spreadsheet"
+ ],
+ "config": {
+ "sort-packages": true
+ },
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"type": "library",
"license": "MIT",
@@ -29,7 +41,8 @@
"check": [
"php-cs-fixer fix --ansi --dry-run --diff",
"phpcs",
- "phpunit --color=always"
+ "phpunit --color=always",
+ "phpstan analyse --ansi"
],
"fix": [
"php-cs-fixer fix --ansi"
@@ -39,35 +52,38 @@
]
},
"require": {
- "php": "^7.2||^8.0",
+ "php": "^7.2 || ^8.0",
"ext-ctype": "*",
"ext-dom": "*",
+ "ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
- "ext-fileinfo": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
- "ext-SimpleXML": "*",
+ "ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
+ "ezyang/htmlpurifier": "^4.13",
"maennchen/zipstream-php": "^2.1",
- "markbaker/complex": "^1.5||^2.0",
- "markbaker/matrix": "^1.2||^2.0",
- "psr/simple-cache": "^1.0",
+ "markbaker/complex": "^2.0",
+ "markbaker/matrix": "^2.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
- "ezyang/htmlpurifier": "^4.13"
+ "psr/simple-cache": "^1.0"
},
"require-dev": {
- "dompdf/dompdf": "^0.8.5",
+ "dealerdirect/phpcodesniffer-composer-installer": "dev-master",
+ "dompdf/dompdf": "^1.0",
"friendsofphp/php-cs-fixer": "^2.18",
"jpgraph/jpgraph": "^4.0",
"mpdf/mpdf": "^8.0",
"phpcompatibility/php-compatibility": "^9.3",
- "phpunit/phpunit": "^8.5||^9.3",
+ "phpstan/phpstan": "^0.12.82",
+ "phpstan/phpstan-phpunit": "^0.12.18",
+ "phpunit/phpunit": "^8.5",
"squizlabs/php_codesniffer": "^3.5",
"tecnickcom/tcpdf": "^6.3"
},
@@ -84,7 +100,8 @@
},
"autoload-dev": {
"psr-4": {
- "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests"
+ "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests",
+ "PhpOffice\\PhpSpreadsheetInfra\\": "infra"
}
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/phpstan-baseline.neon b/vendor/phpoffice/phpspreadsheet/phpstan-baseline.neon
new file mode 100644
index 00000000..4ee0a9ef
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/phpstan-baseline.neon
@@ -0,0 +1,7602 @@
+parameters:
+ ignoreErrors:
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$returnArrayAsType has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$branchPruningEnabled has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$cellStack has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$cyclicFormulaCell has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$localeFunctions has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$phpSpreadsheetFunctions has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$controlFunctions has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Binary operation \"\\-\" between 0 and string\\|false results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$spreadsheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#3 \\$formula of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:translateSeparator\\(\\) expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$functionReplaceFromExcel has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$functionReplaceToLocale has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToLocale\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToLocale\\(\\) has parameter \\$formula with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function preg_quote expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$functionReplaceFromLocale has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$functionReplaceToExcel has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToEnglish\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToEnglish\\(\\) has parameter \\$formula with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:localeFunc\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:localeFunc\\(\\) has parameter \\$function with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$operatorAssociativity has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$comparisonOperators has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:\\$operatorPrecedence has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between mixed and null will always evaluate to false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function stripos expects string, float\\|int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function strpos expects string, float\\|int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:dataTestReference\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:dataTestReference\\(\\) has parameter \\$operandData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getTitle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getColumn\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getCoordinate\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getRow\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method has\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$parent of method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\:\\:attach\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells, PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method attach\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:validateBinaryOperand\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:validateBinaryOperand\\(\\) has parameter \\$operand with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:validateBinaryOperand\\(\\) has parameter \\$stack with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:strCaseReverse\\(\\) expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:raiseFormulaError\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:raiseFormulaError\\(\\) has parameter \\$errorMessage with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method cellExists\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#2 \\$pSheet of static method PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\:\\:resolveName\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet, PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getHighestRow\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Cannot call method getHighestColumn\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:getUnusedBranchStoreKey\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:getTokensAsString\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:getTokensAsString\\(\\) has parameter \\$tokens with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Calculation.php
+
+ -
+ message: "#^Parameter \\#2 \\$field of static method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DCountA\\:\\:evaluate\\(\\) expects int\\|string, int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DMAX\\(\\) should return float but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DMIN\\(\\) should return float but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DPRODUCT\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSTDEV\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSTDEVP\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DSUM\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DVAR\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\:\\:DVARP\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:evaluate\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:evaluate\\(\\) has parameter \\$criteria with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:evaluate\\(\\) has parameter \\$database with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:evaluate\\(\\) has parameter \\$field with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:buildCondition\\(\\) has parameter \\$criterion with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Database\\\\DatabaseAbstract\\:\\:processCondition\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engine\\\\Logger\\:\\:writeDebugLog\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engine/Logger.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\:\\:BITLSHIFT\\(\\) should return int\\|string but returns float\\|int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\:\\:BITRSHIFT\\(\\) should return int\\|string but returns float\\|int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\BesselJ\\:\\:besselj2a\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\BesselJ\\:\\:besselj2b\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\BesselK\\:\\:besselK2\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BesselK.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\BitWise\\:\\:validateBitwiseArgument\\(\\) never returns int so it can be removed from the return typehint\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
+
+ -
+ message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
+
+ -
+ message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\<0, 281474976710655\\>\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
+
+ -
+ message: "#^Parameter \\#1 \\$power of method Complex\\\\Complex\\:\\:pow\\(\\) expects float\\|int, float\\|int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ConvertBase\\:\\:validateValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ConvertBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ConvertBase\\:\\:validatePlaces\\(\\) has parameter \\$places with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ConvertBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ConvertUOM\\:\\:getUOMDetails\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ConvertUOM\\:\\:resolveTemperatureSynonyms\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\Erf\\:\\:\\$twoSqrtPi has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\Erf\\:\\:erfValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\Erf\\:\\:erfValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php
+
+ -
+ message: "#^Binary operation \"\\-\" between 1 and float\\|string results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/Erf.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ErfC\\:\\:\\$oneSqrtPi has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ErfC\\:\\:erfcValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Engineering\\\\ErfC\\:\\:erfcValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php
+
+ -
+ message: "#^Binary operation \"\\-\" between 2 and float\\|string results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Engineering/ErfC.php
+
+ -
+ message: "#^Parameter \\#1 \\$callback of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, array\\('PhpOffice\\\\\\\\PhpSpreadsheet\\\\\\\\Calculation\\\\\\\\Exception', 'errorHandlerCallback'\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/ExceptionHandler.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:ISPMT\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:ISPMT\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\:\\:NPV\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:schedulePayment\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$futureValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$numberOfPeriods with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$payment with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$presentValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$rate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\Interest\\:\\:rateNextGuess\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\InterestAndPrincipal\\:\\:\\$interest has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Constant\\\\Periodic\\\\InterestAndPrincipal\\:\\:\\$principal has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
+
+ -
+ message: "#^Binary operation \"\\-\" between float\\|string and 0\\|float results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:bothNegAndPos\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:bothNegAndPos\\(\\) has parameter \\$neg with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:bothNegAndPos\\(\\) has parameter \\$pos with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart1\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart1\\(\\) has parameter \\$dates with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart1\\(\\) has parameter \\$values with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart2\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart2\\(\\) has parameter \\$values with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart3\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart3\\(\\) has parameter \\$dates with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart3\\(\\) has parameter \\$values with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart3\\(\\) has parameter \\$x1 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xirrPart3\\(\\) has parameter \\$x2 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xnpvOrdered\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xnpvOrdered\\(\\) has parameter \\$dates with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xnpvOrdered\\(\\) has parameter \\$ordered with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xnpvOrdered\\(\\) has parameter \\$rate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:xnpvOrdered\\(\\) has parameter \\$values with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:validateXnpv\\(\\) has parameter \\$dates with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:validateXnpv\\(\\) has parameter \\$rate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\NonPeriodic\\:\\:validateXnpv\\(\\) has parameter \\$values with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\CashFlow\\\\Variable\\\\Periodic\\:\\:presentValue\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validateCost\\(\\) has parameter \\$cost with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validateSalvage\\(\\) has parameter \\$salvage with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validateLife\\(\\) has parameter \\$life with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validatePeriod\\(\\) has parameter \\$period with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validateMonth\\(\\) has parameter \\$month with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Financial\\\\Depreciation\\:\\:validateFactor\\(\\) has parameter \\$factor with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Cannot call method setValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Cannot call method setTokenSubType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Cannot call method getTokenType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#"
+ count: 9
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Cannot call method getTokenSubType\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken\\|null\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Calculation/FormulaParser.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isMatrixValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isMatrixValue\\(\\) has parameter \\$idx with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isValue\\(\\) has parameter \\$idx with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isCellValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:isCellValue\\(\\) has parameter \\$idx with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:ifCondition\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:ifCondition\\(\\) has parameter \\$condition with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:operandSpecialHandling\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:operandSpecialHandling\\(\\) has parameter \\$operand with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Functions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Internal\\\\MakeMatrix\\:\\:make\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Internal/MakeMatrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Internal\\\\WildcardMatch\\:\\:wildcard\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Internal/WildcardMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Internal\\\\WildcardMatch\\:\\:compare\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Internal/WildcardMatch.php
+
+ -
+ message: "#^Call to function is_string\\(\\) with null will always evaluate to false\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Calculation/Logical/Operations.php
+
+ -
+ message: "#^Result of && is always false\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Calculation/Logical/Operations.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\:\\:OFFSET\\(\\) should return array\\|string but returns array\\|int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\:\\:CHOOSE\\(\\) has parameter \\$chooseArgs with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Address\\:\\:sheetName\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Address.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:MATCH\\(\\) should return int\\|string but returns float\\|int\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchFirstValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchFirstValue\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchFirstValue\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchLargestValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchLargestValue\\(\\) has parameter \\$keySet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchLargestValue\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchLargestValue\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchSmallestValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchSmallestValue\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:matchSmallestValue\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:validateLookupValue\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:validateMatchType\\(\\) has parameter \\$matchType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:validateLookupArray\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:prepareLookupArray\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:prepareLookupArray\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\ExcelMatch\\:\\:prepareLookupArray\\(\\) has parameter \\$matchType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
+
+ -
+ message: "#^Binary operation \"\\-\" between int\\|string and 1 results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\HLookup\\:\\:hLookupSearch\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\HLookup\\:\\:hLookupSearch\\(\\) has parameter \\$column with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\HLookup\\:\\:hLookupSearch\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\HLookup\\:\\:hLookupSearch\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\HLookup\\:\\:hLookupSearch\\(\\) has parameter \\$notExactMatch with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Lookup\\:\\:verifyResultVector\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Lookup\\:\\:verifyResultVector\\(\\) has parameter \\$resultVector with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\LookupBase\\:\\:validateIndexLookup\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\LookupBase\\:\\:validateIndexLookup\\(\\) has parameter \\$index_number with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\LookupBase\\:\\:validateIndexLookup\\(\\) has parameter \\$lookup_array with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\LookupBase\\:\\:checkMatch\\(\\) has parameter \\$notExactMatch with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Matrix\\:\\:extractRowValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:extractRequiredCells\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:extractWorksheet\\(\\) has parameter \\$cellAddress with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adjustEndCellColumnForWidth\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adjustEndCellColumnForWidth\\(\\) has parameter \\$columns with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adjustEndCellColumnForWidth\\(\\) has parameter \\$width with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adustEndCellRowForHeight\\(\\) has parameter \\$endCellRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adustEndCellRowForHeight\\(\\) has parameter \\$height with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\Offset\\:\\:adustEndCellRowForHeight\\(\\) has parameter \\$rows with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
+
+ -
+ message: "#^Parameter \\#1 \\$pString of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:columnIndexFromString\\(\\) expects string, string\\|null given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
+
+ -
+ message: "#^Parameter \\#1 \\$low of function range expects float\\|int\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
+
+ -
+ message: "#^Parameter \\#2 \\$high of function range expects float\\|int\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
+
+ -
+ message: "#^Parameter \\#2 \\$cmp_function of function uasort expects callable\\(mixed, mixed\\)\\: int, array\\('self', 'vlookupSort'\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vlookupSort\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vlookupSort\\(\\) has parameter \\$a with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vlookupSort\\(\\) has parameter \\$b with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vLookupSearch\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vLookupSearch\\(\\) has parameter \\$column with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vLookupSearch\\(\\) has parameter \\$lookupArray with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vLookupSearch\\(\\) has parameter \\$lookupValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\LookupRef\\\\VLookup\\:\\:vLookupSearch\\(\\) has parameter \\$notExactMatch with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\:\\:MAXIFS\\(\\) should return float but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\:\\:MINIFS\\(\\) should return float but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Averages\\:\\:filterArguments\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Averages.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Averages\\:\\:filterArguments\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Averages.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Averages\\:\\:modeCalc\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Averages.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Averages\\:\\:modeCalc\\(\\) has parameter \\$data with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Averages.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Percentiles\\:\\:percentileFilterValues\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Percentiles\\:\\:rankFilterValues\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Trends\\:\\:checkTrendArrays\\(\\) has parameter \\$array1 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Trends\\:\\:checkTrendArrays\\(\\) has parameter \\$array2 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Trends\\:\\:GROWTH\\(\\) should return array\\ but returns array\\\\>\\>\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Trends\\:\\:TREND\\(\\) should return array\\ but returns array\\\\>\\>\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Trends.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:SUMIF\\(\\) should return float\\|string but returns float\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildConditionSet\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildConditionSetForValueRange\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildConditions\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildDatabase\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildDatabaseWithValueRange\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Conditional\\:\\:buildDataSet\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\Beta\\:\\:\\$logBetaCacheP has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\Beta\\:\\:\\$logBetaCacheQ has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\Beta\\:\\:\\$logBetaCacheResult has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
+
+ -
+ message: "#^Binary operation \"\\-\" between 1 and float\\|string results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:pchisq\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:pchisq\\(\\) has parameter \\$chi2 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:pchisq\\(\\) has parameter \\$degrees with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gammp\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gammp\\(\\) has parameter \\$n with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gammp\\(\\) has parameter \\$x with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gser\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gser\\(\\) has parameter \\$n with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gser\\(\\) has parameter \\$x with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gcf\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gcf\\(\\) has parameter \\$n with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\ChiSquared\\:\\:gcf\\(\\) has parameter \\$x with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\Normal\\:\\:inverseNcdf\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\Normal\\:\\:inverseNcdf\\(\\) has parameter \\$p with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:calculateDistribution\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:calculateInverse\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:\\$logGammaCacheResult has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:\\$logGammaCacheX has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:logGamma1\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:logGamma2\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:logGamma3\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\GammaBase\\:\\:logGamma4\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\NewtonRaphson\\:\\:\\$callback has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\Distributions\\\\NewtonRaphson\\:\\:execute\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php
+
+ -
+ message: "#^Binary operation \"\\-\" between 1 and float\\|string results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php
+
+ -
+ message: "#^Binary operation \"\\-\" between float\\|string and float\\|int\\|\\(string&numeric\\) results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\MaxMinBase\\:\\:datatypeAdjustmentAllowStrings\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/MaxMinBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\MaxMinBase\\:\\:datatypeAdjustmentAllowStrings\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/MaxMinBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\VarianceBase\\:\\:datatypeAdjustmentAllowStrings\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\VarianceBase\\:\\:datatypeAdjustmentAllowStrings\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\VarianceBase\\:\\:datatypeAdjustmentBooleans\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Statistical\\\\VarianceBase\\:\\:datatypeAdjustmentBooleans\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:TRIMNONPRINTABLE\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:TRIMSPACES\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:CONCATENATE\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:SEARCHSENSITIVE\\(\\) should return string but returns int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\:\\:SEARCHINSENSITIVE\\(\\) should return string but returns int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\CharacterConvert\\:\\:character\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\CharacterConvert\\:\\:unicodeToOrd\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\CharacterConvert\\:\\:unicodeToOrd\\(\\) has parameter \\$character with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\CharacterConvert\\:\\:convertBooleanValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\CharacterConvert\\:\\:convertBooleanValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\Concatenate\\:\\:CONCATENATE\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\Concatenate\\:\\:convertBooleanValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\Concatenate\\:\\:convertBooleanValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
+
+ -
+ message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\<0, max\\>\\|string given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Calculation/TextData/Extract.php
+
+ -
+ message: "#^Parameter \\#2 \\$start of function mb_substr expects int, float\\|int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/TextData/Extract.php
+
+ -
+ message: "#^Cannot cast array\\|float\\|int\\|string to float\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Format.php
+
+ -
+ message: "#^Parameter \\#3 \\$offset of function mb_strpos expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Search.php
+
+ -
+ message: "#^Parameter \\#3 \\$offset of function mb_stripos expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Search.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\TextData\\\\Trim\\:\\:\\$invalidChars has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Trim.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, float\\|int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Calculation/TextData/Trim.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/TextData/Trim.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$onlyIf with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$onlyIfNot with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$reference with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$storeKey with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Token\\\\Stack\\:\\:getStackItem\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Calculation/Token/Stack.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\:\\:\\$formulaAttributes has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Cell.php
+
+ -
+ message: "#^Elseif branch is unreachable because previous condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Cell.php
+
+ -
+ message: "#^Parameter \\#2 \\$format of static method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\:\\:toFormattedString\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Cell.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Cell.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\:\\:getFormulaAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Cell.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function explode expects string, array\\\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Coordinate.php
+
+ -
+ message: "#^Parameter \\#4 \\$currentRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:validateRange\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Coordinate.php
+
+ -
+ message: "#^Parameter \\#5 \\$endRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:validateRange\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Coordinate.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getHashCode\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Coordinate.php
+
+ -
+ message: "#^Parameter \\#1 \\$input of function array_chunk expects array, array\\\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/Coordinate.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:substring\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Cell/DataType.php
+
+ -
+ message: "#^Parameter \\#2 \\$alpha of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\:\\:setShadowColor\\(\\) expects int, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Axis.php
+
+ -
+ message: "#^Parameter \\#1 \\$blur of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\:\\:setShadowBlur\\(\\) expects float, float\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Axis.php
+
+ -
+ message: "#^Parameter \\#1 \\$angle of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\:\\:setShadowAngle\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Axis.php
+
+ -
+ message: "#^Parameter \\#1 \\$distance of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\:\\:setShadowDistance\\(\\) expects float, float\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Axis.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$title \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$legend \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$xAxisLabel \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$yAxisLabel \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$plotArea \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\PlotArea\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\PlotArea\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$xAxis \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$yAxis \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$majorGridlines \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$minorGridlines \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:\\$worksheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setTopLeftXOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setTopLeftXOffset\\(\\) has parameter \\$xOffset with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:getTopLeftXOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setTopLeftYOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setTopLeftYOffset\\(\\) has parameter \\$yOffset with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:getTopLeftYOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightCell\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightCell\\(\\) has parameter \\$cell with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightXOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightXOffset\\(\\) has parameter \\$xOffset with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:getBottomRightXOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightYOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:setBottomRightYOffset\\(\\) has parameter \\$yOffset with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\:\\:getBottomRightYOffset\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Chart.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues and null will always evaluate to false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Chart/DataSeries.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\:\\:\\$dataTypeValues has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/DataSeriesValues.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\:\\:\\$dataSource \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/DataSeriesValues.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\:\\:\\$fillColor \\(array\\\\|string\\) does not accept array\\\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/DataSeriesValues.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\:\\:refresh\\(\\) has parameter \\$flatten with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/DataSeriesValues.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:\\$objectState has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:\\$lineProperties has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:\\$shadowProperties has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:\\$glowProperties has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:\\$softEdges has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#1 \\$color of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setGlowColor\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#2 \\$alpha of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setGlowColor\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#3 \\$type of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setGlowColor\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#1 \\$blur of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setShadowBlur\\(\\) expects float, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#1 \\$angle of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setShadowAngle\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Parameter \\#1 \\$distance of method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\:\\:setShadowDistance\\(\\) expects float, float\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/GridLines.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend\\:\\:\\$positionXLref has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Legend.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend\\:\\:\\$layout \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Legend.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\PlotArea\\:\\:\\$layout \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/PlotArea.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getTrueAlpha\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getTrueAlpha\\(\\) has parameter \\$alpha with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$alpha with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$color with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:setColorProperties\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getLineStyleArrowSize\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getLineStyleArrowSize\\(\\) has parameter \\$array_kay_selector with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getLineStyleArrowSize\\(\\) has parameter \\$array_selector with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getShadowPresetsMap\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getShadowPresetsMap\\(\\) has parameter \\$shadow_presets_option with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getArrayElementsValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getArrayElementsValue\\(\\) has parameter \\$elements with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Properties\\:\\:getArrayElementsValue\\(\\) has parameter \\$properties with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Properties.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$width has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$height has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$colourSet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$markSet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$chart has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$graph has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$plotColour has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:\\$plotMark has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has parameter \\$markerID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatPointMarker\\(\\) has parameter \\$seriesPlot with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$datasetLabels with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$labelCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:formatDataSetLabels\\(\\) has parameter \\$rotation with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageSumCalculation\\(\\) has parameter \\$seriesCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has parameter \\$dataValues with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:percentageAdjustValues\\(\\) has parameter \\$sumValues with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:getCaption\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:getCaption\\(\\) has parameter \\$captionElement with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCartesianPlotArea\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$combination with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$filled with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotLine\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotBar\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotBar\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotScatter\\(\\) has parameter \\$bubble with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotScatter\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotRadar\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotContour\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPlotStock\\(\\) has parameter \\$groupID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderAreaChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderAreaChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderLineChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderLineChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBarChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBarChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderScatterChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderBubbleChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$doughnut with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderPieChart\\(\\) has parameter \\$multiplePlots with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderRadarChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderStockChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderContourChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderContourChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$dimensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$groupCount with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Renderer\\\\JpGraph\\:\\:renderCombinationChart\\(\\) has parameter \\$outputDestination with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\:\\:\\$layout \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Chart/Title.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\:\\:getParent\\(\\) should return PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet but returns PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\:\\:getCurrentCoordinate\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function sscanf expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Parameter \\#1 \\$columnIndex of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:stringFromColumnIndex\\(\\) expects int, int\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Possibly invalid array key type \\(array\\|string\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Cannot call method detach\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Cells.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Memory\\:\\:\\$cache has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Collection/Memory.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\:\\:\\$worksheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/DefinedName.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\:\\:\\$scope \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/DefinedName.php
+
+ -
+ message: "#^Parameter \\#1 \\$namedRange of method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:addNamedRange\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\NamedRange, \\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/DefinedName.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\HashTable\\:\\:getIndexForHashCode\\(\\) should return int but returns int\\|string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/HashTable.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$colourMap has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$face has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$size has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$color has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$bold has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$italic has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$underline has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$superscript has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$subscript has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$strikethrough has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$startTagCallbacks has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$endTagCallbacks has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$stack has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:\\$stringData has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$text of method PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\ITextElement\\:\\:setText\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setName\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setSize\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setBold\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setItalic\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setUnderline\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Cannot call method setStrikethrough\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:rgbToColour\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:rgbToColour\\(\\) has parameter \\$rgb with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\:\\:startFontTag\\(\\) has parameter \\$tag with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, array\\(\\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Html\\), mixed\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$directory of class RecursiveDirectoryIterator constructor expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Parameter \\#1 \\$path of function pathinfo expects string, array\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Sample\\:\\:getSamples\\(\\) should return array\\\\> but returns array\\\\>\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Parameter \\#1 \\$filename of function unlink expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Helper\\\\Sample\\:\\:log\\(\\) has parameter \\$message with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Helper/Sample.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\IOFactory\\:\\:\\$readers has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/IOFactory.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\IOFactory\\:\\:\\$writers has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/IOFactory.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\BaseReader\\:\\:\\$fileHandle has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/BaseReader.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\BaseReader\\:\\:getSecurityScanner\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/BaseReader.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$rowspan has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:readBeginning\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:readEnding\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Parameter \\#2 \\$length of function fread expects int, int\\\\|int\\<1, 2048\\>\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:startsWithTag\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:startsWithTag\\(\\) has parameter \\$data with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:endsWithTag\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:endsWithTag\\(\\) has parameter \\$data with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:containsTags\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:containsTags\\(\\) has parameter \\$data with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$dataArray has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$tableLevel has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$nestedColumn has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:setTableStartColumn\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:setTableStartColumn\\(\\) has parameter \\$column with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:getTableStartColumn\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:releaseTableStartColumn\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:flushCell\\(\\) has parameter \\$cellContent with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:flushCell\\(\\) has parameter \\$column with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:flushCell\\(\\) has parameter \\$row with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Argument of an invalid type DOMNamedNodeMap\\|null supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$spanEtc has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$h1Etc has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Parameter \\#2 \\$styleValue of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:setBorderStyle\\(\\) expects string, string\\|null given\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|null given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Alignment\\:\\:setHorizontal\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Alignment\\:\\:setVertical\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:getStyleColor\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Html\\:\\:\\$borderMappings has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Html.php
+
+ -
+ message: "#^Cannot call method getNamespaces\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Cannot call method children\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\:\\:listWorksheetNames\\(\\) should return array\\ but returns array\\\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Cannot call method getElementsByTagNameNS\\(\\) on DOMElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Parameter \\#1 \\$element of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\:\\:scanElementForText\\(\\) expects DOMNode, DOMElement\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Cannot call method getAttributeNS\\(\\) on DOMElement\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Parameter \\#1 \\$settings of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\:\\:lookForActiveSheet\\(\\) expects DOMElement, DOMElement\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Parameter \\#1 \\$settings of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\:\\:lookForSelectedCells\\(\\) expects DOMElement, DOMElement\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Cannot call method setSelectedCellByColumnAndRow\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Cannot call method getNamedItem\\(\\) on DOMNamedNodeMap\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$officeNs has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$stylesNs has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$stylesFo has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$pageLayoutStyles has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$masterStylesCrossReference has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\PageSettings\\:\\:\\$masterPrintStylesCrossReference has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Cannot call method getElementsByTagNameNS\\(\\) on DOMElement\\|null\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Reader/Ods/PageSettings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:\\$spreadsheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:load\\(\\) has parameter \\$namespacesMeta with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:setMetaProperties\\(\\) has parameter \\$namespacesMeta with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:setMetaProperties\\(\\) has parameter \\$propertyName with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:setUserDefinedProperty\\(\\) has parameter \\$propertyValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Ods\\\\Properties\\:\\:setUserDefinedProperty\\(\\) has parameter \\$propertyValueAttributes with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Ods/Properties.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:\\$callback has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:\\$libxmlDisableEntityLoaderValue has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:__construct\\(\\) has parameter \\$pattern with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:getInstance\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:threadSafeLibxmlDisableEntityLoaderAvailability\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:toUtf8\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Security\\\\XmlScanner\\:\\:toUtf8\\(\\) has parameter \\$xml with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match expects string, array\\\\|string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Security/XmlScanner.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function substr_count expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Slk\\:\\:\\$colorArray has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Slk\\:\\:\\$fontStyleMappings has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Slk\\:\\:\\$styleSettingsFont has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Slk\\:\\:\\$styleSettingsBorder has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Parameter \\#1 \\$columnIndex of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:stringFromColumnIndex\\(\\) expects int, string given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Reader/Slk.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:getDgContainer\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getNestingLevel\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getStartCoordinates\\(\\)\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getEndCoordinates\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getStartOffsetX\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getStartOffsetY\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getEndOffsetX\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getEndOffsetY\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$startRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:getDistanceY\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#4 \\$endRow of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:getDistanceY\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$row of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Xls\\:\\:sizeRow\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:getOPT\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:getDggContainer\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\MemoryDrawing\\:\\:setImageResource\\(\\) expects GdImage\\|resource, resource\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\BaseDrawing\\:\\:setOffsetX\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\BaseDrawing\\:\\:setOffsetY\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$row of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\IReadFilter\\:\\:readCell\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Negated boolean expression is always false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$block of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:makeKey\\(\\) expects int, float given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$data \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$summaryInformation \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:\\$documentSummaryInformation \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$pos of static method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:getUInt2d\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$pos of static method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:getInt4d\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$start of function substr expects int, float\\|int given\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:setShowSummaryBelow\\(\\) expects bool, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:setShowSummaryRight\\(\\) expects bool, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:includeCellRangeFiltered\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:includeCellRangeFiltered\\(\\) has parameter \\$cellRangeAddress with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\DataValidation\\:\\:setType\\(\\) expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\DataValidation\\:\\:setErrorStyle\\(\\) expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\DataValidation\\:\\:setOperator\\(\\) expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:parseRichText\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\:\\:parseRichText\\(\\) has parameter \\$is with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\Color\\\\BIFF5\\:\\:\\$map has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Color/BIFF5.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\Color\\\\BIFF8\\:\\:\\$map has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Color/BIFF8.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\Color\\\\BuiltIn\\:\\:\\$map has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Color/BuiltIn.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\ErrorCode\\:\\:\\$map has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/ErrorCode.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setDggContainer\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setBstoreContainer\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:addBSE\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setBlip\\(\\)\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setDgContainer\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:addChild\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:addChild\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setStartCoordinates\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setStartOffsetX\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setStartOffsetY\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setEndCoordinates\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setEndOffsetX\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setEndOffsetY\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\\\SpContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\|PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setOPT\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/Escher.php
+
+ -
+ message: "#^Parameter \\#1 \\$input of function array_values expects array, array\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:f\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:g\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:h\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:i\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:step\\(\\) has parameter \\$func with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\MD5\\:\\:rotate\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/MD5.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\RC4\\:\\:\\$s has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/RC4.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\RC4\\:\\:\\$i has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/RC4.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xls\\\\RC4\\:\\:\\$j has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xls/RC4.php
+
+ -
+ message: "#^Cannot access property \\$Relationship on SimpleXMLElement\\|false\\.$#"
+ count: 12
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$sheets on SimpleXMLElement\\|false\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method registerXPathNamespace\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToBoolean\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToBoolean\\(\\) has parameter \\$c with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToError\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToError\\(\\) has parameter \\$c with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToString\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToString\\(\\) has parameter \\$c with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$c with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$calculatedValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$castBaseType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$cellDataType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$r with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$sharedFormulas with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:castToFormula\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:getFromZipArchive\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Offset 'name' does not exist on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method xpath\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$is of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:parseRichText\\(\\) expects SimpleXMLElement\\|null, object given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$styleXml of class PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles constructor expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$workbookPr on SimpleXMLElement\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#2 \\$xmlWorkbook of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readProtection\\(\\) expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$relsWorksheet of method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Hyperlinks\\:\\:readHyperlinks\\(\\) expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$authors on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$commentList on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Negated boolean expression is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$drawing on SimpleXMLElement\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method children\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method count\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method asXML\\(\\) on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$definedNames on SimpleXMLElement\\|false\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$pName of method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:getSheetByName\\(\\) expects string, array\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access offset 0 on array\\\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$bookViews on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$Default on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$Override on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$chartElements of static method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readChart\\(\\) expects SimpleXMLElement, SimpleXMLElement\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method addChart\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot access property \\$r on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setName\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setSize\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setBold\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setItalic\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setUnderline\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Cannot call method setStrikethrough\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:getArrayItem\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:getArrayItem\\(\\) has parameter \\$array with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:getArrayItem\\(\\) has parameter \\$key with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:dirAdd\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:dirAdd\\(\\) has parameter \\$add with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:dirAdd\\(\\) has parameter \\$base with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:toCSSArray\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:toCSSArray\\(\\) has parameter \\$style with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$fontSizeInPoints of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:fontSizeToPixels\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function strpos expects string, int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$sizeInInch of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:inchSizeToPixels\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$sizeInCm of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:centimeterSizeToPixels\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:stripWhiteSpaceFromStyleString\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:stripWhiteSpaceFromStyleString\\(\\) has parameter \\$string with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:boolean\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:boolean\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Offset 'id' does not exist on SimpleXMLElement\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readFormControlProperties\\(\\) has parameter \\$dir with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readFormControlProperties\\(\\) has parameter \\$docSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readFormControlProperties\\(\\) has parameter \\$fileWorksheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readPrinterSettings\\(\\) has parameter \\$dir with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readPrinterSettings\\(\\) has parameter \\$docSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\:\\:readPrinterSettings\\(\\) has parameter \\$fileWorksheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\AutoFilter\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\AutoFilter\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\AutoFilter\\:\\:readAutoFilter\\(\\) has parameter \\$autoFilterRange with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\AutoFilter\\:\\:readAutoFilter\\(\\) has parameter \\$xmlSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$pOperator of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:setRule\\(\\) expects string, null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\BaseParserClass\\:\\:boolean\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\BaseParserClass\\:\\:boolean\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readColor\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readColor\\(\\) has parameter \\$background with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readColor\\(\\) has parameter \\$color with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#1 \\$position of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend constructor expects string, bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#3 \\$overlay of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend constructor expects bool, bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#6 \\$displayBlanksAs of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart constructor expects string, bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartTitle\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartLayoutDetails\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartLayoutDetails\\(\\) has parameter \\$chartDetail with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartLayoutDetails\\(\\) has parameter \\$namespacesChartMeta with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeries\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeries\\(\\) has parameter \\$chartDetail with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeries\\(\\) has parameter \\$namespacesChartMeta with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeries\\(\\) has parameter \\$plotType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#3 \\$plotOrder of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeries constructor expects array\\, array\\ given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#7 \\$plotDirection of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeries constructor expects string\\|null, bool\\|float\\|int\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValueSet\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValueSet\\(\\) has parameter \\$marker with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValueSet\\(\\) has parameter \\$namespacesChartMeta with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValueSet\\(\\) has parameter \\$seriesDetail with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#4 \\$pointCount of class PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues constructor expects int, null given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValues\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValues\\(\\) has parameter \\$dataType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValues\\(\\) has parameter \\$seriesValueSet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValuesMultiLevel\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValuesMultiLevel\\(\\) has parameter \\$dataType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:chartDataSeriesValuesMultiLevel\\(\\) has parameter \\$seriesValueSet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:parseRichText\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method getFont\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\Run\\|null\\.$#"
+ count: 12
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setName\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setSize\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setBold\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setItalic\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setUnderline\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method setStrikethrough\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readChartAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Chart\\:\\:readChartAttributes\\(\\) has parameter \\$chartDetail with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Chart.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:isFilteredColumn\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:isFilteredColumn\\(\\) has parameter \\$columnCoordinate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readColumnAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readColumnAttributes\\(\\) has parameter \\$readDataOnly with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readColumnRangeAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readColumnRangeAttributes\\(\\) has parameter \\$readDataOnly with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:isFilteredRow\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:isFilteredRow\\(\\) has parameter \\$rowCoordinate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readRowAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ColumnAndRowAttributes\\:\\:readRowAttributes\\(\\) has parameter \\$readDataOnly with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ColumnAndRowAttributes.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:\\$dxfs has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readConditionalStyles\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readConditionalStyles\\(\\) has parameter \\$xmlSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:setConditionalStyles\\(\\) has parameter \\$xmlExtLst with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readStyleRules\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readStyleRules\\(\\) has parameter \\$cfRules with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readStyleRules\\(\\) has parameter \\$extLst with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readDataBarOfConditionalRule\\(\\) has parameter \\$cfRule with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readDataBarOfConditionalRule\\(\\) has parameter \\$conditionalFormattingRuleExtensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readDataBarExtLstOfConditionalRule\\(\\) has parameter \\$cfRule with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\ConditionalStyles\\:\\:readDataBarExtLstOfConditionalRule\\(\\) has parameter \\$conditionalFormattingRuleExtensions with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/ConditionalStyles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\DataValidations\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\DataValidations\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Hyperlinks\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Hyperlinks\\:\\:\\$hyperlinks has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Hyperlinks.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\PageSetup\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\PageSetup\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\PageSetup\\:\\:load\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\PageSetup\\:\\:pageSetup\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/PageSetup.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:\\$securityScanner has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:\\$docProps has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:extractPropertyData\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:extractPropertyData\\(\\) has parameter \\$propertyData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:readCoreProperties\\(\\) has parameter \\$propertyData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:registerXPathNamespace\\(\\)\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Call to an undefined method object\\:\\:xpath\\(\\)\\.$#"
+ count: 9
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:readExtendedProperties\\(\\) has parameter \\$propertyData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:readCustomProperties\\(\\) has parameter \\$propertyData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Argument of an invalid type object supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:getArrayItem\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Properties\\:\\:getArrayItem\\(\\) has parameter \\$key with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Properties.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\SheetViewOptions\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\SheetViewOptions\\:\\:\\$worksheetXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/SheetViewOptions.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\SheetViews\\:\\:\\$sheetViewXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\SheetViews\\:\\:\\$worksheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/SheetViews.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:\\$styles has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:\\$cellStyles has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:\\$styleXml has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:setStyleBaseData\\(\\) has parameter \\$cellStyles with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:setStyleBaseData\\(\\) has parameter \\$styles with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Static property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:\\$theme \\(PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Theme\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Theme\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Cannot call method count\\(\\) on SimpleXMLElement\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readStyle\\(\\) has parameter \\$style with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Parameter \\#2 \\$alignmentXml of static method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readAlignmentStyle\\(\\) expects SimpleXMLElement, object given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readProtectionLocked\\(\\) has parameter \\$style with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readProtectionHidden\\(\\) has parameter \\$style with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readColor\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readColor\\(\\) has parameter \\$background with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:readColor\\(\\) has parameter \\$color with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Parameter \\#1 \\$hex of static method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Color\\:\\:changeBrightness\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:dxfs\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:dxfs\\(\\) has parameter \\$readDataOnly with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:styles\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:getArrayItem\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:getArrayItem\\(\\) has parameter \\$array with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xlsx\\\\Styles\\:\\:getArrayItem\\(\\) has parameter \\$key with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xlsx/Styles.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Reader\\\\Xml\\:\\:\\$fileContents has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xml.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xml.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xml.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:convertEncoding\\(\\) expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Reader/Xml.php
+
+ -
+ message: "#^Parameter \\#2 \\$cmp_function of function uksort expects callable\\(mixed, mixed\\)\\: int, array\\('self', 'cellReverseSort'\\) given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Parameter \\#2 \\$cmp_function of function uksort expects callable\\(mixed, mixed\\)\\: int, array\\('self', 'cellSort'\\) given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Parameter \\#1 \\$index of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\RowDimension\\:\\:setRowIndex\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Parameter \\#1 \\$columnIndex of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:stringFromColumnIndex\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Parameter \\#1 \\$pCellRange of method PhpOffice\\\\PhpSpreadsheet\\\\ReferenceHelper\\:\\:updateCellReference\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/ReferenceHelper.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\Run\\:\\:\\$font \\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/RichText/Run.php
+
+ -
+ message: "#^Result of && is always false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Settings.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Settings.php
+
+ -
+ message: "#^Negated boolean expression is always false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Settings.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:getHttpClient\\(\\) should return Psr\\\\Http\\\\Client\\\\ClientInterface but returns Psr\\\\Http\\\\Client\\\\ClientInterface\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Settings.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:getRequestFactory\\(\\) should return Psr\\\\Http\\\\Message\\\\RequestFactoryInterface but returns Psr\\\\Http\\\\Message\\\\RequestFactoryInterface\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Settings.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\CodePage\\:\\:\\$pageArray has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/CodePage.php
+
+ -
+ message: "#^Parameter \\#1 \\$dateValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Date\\:\\:timestampToExcel\\(\\) expects int, float\\|int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Date.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/Date.php
+
+ -
+ message: "#^Parameter \\#1 \\$pFormatCode of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Date\\:\\:isDateTimeFormatCode\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Date.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Date\\:\\:\\$possibleDateFormatCharacters has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Date.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:pixelsToCellDimension\\(\\) should return int but returns float\\|int\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#1 \\$fp of function fread expects resource, resource\\|false given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#1 \\$fp of function feof expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#1 \\$x_size of function imagecreatetruecolor expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$y_size of function imagecreatetruecolor expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagecolorallocate expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$red of function imagecolorallocate expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#3 \\$green of function imagecolorallocate expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#4 \\$blue of function imagecolorallocate expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagesetpixel expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#3 \\$y of function imagesetpixel expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Parameter \\#4 \\$col of function imagesetpixel expects int, int\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:imagecreatefrombmp\\(\\) should return GdImage\\|resource but returns resource\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Drawing.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:\\$spgrContainer has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getDgId\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setDgId\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getLastSpId\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setLastSpId\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:getSpgrContainer\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setSpgrContainer\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\:\\:setSpgrContainer\\(\\) has parameter \\$spgrContainer with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DgContainer\\\\SpgrContainer\\:\\:getChildren\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between string\\|false and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/File.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\File\\:\\:realpath\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/File.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\File\\:\\:sysGetTempDir\\(\\) should return string but returns string\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/File.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:\\$autoSizeMethods has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:pixelsToCellDimension\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Parameter \\#2 \\$pDefaultFont of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:pixelsToCellDimension\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Parameter \\#1 \\$size of function imagettfbbox expects float, float\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Cannot access offset 0 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Cannot access offset 2 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Cannot access offset 4 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Cannot access offset 6 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Font.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\EigenvalueDecomposition\\:\\:\\$e has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\EigenvalueDecomposition\\:\\:\\$cdivi has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php
+
+ -
+ message: "#^Else branch is unreachable because previous condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\LUDecomposition\\:\\:getDoublePivot\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:__construct\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 19
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:getMatrix\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:plus\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:plusEquals\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Call to function is_string\\(\\) with float\\|int will always evaluate to false\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Result of && is always false\\.$#"
+ count: 10
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:minus\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:minusEquals\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayTimes\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayTimesEquals\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayRightDivide\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Parameter \\#3 \\$c of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:set\\(\\) expects float\\|int\\|null, string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayRightDivideEquals\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayLeftDivide\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:arrayLeftDivideEquals\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:times\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:power\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:concat\\(\\) has parameter \\$args with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
+
+ -
+ message: "#^Left side of && is always true\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 7
+ path: src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\:\\:getStream\\(\\) should return resource but returns resource\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#1 \\$No of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#2 \\$name of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#3 \\$type of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#4 \\$prev of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#5 \\$next of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#6 \\$dir of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#9 \\$data of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS constructor expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#1 \\$oleTimestamp of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\:\\:OLE2LocalDate\\(\\) expects string, string\\|false given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\:\\:getData\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Cannot access offset 3 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Cannot access offset 4 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Cannot access offset 2 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE.php
+
+ -
+ message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php
+
+ -
+ message: "#^Parameter \\#3 \\$length of function array_slice expects int\\|null, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS.php
+
+ -
+ message: "#^Parameter \\#2 \\$offset of function array_slice expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS.php
+
+ -
+ message: "#^Parameter \\#1 \\$No of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/File.php
+
+ -
+ message: "#^Parameter \\#4 \\$prev of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/File.php
+
+ -
+ message: "#^Parameter \\#5 \\$next of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/File.php
+
+ -
+ message: "#^Parameter \\#6 \\$dir of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/File.php
+
+ -
+ message: "#^Parameter \\#1 \\$No of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#4 \\$prev of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#5 \\$next of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#6 \\$dir of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#9 \\$data of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\:\\:__construct\\(\\) expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#1 \\$iSBDcnt of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveHeader\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#2 \\$iBBcnt of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveHeader\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#3 \\$iPPScnt of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveHeader\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#1 \\$iStBlk of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveBigData\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#1 \\$iSbdSize of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveBbd\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#2 \\$iBsize of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveBbd\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Parameter \\#3 \\$iPpsCnt of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLE\\\\PPS\\\\Root\\:\\:saveBbd\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLE/PPS/Root.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLERead\\:\\:\\$data has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLERead\\:\\:\\$wrkbook has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLERead\\:\\:\\$summaryInformation has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLERead\\:\\:\\$documentSummaryInformation has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\OLERead\\:\\:getInt4d\\(\\) expects string, string\\|false given\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/OLERead.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/PasswordHasher.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:sanitizeUTF8\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:formatNumber\\(\\) should return string but returns array\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:countCharacters\\(\\) should return int but returns int\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:mbIsUpper\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:mbIsUpper\\(\\) has parameter \\$char with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:mbStrSplit\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:mbStrSplit\\(\\) has parameter \\$string with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function strlen expects string, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/StringHelper.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$goodnessOfFit has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$stdevOfResiduals has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$covariance has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$correlation has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$SSRegression has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$SSResiduals has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$DFResiduals has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$f has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$slope has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$slopeSE has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$intersect has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$intersectSE has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$xOffset has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:\\$yOffset has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:getError\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:getBestFitType\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$const with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$meanX with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$meanY with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$sumX with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$sumX2 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$sumXY with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$sumY with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:calculateGoodnessOfFit\\(\\) has parameter \\$sumY2 with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\BestFit\\:\\:sumSquares\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/BestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\PolynomialBestFit\\:\\:getCoefficients\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\PolynomialBestFit\\:\\:getCoefficients\\(\\) has parameter \\$dp with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
+
+ -
+ message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\Trend\\:\\:calculate\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\Trend\\:\\:calculate\\(\\) has parameter \\$const with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\Trend\\:\\:calculate\\(\\) has parameter \\$trendType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\Trend\\:\\:calculate\\(\\) has parameter \\$xValues with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\Trend\\:\\:calculate\\(\\) has parameter \\$yValues with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Parameter \\#1 \\$order of class PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Trend\\\\PolynomialBestFit constructor expects int, string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Shared/Trend/Trend.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:\\$debugEnabled has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/XMLWriter.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:\\$tempFileName \\(string\\) does not accept string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/XMLWriter.php
+
+ -
+ message: "#^Parameter \\#1 \\$uri of method XMLWriter\\:\\:openUri\\(\\) expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/XMLWriter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:getData\\(\\) should return string but returns string\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/XMLWriter.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Drawing\\:\\:pointsToPixels\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$fontSizeInPoints of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:fontSizeToPixels\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Shared/Xls.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:\\$workbookViewVisibilityValues has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Call to function is_array\\(\\) with string will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pSheet of method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:getIndex\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet, PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Cannot call method getTitle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Comparison operation \"\\<\\=\" between int\\ and 1000 is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Result of \\|\\| is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Spreadsheet.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Alignment.php
+
+ -
+ message: "#^Parameter \\#1 \\$parent of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Supervisor\\:\\:bindParent\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style, \\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Border\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Border.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Border.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getStyleArray\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Border.php
+
+ -
+ message: "#^Right side of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Border.php
+
+ -
+ message: "#^Parameter \\#1 \\$parent of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Supervisor\\:\\:bindParent\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style, \\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Borders\\) given\\.$#"
+ count: 10
+ path: src/PhpSpreadsheet/Style/Borders.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Borders.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Border\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill\\:\\:getEndColor\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Border\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill\\:\\:getStartColor\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Border\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill\\:\\:getColor\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getStyleArray\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Color\\:\\:getColourComponent\\(\\) should return int\\|string but returns float\\|int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Color.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\:\\:\\$condition \\(array\\\\) does not accept array\\\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Conditional.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\:\\:\\$style \\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Conditional.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\:\\:setShowValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBar.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\:\\:setMinimumConditionalFormatValueObject\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBar.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\:\\:setMaximumConditionalFormatValueObject\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBar.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\:\\:setConditionalFormattingRuleExt\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBar.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBarExtension\\:\\:getXmlAttributes\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBarExtension\\:\\:getXmlElements\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBarExtension\\:\\:setMaximumConditionalFormatValueObject\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBarExtension\\:\\:setMinimumConditionalFormatValueObject\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalDataBarExtension.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:\\$type has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:\\$value has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:\\$cellFormula has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:__construct\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:__construct\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:setType\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:setValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormatValueObject\\:\\:setCellFormula\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormatValueObject.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:\\$id has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:__construct\\(\\) has parameter \\$id with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:generateUuid\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:parseExtLstXml\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:parseExtLstXml\\(\\) has parameter \\$extLstXml with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$minLength on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$maxLength on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$border on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$gradient on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$direction on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$negativeBarBorderColorSameAsPositive on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Cannot access property \\$axisPosition on SimpleXMLElement\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalFormattingRuleExtension\\:\\:parseExtDataBarElementChildrenFromXml\\(\\) has parameter \\$ns with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Offset 'rgb' does not exist on SimpleXMLElement\\|null\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Offset 'theme' does not exist on SimpleXMLElement\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Offset 'tint' does not exist on SimpleXMLElement\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/ConditionalFormatting/ConditionalFormattingRuleExtension.php
+
+ -
+ message: "#^Parameter \\#1 \\$parent of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Supervisor\\:\\:bindParent\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style, \\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill\\) given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Style/Fill.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Fill.php
+
+ -
+ message: "#^Parameter \\#1 \\$parent of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Supervisor\\:\\:bindParent\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style, \\$this\\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Font.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Font.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\:\\:\\$builtInFormatCode \\(int\\|false\\) does not accept bool\\|int\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\DateFormatter\\:\\:format\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$callback of function preg_replace_callback expects callable\\(\\)\\: mixed, array\\('self', 'setLowercaseCallback'\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace_callback expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$replace of function str_replace expects array\\|string, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$callback of function preg_replace_callback expects callable\\(\\)\\: mixed, array\\('self', 'escapeQuotesCallback'\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Parameter \\#1 \\$format of method DateTime\\:\\:format\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\DateFormatter\\:\\:setLowercaseCallback\\(\\) has parameter \\$matches with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\DateFormatter\\:\\:escapeQuotesCallback\\(\\) has parameter \\$matches with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/DateFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has parameter \\$cond with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has parameter \\$dfcond with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has parameter \\$dfval with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has parameter \\$val with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormatCompare\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormat\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormat\\(\\) has parameter \\$sections with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:splitFormat\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\Formatter\\:\\:toFormattedString\\(\\) should return string but returns float\\|int\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_split expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/Formatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\FractionFormatter\\:\\:format\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function trim expects string, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/FractionFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:mergeComplexNumberFormatMasks\\(\\) has parameter \\$masks with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:mergeComplexNumberFormatMasks\\(\\) has parameter \\$numbers with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:processComplexNumberFormatMask\\(\\) has parameter \\$mask with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:processComplexNumberFormatMask\\(\\) has parameter \\$number with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:complexNumberFormatMask\\(\\) has parameter \\$mask with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:complexNumberFormatMask\\(\\) has parameter \\$number with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:complexNumberFormatMask\\(\\) has parameter \\$splitOnPoint with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function strpos expects string, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function explode expects string, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:formatStraightNumericValue\\(\\) has parameter \\$format with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:formatStraightNumericValue\\(\\) has parameter \\$useThousands with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:formatStraightNumericValue\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:format\\(\\) has parameter \\$format with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\NumberFormatter\\:\\:format\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, array\\|string\\|null given\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match expects string, array\\|string\\|null given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Parameter \\#2 \\$format of static method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\FractionFormatter\\:\\:format\\(\\) expects string, array\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/NumberFormatter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\\\PercentageFormatter\\:\\:format\\(\\) has parameter \\$value with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/PercentageFormatter.php
+
+ -
+ message: "#^Parameter \\#1 \\$format of function sprintf expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/NumberFormat/PercentageFormatter.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getSharedComponent\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Protection.php
+
+ -
+ message: "#^Call to an undefined method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getCellXfByIndex\\(\\)\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Style.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\:\\:getParent\\(\\) should return PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet but returns PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Style\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Style/Style.php
+
+ -
+ message: "#^Result of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$excelTimestamp of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Date\\:\\:excelToTimestamp\\(\\) expects float\\|int, float\\|int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\<1, max\\>\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:\\$toReplace has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#2 \\$now of function strtotime expects int, int\\|false given\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#5 \\$day of function gmmktime expects int, string given\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#6 \\$year of function gmmktime expects int, string given\\.$#"
+ count: 13
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#4 \\$mon of function gmmktime expects int, string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#5 \\$day of function gmmktime expects int, float given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$attributes of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\:\\:setAttributes\\(\\) expects array\\, array\\ given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$columnID with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$endRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$ruleType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$ruleValue with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$startRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot call method rangeToArray\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot call method getRowDimension\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'year' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'month' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'day' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'hour' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'minute' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot assign offset 'second' to array\\\\|string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function preg_quote expects string, array\\\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Binary operation \"\\*\" between 0\\|array\\\\|string and float\\|int results in an error\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Left side of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Parameter \\#1 \\$function of function call_user_func_array expects callable\\(\\)\\: mixed, array\\('PhpOffice\\\\\\\\PhpSpreadsheet\\\\\\\\Worksheet\\\\\\\\AutoFilter', mixed\\) given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$ruleTypes has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$dateTimeGroups has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$dynamicTypes has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$operators has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$topTenValue has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$topTenType has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$parent \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php
+
+ -
+ message: "#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/BaseDrawing.php
+
+ -
+ message: "#^Cannot call method getDrawingCollection\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/BaseDrawing.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\BaseDrawing\\:\\:\\$shadow \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Drawing\\\\Shadow\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Drawing\\\\Shadow\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/BaseDrawing.php
+
+ -
+ message: "#^Cannot call method getHashCode\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/BaseDrawing.php
+
+ -
+ message: "#^Class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\CellIterator implements generic interface Iterator but does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/CellIterator.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\CellIterator\\:\\:adjustForExistingOnlyRange\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/CellIterator.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Column\\:\\:\\$parent \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Column.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\CellIterator\\:\\:\\$worksheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php
+
+ -
+ message: "#^Class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\ColumnIterator implements generic interface Iterator but does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/ColumnIterator.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Drawing\\\\Shadow\\:\\:\\$color \\(PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Color\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Color\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php
+
+ -
+ message: "#^Class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Iterator implements generic interface Iterator but does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Iterator.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\PageSetup\\:\\:\\$pageOrder has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/PageSetup.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int\\ and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/PageSetup.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\PageSetup\\:\\:getPrintArea\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/PageSetup.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|null given\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Worksheet/PageSetup.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\PageSetup\\:\\:setFirstPageNumber\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/PageSetup.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Row\\:\\:\\$worksheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Row.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\CellIterator\\:\\:\\$worksheet \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/RowCellIterator.php
+
+ -
+ message: "#^Class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\RowIterator implements generic interface Iterator but does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/RowIterator.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\SheetView\\:\\:\\$sheetViewTypes has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/SheetView.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int\\ and null will always evaluate to false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/SheetView.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/SheetView.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:\\$drawingCollection with generic class ArrayObject does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:\\$chartCollection with generic class ArrayObject does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:\\$parent \\(PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pIndex of class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\RowDimension constructor expects int, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pIndex of class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\ColumnDimension constructor expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pRange of class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter constructor expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:getDrawingCollection\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:getChartCollection\\(\\) return type with generic class ArrayObject does not specify its types\\: TKey, TValue$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$input of function array_splice expects array, ArrayObject&iterable\\ given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pRange of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:rangeDimension\\(\\) expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$format of static method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\:\\:toFormattedString\\(\\) expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#3 \\$rotation of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:calculateColumnWidth\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Left side of && is always true\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method renameCalculationCacheForWorksheet\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$start of function substr expects int, int\\<0, max\\>\\|false given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Result of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pRange of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:setRange\\(\\) expects string, null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:getFreezePane\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$row of method PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\:\\:removeRow\\(\\) expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$coord of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:coordinateIsRange\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$pRange of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:splitRange\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:\\$activeCell \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:\\$selectedCells \\(string\\) does not accept string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getCalculatedValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getXfIndex\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Right side of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getHashCode\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getWorksheet\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method getValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\DefinedName\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Cannot call method rangeToArray\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Worksheet/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Csv\\:\\:\\$enclosureRequired has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Csv.php
+
+ -
+ message: "#^Call to function array_key_exists\\(\\) with int and array\\('none' \\=\\> 'none', 'dashDot' \\=\\> '1px dashed', 'dashDotDot' \\=\\> '1px dotted', 'dashed' \\=\\> '1px dashed', 'dotted' \\=\\> '1px dotted', 'double' \\=\\> '3px double', 'hair' \\=\\> '1px solid', 'medium' \\=\\> '2px solid', \\.\\.\\.\\) will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:getSheetIndex\\(\\) should return int but returns int\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has parameter \\$desc with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateMeta\\(\\) has parameter \\$val with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetPrep\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has parameter \\$rowMin with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetStarts\\(\\) has parameter \\$sheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$row with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$tbodyStart with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$theadEnd with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateSheetTags\\(\\) has parameter \\$theadStart with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function htmlspecialchars expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Cannot access offset 'mime' on array\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagepng expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$str of function base64_encode expects string, string\\|false given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Ternary operator condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#3 \\$use_include_path of function fopen expects bool, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#2 \\$length of function fread expects int, int\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Cannot access offset 0 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$vAlign of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapVAlign\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$hAlign of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapHAlign\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$borderStyle of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:mapBorderStyle\\(\\) expects int, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateHTMLFooter\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTagInline\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTagInline\\(\\) has parameter \\$id with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTagInline\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$html with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$id with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableTag\\(\\) has parameter \\$sheetIndex with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateTableFooter\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$cellAddress with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$colNum with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$pRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellCss\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValueRich\\(\\) has parameter \\$cell with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValueRich\\(\\) has parameter \\$cellData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Parameter \\#1 \\$pStyle of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:createCSSStyleFont\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Cannot call method getSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Cannot call method getSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValue\\(\\) has parameter \\$cell with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValue\\(\\) has parameter \\$cellData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellDataValue\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cell with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cellType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$cssClass with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowCellData\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowIncludeCharts\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowIncludeCharts\\(\\) has parameter \\$coordinate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowIncludeCharts\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$colSpan with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$html with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowSpans\\(\\) has parameter \\$rowSpan with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cellData with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cellType with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$colNum with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$colSpan with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$coordinate with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$cssClass with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$html with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$pRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$pSheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$rowSpan with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:generateRowWriteCell\\(\\) has parameter \\$sheetIndex with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$candidateSpannedRow with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$sheet with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Html\\:\\:calculateSpansOmitRows\\(\\) has parameter \\$sheetIndex with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Html.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\IWriter\\:\\:save\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/IWriter.php
+
+ -
+ message: "#^Negated boolean expression is always false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\Cell\\\\Style\\:\\:\\$writer has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Ods/Cell/Style.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\Content\\:\\:\\$formulaConvertor has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/Content.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Writer/Ods/Content.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<2, max\\> given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Ods/Content.php
+
+ -
+ message: "#^Parameter \\#1 \\$pRange of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:splitRange\\(\\) expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/Content.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\Formula\\:\\:\\$definedNames has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/Formula.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\NamedExpressions\\:\\:\\$objWriter has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\NamedExpressions\\:\\:\\$spreadsheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\NamedExpressions\\:\\:\\$formulaConvertor has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Ods\\\\NamedExpressions\\:\\:__construct\\(\\) has parameter \\$formulaConvertor with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php
+
+ -
+ message: "#^Cannot call method getTitle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Ods/NamedExpressions.php
+
+ -
+ message: "#^Parameter \\#1 \\$content of method XMLWriter\\:\\:text\\(\\) expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Ods/Settings.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Pdf/Dompdf.php
+
+ -
+ message: "#^Parameter \\#2 \\$str of function fwrite expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Pdf/Dompdf.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between null and int will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Pdf/Mpdf.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between int and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php
+
+ -
+ message: "#^Cannot call method getHashCode\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$font of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:addFont\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'startCoordinates' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'startOffsetX' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'startOffsetY' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'endCoordinates' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'endOffsetX' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Offset 'endOffsetY' does not exist on array\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\\\Blip\\:\\:setData\\(\\) expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagepng expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagepng expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#1 \\$blipType of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\\\DggContainer\\\\BstoreContainer\\\\BSE\\:\\:setBlipType\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Parameter \\#2 \\$pad_length of function str_pad expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\BIFFwriter\\:\\:writeEof\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Escher\\:\\:\\$object has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Escher.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Escher\\:\\:\\$data has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Escher.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xls/Escher.php
+
+ -
+ message: "#^Elseif condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Escher.php
+
+ -
+ message: "#^Parameter \\#1 \\$name of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Font\\:\\:getCharsetFromFontName\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Font.php
+
+ -
+ message: "#^If condition is always false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xls/Font.php
+
+ -
+ message: "#^Parameter \\#1 \\$bold of static method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Font\\:\\:mapBold\\(\\) expects bool, bool\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Font.php
+
+ -
+ message: "#^Parameter \\#1 \\$underline of static method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Font\\:\\:mapUnderline\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Font.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:UTF8toBIFF8UnicodeShort\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Font.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Parser\\:\\:\\$spreadsheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Parser\\:\\:advance\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Offset 'left' does not exist on \\(array&nonEmpty\\)\\|string\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Offset 'right' does not exist on \\(array&nonEmpty\\)\\|string\\.$#"
+ count: 5
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Offset 'value' does not exist on \\(array&nonEmpty\\)\\|string\\.$#"
+ count: 7
+ path: src/PhpSpreadsheet/Writer/Xls/Parser.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:\\$colors has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Cannot call method getTitle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:writeAllDefinedNamesBiff8\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Parameter \\#1 \\$pSheet of method PhpOffice\\\\PhpSpreadsheet\\\\Spreadsheet\\:\\:getIndex\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet, PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:writeSupbookInternal\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:writeExternalsheetBiff8\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Cannot access offset 'encoding' on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:writeMsoDrawingGroup\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Workbook\\:\\:\\$escher \\(PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Workbook.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:\\$colors has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot call method getHashCode\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#4 \\$isError of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:writeBoolErr\\(\\) expects bool, int given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$pieces of function implode expects array, array\\\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match_all expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$coordinates of static method PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Coordinate\\:\\:indexesFromString\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:\\$activePane \\(int\\) does not accept int\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#5 \\$width of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:positionImage\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#6 \\$height of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:positionImage\\(\\) expects int, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagesx expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagesy expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagecolorat expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagecolorsforindex expects resource, GdImage\\|resource given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$col of function imagecolorsforindex expects int, int\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$ascii of function chr expects int, float given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$length of function fread expects int, int\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$data of function unpack expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot access offset 'ident' on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot access offset 'sa' on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot access offset 1 on array\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot access offset 2 on array\\|false\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Cannot access offset 'comp' on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Worksheet\\:\\:\\$escher \\(PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\Escher\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Worksheet.php
+
+ -
+ message: "#^Parameter \\#1 \\$textRotation of static method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xls\\\\Xf\\:\\:mapTextRotation\\(\\) expects int, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xls/Xf.php
+
+ -
+ message: "#^Possibly invalid array key type array\\|string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$path of function dirname expects string, array\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$path of function basename expects string, array\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Parameter \\#1 \\$function of function call_user_func expects callable\\(\\)\\: mixed, string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\:\\:\\$pathNames has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:\\$calculateCellValues has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 45
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Call to function is_array\\(\\) with string will always evaluate to false\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Result of && is always false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\PlotArea and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Argument of an invalid type array\\|string supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$yAxisLabel of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#4 \\$id1 of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects string, int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#5 \\$id2 of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects string, int\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#7 \\$xAxis of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#8 \\$majorGridlines of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#9 \\$minorGridlines of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$xAxisLabel of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeCategoryAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Title\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#3 \\$id1 of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeCategoryAxis\\(\\) expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#4 \\$id2 of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeCategoryAxis\\(\\) expects string, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#6 \\$yAxis of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeCategoryAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Part \\$xAxis\\-\\>getShadowProperty\\('effect'\\) \\(array\\|int\\|string\\|null\\) of encapsed string cannot be cast to string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, array\\|int\\|string given\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Part \\$xAxis\\-\\>getShadowProperty\\(\\['color', 'type'\\]\\) \\(array\\|int\\|string\\|null\\) of encapsed string cannot be cast to string\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, array\\|int\\|string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Else branch is unreachable because previous condition is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:getChartType\\(\\) never returns string so it can be removed from the return typehint\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeries and null will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method getFillColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Cannot call method getDataValues\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#1 \\$plotSeriesValues of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeBubbles\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues and null will always evaluate to false\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#1 \\$text of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:writeRawData\\(\\) expects array\\\\|string, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float\\|int given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float given\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function substr expects string, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Comments.php
+
+ -
+ message: "#^Parameter \\#2 \\$content of method XMLWriter\\:\\:writeElement\\(\\) expects string\\|null, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Comments.php
+
+ -
+ message: "#^Parameter \\#1 \\$arr1 of function array_diff expects array, array\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php
+
+ -
+ message: "#^Cannot access offset 2 on array\\|false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\DefinedNames\\:\\:\\$objWriter has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\DefinedNames\\:\\:\\$spreadsheet has no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php
+
+ -
+ message: "#^Cannot call method getTitle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/DefinedNames.php
+
+ -
+ message: "#^Parameter \\#2 \\$content of method XMLWriter\\:\\:writeElement\\(\\) expects string\\|null, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/DocProps.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/DocProps.php
+
+ -
+ message: "#^Parameter \\#1 \\$index of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\:\\:getChartByIndex\\(\\) expects string, int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$pChart of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Drawing\\:\\:writeChart\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Chart\\|false given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$content of method XMLWriter\\:\\:writeElement\\(\\) expects string\\|null, int given\\.$#"
+ count: 12
+ path: src/PhpSpreadsheet/Writer/Xlsx/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Writer/Xlsx/Drawing.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<0, max\\> given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Drawing.php
+
+ -
+ message: "#^Parameter \\#4 \\$pTarget of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeRelationship\\(\\) expects string, array\\|string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Parameter \\#2 \\$pId of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeRelationship\\(\\) expects int, string given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeUnparsedRelationship\\(\\) has parameter \\$relationship with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeUnparsedRelationship\\(\\) has parameter \\$type with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeDrawingHyperLink\\(\\) has parameter \\$i with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeDrawingHyperLink\\(\\) has parameter \\$objWriter with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Parameter \\#2 \\$pId of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeRelationship\\(\\) expects int, float\\|int given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Rels\\:\\:writeDrawingHyperLink\\(\\) should return int but returns float\\|int\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Rels.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<0, max\\> given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Instanceof between string and PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\RichText will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Instanceof between \\*NEVER\\* and PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\RichText will always evaluate to false\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getName\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getBold\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getItalic\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getSubscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getSuperscript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getStrikethrough\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getSize\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Cannot call method getUnderline\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Parameter \\#1 \\$pText of method PhpOffice\\\\PhpSpreadsheet\\\\RichText\\\\RichText\\:\\:createTextRun\\(\\) expects string, string\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/StringTable.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 22
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$pNumberFormat of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Style\\:\\:writeNumFmt\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\NumberFormat\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$pFont of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Style\\:\\:writeFont\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$pFill of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Style\\:\\:writeFill\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Fill\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$pBorders of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Style\\:\\:writeBorder\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Borders, PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Borders\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<0, max\\> given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Cannot call method getStyle\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
+ count: 4
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Comparison operation \"\\<\" between int\\ and 0 is always true\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<1, max\\> given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Result of \\|\\| is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Style.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 7
+ path: src/PhpSpreadsheet/Writer/Xlsx/Workbook.php
+
+ -
+ message: "#^Parameter \\#3 \\$pStringTable of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Worksheet\\:\\:writeSheetData\\(\\) expects array\\, array\\\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, string\\|null given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
+ count: 19
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<1, max\\> given\\.$#"
+ count: 7
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\<0, max\\> given\\.$#"
+ count: 3
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int\\|null given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Worksheet\\:\\:writeAttributeIf\\(\\) has parameter \\$condition with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Worksheet\\:\\:writeElementIf\\(\\) has parameter \\$condition with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#3 \\$namespace of method XMLWriter\\:\\:startElementNs\\(\\) expects string, null given\\.$#"
+ count: 8
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^If condition is always true\\.$#"
+ count: 6
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Worksheet\\:\\:writeDataBarElements\\(\\) has parameter \\$dataBar with no typehint specified\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#4 \\$val of static method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Worksheet\\:\\:writeAttributeIf\\(\\) expects string, int given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, array\\\\|string given\\.$#"
+ count: 2
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|string supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Parameter \\#2 \\$content of method XMLWriter\\:\\:writeElement\\(\\) expects string\\|null, int\\|string given\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Right side of && is always true\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Xlfn\\:\\:addXlfn\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: src/PhpSpreadsheet/Writer/Xlsx/Xlfn.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Calculation/Engine/RangeTest.php
+
+ -
+ message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with arguments PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell, null and 'should get exact…' will always evaluate to false\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Collection/CellsTest.php
+
+ -
+ message: "#^Cannot call method getParent\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Collection/CellsTest.php
+
+ -
+ message: "#^Cannot call method getCoordinate\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Collection/CellsTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$row of method PhpOffice\\\\PhpSpreadsheet\\\\Collection\\\\Cells\\:\\:getHighestColumn\\(\\) expects string\\|null, int given\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Collection/CellsTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Functional\\\\ColumnWidthTest\\:\\:testReadColumnWidth\\(\\) has parameter \\$format with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/ColumnWidthTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Functional\\\\CommentsTest\\:\\:testComments\\(\\) has parameter \\$format with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/CommentsTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\:\\:addCondition\\(\\) expects string, float given\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Functional/ConditionalStopIfTrueTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagecolorallocate expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagestring expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php
+
+ -
+ message: "#^Parameter \\#6 \\$col of function imagestring expects int, int\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\MemoryDrawing\\:\\:setImageResource\\(\\) expects GdImage\\|resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php
+
+ -
+ message: "#^Cannot call method getUrl\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Hyperlink\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/DrawingImageHyperlinkTest.php
+
+ -
+ message: "#^Cannot call method getPageSetup\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 5
+ path: tests/PhpSpreadsheetTests/Functional/PrintAreaTest.php
+
+ -
+ message: "#^Cannot access offset 'size' on array\\(0 \\=\\> int, 1 \\=\\> int, 2 \\=\\> int, 3 \\=\\> int, 4 \\=\\> int, 5 \\=\\> int, 6 \\=\\> int, 7 \\=\\> int, \\.\\.\\.\\)\\|false\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Functional/StreamTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$fp of function fstat expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/StreamTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pFilename of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\IWriter\\:\\:save\\(\\) expects resource\\|string, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Functional/StreamTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$expected of static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) expects class\\-string\\, string given\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/IOFactoryTest.php
+
+ -
+ message: "#^Cannot call method getValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\NamedFormula\\|null\\.$#"
+ count: 5
+ path: tests/PhpSpreadsheetTests/NamedFormulaTest.php
+
+ -
+ message: "#^Cannot call method getValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\NamedRange\\|null\\.$#"
+ count: 5
+ path: tests/PhpSpreadsheetTests/NamedRangeTest.php
+
+ -
+ message: "#^Unreachable statement \\- code above always terminates\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Ods/OdsTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Security\\\\XmlScannerTest\\:\\:testValidXML\\(\\) has parameter \\$libxmlDisableEntityLoader with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Security\\\\XmlScannerTest\\:\\:testInvalidXML\\(\\) has parameter \\$libxmlDisableEntityLoader with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php
+
+ -
+ message: "#^Cannot call method getFormattedValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/XlsTest.php
+
+ -
+ message: "#^Cannot call method getCoordinate\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Cell\\\\Cell\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/XlsTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Xlsx\\\\AutoFilterTest\\:\\:getWorksheetInstance\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Xlsx\\\\AutoFilterTest\\:\\:getXMLInstance\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Xlsx\\\\AutoFilterTest\\:\\:getXMLInstance\\(\\) has parameter \\$ref with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Xlsx\\\\AutoFilterTest\\:\\:getAutoFilterInstance\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/AutoFilterTest.php
+
+ -
+ message: "#^Function PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\getTitleText\\(\\) has no return typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ChartsTitleTest.php
+
+ -
+ message: "#^Function PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\getTitleText\\(\\) has parameter \\$title with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ChartsTitleTest.php
+
+ -
+ message: "#^Cannot call method setMinimumConditionalFormatValueObject\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Cannot call method getMinimumConditionalFormatValueObject\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 13
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Cannot call method getMaximumConditionalFormatValueObject\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 13
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Cannot call method getColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 5
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Cannot call method getConditionalFormattingRuleExt\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 8
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Cannot call method getShowValue\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\ConditionalFormatting\\\\ConditionalDataBar\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xlsx/ConditionalFormattingDataBarXlsxTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\XlsxTest\\:\\:testStripsWhiteSpaceFromStyleString\\(\\) has parameter \\$string with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/XlsxTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Reader\\\\Xml\\\\XmlTest\\:\\:testInvalidSimpleXML\\(\\) has parameter \\$filename with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php
+
+ -
+ message: "#^Argument of an invalid type array\\\\|false supplied for foreach, only iterables are supported\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Reader/Xml/XmlTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:setCurrencyCode\\(\\) expects string, null given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Shared/StringHelperTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\SpreadsheetTest\\:\\:testGetSheetByName\\(\\) has parameter \\$index with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/SpreadsheetTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\SpreadsheetTest\\:\\:testGetSheetByName\\(\\) has parameter \\$sheetName with no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/SpreadsheetTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\:\\:addCondition\\(\\) expects string, float given\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Style/ConditionalTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Conditional\\:\\:setConditions\\(\\) expects array\\\\|bool\\|float\\|int\\|string, array\\ given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Style/ConditionalTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:setValue\\(\\) expects array\\\\|string, int given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/AutoFilter/Column/RuleTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$attributes of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\:\\:setAttributes\\(\\) expects array\\, array\\ given\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php
+
+ -
+ message: "#^Parameter \\#2 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\:\\:setAttribute\\(\\) expects string, int given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$pColumn of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:setColumn\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\|string, float given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/AutoFilterTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagecolorallocate expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$im of function imagestring expects resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php
+
+ -
+ message: "#^Parameter \\#6 \\$col of function imagestring expects int, int\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$value of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\MemoryDrawing\\:\\:setImageResource\\(\\) expects GdImage\\|resource, resource\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/DrawingTest.php
+
+ -
+ message: "#^Parameter \\#2 \\$rowIndex of class PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\RowCellIterator constructor expects int, string given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/RowCellIterator2Test.php
+
+ -
+ message: "#^Parameter \\#1 \\$options of static method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:setLibXmlLoaderOptions\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Worksheet/WorksheetNamedRangesTest.php
+
+ -
+ message: "#^Property PhpOffice\\\\PhpSpreadsheetTests\\\\Writer\\\\Csv\\\\CsvEnclosureTest\\:\\:\\$cellValues has no typehint specified\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php
+
+ -
+ message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|false given\\.$#"
+ count: 4
+ path: tests/PhpSpreadsheetTests/Writer/Csv/CsvEnclosureTest.php
+
+ -
+ message: "#^Method PhpOffice\\\\PhpSpreadsheetTests\\\\Writer\\\\Html\\\\CallbackTest\\:\\:yellowBody\\(\\) should return string but returns string\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function strpos expects string, string\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Html/CallbackTest.php
+
+ -
+ message: "#^Cannot call method getColor\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Writer/Html/GridlinesTest.php
+
+ -
+ message: "#^Cannot call method setSuperScript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Html/GridlinesTest.php
+
+ -
+ message: "#^Cannot call method setSubScript\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Writer/Html/GridlinesTest.php
+
+ -
+ message: "#^Cannot call method setBold\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Style\\\\Font\\|null\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Writer/Html/HtmlCommentsTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$directory of function chdir expects string, string\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Html/ImagesRootTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$options of static method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:setLibXmlLoaderOptions\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/FloatsRetainedTest.php
+
+ -
+ message: "#^Parameter \\#2 \\$locale of function setlocale expects string\\|null, string\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php
+
+ -
+ message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|false given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/LocaleFloatsTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$options of static method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:setLibXmlLoaderOptions\\(\\) expects int, null given\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/StartsWithHashTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$options of static method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:setLibXmlLoaderOptions\\(\\) expects int, null given\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataCloneTest.php
+
+ -
+ message: "#^Cannot call method getDrawingCollection\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 4
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataCloneTest.php
+
+ -
+ message: "#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
+ count: 4
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataCloneTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$options of static method PhpOffice\\\\PhpSpreadsheet\\\\Settings\\:\\:setLibXmlLoaderOptions\\(\\) expects int, null given\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
+ -
+ message: "#^Parameter \\#1 \\$data of function simplexml_load_string expects string, string\\|false given\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
+ -
+ message: "#^Cannot access property \\$workbookProtection on SimpleXMLElement\\|false\\.$#"
+ count: 3
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
+ -
+ message: "#^Cannot access property \\$sheets on SimpleXMLElement\\|false\\.$#"
+ count: 2
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
+ -
+ message: "#^Cannot access property \\$pageSetup on SimpleXMLElement\\|false\\.$#"
+ count: 1
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
+ -
+ message: "#^Cannot access property \\$sheetProtection on SimpleXMLElement\\|false\\.$#"
+ count: 5
+ path: tests/PhpSpreadsheetTests/Writer/Xlsx/UnparsedDataTest.php
+
diff --git a/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist b/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist
new file mode 100644
index 00000000..b7a4fca8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist
@@ -0,0 +1,29 @@
+includes:
+ - phpstan-baseline.neon
+ - vendor/phpstan/phpstan-phpunit/extension.neon
+ - vendor/phpstan/phpstan-phpunit/rules.neon
+
+parameters:
+ level: max
+ paths:
+ - src/
+ - tests/
+ parallel:
+ processTimeout: 300.0
+ checkMissingIterableValueType: false
+ ignoreErrors:
+ - '~^Class GdImage not found\.$~'
+ - '~^Return typehint of method .* has invalid type GdImage\.$~'
+ - '~^Property .* has unknown class GdImage as its type\.$~'
+ - '~^Parameter .* of method .* has invalid typehint type GdImage\.$~'
+ - '~^Parameter \#1 \$im of function (imagedestroy|imageistruecolor|imagealphablending|imagesavealpha|imagecolortransparent|imagecolorsforindex|imagesavealpha|imagesx|imagesy) expects resource, GdImage\|resource given\.$~'
+ - '~^Parameter \#2 \$src_im of function imagecopy expects resource, GdImage\|resource given\.$~'
+ # Accept a bit anything for assert methods
+ - '~^Parameter \#2 .* of static method PHPUnit\\Framework\\Assert\:\:assert\w+\(\) expects .*, .* given\.$~'
+ - '~^Method PhpOffice\\PhpSpreadsheetTests\\.*\:\:test.*\(\) has parameter \$args with no typehint specified\.$~'
+
+ # Ignore all JpGraph issues
+ - '~^Constant (MARK_CIRCLE|MARK_CROSS|MARK_DIAMOND|MARK_DTRIANGLE|MARK_FILLEDCIRCLE|MARK_SQUARE|MARK_STAR|MARK_UTRIANGLE|MARK_X|SIDE_RIGHT) not found\.$~'
+ - '~^Instantiated class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot) not found\.$~'
+ - '~^Call to method .*\(\) on an unknown class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot)\.$~'
+ - '~^Access to property .* on an unknown class (AccBarPlot|AccLinePlot|BarPlot|ContourPlot|Graph|GroupBarPlot|GroupBarPlot|LinePlot|LinePlot|PieGraph|PiePlot|PiePlot3D|PiePlotC|RadarGraph|RadarPlot|ScatterPlot|Spline|StockPlot)\.$~'
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
index bc0baa4d..d03b3623 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
@@ -30,6 +30,9 @@ class Calculation
const CALCULATION_REGEXP_CELLREF = '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?\b([a-z]{1,3})\$?(\d{1,7})(?![\w.])';
// Cell reference (with or without a sheet reference) ensuring absolute/relative
const CALCULATION_REGEXP_CELLREF_RELATIVE = '((([^\s\(,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?(\$?\b[a-z]{1,3})(\$?\d{1,7})(?![\w.])';
+ const CALCULATION_REGEXP_COLUMN_RANGE = '(((([^\s\(,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?(\$?[a-z]{1,3})):(?![.*])';
+ const CALCULATION_REGEXP_ROW_RANGE = '(((([^\s\(,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?(\$?[1-9][0-9]{0,6})):(?![.*])';
+ // Cell reference (with or without a sheet reference) ensuring absolute/relative
// Cell ranges ensuring absolute/relative
const CALCULATION_REGEXP_COLUMNRANGE_RELATIVE = '(\$?[a-z]{1,3}):(\$?[a-z]{1,3})';
const CALCULATION_REGEXP_ROWRANGE_RELATIVE = '(\$?\d{1,7}):(\$?\d{1,7})';
@@ -130,7 +133,7 @@ class Calculation
/**
* Error message for any error that was raised/thrown by the calculation engine.
*
- * @var string
+ * @var null|string
*/
public $formulaError;
@@ -204,7 +207,7 @@ class Calculation
/**
* Locale-specific translations for Excel constants (True, False and Null).
*
- * @var string[]
+ * @var array
*/
public static $localeBoolean = [
'TRUE' => 'TRUE',
@@ -216,7 +219,7 @@ class Calculation
* Excel constant string translations to their PHP equivalents
* Constant conversion from text name/value to actual (datatyped) value.
*
- * @var string[]
+ * @var array
*/
private static $excelConstants = [
'TRUE' => true,
@@ -228,42 +231,42 @@ class Calculation
private static $phpSpreadsheetFunctions = [
'ABS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinABS'],
+ 'functionCall' => [MathTrig\Absolute::class, 'evaluate'],
'argumentCount' => '1',
],
'ACCRINT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'ACCRINT'],
- 'argumentCount' => '4-7',
+ 'functionCall' => [Financial\Securities\AccruedInterest::class, 'periodic'],
+ 'argumentCount' => '4-8',
],
'ACCRINTM' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'ACCRINTM'],
+ 'functionCall' => [Financial\Securities\AccruedInterest::class, 'atMaturity'],
'argumentCount' => '3-5',
],
'ACOS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinACOS'],
+ 'functionCall' => [MathTrig\Trig\Cosine::class, 'acos'],
'argumentCount' => '1',
],
'ACOSH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinACOSH'],
+ 'functionCall' => [MathTrig\Trig\Cosine::class, 'acosh'],
'argumentCount' => '1',
],
'ACOT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'ACOT'],
+ 'functionCall' => [MathTrig\Trig\Cotangent::class, 'acot'],
'argumentCount' => '1',
],
'ACOTH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'ACOTH'],
+ 'functionCall' => [MathTrig\Trig\Cotangent::class, 'acoth'],
'argumentCount' => '1',
],
'ADDRESS' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'cellAddress'],
+ 'functionCall' => [LookupRef\Address::class, 'cell'],
'argumentCount' => '2-5',
],
'AGGREGATE' => [
@@ -273,12 +276,12 @@ class Calculation
],
'AMORDEGRC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'AMORDEGRC'],
+ 'functionCall' => [Financial\Amortization::class, 'AMORDEGRC'],
'argumentCount' => '6,7',
],
'AMORLINC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'AMORLINC'],
+ 'functionCall' => [Financial\Amortization::class, 'AMORLINC'],
'argumentCount' => '6,7',
],
'AND' => [
@@ -288,7 +291,7 @@ class Calculation
],
'ARABIC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'ARABIC'],
+ 'functionCall' => [MathTrig\Arabic::class, 'evaluate'],
'argumentCount' => '1',
],
'AREAS' => [
@@ -296,6 +299,11 @@ class Calculation
'functionCall' => [Functions::class, 'DUMMY'],
'argumentCount' => '1',
],
+ 'ARRAYTOTEXT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'ASC' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
'functionCall' => [Functions::class, 'DUMMY'],
@@ -303,42 +311,42 @@ class Calculation
],
'ASIN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinASIN'],
+ 'functionCall' => [MathTrig\Trig\Sine::class, 'asin'],
'argumentCount' => '1',
],
'ASINH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinASINH'],
+ 'functionCall' => [MathTrig\Trig\Sine::class, 'asinh'],
'argumentCount' => '1',
],
'ATAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinATAN'],
+ 'functionCall' => [MathTrig\Trig\Tangent::class, 'atan'],
'argumentCount' => '1',
],
'ATAN2' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'ATAN2'],
+ 'functionCall' => [MathTrig\Trig\Tangent::class, 'atan2'],
'argumentCount' => '2',
],
'ATANH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinATANH'],
+ 'functionCall' => [MathTrig\Trig\Tangent::class, 'atanh'],
'argumentCount' => '1',
],
'AVEDEV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Averages::class, 'AVEDEV'],
+ 'functionCall' => [Statistical\Averages::class, 'averageDeviations'],
'argumentCount' => '1+',
],
'AVERAGE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Averages::class, 'AVERAGE'],
+ 'functionCall' => [Statistical\Averages::class, 'average'],
'argumentCount' => '1+',
],
'AVERAGEA' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Averages::class, 'AVERAGEA'],
+ 'functionCall' => [Statistical\Averages::class, 'averageA'],
'argumentCount' => '1+',
],
'AVERAGEIF' => [
@@ -358,7 +366,7 @@ class Calculation
],
'BASE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'BASE'],
+ 'functionCall' => [MathTrig\Base::class, 'evaluate'],
'argumentCount' => '2,3',
],
'BESSELI' => [
@@ -383,7 +391,7 @@ class Calculation
],
'BETADIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'BETADIST'],
+ 'functionCall' => [Statistical\Distributions\Beta::class, 'distribution'],
'argumentCount' => '3-5',
],
'BETA.DIST' => [
@@ -393,12 +401,12 @@ class Calculation
],
'BETAINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'BETAINV'],
+ 'functionCall' => [Statistical\Distributions\Beta::class, 'inverse'],
'argumentCount' => '3-5',
],
'BETA.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'BETAINV'],
+ 'functionCall' => [Statistical\Distributions\Beta::class, 'inverse'],
'argumentCount' => '3-5',
],
'BIN2DEC' => [
@@ -418,22 +426,22 @@ class Calculation
],
'BINOMDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'BINOMDIST'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'distribution'],
'argumentCount' => '4',
],
'BINOM.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'BINOMDIST'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'distribution'],
'argumentCount' => '4',
],
'BINOM.DIST.RANGE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'range'],
'argumentCount' => '3,4',
],
'BINOM.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'inverse'],
'argumentCount' => '3',
],
'BITAND' => [
@@ -448,7 +456,7 @@ class Calculation
],
'BITXOR' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering\BitWise::class, 'BITOR'],
+ 'functionCall' => [Engineering\BitWise::class, 'BITXOR'],
'argumentCount' => '2',
],
'BITLSHIFT' => [
@@ -463,17 +471,17 @@ class Calculation
],
'CEILING' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Ceiling::class, 'funcCeiling'],
+ 'functionCall' => [MathTrig\Ceiling::class, 'ceiling'],
'argumentCount' => '1-2', // 2 for Excel, 1-2 for Ods/Gnumeric
],
'CEILING.MATH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\CeilingMath::class, 'funcCeilingMath'],
+ 'functionCall' => [MathTrig\Ceiling::class, 'math'],
'argumentCount' => '1-3',
],
'CEILING.PRECISE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\CeilingPrecise::class, 'funcCeilingPrecise'],
+ 'functionCall' => [MathTrig\Ceiling::class, 'precise'],
'argumentCount' => '1,2',
],
'CELL' => [
@@ -483,108 +491,109 @@ class Calculation
],
'CHAR' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'CHARACTER'],
+ 'functionCall' => [TextData\CharacterConvert::class, 'character'],
'argumentCount' => '1',
],
'CHIDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CHIDIST'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionRightTail'],
'argumentCount' => '2',
],
'CHISQ.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionLeftTail'],
'argumentCount' => '3',
],
'CHISQ.DIST.RT' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CHIDIST'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'distributionRightTail'],
'argumentCount' => '2',
],
'CHIINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CHIINV'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseRightTail'],
'argumentCount' => '2',
],
'CHISQ.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseLeftTail'],
'argumentCount' => '2',
],
'CHISQ.INV.RT' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CHIINV'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'inverseRightTail'],
'argumentCount' => '2',
],
'CHITEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'test'],
'argumentCount' => '2',
],
'CHISQ.TEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Statistical\Distributions\ChiSquared::class, 'test'],
'argumentCount' => '2',
],
'CHOOSE' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'CHOOSE'],
+ 'functionCall' => [LookupRef\Selection::class, 'CHOOSE'],
'argumentCount' => '2+',
],
'CLEAN' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'TRIMNONPRINTABLE'],
+ 'functionCall' => [TextData\Trim::class, 'nonPrintable'],
'argumentCount' => '1',
],
'CODE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'ASCIICODE'],
+ 'functionCall' => [TextData\CharacterConvert::class, 'code'],
'argumentCount' => '1',
],
'COLUMN' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'COLUMN'],
+ 'functionCall' => [LookupRef\RowColumnInformation::class, 'COLUMN'],
'argumentCount' => '-1',
+ 'passCellReference' => true,
'passByReference' => [true],
],
'COLUMNS' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'COLUMNS'],
+ 'functionCall' => [LookupRef\RowColumnInformation::class, 'COLUMNS'],
'argumentCount' => '1',
],
'COMBIN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'COMBIN'],
+ 'functionCall' => [MathTrig\Combinations::class, 'withoutRepetition'],
'argumentCount' => '2',
],
'COMBINA' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [MathTrig\Combinations::class, 'withRepetition'],
'argumentCount' => '2',
],
'COMPLEX' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'COMPLEX'],
+ 'functionCall' => [Engineering\Complex::class, 'COMPLEX'],
'argumentCount' => '2,3',
],
'CONCAT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'CONCATENATE'],
+ 'functionCall' => [TextData\Concatenate::class, 'CONCATENATE'],
'argumentCount' => '1+',
],
'CONCATENATE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'CONCATENATE'],
+ 'functionCall' => [TextData\Concatenate::class, 'CONCATENATE'],
'argumentCount' => '1+',
],
'CONFIDENCE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CONFIDENCE'],
+ 'functionCall' => [Statistical\Confidence::class, 'CONFIDENCE'],
'argumentCount' => '3',
],
'CONFIDENCE.NORM' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CONFIDENCE'],
+ 'functionCall' => [Statistical\Confidence::class, 'CONFIDENCE'],
'argumentCount' => '3',
],
'CONFIDENCE.T' => [
@@ -599,27 +608,27 @@ class Calculation
],
'CORREL' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CORREL'],
+ 'functionCall' => [Statistical\Trends::class, 'CORREL'],
'argumentCount' => '2',
],
'COS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinCOS'],
+ 'functionCall' => [MathTrig\Trig\Cosine::class, 'cos'],
'argumentCount' => '1',
],
'COSH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinCOSH'],
+ 'functionCall' => [MathTrig\Trig\Cosine::class, 'cosh'],
'argumentCount' => '1',
],
'COT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'COT'],
+ 'functionCall' => [MathTrig\Trig\Cotangent::class, 'cot'],
'argumentCount' => '1',
],
'COTH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'COTH'],
+ 'functionCall' => [MathTrig\Trig\Cotangent::class, 'coth'],
'argumentCount' => '1',
],
'COUNT' => [
@@ -649,42 +658,42 @@ class Calculation
],
'COUPDAYBS' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPDAYBS'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPDAYBS'],
'argumentCount' => '3,4',
],
'COUPDAYS' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPDAYS'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPDAYS'],
'argumentCount' => '3,4',
],
'COUPDAYSNC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPDAYSNC'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPDAYSNC'],
'argumentCount' => '3,4',
],
'COUPNCD' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPNCD'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPNCD'],
'argumentCount' => '3,4',
],
'COUPNUM' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPNUM'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPNUM'],
'argumentCount' => '3,4',
],
'COUPPCD' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'COUPPCD'],
+ 'functionCall' => [Financial\Coupons::class, 'COUPPCD'],
'argumentCount' => '3,4',
],
'COVAR' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'COVAR'],
+ 'functionCall' => [Statistical\Trends::class, 'COVAR'],
'argumentCount' => '2',
],
'COVARIANCE.P' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'COVAR'],
+ 'functionCall' => [Statistical\Trends::class, 'COVAR'],
'argumentCount' => '2',
],
'COVARIANCE.S' => [
@@ -694,17 +703,17 @@ class Calculation
],
'CRITBINOM' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CRITBINOM'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'inverse'],
'argumentCount' => '3',
],
'CSC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'CSC'],
+ 'functionCall' => [MathTrig\Trig\Cosecant::class, 'csc'],
'argumentCount' => '1',
],
'CSCH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'CSCH'],
+ 'functionCall' => [MathTrig\Trig\Cosecant::class, 'csch'],
'argumentCount' => '1',
],
'CUBEKPIMEMBER' => [
@@ -744,27 +753,32 @@ class Calculation
],
'CUMIPMT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'CUMIPMT'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Cumulative::class, 'interest'],
'argumentCount' => '6',
],
'CUMPRINC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'CUMPRINC'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Cumulative::class, 'principal'],
'argumentCount' => '6',
],
'DATE' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DATE'],
+ 'functionCall' => [DateTimeExcel\Date::class, 'fromYMD'],
'argumentCount' => '3',
],
'DATEDIF' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DATEDIF'],
+ 'functionCall' => [DateTimeExcel\Difference::class, 'interval'],
'argumentCount' => '2,3',
],
+ 'DATESTRING' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'DATEVALUE' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DATEVALUE'],
+ 'functionCall' => [DateTimeExcel\DateValue::class, 'fromString'],
'argumentCount' => '1',
],
'DAVERAGE' => [
@@ -774,22 +788,22 @@ class Calculation
],
'DAY' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DAYOFMONTH'],
+ 'functionCall' => [DateTimeExcel\DateParts::class, 'day'],
'argumentCount' => '1',
],
'DAYS' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DAYS'],
+ 'functionCall' => [DateTimeExcel\Days::class, 'between'],
'argumentCount' => '2',
],
'DAYS360' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DAYS360'],
+ 'functionCall' => [DateTimeExcel\Days360::class, 'between'],
'argumentCount' => '2,3',
],
'DB' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'DB'],
+ 'functionCall' => [Financial\Depreciation::class, 'DB'],
'argumentCount' => '4,5',
],
'DBCS' => [
@@ -809,7 +823,7 @@ class Calculation
],
'DDB' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'DDB'],
+ 'functionCall' => [Financial\Depreciation::class, 'DDB'],
'argumentCount' => '4,5',
],
'DEC2BIN' => [
@@ -834,7 +848,7 @@ class Calculation
],
'DEGREES' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinDEGREES'],
+ 'functionCall' => [MathTrig\Angle::class, 'toDegrees'],
'argumentCount' => '1',
],
'DELTA' => [
@@ -844,7 +858,7 @@ class Calculation
],
'DEVSQ' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'DEVSQ'],
+ 'functionCall' => [Statistical\Deviations::class, 'sumSquares'],
'argumentCount' => '1+',
],
'DGET' => [
@@ -854,7 +868,7 @@ class Calculation
],
'DISC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'DISC'],
+ 'functionCall' => [Financial\Securities\Rates::class, 'discount'],
'argumentCount' => '4,5',
],
'DMAX' => [
@@ -869,17 +883,17 @@ class Calculation
],
'DOLLAR' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'DOLLAR'],
+ 'functionCall' => [TextData\Format::class, 'DOLLAR'],
'argumentCount' => '1,2',
],
'DOLLARDE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'DOLLARDE'],
+ 'functionCall' => [Financial\Dollar::class, 'decimal'],
'argumentCount' => '2',
],
'DOLLARFR' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'DOLLARFR'],
+ 'functionCall' => [Financial\Dollar::class, 'fractional'],
'argumentCount' => '2',
],
'DPRODUCT' => [
@@ -917,24 +931,29 @@ class Calculation
'functionCall' => [Database\DVarP::class, 'evaluate'],
'argumentCount' => '3',
],
+ 'ECMA.CEILING' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '1,2',
+ ],
'EDATE' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'EDATE'],
+ 'functionCall' => [DateTimeExcel\Month::class, 'adjust'],
'argumentCount' => '2',
],
'EFFECT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'EFFECT'],
+ 'functionCall' => [Financial\InterestRate::class, 'effective'],
'argumentCount' => '2',
],
'ENCODEURL' => [
'category' => Category::CATEGORY_WEB,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Web\Service::class, 'urlEncode'],
'argumentCount' => '1',
],
'EOMONTH' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'EOMONTH'],
+ 'functionCall' => [DateTimeExcel\Month::class, 'lastDay'],
'argumentCount' => '2',
],
'ERF' => [
@@ -964,37 +983,37 @@ class Calculation
],
'EVEN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'EVEN'],
+ 'functionCall' => [MathTrig\Round::class, 'even'],
'argumentCount' => '1',
],
'EXACT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'EXACT'],
+ 'functionCall' => [TextData\Text::class, 'exact'],
'argumentCount' => '2',
],
'EXP' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinEXP'],
+ 'functionCall' => [MathTrig\Exp::class, 'evaluate'],
'argumentCount' => '1',
],
'EXPONDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'EXPONDIST'],
+ 'functionCall' => [Statistical\Distributions\Exponential::class, 'distribution'],
'argumentCount' => '3',
],
'EXPON.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'EXPONDIST'],
+ 'functionCall' => [Statistical\Distributions\Exponential::class, 'distribution'],
'argumentCount' => '3',
],
'FACT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'FACT'],
+ 'functionCall' => [MathTrig\Factorial::class, 'fact'],
'argumentCount' => '1',
],
'FACTDOUBLE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'FACTDOUBLE'],
+ 'functionCall' => [MathTrig\Factorial::class, 'factDouble'],
'argumentCount' => '1',
],
'FALSE' => [
@@ -1009,7 +1028,7 @@ class Calculation
],
'F.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'FDIST2'],
+ 'functionCall' => [Statistical\Distributions\F::class, 'distribution'],
'argumentCount' => '4',
],
'F.DIST.RT' => [
@@ -1029,12 +1048,12 @@ class Calculation
],
'FIND' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'],
+ 'functionCall' => [TextData\Search::class, 'sensitive'],
'argumentCount' => '2,3',
],
'FINDB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'SEARCHSENSITIVE'],
+ 'functionCall' => [TextData\Search::class, 'sensitive'],
'argumentCount' => '2,3',
],
'FINV' => [
@@ -1054,37 +1073,37 @@ class Calculation
],
'FISHER' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'FISHER'],
+ 'functionCall' => [Statistical\Distributions\Fisher::class, 'distribution'],
'argumentCount' => '1',
],
'FISHERINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'FISHERINV'],
+ 'functionCall' => [Statistical\Distributions\Fisher::class, 'inverse'],
'argumentCount' => '1',
],
'FIXED' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'FIXEDFORMAT'],
+ 'functionCall' => [TextData\Format::class, 'FIXEDFORMAT'],
'argumentCount' => '1-3',
],
'FLOOR' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Floor::class, 'funcFloor'],
+ 'functionCall' => [MathTrig\Floor::class, 'floor'],
'argumentCount' => '1-2', // Excel requries 2, Ods/Gnumeric 1-2
],
'FLOOR.MATH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\FloorMath::class, 'funcFloorMath'],
+ 'functionCall' => [MathTrig\Floor::class, 'math'],
'argumentCount' => '1-3',
],
'FLOOR.PRECISE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\FloorPrecise::class, 'funcFloorPrecise'],
+ 'functionCall' => [MathTrig\Floor::class, 'precise'],
'argumentCount' => '1-2',
],
'FORECAST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'FORECAST'],
+ 'functionCall' => [Statistical\Trends::class, 'FORECAST'],
'argumentCount' => '3',
],
'FORECAST.ETS' => [
@@ -1109,12 +1128,12 @@ class Calculation
],
'FORECAST.LINEAR' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'FORECAST'],
+ 'functionCall' => [Statistical\Trends::class, 'FORECAST'],
'argumentCount' => '3',
],
'FORMULATEXT' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'FORMULATEXT'],
+ 'functionCall' => [LookupRef\Formula::class, 'text'],
'argumentCount' => '1',
'passCellReference' => true,
'passByReference' => [true],
@@ -1136,62 +1155,62 @@ class Calculation
],
'FV' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'FV'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'futureValue'],
'argumentCount' => '3-5',
],
'FVSCHEDULE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'FVSCHEDULE'],
+ 'functionCall' => [Financial\CashFlow\Single::class, 'futureValue'],
'argumentCount' => '2',
],
'GAMMA' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMAFunction'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'gamma'],
'argumentCount' => '1',
],
'GAMMADIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMADIST'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'distribution'],
'argumentCount' => '4',
],
'GAMMA.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMADIST'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'distribution'],
'argumentCount' => '4',
],
'GAMMAINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMAINV'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'inverse'],
'argumentCount' => '3',
],
'GAMMA.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMAINV'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'inverse'],
'argumentCount' => '3',
],
'GAMMALN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMALN'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'ln'],
'argumentCount' => '1',
],
'GAMMALN.PRECISE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAMMALN'],
+ 'functionCall' => [Statistical\Distributions\Gamma::class, 'ln'],
'argumentCount' => '1',
],
'GAUSS' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GAUSS'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'gauss'],
'argumentCount' => '1',
],
'GCD' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'GCD'],
+ 'functionCall' => [MathTrig\Gcd::class, 'evaluate'],
'argumentCount' => '1+',
],
'GEOMEAN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GEOMEAN'],
+ 'functionCall' => [Statistical\Averages\Mean::class, 'geometric'],
'argumentCount' => '1+',
],
'GESTEP' => [
@@ -1206,12 +1225,12 @@ class Calculation
],
'GROWTH' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'GROWTH'],
+ 'functionCall' => [Statistical\Trends::class, 'GROWTH'],
'argumentCount' => '1-4',
],
'HARMEAN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'HARMEAN'],
+ 'functionCall' => [Statistical\Averages\Mean::class, 'harmonic'],
'argumentCount' => '1+',
],
'HEX2BIN' => [
@@ -1231,23 +1250,23 @@ class Calculation
],
'HLOOKUP' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'HLOOKUP'],
+ 'functionCall' => [LookupRef\HLookup::class, 'lookup'],
'argumentCount' => '3,4',
],
'HOUR' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'HOUROFDAY'],
+ 'functionCall' => [DateTimeExcel\TimeParts::class, 'hour'],
'argumentCount' => '1',
],
'HYPERLINK' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'HYPERLINK'],
+ 'functionCall' => [LookupRef\Hyperlink::class, 'set'],
'argumentCount' => '1,2',
'passCellReference' => true,
],
'HYPGEOMDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'HYPGEOMDIST'],
+ 'functionCall' => [Statistical\Distributions\HyperGeometric::class, 'distribution'],
'argumentCount' => '4',
],
'HYPGEOM.DIST' => [
@@ -1277,137 +1296,137 @@ class Calculation
],
'IMABS' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMABS'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMABS'],
'argumentCount' => '1',
],
'IMAGINARY' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMAGINARY'],
+ 'functionCall' => [Engineering\Complex::class, 'IMAGINARY'],
'argumentCount' => '1',
],
'IMARGUMENT' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMARGUMENT'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMARGUMENT'],
'argumentCount' => '1',
],
'IMCONJUGATE' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCONJUGATE'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCONJUGATE'],
'argumentCount' => '1',
],
'IMCOS' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCOS'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOS'],
'argumentCount' => '1',
],
'IMCOSH' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCOSH'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOSH'],
'argumentCount' => '1',
],
'IMCOT' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCOT'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCOT'],
'argumentCount' => '1',
],
'IMCSC' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCSC'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCSC'],
'argumentCount' => '1',
],
'IMCSCH' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMCSCH'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMCSCH'],
'argumentCount' => '1',
],
'IMDIV' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMDIV'],
+ 'functionCall' => [Engineering\ComplexOperations::class, 'IMDIV'],
'argumentCount' => '2',
],
'IMEXP' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMEXP'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMEXP'],
'argumentCount' => '1',
],
'IMLN' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMLN'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLN'],
'argumentCount' => '1',
],
'IMLOG10' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMLOG10'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLOG10'],
'argumentCount' => '1',
],
'IMLOG2' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMLOG2'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMLOG2'],
'argumentCount' => '1',
],
'IMPOWER' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMPOWER'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMPOWER'],
'argumentCount' => '2',
],
'IMPRODUCT' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMPRODUCT'],
+ 'functionCall' => [Engineering\ComplexOperations::class, 'IMPRODUCT'],
'argumentCount' => '1+',
],
'IMREAL' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMREAL'],
+ 'functionCall' => [Engineering\Complex::class, 'IMREAL'],
'argumentCount' => '1',
],
'IMSEC' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSEC'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSEC'],
'argumentCount' => '1',
],
'IMSECH' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSECH'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSECH'],
'argumentCount' => '1',
],
'IMSIN' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSIN'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSIN'],
'argumentCount' => '1',
],
'IMSINH' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSINH'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSINH'],
'argumentCount' => '1',
],
'IMSQRT' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSQRT'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMSQRT'],
'argumentCount' => '1',
],
'IMSUB' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSUB'],
+ 'functionCall' => [Engineering\ComplexOperations::class, 'IMSUB'],
'argumentCount' => '2',
],
'IMSUM' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMSUM'],
+ 'functionCall' => [Engineering\ComplexOperations::class, 'IMSUM'],
'argumentCount' => '1+',
],
'IMTAN' => [
'category' => Category::CATEGORY_ENGINEERING,
- 'functionCall' => [Engineering::class, 'IMTAN'],
+ 'functionCall' => [Engineering\ComplexFunctions::class, 'IMTAN'],
'argumentCount' => '1',
],
'INDEX' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'INDEX'],
+ 'functionCall' => [LookupRef\Matrix::class, 'index'],
'argumentCount' => '1-4',
],
'INDIRECT' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'INDIRECT'],
+ 'functionCall' => [LookupRef\Indirect::class, 'INDIRECT'],
'argumentCount' => '1,2',
'passCellReference' => true,
],
@@ -1418,27 +1437,27 @@ class Calculation
],
'INT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\IntClass::class, 'funcInt'],
+ 'functionCall' => [MathTrig\IntClass::class, 'evaluate'],
'argumentCount' => '1',
],
'INTERCEPT' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'INTERCEPT'],
+ 'functionCall' => [Statistical\Trends::class, 'INTERCEPT'],
'argumentCount' => '2',
],
'INTRATE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'INTRATE'],
+ 'functionCall' => [Financial\Securities\Rates::class, 'interest'],
'argumentCount' => '4,5',
],
'IPMT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'IPMT'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'payment'],
'argumentCount' => '4-6',
],
'IRR' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'IRR'],
+ 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'rate'],
'argumentCount' => '1,2',
],
'ISBLANK' => [
@@ -1500,12 +1519,12 @@ class Calculation
],
'ISOWEEKNUM' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'ISOWEEKNUM'],
+ 'functionCall' => [DateTimeExcel\Week::class, 'isoWeekNumber'],
'argumentCount' => '1',
],
'ISPMT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'ISPMT'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'schedulePayment'],
'argumentCount' => '4',
],
'ISREF' => [
@@ -1518,6 +1537,11 @@ class Calculation
'functionCall' => [Functions::class, 'isText'],
'argumentCount' => '1',
],
+ 'ISTHAIDIGIT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'JIS' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
'functionCall' => [Functions::class, 'DUMMY'],
@@ -1525,107 +1549,107 @@ class Calculation
],
'KURT' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'KURT'],
+ 'functionCall' => [Statistical\Deviations::class, 'kurtosis'],
'argumentCount' => '1+',
],
'LARGE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LARGE'],
+ 'functionCall' => [Statistical\Size::class, 'large'],
'argumentCount' => '2',
],
'LCM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'LCM'],
+ 'functionCall' => [MathTrig\Lcm::class, 'evaluate'],
'argumentCount' => '1+',
],
'LEFT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'LEFT'],
+ 'functionCall' => [TextData\Extract::class, 'left'],
'argumentCount' => '1,2',
],
'LEFTB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'LEFT'],
+ 'functionCall' => [TextData\Extract::class, 'left'],
'argumentCount' => '1,2',
],
'LEN' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'STRINGLENGTH'],
+ 'functionCall' => [TextData\Text::class, 'length'],
'argumentCount' => '1',
],
'LENB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'STRINGLENGTH'],
+ 'functionCall' => [TextData\Text::class, 'length'],
'argumentCount' => '1',
],
'LINEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LINEST'],
+ 'functionCall' => [Statistical\Trends::class, 'LINEST'],
'argumentCount' => '1-4',
],
'LN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinLN'],
+ 'functionCall' => [MathTrig\Logarithms::class, 'natural'],
'argumentCount' => '1',
],
'LOG' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'logBase'],
+ 'functionCall' => [MathTrig\Logarithms::class, 'withBase'],
'argumentCount' => '1,2',
],
'LOG10' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinLOG10'],
+ 'functionCall' => [MathTrig\Logarithms::class, 'base10'],
'argumentCount' => '1',
],
'LOGEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LOGEST'],
+ 'functionCall' => [Statistical\Trends::class, 'LOGEST'],
'argumentCount' => '1-4',
],
'LOGINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LOGINV'],
+ 'functionCall' => [Statistical\Distributions\LogNormal::class, 'inverse'],
'argumentCount' => '3',
],
'LOGNORMDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LOGNORMDIST'],
+ 'functionCall' => [Statistical\Distributions\LogNormal::class, 'cumulative'],
'argumentCount' => '3',
],
'LOGNORM.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LOGNORMDIST2'],
+ 'functionCall' => [Statistical\Distributions\LogNormal::class, 'distribution'],
'argumentCount' => '4',
],
'LOGNORM.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'LOGINV'],
+ 'functionCall' => [Statistical\Distributions\LogNormal::class, 'inverse'],
'argumentCount' => '3',
],
'LOOKUP' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'LOOKUP'],
+ 'functionCall' => [LookupRef\Lookup::class, 'lookup'],
'argumentCount' => '2,3',
],
'LOWER' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'LOWERCASE'],
+ 'functionCall' => [TextData\CaseConvert::class, 'lower'],
'argumentCount' => '1',
],
'MATCH' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'MATCH'],
+ 'functionCall' => [LookupRef\ExcelMatch::class, 'MATCH'],
'argumentCount' => '2,3',
],
'MAX' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Maximum::class, 'MAX'],
+ 'functionCall' => [Statistical\Maximum::class, 'max'],
'argumentCount' => '1+',
],
'MAXA' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Maximum::class, 'MAXA'],
+ 'functionCall' => [Statistical\Maximum::class, 'maxA'],
'argumentCount' => '1+',
],
'MAXIFS' => [
@@ -1635,7 +1659,7 @@ class Calculation
],
'MDETERM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'MDETERM'],
+ 'functionCall' => [MathTrig\MatrixFunctions::class, 'determinant'],
'argumentCount' => '1',
],
'MDURATION' => [
@@ -1645,7 +1669,7 @@ class Calculation
],
'MEDIAN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'MEDIAN'],
+ 'functionCall' => [Statistical\Averages::class, 'median'],
'argumentCount' => '1+',
],
'MEDIANIF' => [
@@ -1655,22 +1679,22 @@ class Calculation
],
'MID' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'MID'],
+ 'functionCall' => [TextData\Extract::class, 'mid'],
'argumentCount' => '3',
],
'MIDB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'MID'],
+ 'functionCall' => [TextData\Extract::class, 'mid'],
'argumentCount' => '3',
],
'MIN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Minimum::class, 'MIN'],
+ 'functionCall' => [Statistical\Minimum::class, 'min'],
'argumentCount' => '1+',
],
'MINA' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical\Minimum::class, 'MINA'],
+ 'functionCall' => [Statistical\Minimum::class, 'minA'],
'argumentCount' => '1+',
],
'MINIFS' => [
@@ -1680,32 +1704,32 @@ class Calculation
],
'MINUTE' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'MINUTE'],
+ 'functionCall' => [DateTimeExcel\TimeParts::class, 'minute'],
'argumentCount' => '1',
],
'MINVERSE' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'MINVERSE'],
+ 'functionCall' => [MathTrig\MatrixFunctions::class, 'inverse'],
'argumentCount' => '1',
],
'MIRR' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'MIRR'],
+ 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'modifiedRate'],
'argumentCount' => '3',
],
'MMULT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'MMULT'],
+ 'functionCall' => [MathTrig\MatrixFunctions::class, 'multiply'],
'argumentCount' => '2',
],
'MOD' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'MOD'],
+ 'functionCall' => [MathTrig\Operations::class, 'mod'],
'argumentCount' => '2',
],
'MODE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'MODE'],
+ 'functionCall' => [Statistical\Averages::class, 'mode'],
'argumentCount' => '1+',
],
'MODE.MULT' => [
@@ -1715,27 +1739,27 @@ class Calculation
],
'MODE.SNGL' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'MODE'],
+ 'functionCall' => [Statistical\Averages::class, 'mode'],
'argumentCount' => '1+',
],
'MONTH' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'MONTHOFYEAR'],
+ 'functionCall' => [DateTimeExcel\DateParts::class, 'month'],
'argumentCount' => '1',
],
'MROUND' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Mround::class, 'funcMround'],
+ 'functionCall' => [MathTrig\Round::class, 'multiple'],
'argumentCount' => '2',
],
'MULTINOMIAL' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'MULTINOMIAL'],
+ 'functionCall' => [MathTrig\Factorial::class, 'multinomial'],
'argumentCount' => '1+',
],
'MUNIT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [MathTrig\MatrixFunctions::class, 'identity'],
'argumentCount' => '1',
],
'N' => [
@@ -1750,7 +1774,7 @@ class Calculation
],
'NEGBINOMDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NEGBINOMDIST'],
+ 'functionCall' => [Statistical\Distributions\Binomial::class, 'negative'],
'argumentCount' => '3',
],
'NEGBINOM.DIST' => [
@@ -1760,7 +1784,7 @@ class Calculation
],
'NETWORKDAYS' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'NETWORKDAYS'],
+ 'functionCall' => [DateTimeExcel\NetworkDays::class, 'count'],
'argumentCount' => '2-3',
],
'NETWORKDAYS.INTL' => [
@@ -1770,47 +1794,47 @@ class Calculation
],
'NOMINAL' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'NOMINAL'],
+ 'functionCall' => [Financial\InterestRate::class, 'nominal'],
'argumentCount' => '2',
],
'NORMDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMDIST'],
+ 'functionCall' => [Statistical\Distributions\Normal::class, 'distribution'],
'argumentCount' => '4',
],
'NORM.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMDIST'],
+ 'functionCall' => [Statistical\Distributions\Normal::class, 'distribution'],
'argumentCount' => '4',
],
'NORMINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMINV'],
+ 'functionCall' => [Statistical\Distributions\Normal::class, 'inverse'],
'argumentCount' => '3',
],
'NORM.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMINV'],
+ 'functionCall' => [Statistical\Distributions\Normal::class, 'inverse'],
'argumentCount' => '3',
],
'NORMSDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMSDIST'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'cumulative'],
'argumentCount' => '1',
],
'NORM.S.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMSDIST2'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'distribution'],
'argumentCount' => '1,2',
],
'NORMSINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMSINV'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'inverse'],
'argumentCount' => '1',
],
'NORM.S.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'NORMSINV'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'inverse'],
'argumentCount' => '1',
],
'NOT' => [
@@ -1820,22 +1844,27 @@ class Calculation
],
'NOW' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DATETIMENOW'],
+ 'functionCall' => [DateTimeExcel\Current::class, 'now'],
'argumentCount' => '0',
],
'NPER' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'NPER'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'periods'],
'argumentCount' => '3-5',
],
'NPV' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'NPV'],
+ 'functionCall' => [Financial\CashFlow\Variable\Periodic::class, 'presentValue'],
'argumentCount' => '2+',
],
+ 'NUMBERSTRING' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'NUMBERVALUE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'NUMBERVALUE'],
+ 'functionCall' => [TextData\Format::class, 'NUMBERVALUE'],
'argumentCount' => '1+',
],
'OCT2BIN' => [
@@ -1855,7 +1884,7 @@ class Calculation
],
'ODD' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'ODD'],
+ 'functionCall' => [MathTrig\Round::class, 'odd'],
'argumentCount' => '1',
],
'ODDFPRICE' => [
@@ -1880,7 +1909,7 @@ class Calculation
],
'OFFSET' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'OFFSET'],
+ 'functionCall' => [LookupRef\Offset::class, 'OFFSET'],
'argumentCount' => '3-5',
'passCellReference' => true,
'passByReference' => [true],
@@ -1892,17 +1921,17 @@ class Calculation
],
'PDURATION' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PDURATION'],
+ 'functionCall' => [Financial\CashFlow\Single::class, 'periods'],
'argumentCount' => '3',
],
'PEARSON' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'CORREL'],
+ 'functionCall' => [Statistical\Trends::class, 'CORREL'],
'argumentCount' => '2',
],
'PERCENTILE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'PERCENTILE'],
+ 'functionCall' => [Statistical\Percentiles::class, 'PERCENTILE'],
'argumentCount' => '2',
],
'PERCENTILE.EXC' => [
@@ -1912,12 +1941,12 @@ class Calculation
],
'PERCENTILE.INC' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'PERCENTILE'],
+ 'functionCall' => [Statistical\Percentiles::class, 'PERCENTILE'],
'argumentCount' => '2',
],
'PERCENTRANK' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'PERCENTRANK'],
+ 'functionCall' => [Statistical\Percentiles::class, 'PERCENTRANK'],
'argumentCount' => '2,3',
],
'PERCENTRANK.EXC' => [
@@ -1927,7 +1956,7 @@ class Calculation
],
'PERCENTRANK.INC' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'PERCENTRANK'],
+ 'functionCall' => [Statistical\Percentiles::class, 'PERCENTRANK'],
'argumentCount' => '2,3',
],
'PERMUT' => [
@@ -1957,42 +1986,42 @@ class Calculation
],
'PMT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PMT'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Payments::class, 'annuity'],
'argumentCount' => '3-5',
],
'POISSON' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'POISSON'],
+ 'functionCall' => [Statistical\Distributions\Poisson::class, 'distribution'],
'argumentCount' => '3',
],
'POISSON.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'POISSON'],
+ 'functionCall' => [Statistical\Distributions\Poisson::class, 'distribution'],
'argumentCount' => '3',
],
'POWER' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'POWER'],
+ 'functionCall' => [MathTrig\Operations::class, 'power'],
'argumentCount' => '2',
],
'PPMT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PPMT'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Payments::class, 'interestPayment'],
'argumentCount' => '4-6',
],
'PRICE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PRICE'],
+ 'functionCall' => [Financial\Securities\Price::class, 'price'],
'argumentCount' => '6,7',
],
'PRICEDISC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PRICEDISC'],
+ 'functionCall' => [Financial\Securities\Price::class, 'priceDiscounted'],
'argumentCount' => '4,5',
],
'PRICEMAT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PRICEMAT'],
+ 'functionCall' => [Financial\Securities\Price::class, 'priceAtMaturity'],
'argumentCount' => '5,6',
],
'PROB' => [
@@ -2002,22 +2031,22 @@ class Calculation
],
'PRODUCT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'PRODUCT'],
+ 'functionCall' => [MathTrig\Operations::class, 'product'],
'argumentCount' => '1+',
],
'PROPER' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'PROPERCASE'],
+ 'functionCall' => [TextData\CaseConvert::class, 'proper'],
'argumentCount' => '1',
],
'PV' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'PV'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic::class, 'presentValue'],
'argumentCount' => '3-5',
],
'QUARTILE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'QUARTILE'],
+ 'functionCall' => [Statistical\Percentiles::class, 'QUARTILE'],
'argumentCount' => '2',
],
'QUARTILE.EXC' => [
@@ -2027,22 +2056,22 @@ class Calculation
],
'QUARTILE.INC' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'QUARTILE'],
+ 'functionCall' => [Statistical\Percentiles::class, 'QUARTILE'],
'argumentCount' => '2',
],
'QUOTIENT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'QUOTIENT'],
+ 'functionCall' => [MathTrig\Operations::class, 'quotient'],
'argumentCount' => '2',
],
'RADIANS' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinRADIANS'],
+ 'functionCall' => [MathTrig\Angle::class, 'toRadians'],
'argumentCount' => '1',
],
'RAND' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'RAND'],
+ 'functionCall' => [MathTrig\Random::class, 'rand'],
'argumentCount' => '0',
],
'RANDARRAY' => [
@@ -2052,12 +2081,12 @@ class Calculation
],
'RANDBETWEEN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'RAND'],
+ 'functionCall' => [MathTrig\Random::class, 'randBetween'],
'argumentCount' => '2',
],
'RANK' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'RANK'],
+ 'functionCall' => [Statistical\Percentiles::class, 'RANK'],
'argumentCount' => '2,3',
],
'RANK.AVG' => [
@@ -2067,83 +2096,94 @@ class Calculation
],
'RANK.EQ' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'RANK'],
+ 'functionCall' => [Statistical\Percentiles::class, 'RANK'],
'argumentCount' => '2,3',
],
'RATE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'RATE'],
+ 'functionCall' => [Financial\CashFlow\Constant\Periodic\Interest::class, 'rate'],
'argumentCount' => '3-6',
],
'RECEIVED' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'RECEIVED'],
+ 'functionCall' => [Financial\Securities\Price::class, 'received'],
'argumentCount' => '4-5',
],
'REPLACE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'REPLACE'],
+ 'functionCall' => [TextData\Replace::class, 'replace'],
'argumentCount' => '4',
],
'REPLACEB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'REPLACE'],
+ 'functionCall' => [TextData\Replace::class, 'replace'],
'argumentCount' => '4',
],
'REPT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'builtinREPT'],
+ 'functionCall' => [TextData\Concatenate::class, 'builtinREPT'],
'argumentCount' => '2',
],
'RIGHT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'RIGHT'],
+ 'functionCall' => [TextData\Extract::class, 'right'],
'argumentCount' => '1,2',
],
'RIGHTB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'RIGHT'],
+ 'functionCall' => [TextData\Extract::class, 'right'],
'argumentCount' => '1,2',
],
'ROMAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Roman::class, 'funcRoman'],
+ 'functionCall' => [MathTrig\Roman::class, 'evaluate'],
'argumentCount' => '1,2',
],
'ROUND' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Round::class, 'builtinROUND'],
+ 'functionCall' => [MathTrig\Round::class, 'round'],
'argumentCount' => '2',
],
+ 'ROUNDBAHTDOWN' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'ROUNDBAHTUP' => [
+ 'category' => Category::CATEGORY_MATH_AND_TRIG,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'ROUNDDOWN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\RoundDown::class, 'funcRoundDown'],
+ 'functionCall' => [MathTrig\Round::class, 'down'],
'argumentCount' => '2',
],
'ROUNDUP' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\RoundUp::class, 'funcRoundUp'],
+ 'functionCall' => [MathTrig\Round::class, 'up'],
'argumentCount' => '2',
],
'ROW' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'ROW'],
+ 'functionCall' => [LookupRef\RowColumnInformation::class, 'ROW'],
'argumentCount' => '-1',
+ 'passCellReference' => true,
'passByReference' => [true],
],
'ROWS' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'ROWS'],
+ 'functionCall' => [LookupRef\RowColumnInformation::class, 'ROWS'],
'argumentCount' => '1',
],
'RRI' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'RRI'],
+ 'functionCall' => [Financial\CashFlow\Single::class, 'interestRate'],
'argumentCount' => '3',
],
'RSQ' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'RSQ'],
+ 'functionCall' => [Statistical\Trends::class, 'RSQ'],
'argumentCount' => '2',
],
'RTD' => [
@@ -2153,27 +2193,27 @@ class Calculation
],
'SEARCH' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'],
+ 'functionCall' => [TextData\Search::class, 'insensitive'],
'argumentCount' => '2,3',
],
'SEARCHB' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'SEARCHINSENSITIVE'],
+ 'functionCall' => [TextData\Search::class, 'insensitive'],
'argumentCount' => '2,3',
],
'SEC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SEC'],
+ 'functionCall' => [MathTrig\Trig\Secant::class, 'sec'],
'argumentCount' => '1',
],
'SECH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SECH'],
+ 'functionCall' => [MathTrig\Trig\Secant::class, 'sech'],
'argumentCount' => '1',
],
'SECOND' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'SECOND'],
+ 'functionCall' => [DateTimeExcel\TimeParts::class, 'second'],
'argumentCount' => '1',
],
'SEQUENCE' => [
@@ -2183,7 +2223,7 @@ class Calculation
],
'SERIESSUM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SERIESSUM'],
+ 'functionCall' => [MathTrig\SeriesSum::class, 'evaluate'],
'argumentCount' => '4',
],
'SHEET' => [
@@ -2198,22 +2238,22 @@ class Calculation
],
'SIGN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SIGN'],
+ 'functionCall' => [MathTrig\Sign::class, 'evaluate'],
'argumentCount' => '1',
],
'SIN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinSIN'],
+ 'functionCall' => [MathTrig\Trig\Sine::class, 'sin'],
'argumentCount' => '1',
],
'SINH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinSINH'],
+ 'functionCall' => [MathTrig\Trig\Sine::class, 'sinh'],
'argumentCount' => '1',
],
'SKEW' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'SKEW'],
+ 'functionCall' => [Statistical\Deviations::class, 'skew'],
'argumentCount' => '1+',
],
'SKEW.P' => [
@@ -2223,17 +2263,17 @@ class Calculation
],
'SLN' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'SLN'],
+ 'functionCall' => [Financial\Depreciation::class, 'SLN'],
'argumentCount' => '3',
],
'SLOPE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'SLOPE'],
+ 'functionCall' => [Statistical\Trends::class, 'SLOPE'],
'argumentCount' => '2',
],
'SMALL' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'SMALL'],
+ 'functionCall' => [Statistical\Size::class, 'small'],
'argumentCount' => '2',
],
'SORT' => [
@@ -2248,17 +2288,17 @@ class Calculation
],
'SQRT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinSQRT'],
+ 'functionCall' => [MathTrig\Sqrt::class, 'sqrt'],
'argumentCount' => '1',
],
'SQRTPI' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SQRTPI'],
+ 'functionCall' => [MathTrig\Sqrt::class, 'pi'],
'argumentCount' => '1',
],
'STANDARDIZE' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'STANDARDIZE'],
+ 'functionCall' => [Statistical\Standardize::class, 'execute'],
'argumentCount' => '3',
],
'STDEV' => [
@@ -2283,33 +2323,33 @@ class Calculation
],
'STDEVP' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'STDEVP'],
+ 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVP'],
'argumentCount' => '1+',
],
'STDEVPA' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'STDEVPA'],
+ 'functionCall' => [Statistical\StandardDeviations::class, 'STDEVPA'],
'argumentCount' => '1+',
],
'STEYX' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'STEYX'],
+ 'functionCall' => [Statistical\Trends::class, 'STEYX'],
'argumentCount' => '2',
],
'SUBSTITUTE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'SUBSTITUTE'],
+ 'functionCall' => [TextData\Replace::class, 'substitute'],
'argumentCount' => '3,4',
],
'SUBTOTAL' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUBTOTAL'],
+ 'functionCall' => [MathTrig\Subtotal::class, 'evaluate'],
'argumentCount' => '2+',
'passCellReference' => true,
],
'SUM' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUM'],
+ 'functionCall' => [MathTrig\Sum::class, 'sumErroringStrings'],
'argumentCount' => '1+',
],
'SUMIF' => [
@@ -2324,27 +2364,27 @@ class Calculation
],
'SUMPRODUCT' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUMPRODUCT'],
+ 'functionCall' => [MathTrig\Sum::class, 'product'],
'argumentCount' => '1+',
],
'SUMSQ' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUMSQ'],
+ 'functionCall' => [MathTrig\SumSquares::class, 'sumSquare'],
'argumentCount' => '1+',
],
'SUMX2MY2' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUMX2MY2'],
+ 'functionCall' => [MathTrig\SumSquares::class, 'sumXSquaredMinusYSquared'],
'argumentCount' => '2',
],
'SUMX2PY2' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUMX2PY2'],
+ 'functionCall' => [MathTrig\SumSquares::class, 'sumXSquaredPlusYSquared'],
'argumentCount' => '2',
],
'SUMXMY2' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'SUMXMY2'],
+ 'functionCall' => [MathTrig\SumSquares::class, 'sumXMinusYSquared'],
'argumentCount' => '2',
],
'SWITCH' => [
@@ -2354,42 +2394,42 @@ class Calculation
],
'SYD' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'SYD'],
+ 'functionCall' => [Financial\Depreciation::class, 'SYD'],
'argumentCount' => '4',
],
'T' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'RETURNSTRING'],
+ 'functionCall' => [TextData\Text::class, 'test'],
'argumentCount' => '1',
],
'TAN' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinTAN'],
+ 'functionCall' => [MathTrig\Trig\Tangent::class, 'tan'],
'argumentCount' => '1',
],
'TANH' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig::class, 'builtinTANH'],
+ 'functionCall' => [MathTrig\Trig\Tangent::class, 'tanh'],
'argumentCount' => '1',
],
'TBILLEQ' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'TBILLEQ'],
+ 'functionCall' => [Financial\TreasuryBill::class, 'bondEquivalentYield'],
'argumentCount' => '3',
],
'TBILLPRICE' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'TBILLPRICE'],
+ 'functionCall' => [Financial\TreasuryBill::class, 'price'],
'argumentCount' => '3',
],
'TBILLYIELD' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'TBILLYIELD'],
+ 'functionCall' => [Financial\TreasuryBill::class, 'yield'],
'argumentCount' => '3',
],
'TDIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'TDIST'],
+ 'functionCall' => [Statistical\Distributions\StudentT::class, 'distribution'],
'argumentCount' => '3',
],
'T.DIST' => [
@@ -2409,32 +2449,67 @@ class Calculation
],
'TEXT' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'TEXTFORMAT'],
+ 'functionCall' => [TextData\Format::class, 'TEXTFORMAT'],
'argumentCount' => '2',
],
'TEXTJOIN' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'TEXTJOIN'],
+ 'functionCall' => [TextData\Concatenate::class, 'TEXTJOIN'],
'argumentCount' => '3+',
],
+ 'THAIDAYOFWEEK' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAIDIGIT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAIMONTHOFYEAR' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAINUMSOUND' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAINUMSTRING' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAISTRINGLENGTH' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
+ 'THAIYEAR' => [
+ 'category' => Category::CATEGORY_DATE_AND_TIME,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'TIME' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'TIME'],
+ 'functionCall' => [DateTimeExcel\Time::class, 'fromHMS'],
'argumentCount' => '3',
],
'TIMEVALUE' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'TIMEVALUE'],
+ 'functionCall' => [DateTimeExcel\TimeValue::class, 'fromString'],
'argumentCount' => '1',
],
'TINV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'TINV'],
+ 'functionCall' => [Statistical\Distributions\StudentT::class, 'inverse'],
'argumentCount' => '2',
],
'T.INV' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'TINV'],
+ 'functionCall' => [Statistical\Distributions\StudentT::class, 'inverse'],
'argumentCount' => '2',
],
'T.INV.2T' => [
@@ -2444,27 +2519,27 @@ class Calculation
],
'TODAY' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'DATENOW'],
+ 'functionCall' => [DateTimeExcel\Current::class, 'today'],
'argumentCount' => '0',
],
'TRANSPOSE' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'TRANSPOSE'],
+ 'functionCall' => [LookupRef\Matrix::class, 'transpose'],
'argumentCount' => '1',
],
'TREND' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'TREND'],
+ 'functionCall' => [Statistical\Trends::class, 'TREND'],
'argumentCount' => '1-4',
],
'TRIM' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'TRIMSPACES'],
+ 'functionCall' => [TextData\Trim::class, 'spaces'],
'argumentCount' => '1',
],
'TRIMMEAN' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'TRIMMEAN'],
+ 'functionCall' => [Statistical\Averages\Mean::class, 'trim'],
'argumentCount' => '2',
],
'TRUE' => [
@@ -2474,7 +2549,7 @@ class Calculation
],
'TRUNC' => [
'category' => Category::CATEGORY_MATH_AND_TRIG,
- 'functionCall' => [MathTrig\Trunc::class, 'funcTrunc'],
+ 'functionCall' => [MathTrig\Trunc::class, 'evaluate'],
'argumentCount' => '1,2',
],
'TTEST' => [
@@ -2494,12 +2569,12 @@ class Calculation
],
'UNICHAR' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'CHARACTER'],
+ 'functionCall' => [TextData\CharacterConvert::class, 'character'],
'argumentCount' => '1',
],
'UNICODE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'ASCIICODE'],
+ 'functionCall' => [TextData\CharacterConvert::class, 'code'],
'argumentCount' => '1',
],
'UNIQUE' => [
@@ -2509,19 +2584,24 @@ class Calculation
],
'UPPER' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'UPPERCASE'],
+ 'functionCall' => [TextData\CaseConvert::class, 'upper'],
'argumentCount' => '1',
],
'USDOLLAR' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Functions::class, 'DUMMY'],
+ 'functionCall' => [Financial\Dollar::class, 'format'],
'argumentCount' => '2',
],
'VALUE' => [
'category' => Category::CATEGORY_TEXT_AND_DATA,
- 'functionCall' => [TextData::class, 'VALUE'],
+ 'functionCall' => [TextData\Format::class, 'VALUE'],
'argumentCount' => '1',
],
+ 'VALUETOTEXT' => [
+ 'category' => Category::CATEGORY_TEXT_AND_DATA,
+ 'functionCall' => [Functions::class, 'DUMMY'],
+ 'argumentCount' => '?',
+ ],
'VAR' => [
'category' => Category::CATEGORY_STATISTICAL,
'functionCall' => [Statistical\Variances::class, 'VAR'],
@@ -2559,37 +2639,37 @@ class Calculation
],
'VLOOKUP' => [
'category' => Category::CATEGORY_LOOKUP_AND_REFERENCE,
- 'functionCall' => [LookupRef::class, 'VLOOKUP'],
+ 'functionCall' => [LookupRef\VLookup::class, 'lookup'],
'argumentCount' => '3,4',
],
'WEBSERVICE' => [
'category' => Category::CATEGORY_WEB,
- 'functionCall' => [Web::class, 'WEBSERVICE'],
+ 'functionCall' => [Web\Service::class, 'webService'],
'argumentCount' => '1',
],
'WEEKDAY' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'WEEKDAY'],
+ 'functionCall' => [DateTimeExcel\Week::class, 'day'],
'argumentCount' => '1,2',
],
'WEEKNUM' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'WEEKNUM'],
+ 'functionCall' => [DateTimeExcel\Week::class, 'number'],
'argumentCount' => '1,2',
],
'WEIBULL' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'WEIBULL'],
+ 'functionCall' => [Statistical\Distributions\Weibull::class, 'distribution'],
'argumentCount' => '4',
],
'WEIBULL.DIST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'WEIBULL'],
+ 'functionCall' => [Statistical\Distributions\Weibull::class, 'distribution'],
'argumentCount' => '4',
],
'WORKDAY' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'WORKDAY'],
+ 'functionCall' => [DateTimeExcel\WorkDay::class, 'date'],
'argumentCount' => '2-3',
],
'WORKDAY.INTL' => [
@@ -2599,7 +2679,7 @@ class Calculation
],
'XIRR' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'XIRR'],
+ 'functionCall' => [Financial\CashFlow\Variable\NonPeriodic::class, 'rate'],
'argumentCount' => '2,3',
],
'XLOOKUP' => [
@@ -2609,7 +2689,7 @@ class Calculation
],
'XNPV' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'XNPV'],
+ 'functionCall' => [Financial\CashFlow\Variable\NonPeriodic::class, 'presentValue'],
'argumentCount' => '3',
],
'XMATCH' => [
@@ -2624,12 +2704,12 @@ class Calculation
],
'YEAR' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'YEAR'],
+ 'functionCall' => [DateTimeExcel\DateParts::class, 'year'],
'argumentCount' => '1',
],
'YEARFRAC' => [
'category' => Category::CATEGORY_DATE_AND_TIME,
- 'functionCall' => [DateTime::class, 'YEARFRAC'],
+ 'functionCall' => [DateTimeExcel\YearFrac::class, 'fraction'],
'argumentCount' => '2,3',
],
'YIELD' => [
@@ -2639,22 +2719,22 @@ class Calculation
],
'YIELDDISC' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'YIELDDISC'],
+ 'functionCall' => [Financial\Securities\Yields::class, 'yieldDiscounted'],
'argumentCount' => '4,5',
],
'YIELDMAT' => [
'category' => Category::CATEGORY_FINANCIAL,
- 'functionCall' => [Financial::class, 'YIELDMAT'],
+ 'functionCall' => [Financial\Securities\Yields::class, 'yieldAtMaturity'],
'argumentCount' => '5,6',
],
'ZTEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'ZTEST'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'zTest'],
'argumentCount' => '2-3',
],
'Z.TEST' => [
'category' => Category::CATEGORY_STATISTICAL,
- 'functionCall' => [Statistical::class, 'ZTEST'],
+ 'functionCall' => [Statistical\Distributions\StandardNormal::class, 'zTest'],
'argumentCount' => '2-3',
],
];
@@ -2700,7 +2780,7 @@ class Calculation
* Get an instance of this class.
*
* @param ?Spreadsheet $spreadsheet Injected spreadsheet for working with a PhpSpreadsheet Spreadsheet object,
- * or NULL to create a standalone claculation engine
+ * or NULL to create a standalone calculation engine
*/
public static function getInstance(?Spreadsheet $spreadsheet = null): self
{
@@ -2904,6 +2984,21 @@ class Calculation
return self::$localeLanguage;
}
+ private function getLocaleFile(string $localeDir, string $locale, string $language, string $file): string
+ {
+ $localeFileName = $localeDir . str_replace('_', DIRECTORY_SEPARATOR, $locale) .
+ DIRECTORY_SEPARATOR . $file;
+ if (!file_exists($localeFileName)) {
+ // If there isn't a locale specific file, look for a language specific file
+ $localeFileName = $localeDir . $language . DIRECTORY_SEPARATOR . $file;
+ if (!file_exists($localeFileName)) {
+ throw new Exception('Locale file not found');
+ }
+ }
+
+ return $localeFileName;
+ }
+
/**
* Set the locale code.
*
@@ -2911,7 +3006,7 @@ class Calculation
*
* @return bool
*/
- public function setLocale($locale)
+ public function setLocale(string $locale)
{
// Identify our locale and language
$language = $locale = strtolower($locale);
@@ -2921,31 +3016,30 @@ class Calculation
if (count(self::$validLocaleLanguages) == 1) {
self::loadLocales();
}
+
// Test whether we have any language data for this language (any locale)
if (in_array($language, self::$validLocaleLanguages)) {
// initialise language/locale settings
self::$localeFunctions = [];
self::$localeArgumentSeparator = ',';
self::$localeBoolean = ['TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL'];
- // Default is English, if user isn't requesting english, then read the necessary data from the locale files
- if ($locale != 'en_us') {
+
+ // Default is US English, if user isn't requesting US english, then read the necessary data from the locale files
+ if ($locale !== 'en_us') {
+ $localeDir = implode(DIRECTORY_SEPARATOR, [__DIR__, 'locale', null]);
// Search for a file with a list of function names for locale
- $functionNamesFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'functions';
- if (!file_exists($functionNamesFile)) {
- // If there isn't a locale specific function file, look for a language specific function file
- $functionNamesFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'functions';
- if (!file_exists($functionNamesFile)) {
- return false;
- }
+ try {
+ $functionNamesFile = $this->getLocaleFile($localeDir, $locale, $language, 'functions');
+ } catch (Exception $e) {
+ return false;
}
+
// Retrieve the list of locale or language specific function names
$localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($localeFunctions as $localeFunction) {
[$localeFunction] = explode('##', $localeFunction); // Strip out comments
if (strpos($localeFunction, '=') !== false) {
- [$fName, $lfName] = explode('=', $localeFunction);
- $fName = trim($fName);
- $lfName = trim($lfName);
+ [$fName, $lfName] = array_map('trim', explode('=', $localeFunction));
if ((isset(self::$phpSpreadsheetFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) {
self::$localeFunctions[$fName] = $lfName;
}
@@ -2959,20 +3053,22 @@ class Calculation
self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE'];
}
- $configFile = __DIR__ . '/locale/' . str_replace('_', DIRECTORY_SEPARATOR, $locale) . DIRECTORY_SEPARATOR . 'config';
- if (!file_exists($configFile)) {
- $configFile = __DIR__ . '/locale/' . $language . DIRECTORY_SEPARATOR . 'config';
+ try {
+ $configFile = $this->getLocaleFile($localeDir, $locale, $language, 'config');
+ } catch (Exception $e) {
+ return false;
}
- if (file_exists($configFile)) {
- $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
- foreach ($localeSettings as $localeSetting) {
- [$localeSetting] = explode('##', $localeSetting); // Strip out comments
- if (strpos($localeSetting, '=') !== false) {
- [$settingName, $settingValue] = explode('=', $localeSetting);
- $settingName = strtoupper(trim($settingName));
+
+ $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
+ foreach ($localeSettings as $localeSetting) {
+ [$localeSetting] = explode('##', $localeSetting); // Strip out comments
+ if (strpos($localeSetting, '=') !== false) {
+ [$settingName, $settingValue] = array_map('trim', explode('=', $localeSetting));
+ $settingName = strtoupper($settingName);
+ if ($settingValue !== '') {
switch ($settingName) {
case 'ARGUMENTSEPARATOR':
- self::$localeArgumentSeparator = trim($settingValue);
+ self::$localeArgumentSeparator = $settingValue;
break;
}
@@ -3152,6 +3248,7 @@ class Calculation
// Return Excel errors "as is"
return $value;
}
+
// Return strings wrapped in quotes
return self::FORMULA_STRING_QUOTE . $value . self::FORMULA_STRING_QUOTE;
} elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
@@ -3343,18 +3440,15 @@ class Calculation
}
/**
- * @param string $cellReference
* @param mixed $cellValue
- *
- * @return bool
*/
- public function getValueFromCache($cellReference, &$cellValue)
+ public function getValueFromCache(string $cellReference, &$cellValue): bool
{
+ $this->debugLog->writeDebugLog("Testing cache value for cell {$cellReference}");
// Is calculation cacheing enabled?
- // Is the value present in calculation cache?
- $this->debugLog->writeDebugLog('Testing cache value for cell ', $cellReference);
+ // If so, is the required value present in calculation cache?
if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) {
- $this->debugLog->writeDebugLog('Retrieving value for cell ', $cellReference, ' from cache');
+ $this->debugLog->writeDebugLog("Retrieving value for cell {$cellReference} from cache");
// Return the cached result
$cellValue = $this->calculationCache[$cellReference];
@@ -3416,7 +3510,7 @@ class Calculation
if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) {
return $cellValue;
}
- $this->debugLog->writeDebugLog('Evaluating formula for cell ', $wsCellReference);
+ $this->debugLog->writeDebugLog("Evaluating formula for cell {$wsCellReference}");
if (($wsTitle[0] !== "\x00") && ($this->cyclicReferenceStack->onStack($wsCellReference))) {
if ($this->cyclicFormulaCount <= 0) {
@@ -3438,7 +3532,7 @@ class Calculation
}
}
- $this->debugLog->writeDebugLog('Formula for cell ', $wsCellReference, ' is ', $formula);
+ $this->debugLog->writeDebugLog("Formula for cell {$wsCellReference} is {$formula}");
// Parse the formula onto the token stack and calculate the value
$this->cyclicReferenceStack->push($wsCellReference);
@@ -3457,8 +3551,8 @@ class Calculation
/**
* Ensure that paired matrix operands are both matrices and of the same size.
*
- * @param mixed &$operand1 First matrix operand
- * @param mixed &$operand2 Second matrix operand
+ * @param mixed $operand1 First matrix operand
+ * @param mixed $operand2 Second matrix operand
* @param int $resize Flag indicating whether the matrices should be resized to match
* and (if so), whether the smaller dimension should grow or the
* larger should shrink.
@@ -3502,7 +3596,7 @@ class Calculation
/**
* Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0.
*
- * @param array &$matrix matrix operand
+ * @param array $matrix matrix operand
*
* @return int[] An array comprising the number of rows, and number of columns
*/
@@ -3527,8 +3621,8 @@ class Calculation
/**
* Ensure that paired matrix operands are both matrices of the same size.
*
- * @param mixed &$matrix1 First matrix operand
- * @param mixed &$matrix2 Second matrix operand
+ * @param mixed $matrix1 First matrix operand
+ * @param mixed $matrix2 Second matrix operand
* @param int $matrix1Rows Row size of first matrix operand
* @param int $matrix1Columns Column size of first matrix operand
* @param int $matrix2Rows Row size of second matrix operand
@@ -3570,8 +3664,8 @@ class Calculation
/**
* Ensure that paired matrix operands are both matrices of the same size.
*
- * @param mixed &$matrix1 First matrix operand
- * @param mixed &$matrix2 Second matrix operand
+ * @param mixed $matrix1 First matrix operand
+ * @param mixed $matrix2 Second matrix operand
* @param int $matrix1Rows Row size of first matrix operand
* @param int $matrix1Columns Column size of first matrix operand
* @param int $matrix2Rows Row size of second matrix operand
@@ -3688,6 +3782,8 @@ class Calculation
return $typeString . ' with a value of ' . $this->showValue($value);
}
+
+ return null;
}
/**
@@ -3782,7 +3878,7 @@ class Calculation
/**
* @param string $formula
*
- * @return bool
+ * @return array|false
*/
private function internalParseFormula($formula, ?Cell $pCell = null)
{
@@ -3795,13 +3891,15 @@ class Calculation
$pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null;
$regexpMatchString = '/^(' . self::CALCULATION_REGEXP_FUNCTION .
- '|' . self::CALCULATION_REGEXP_CELLREF .
- '|' . self::CALCULATION_REGEXP_NUMBER .
- '|' . self::CALCULATION_REGEXP_STRING .
- '|' . self::CALCULATION_REGEXP_OPENBRACE .
- '|' . self::CALCULATION_REGEXP_DEFINEDNAME .
- '|' . self::CALCULATION_REGEXP_ERROR .
- ')/sui';
+ '|' . self::CALCULATION_REGEXP_CELLREF .
+ '|' . self::CALCULATION_REGEXP_COLUMN_RANGE .
+ '|' . self::CALCULATION_REGEXP_ROW_RANGE .
+ '|' . self::CALCULATION_REGEXP_NUMBER .
+ '|' . self::CALCULATION_REGEXP_STRING .
+ '|' . self::CALCULATION_REGEXP_OPENBRACE .
+ '|' . self::CALCULATION_REGEXP_DEFINEDNAME .
+ '|' . self::CALCULATION_REGEXP_ERROR .
+ ')/sui';
// Start with initialisation
$index = 0;
@@ -3864,7 +3962,8 @@ class Calculation
$opCharacter .= $formula[++$index];
}
// Find out if we're currently at the beginning of a number, variable, cell reference, function, parenthesis or operand
- $isOperandOrFunction = preg_match($regexpMatchString, substr($formula, $index), $match);
+ $isOperandOrFunction = (bool) preg_match($regexpMatchString, substr($formula, $index), $match);
+
if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus?
// Put a negation on the stack
$stack->push('Unary Operator', '~', null, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
@@ -3940,6 +4039,7 @@ class Calculation
}
// Check the argument count
$argumentCountError = false;
+ $expectedArgumentCountString = null;
if (is_numeric($expectedArgumentCount)) {
if ($expectedArgumentCount < 0) {
if ($argumentCount > abs($expectedArgumentCount)) {
@@ -4035,6 +4135,7 @@ class Calculation
$expectingOperand = false;
$val = $match[1];
$length = strlen($val);
+
if (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $val, $matches)) {
$val = preg_replace('/\s/u', '', $val);
if (isset(self::$phpSpreadsheetFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function
@@ -4071,7 +4172,7 @@ class Calculation
// Should only be applied to the actual cell column, not the worksheet name
// If the last entry on the stack was a : operator, then we have a cell range reference
$testPrevOp = $stack->last(1);
- if ($testPrevOp !== null && $testPrevOp['value'] == ':') {
+ if ($testPrevOp !== null && $testPrevOp['value'] === ':') {
// If we have a worksheet reference, then we're playing with a 3D reference
if ($matches[2] == '') {
// Otherwise, we 'inherit' the worksheet reference from the start cell reference
@@ -4088,62 +4189,57 @@ class Calculation
return $this->raiseFormulaError('3D Range references are not yet supported');
}
}
+ } elseif (strpos($val, '!') === false && $pCellParent !== null) {
+ $worksheet = $pCellParent->getTitle();
+ $val = "'{$worksheet}'!{$val}";
}
$outputItem = $stack->getStackItem('Cell Reference', $val, $val, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
$output[] = $outputItem;
} else { // it's a variable, constant, string, number or boolean
+ $localeConstant = false;
+ $stackItemType = 'Value';
+ $stackItemReference = null;
+
// If the last entry on the stack was a : operator, then we may have a row or column range reference
$testPrevOp = $stack->last(1);
if ($testPrevOp !== null && $testPrevOp['value'] === ':') {
+ $stackItemType = 'Cell Reference';
$startRowColRef = $output[count($output) - 1]['value'];
[$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true);
$rangeSheetRef = $rangeWS1;
- if ($rangeWS1 != '') {
+ if ($rangeWS1 !== '') {
$rangeWS1 .= '!';
}
+ $rangeSheetRef = trim($rangeSheetRef, "'");
[$rangeWS2, $val] = Worksheet::extractSheetTitle($val, true);
- if ($rangeWS2 != '') {
+ if ($rangeWS2 !== '') {
$rangeWS2 .= '!';
} else {
$rangeWS2 = $rangeWS1;
}
+
$refSheet = $pCellParent;
- if ($pCellParent !== null && $rangeSheetRef !== $pCellParent->getTitle()) {
+ if ($pCellParent !== null && $rangeSheetRef !== '' && $rangeSheetRef !== $pCellParent->getTitle()) {
$refSheet = $pCellParent->getParent()->getSheetByName($rangeSheetRef);
}
- if (
- (is_int($startRowColRef)) && (ctype_digit($val)) &&
- ($startRowColRef <= 1048576) && ($val <= 1048576)
- ) {
- // Row range
- $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007
- $output[count($output) - 1]['value'] = $rangeWS1 . 'A' . $startRowColRef;
- $val = $rangeWS2 . $endRowColRef . $val;
- } elseif (
- (ctype_alpha($startRowColRef)) && (ctype_alpha($val)) &&
- (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)
- ) {
- // Column range
- $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007
- $output[count($output) - 1]['value'] = $rangeWS1 . strtoupper($startRowColRef) . '1';
- $val = $rangeWS2 . $val . $endRowColRef;
- }
- }
- $localeConstant = false;
- $stackItemType = 'Value';
- $stackItemReference = null;
- if ($opCharacter == self::FORMULA_STRING_QUOTE) {
+ if (ctype_digit($val) && $val <= 1048576) {
+ // Row range
+ $stackItemType = 'Row Reference';
+ $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestDataColumn($val) : 'XFD'; // Max 16,384 columns for Excel2007
+ $val = "{$rangeWS2}{$endRowColRef}{$val}";
+ } elseif (ctype_alpha($val) && strlen($val) <= 3) {
+ // Column range
+ $stackItemType = 'Column Reference';
+ $endRowColRef = ($refSheet !== null) ? $refSheet->getHighestDataRow($val) : 1048576; // Max 1,048,576 rows for Excel2007
+ $val = "{$rangeWS2}{$val}{$endRowColRef}";
+ }
+ $stackItemReference = $val;
+ } elseif ($opCharacter == self::FORMULA_STRING_QUOTE) {
// UnEscape any quotes within the string
$val = self::wrapResult(str_replace('""', self::FORMULA_STRING_QUOTE, self::unwrapResult($val)));
- } elseif (is_numeric($val)) {
- if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) {
- $val = (float) $val;
- } else {
- $val = (int) $val;
- }
} elseif (isset(self::$excelConstants[trim(strtoupper($val))])) {
$stackItemType = 'Constant';
$excelConstant = trim(strtoupper($val));
@@ -4151,10 +4247,41 @@ class Calculation
} elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) {
$stackItemType = 'Constant';
$val = self::$excelConstants[$localeConstant];
+ } elseif (
+ preg_match('/^' . self::CALCULATION_REGEXP_ROW_RANGE . '/miu', substr($formula, $index), $rowRangeReference)
+ ) {
+ $val = $rowRangeReference[1];
+ $length = strlen($rowRangeReference[1]);
+ $stackItemType = 'Row Reference';
+ $column = 'A';
+ if (($testPrevOp !== null && $testPrevOp['value'] === ':') && $pCellParent !== null) {
+ $column = $pCellParent->getHighestDataColumn($val);
+ }
+ $val = "{$rowRangeReference[2]}{$column}{$rowRangeReference[7]}";
+ $stackItemReference = $val;
+ } elseif (
+ preg_match('/^' . self::CALCULATION_REGEXP_COLUMN_RANGE . '/miu', substr($formula, $index), $columnRangeReference)
+ ) {
+ $val = $columnRangeReference[1];
+ $length = strlen($val);
+ $stackItemType = 'Column Reference';
+ $row = '1';
+ if (($testPrevOp !== null && $testPrevOp['value'] === ':') && $pCellParent !== null) {
+ $row = $pCellParent->getHighestDataRow($val);
+ }
+ $val = "{$val}{$row}";
+ $stackItemReference = $val;
} elseif (preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', $val, $match)) {
$stackItemType = 'Defined Name';
$stackItemReference = $val;
+ } elseif (is_numeric($val)) {
+ if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) {
+ $val = (float) $val;
+ } else {
+ $val = (int) $val;
+ }
}
+
$details = $stack->getStackItem($stackItemType, $val, $stackItemReference, $currentCondition, $currentOnlyIf, $currentOnlyIfNot);
if ($localeConstant) {
$details['localeValue'] = $localeConstant;
@@ -4204,7 +4331,7 @@ class Calculation
((preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '.*/Ui', substr($formula, $index), $match)) &&
($output[count($output) - 1]['type'] == 'Cell Reference') ||
(preg_match('/^' . self::CALCULATION_REGEXP_DEFINEDNAME . '.*/miu', substr($formula, $index), $match)) &&
- ($output[count($output) - 1]['type'] == 'Defined Name' || $output[count($output) - 1]['type'] == 'Value')
+ ($output[count($output) - 1]['type'] == 'Defined Name' || $output[count($output) - 1]['type'] == 'Value')
)
) {
while (
@@ -4253,7 +4380,7 @@ class Calculation
* @param mixed $tokens
* @param null|string $cellID
*
- * @return bool
+ * @return array|false
*/
private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null)
{
@@ -4428,6 +4555,7 @@ class Calculation
} else {
return $this->raiseFormulaError('Unable to access Cell Reference');
}
+
$stack->push('Cell Reference', $cellValue, $cellRef);
} else {
$stack->push('Error', Functions::REF(), null);
@@ -4559,8 +4687,9 @@ class Calculation
} else {
$this->executeNumericBinaryOperation($multiplier, $arg, '*', 'arrayTimesEquals', $stack);
}
- } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token, $matches)) {
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/i', $token ?? '', $matches)) {
$cellRef = null;
+
if (isset($matches[8])) {
if ($pCell === null) {
// We can't access the range, so return a REF error
@@ -4593,7 +4722,7 @@ class Calculation
}
} else {
if ($pCell === null) {
- // We can't access the cell, so return a REF error
+ // We can't access the cell, so return a REF error
$cellValue = Functions::REF();
} else {
$cellRef = $matches[6] . $matches[7];
@@ -4610,6 +4739,7 @@ class Calculation
$cellValue = $this->extractCellRange($cellRef, $this->spreadsheet->getSheetByName($matches[2]), false);
$pCell->attach($pCellParent);
} else {
+ $cellRef = ($cellSheet !== null) ? "{$matches[2]}!{$cellRef}" : $cellRef;
$cellValue = null;
}
} else {
@@ -4628,13 +4758,14 @@ class Calculation
}
}
}
- $stack->push('Value', $cellValue, $cellRef);
+
+ $stack->push('Cell Value', $cellValue, $cellRef);
if (isset($storeKey)) {
$branchStore[$storeKey] = $cellValue;
}
// if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on
- } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token, $matches)) {
+ } elseif (preg_match('/^' . self::CALCULATION_REGEXP_FUNCTION . '$/miu', $token ?? '', $matches)) {
if ($pCellParent) {
$pCell->attach($pCellParent);
}
@@ -4646,6 +4777,9 @@ class Calculation
$this->debugLog->writeDebugLog('Evaluating Function ', self::localeFunc($functionName), '() with ', (($argCount == 0) ? 'no' : $argCount), ' argument', (($argCount == 1) ? '' : 's'));
}
if ((isset(self::$phpSpreadsheetFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) { // function
+ $passByReference = false;
+ $passCellReference = false;
+ $functionCall = null;
if (isset(self::$phpSpreadsheetFunctions[$functionName])) {
$functionCall = self::$phpSpreadsheetFunctions[$functionName]['functionCall'];
$passByReference = isset(self::$phpSpreadsheetFunctions[$functionName]['passByReference']);
@@ -4721,7 +4855,7 @@ class Calculation
}
} else {
// if the token is a number, boolean, string or an Excel error, push it onto the stack
- if (isset(self::$excelConstants[strtoupper($token)])) {
+ if (isset(self::$excelConstants[strtoupper($token ?? '')])) {
$excelConstant = strtoupper($token);
$stack->push('Constant Value', self::$excelConstants[$excelConstant]);
if (isset($storeKey)) {
@@ -4803,6 +4937,53 @@ class Calculation
return true;
}
+ /**
+ * @param null|string $cellID
+ * @param mixed $operand1
+ * @param mixed $operand2
+ * @param string $operation
+ *
+ * @return array
+ */
+ private function executeArrayComparison($cellID, $operand1, $operand2, $operation, Stack &$stack, bool $recursingArrays)
+ {
+ $result = [];
+ if (!is_array($operand2)) {
+ // Operand 1 is an array, Operand 2 is a scalar
+ foreach ($operand1 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2));
+ $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ } elseif (!is_array($operand1)) {
+ // Operand 1 is a scalar, Operand 2 is an array
+ foreach ($operand2 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData));
+ $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ } else {
+ // Operand 1 and Operand 2 are both arrays
+ if (!$recursingArrays) {
+ self::checkMatrixOperands($operand1, $operand2, 2);
+ }
+ foreach ($operand1 as $x => $operandData) {
+ $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x]));
+ $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true);
+ $r = $stack->pop();
+ $result[$x] = $r['value'];
+ }
+ }
+ // Log the result details
+ $this->debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result));
+ // And push the result onto the stack
+ $stack->push('Array', $result);
+
+ return $result;
+ }
+
/**
* @param null|string $cellID
* @param mixed $operand1
@@ -4816,38 +4997,7 @@ class Calculation
{
// If we're dealing with matrix operations, we want a matrix result
if ((is_array($operand1)) || (is_array($operand2))) {
- $result = [];
- if ((is_array($operand1)) && (!is_array($operand2))) {
- foreach ($operand1 as $x => $operandData) {
- $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2));
- $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack);
- $r = $stack->pop();
- $result[$x] = $r['value'];
- }
- } elseif ((!is_array($operand1)) && (is_array($operand2))) {
- foreach ($operand2 as $x => $operandData) {
- $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData));
- $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack);
- $r = $stack->pop();
- $result[$x] = $r['value'];
- }
- } else {
- if (!$recursingArrays) {
- self::checkMatrixOperands($operand1, $operand2, 2);
- }
- foreach ($operand1 as $x => $operandData) {
- $this->debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x]));
- $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true);
- $r = $stack->pop();
- $result[$x] = $r['value'];
- }
- }
- // Log the result details
- $this->debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result));
- // And push the result onto the stack
- $stack->push('Array', $result);
-
- return $result;
+ return $this->executeArrayComparison($cellID, $operand1, $operand2, $operation, $stack, $recursingArrays);
}
// Simple validate the two operands if they are string values
@@ -4861,10 +5011,10 @@ class Calculation
// Use case insensitive comparaison if not OpenOffice mode
if (Functions::getCompatibilityMode() != Functions::COMPATIBILITY_OPENOFFICE) {
if (is_string($operand1)) {
- $operand1 = strtoupper($operand1);
+ $operand1 = Shared\StringHelper::strToUpper($operand1);
}
if (is_string($operand2)) {
- $operand2 = strtoupper($operand2);
+ $operand2 = Shared\StringHelper::strToUpper($operand2);
}
}
@@ -4930,6 +5080,9 @@ class Calculation
}
break;
+
+ default:
+ throw new Exception('Unsupported binary comparison operation');
}
// Log the result details
@@ -5047,6 +5200,9 @@ class Calculation
$result = $operand1 ** $operand2;
break;
+
+ default:
+ throw new Exception('Unsupported numeric binary operation');
}
}
}
@@ -5075,7 +5231,7 @@ class Calculation
/**
* Extract range values.
*
- * @param string &$pRange String based range representation
+ * @param string $pRange String based range representation
* @param Worksheet $pSheet Worksheet
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
*
@@ -5088,6 +5244,7 @@ class Calculation
if ($pSheet !== null) {
$pSheetName = $pSheet->getTitle();
+
if (strpos($pRange, '!') !== false) {
[$pSheetName, $pRange] = Worksheet::extractSheetTitle($pRange, true);
$pSheet = $this->spreadsheet->getSheetByName($pSheetName);
@@ -5128,7 +5285,7 @@ class Calculation
/**
* Extract range values.
*
- * @param string &$pRange String based range representation
+ * @param string $pRange String based range representation
* @param Worksheet $pSheet Worksheet
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
*
@@ -5206,10 +5363,8 @@ class Calculation
/**
* Get a list of all implemented functions as an array of function objects.
- *
- * @return array of Category
*/
- public function getFunctions()
+ public function getFunctions(): array
{
return self::$phpSpreadsheetFunctions;
}
@@ -5308,9 +5463,7 @@ class Calculation
$recursiveCalculationCell = ($definedNameWorksheet !== null && $definedNameWorksheet !== $pCellWorksheet)
? $definedNameWorksheet->getCell('A1')
: $pCell;
- $recursiveCalculationCellAddress = $recursiveCalculationCell !== null
- ? $recursiveCalculationCell->getCoordinate()
- : null;
+ $recursiveCalculationCellAddress = $recursiveCalculationCell->getCoordinate();
// Adjust relative references in ranges and formulae so that we execute the calculation for the correct rows and columns
$definedNameValue = self::$referenceHelper->updateFormulaReferencesAnyWorksheet(
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php
index 76431979..65031674 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database.php
@@ -17,7 +17,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DAverage class instead
+ * @see Database\DAverage::evaluate()
+ * Use the evaluate() method in the Database\DAverage class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -52,7 +53,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DCount class instead
+ * @see Database\DCount::evaluate()
+ * Use the evaluate() method in the Database\DCount class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -89,7 +91,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DCountA class instead
+ * @see Database\DCountA::evaluate()
+ * Use the evaluate() method in the Database\DCountA class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -124,7 +127,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DGet class instead
+ * @see Database\DGet::evaluate()
+ * Use the evaluate() method in the Database\DGet class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -159,7 +163,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DMax class instead
+ * @see Database\DMax::evaluate()
+ * Use the evaluate() method in the Database\DMax class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -194,7 +199,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DMin class instead
+ * @see Database\DMin::evaluate()
+ * Use the evaluate() method in the Database\DMin class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -228,7 +234,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DProduct class instead
+ * @see Database\DProduct::evaluate()
+ * Use the evaluate() method in the Database\DProduct class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -245,7 +252,7 @@ class Database
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return float|string
*/
public static function DPRODUCT($database, $field, $criteria)
{
@@ -263,7 +270,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DStDev class instead
+ * @see Database\DStDev::evaluate()
+ * Use the evaluate() method in the Database\DStDev class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -298,7 +306,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DStDevP class instead
+ * @see Database\DStDevP::evaluate()
+ * Use the evaluate() method in the Database\DStDevP class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -332,7 +341,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DSum class instead
+ * @see Database\DSum::evaluate()
+ * Use the evaluate() method in the Database\DSum class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -349,7 +359,7 @@ class Database
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return float|string
*/
public static function DSUM($database, $field, $criteria)
{
@@ -367,7 +377,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DVar class instead
+ * @see Database\DVar::evaluate()
+ * Use the evaluate() method in the Database\DVar class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
@@ -402,7 +413,8 @@ class Database
*
* @Deprecated 1.17.0
*
- * @see Use the evaluate() method in the Database\DVarP class instead
+ * @see Database\DVarP::evaluate()
+ * Use the evaluate() method in the Database\DVarP class instead
*
* @param mixed[] $database The range of cells that makes up the list or database.
* A database is a list of related data in which rows of related
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DAverage.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DAverage.php
index 738cb78e..e30842dc 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DAverage.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DAverage.php
@@ -38,7 +38,7 @@ class DAverage extends DatabaseAbstract
return null;
}
- return Averages::AVERAGE(
+ return Averages::average(
self::getFilteredColumn($database, $field, $criteria)
);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMax.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMax.php
index 6cf2f20d..9c5c7301 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMax.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMax.php
@@ -30,7 +30,7 @@ class DMax extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
@@ -39,7 +39,7 @@ class DMax extends DatabaseAbstract
return null;
}
- return Maximum::MAX(
+ return Maximum::max(
self::getFilteredColumn($database, $field, $criteria)
);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMin.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMin.php
index 5668bcf6..e7b473a7 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMin.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DMin.php
@@ -30,7 +30,7 @@ class DMin extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
@@ -39,7 +39,7 @@ class DMin extends DatabaseAbstract
return null;
}
- return Minimum::MIN(
+ return Minimum::min(
self::getFilteredColumn($database, $field, $criteria)
);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DProduct.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DProduct.php
index a3b245f3..35e3d479 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DProduct.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DProduct.php
@@ -29,7 +29,7 @@ class DProduct extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
@@ -38,7 +38,7 @@ class DProduct extends DatabaseAbstract
return null;
}
- return MathTrig::PRODUCT(
+ return MathTrig\Operations::product(
self::getFilteredColumn($database, $field, $criteria)
);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDev.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDev.php
index cfc7e952..7ec42bc4 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDev.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDev.php
@@ -30,7 +30,7 @@ class DStDev extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float|string
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDevP.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDevP.php
index 2a04c5d9..cbe241f0 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDevP.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DStDevP.php
@@ -30,7 +30,7 @@ class DStDevP extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float|string
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DSum.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DSum.php
index b2fa464a..03841c4e 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DSum.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DSum.php
@@ -29,7 +29,7 @@ class DSum extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float
+ * @return null|float|string
*/
public static function evaluate($database, $field, $criteria)
{
@@ -38,7 +38,7 @@ class DSum extends DatabaseAbstract
return null;
}
- return MathTrig::SUM(
+ return MathTrig\Sum::sumIgnoringStrings(
self::getFilteredColumn($database, $field, $criteria)
);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVar.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVar.php
index c70da073..0a998c03 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVar.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVar.php
@@ -30,7 +30,7 @@ class DVar extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float|string (string if result is an error)
+ * @return null|float|string (string if result is an error)
*/
public static function evaluate($database, $field, $criteria)
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVarP.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVarP.php
index f22f2cca..77acbdfc 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVarP.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DVarP.php
@@ -30,7 +30,7 @@ class DVarP extends DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return float|string (string if result is an error)
+ * @return null|float|string (string if result is an error)
*/
public static function evaluate($database, $field, $criteria)
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
index cf48bd88..2c9bb2de 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Database/DatabaseAbstract.php
@@ -57,7 +57,7 @@ abstract class DatabaseAbstract
* the column label in which you specify a condition for the
* column.
*
- * @return array of mixed
+ * @return mixed[]
*/
protected static function filter(array $database, array $criteria): array
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
index 64d72c2b..44a38c19 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTime.php
@@ -2,127 +2,49 @@
namespace PhpOffice\PhpSpreadsheet\Calculation;
-use DateTimeImmutable;
use DateTimeInterface;
-use PhpOffice\PhpSpreadsheet\Shared\Date;
-use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
+/**
+ * @deprecated 1.18.0
+ */
class DateTime
{
/**
* Identify if a year is a leap year or not.
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Helpers::isLeapYear()
+ * Use the isLeapYear method in the DateTimeExcel\Helpers class instead
+ *
* @param int|string $year The year to test
*
* @return bool TRUE if the year is a leap year, otherwise FALSE
*/
public static function isLeapYear($year)
{
- return (($year % 4) === 0) && (($year % 100) !== 0) || (($year % 400) === 0);
- }
-
- /**
- * Return the number of days between two dates based on a 360 day calendar.
- *
- * @param int $startDay Day of month of the start date
- * @param int $startMonth Month of the start date
- * @param int $startYear Year of the start date
- * @param int $endDay Day of month of the start date
- * @param int $endMonth Month of the start date
- * @param int $endYear Year of the start date
- * @param bool $methodUS Whether to use the US method or the European method of calculation
- *
- * @return int Number of days between the start date and the end date
- */
- private static function dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, $methodUS)
- {
- if ($startDay == 31) {
- --$startDay;
- } elseif ($methodUS && ($startMonth == 2 && ($startDay == 29 || ($startDay == 28 && !self::isLeapYear($startYear))))) {
- $startDay = 30;
- }
- if ($endDay == 31) {
- if ($methodUS && $startDay != 30) {
- $endDay = 1;
- if ($endMonth == 12) {
- ++$endYear;
- $endMonth = 1;
- } else {
- ++$endMonth;
- }
- } else {
- $endDay = 30;
- }
- }
-
- return $endDay + $endMonth * 30 + $endYear * 360 - $startDay - $startMonth * 30 - $startYear * 360;
+ return DateTimeExcel\Helpers::isLeapYear($year);
}
/**
* getDateValue.
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Helpers::getDateValue()
+ * Use the getDateValue method in the DateTimeExcel\Helpers class instead
+ *
* @param mixed $dateValue
*
* @return mixed Excel date/time serial value, or string if error
*/
public static function getDateValue($dateValue)
{
- if (!is_numeric($dateValue)) {
- if ((is_object($dateValue)) && ($dateValue instanceof DateTimeInterface)) {
- $dateValue = Date::PHPToExcel($dateValue);
- } else {
- $saveReturnDateType = Functions::getReturnDateType();
- Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
- $dateValue = self::DATEVALUE($dateValue);
- Functions::setReturnDateType($saveReturnDateType);
- }
+ try {
+ return DateTimeExcel\Helpers::getDateValue($dateValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
-
- return $dateValue;
- }
-
- /**
- * getTimeValue.
- *
- * @param string $timeValue
- *
- * @return mixed Excel date/time serial value, or string if error
- */
- private static function getTimeValue($timeValue)
- {
- $saveReturnDateType = Functions::getReturnDateType();
- Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
- $timeValue = self::TIMEVALUE($timeValue);
- Functions::setReturnDateType($saveReturnDateType);
-
- return $timeValue;
- }
-
- private static function adjustDateByMonths($dateValue = 0, $adjustmentMonths = 0)
- {
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
- $oMonth = (int) $PHPDateObject->format('m');
- $oYear = (int) $PHPDateObject->format('Y');
-
- $adjustmentMonthsString = (string) $adjustmentMonths;
- if ($adjustmentMonths > 0) {
- $adjustmentMonthsString = '+' . $adjustmentMonths;
- }
- if ($adjustmentMonths != 0) {
- $PHPDateObject->modify($adjustmentMonthsString . ' months');
- }
- $nMonth = (int) $PHPDateObject->format('m');
- $nYear = (int) $PHPDateObject->format('Y');
-
- $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
- if ($monthDiff != $adjustmentMonths) {
- $adjustDays = (int) $PHPDateObject->format('d');
- $adjustDaysString = '-' . $adjustDays . ' days';
- $PHPDateObject->modify($adjustDaysString);
- }
-
- return $PHPDateObject;
}
/**
@@ -139,15 +61,17 @@ class DateTime
* Excel Function:
* NOW()
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Current::now()
+ * Use the now method in the DateTimeExcel\Current class instead
+ *
* @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
* depending on the value of the ReturnDateType flag
*/
public static function DATETIMENOW()
{
- $dti = new DateTimeImmutable();
- $dateArray = date_parse($dti->format('c'));
-
- return is_array($dateArray) ? self::returnIn3FormatsArray($dateArray) : Functions::VALUE();
+ return DateTimeExcel\Current::now();
}
/**
@@ -164,15 +88,17 @@ class DateTime
* Excel Function:
* TODAY()
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Current::today()
+ * Use the today method in the DateTimeExcel\Current class instead
+ *
* @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
* depending on the value of the ReturnDateType flag
*/
public static function DATENOW()
{
- $dti = new DateTimeImmutable();
- $dateArray = date_parse($dti->format('c'));
-
- return is_array($dateArray) ? self::returnIn3FormatsArray($dateArray, true) : Functions::VALUE();
+ return DateTimeExcel\Current::today();
}
/**
@@ -183,9 +109,15 @@ class DateTime
* NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
* format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
*
+ *
* Excel Function:
* DATE(year,month,day)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Date::fromYMD()
+ * Use the fromYMD method in the DateTimeExcel\Date class instead
+ *
* PhpSpreadsheet is a lot more forgiving than MS Excel when passing non numeric values to this function.
* A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted,
* as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language.
@@ -226,65 +158,7 @@ class DateTime
*/
public static function DATE($year = 0, $month = 1, $day = 1)
{
- $year = Functions::flattenSingleValue($year);
- $month = Functions::flattenSingleValue($month);
- $day = Functions::flattenSingleValue($day);
-
- if (($month !== null) && (!is_numeric($month))) {
- $month = Date::monthStringToNumber($month);
- }
-
- if (($day !== null) && (!is_numeric($day))) {
- $day = Date::dayStringToNumber($day);
- }
-
- $year = ($year !== null) ? StringHelper::testStringAsNumeric($year) : 0;
- $month = ($month !== null) ? StringHelper::testStringAsNumeric($month) : 0;
- $day = ($day !== null) ? StringHelper::testStringAsNumeric($day) : 0;
- if (
- (!is_numeric($year)) ||
- (!is_numeric($month)) ||
- (!is_numeric($day))
- ) {
- return Functions::VALUE();
- }
- $year = (int) $year;
- $month = (int) $month;
- $day = (int) $day;
-
- $baseYear = Date::getExcelCalendar();
- // Validate parameters
- if ($year < ($baseYear - 1900)) {
- return Functions::NAN();
- }
- if ((($baseYear - 1900) != 0) && ($year < $baseYear) && ($year >= 1900)) {
- return Functions::NAN();
- }
-
- if (($year < $baseYear) && ($year >= ($baseYear - 1900))) {
- $year += 1900;
- }
-
- if ($month < 1) {
- // Handle year/month adjustment if month < 1
- --$month;
- $year += ceil($month / 12) - 1;
- $month = 13 - abs($month % 12);
- } elseif ($month > 12) {
- // Handle year/month adjustment if month > 12
- $year += floor($month / 12);
- $month = ($month % 12);
- }
-
- // Re-validate the year parameter after adjustments
- if (($year < $baseYear) || ($year >= 10000)) {
- return Functions::NAN();
- }
-
- // Execute function
- $excelDateValue = Date::formattedPHPToExcel($year, $month, $day);
-
- return self::returnIn3FormatsFloat($excelDateValue);
+ return DateTimeExcel\Date::fromYMD($year, $month, $day);
}
/**
@@ -298,6 +172,11 @@ class DateTime
* Excel Function:
* TIME(hour,minute,second)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Time::fromHMS()
+ * Use the fromHMS method in the DateTimeExcel\Time class instead
+ *
* @param int $hour A number from 0 (zero) to 32767 representing the hour.
* Any value greater than 23 will be divided by 24 and the remainder
* will be treated as the hour value. For example, TIME(27,0,0) =
@@ -315,73 +194,7 @@ class DateTime
*/
public static function TIME($hour = 0, $minute = 0, $second = 0)
{
- $hour = Functions::flattenSingleValue($hour);
- $minute = Functions::flattenSingleValue($minute);
- $second = Functions::flattenSingleValue($second);
-
- if ($hour == '') {
- $hour = 0;
- }
- if ($minute == '') {
- $minute = 0;
- }
- if ($second == '') {
- $second = 0;
- }
-
- if ((!is_numeric($hour)) || (!is_numeric($minute)) || (!is_numeric($second))) {
- return Functions::VALUE();
- }
- $hour = (int) $hour;
- $minute = (int) $minute;
- $second = (int) $second;
-
- if ($second < 0) {
- $minute += floor($second / 60);
- $second = 60 - abs($second % 60);
- if ($second == 60) {
- $second = 0;
- }
- } elseif ($second >= 60) {
- $minute += floor($second / 60);
- $second = $second % 60;
- }
- if ($minute < 0) {
- $hour += floor($minute / 60);
- $minute = 60 - abs($minute % 60);
- if ($minute == 60) {
- $minute = 0;
- }
- } elseif ($minute >= 60) {
- $hour += floor($minute / 60);
- $minute = $minute % 60;
- }
-
- if ($hour > 23) {
- $hour = $hour % 24;
- } elseif ($hour < 0) {
- return Functions::NAN();
- }
-
- // Execute function
- $retType = Functions::getReturnDateType();
- if ($retType === Functions::RETURNDATE_EXCEL) {
- $date = 0;
- $calendar = Date::getExcelCalendar();
- if ($calendar != Date::CALENDAR_WINDOWS_1900) {
- $date = 1;
- }
-
- return (float) Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);
- }
- if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
- return (int) Date::excelToTimestamp(Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600
- }
- // RETURNDATE_PHP_DATETIME_OBJECT
- // Hour has already been normalized (0-23) above
- $phpDateObject = new \DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);
-
- return $phpDateObject;
+ return DateTimeExcel\Time::fromHMS($hour, $minute, $second);
}
/**
@@ -397,6 +210,11 @@ class DateTime
* Excel Function:
* DATEVALUE(dateValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\DateValue::fromString()
+ * Use the fromString method in the DateTimeExcel\DateValue class instead
+ *
* @param string $dateValue Text that represents a date in a Microsoft Excel date format.
* For example, "1/30/2008" or "30-Jan-2008" are text strings within
* quotation marks that represent dates. Using the default date
@@ -409,188 +227,9 @@ class DateTime
* @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
* depending on the value of the ReturnDateType flag
*/
- public static function DATEVALUE($dateValue = 1)
+ public static function DATEVALUE($dateValue)
{
- $dti = new DateTimeImmutable();
- $baseYear = Date::getExcelCalendar();
- $dateValue = trim(Functions::flattenSingleValue($dateValue), '"');
- // Strip any ordinals because they're allowed in Excel (English only)
- $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue);
- // Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany)
- $dateValue = str_replace(['/', '.', '-', ' '], ' ', $dateValue);
-
- $yearFound = false;
- $t1 = explode(' ', $dateValue);
- $t = '';
- foreach ($t1 as &$t) {
- if ((is_numeric($t)) && ($t > 31)) {
- if ($yearFound) {
- return Functions::VALUE();
- }
- if ($t < 100) {
- $t += 1900;
- }
- $yearFound = true;
- }
- }
- if (count($t1) === 1) {
- // We've been fed a time value without any date
- return ((strpos($t, ':') === false)) ? Functions::Value() : 0.0;
- }
- if (count($t1) == 2) {
- // We only have two parts of the date: either day/month or month/year
- if ($yearFound) {
- array_unshift($t1, 1);
- } else {
- if (is_numeric($t1[1]) && $t1[1] > 29) {
- $t1[1] += 1900;
- array_unshift($t1, 1);
- } else {
- $t1[] = $dti->format('Y');
- }
- }
- }
- unset($t);
- $dateValue = implode(' ', $t1);
-
- $PHPDateArray = date_parse($dateValue);
- if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
- // If original count was 1, we've already returned.
- // If it was 2, we added another.
- // Therefore, neither of the first 2 stroks below can fail.
- $testVal1 = strtok($dateValue, '- ');
- $testVal2 = strtok('- ');
- $testVal3 = strtok('- ') ?: $dti->format('Y');
- self::adjustYear($testVal1, $testVal2, $testVal3);
- $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3);
- if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
- $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3);
- if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
- return Functions::VALUE();
- }
- }
- }
-
- $retValue = Functions::Value();
- if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
- // Execute function
- self::replaceIfEmpty($PHPDateArray['year'], $dti->format('Y'));
- if ($PHPDateArray['year'] < $baseYear) {
- return Functions::VALUE();
- }
- self::replaceIfEmpty($PHPDateArray['month'], $dti->format('m'));
- self::replaceIfEmpty($PHPDateArray['day'], $dti->format('d'));
- $PHPDateArray['hour'] = 0;
- $PHPDateArray['minute'] = 0;
- $PHPDateArray['second'] = 0;
- $month = (int) $PHPDateArray['month'];
- $day = (int) $PHPDateArray['day'];
- $year = (int) $PHPDateArray['year'];
- if (!checkdate($month, $day, $year)) {
- return ($year === 1900 && $month === 2 && $day === 29) ? self::returnIn3FormatsFloat(60.0) : Functions::VALUE();
- }
- $retValue = is_array($PHPDateArray) ? self::returnIn3FormatsArray($PHPDateArray, true) : Functions::VALUE();
- }
-
- return $retValue;
- }
-
- /**
- * Help reduce perceived complexity of some tests.
- *
- * @param mixed $value
- * @param mixed $altValue
- */
- private static function replaceIfEmpty(&$value, $altValue): void
- {
- $value = $value ?: $altValue;
- }
-
- /**
- * Adjust year in ambiguous situations.
- */
- private static function adjustYear(string $testVal1, string $testVal2, string &$testVal3): void
- {
- if (!is_numeric($testVal1) || $testVal1 < 31) {
- if (!is_numeric($testVal2) || $testVal2 < 12) {
- if (is_numeric($testVal3) && $testVal3 < 12) {
- $testVal3 += 2000;
- }
- }
- }
- }
-
- /**
- * Return result in one of three formats.
- *
- * @return mixed
- */
- private static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false)
- {
- $retType = Functions::getReturnDateType();
- if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
- return new \DateTime(
- $dateArray['year']
- . '-' . $dateArray['month']
- . '-' . $dateArray['day']
- . ' ' . $dateArray['hour']
- . ':' . $dateArray['minute']
- . ':' . $dateArray['second']
- );
- }
- $excelDateValue =
- Date::formattedPHPToExcel(
- $dateArray['year'],
- $dateArray['month'],
- $dateArray['day'],
- $dateArray['hour'],
- $dateArray['minute'],
- $dateArray['second']
- );
- if ($retType === Functions::RETURNDATE_EXCEL) {
- return $noFrac ? floor($excelDateValue) : (float) $excelDateValue;
- }
- // RETURNDATE_UNIX_TIMESTAMP)
-
- return (int) Date::excelToTimestamp($excelDateValue);
- }
-
- /**
- * Return result in one of three formats.
- *
- * @return mixed
- */
- private static function returnIn3FormatsFloat(float $excelDateValue)
- {
- $retType = Functions::getReturnDateType();
- if ($retType === Functions::RETURNDATE_EXCEL) {
- return $excelDateValue;
- }
- if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
- return (int) Date::excelToTimestamp($excelDateValue);
- }
- // RETURNDATE_PHP_DATETIME_OBJECT
-
- return Date::excelToDateTimeObject($excelDateValue);
- }
-
- /**
- * Return result in one of three formats.
- *
- * @return mixed
- */
- private static function returnIn3FormatsObject(\DateTime $PHPDateObject)
- {
- $retType = Functions::getReturnDateType();
- if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
- return $PHPDateObject;
- }
- if ($retType === Functions::RETURNDATE_EXCEL) {
- return (float) Date::PHPToExcel($PHPDateObject);
- }
- // RETURNDATE_UNIX_TIMESTAMP
-
- return (int) Date::excelToTimestamp(Date::PHPToExcel($PHPDateObject));
+ return DateTimeExcel\DateValue::fromString($dateValue);
}
/**
@@ -606,6 +245,11 @@ class DateTime
* Excel Function:
* TIMEVALUE(timeValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\TimeValue::fromString()
+ * Use the fromString method in the DateTimeExcel\TimeValue class instead
+ *
* @param string $timeValue A text string that represents a time in any one of the Microsoft
* Excel time formats; for example, "6:45 PM" and "18:45" text strings
* within quotation marks that represent time.
@@ -616,37 +260,20 @@ class DateTime
*/
public static function TIMEVALUE($timeValue)
{
- $timeValue = trim(Functions::flattenSingleValue($timeValue), '"');
- $timeValue = str_replace(['/', '.'], '-', $timeValue);
-
- $arraySplit = preg_split('/[\/:\-\s]/', $timeValue);
- if ((count($arraySplit) == 2 || count($arraySplit) == 3) && $arraySplit[0] > 24) {
- $arraySplit[0] = ($arraySplit[0] % 24);
- $timeValue = implode(':', $arraySplit);
- }
-
- $PHPDateArray = date_parse($timeValue);
- $retValue = Functions::VALUE();
- if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
- // OpenOffice-specific code removed - it works just like Excel
- $excelDateValue = Date::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1;
-
- $retType = Functions::getReturnDateType();
- if ($retType === Functions::RETURNDATE_EXCEL) {
- $retValue = (float) $excelDateValue;
- } elseif ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
- $retValue = (int) $phpDateValue = Date::excelToTimestamp($excelDateValue + 25569) - 3600;
- } else {
- $retValue = new \DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);
- }
- }
-
- return $retValue;
+ return DateTimeExcel\TimeValue::fromString($timeValue);
}
/**
* DATEDIF.
*
+ * Excel Function:
+ * DATEDIF(startdate, enddate, unit)
+ *
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Difference::interval()
+ * Use the interval method in the DateTimeExcel\Difference class instead
+ *
* @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object
* or a standard date string
* @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object
@@ -657,95 +284,7 @@ class DateTime
*/
public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 'D')
{
- $startDate = Functions::flattenSingleValue($startDate);
- $endDate = Functions::flattenSingleValue($endDate);
- $unit = strtoupper(Functions::flattenSingleValue($unit));
-
- if (is_string($startDate = self::getDateValue($startDate))) {
- return Functions::VALUE();
- }
- if (is_string($endDate = self::getDateValue($endDate))) {
- return Functions::VALUE();
- }
-
- // Validate parameters
- if ($startDate > $endDate) {
- return Functions::NAN();
- }
-
- // Execute function
- $difference = $endDate - $startDate;
-
- $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
- $startDays = $PHPStartDateObject->format('j');
- $startMonths = $PHPStartDateObject->format('n');
- $startYears = $PHPStartDateObject->format('Y');
-
- $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
- $endDays = $PHPEndDateObject->format('j');
- $endMonths = $PHPEndDateObject->format('n');
- $endYears = $PHPEndDateObject->format('Y');
-
- $PHPDiffDateObject = $PHPEndDateObject->diff($PHPStartDateObject);
-
- switch ($unit) {
- case 'D':
- $retVal = (int) $difference;
-
- break;
- case 'M':
- $retVal = (int) 12 * $PHPDiffDateObject->format('%y') + $PHPDiffDateObject->format('%m');
-
- break;
- case 'Y':
- $retVal = (int) $PHPDiffDateObject->format('%y');
-
- break;
- case 'MD':
- if ($endDays < $startDays) {
- $retVal = $endDays;
- $PHPEndDateObject->modify('-' . $endDays . ' days');
- $adjustDays = $PHPEndDateObject->format('j');
- $retVal += ($adjustDays - $startDays);
- } else {
- $retVal = (int) $PHPDiffDateObject->format('%d');
- }
-
- break;
- case 'YM':
- $retVal = (int) $PHPDiffDateObject->format('%m');
-
- break;
- case 'YD':
- $retVal = (int) $difference;
- if ($endYears > $startYears) {
- $isLeapStartYear = $PHPStartDateObject->format('L');
- $wasLeapEndYear = $PHPEndDateObject->format('L');
-
- // Adjust end year to be as close as possible as start year
- while ($PHPEndDateObject >= $PHPStartDateObject) {
- $PHPEndDateObject->modify('-1 year');
- $endYears = $PHPEndDateObject->format('Y');
- }
- $PHPEndDateObject->modify('+1 year');
-
- // Get the result
- $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
-
- // Adjust for leap years cases
- $isLeapEndYear = $PHPEndDateObject->format('L');
- $limit = new \DateTime($PHPEndDateObject->format('Y-02-29'));
- if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {
- --$retVal;
- }
- }
-
- break;
- default:
- $retVal = Functions::VALUE();
- }
-
- return $retVal;
+ return DateTimeExcel\Difference::interval($startDate, $endDate, $unit);
}
/**
@@ -756,40 +295,21 @@ class DateTime
* Excel Function:
* DAYS(endDate, startDate)
*
- * @param DateTimeImmutable|float|int|string $endDate Excel date serial value (float),
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Days::between()
+ * Use the between method in the DateTimeExcel\Days class instead
+ *
+ * @param DateTimeInterface|float|int|string $endDate Excel date serial value (float),
* PHP date timestamp (integer), PHP DateTime object, or a standard date string
- * @param DateTimeImmutable|float|int|string $startDate Excel date serial value (float),
+ * @param DateTimeInterface|float|int|string $startDate Excel date serial value (float),
* PHP date timestamp (integer), PHP DateTime object, or a standard date string
*
* @return int|string Number of days between start date and end date or an error
*/
public static function DAYS($endDate = 0, $startDate = 0)
{
- $startDate = Functions::flattenSingleValue($startDate);
- $endDate = Functions::flattenSingleValue($endDate);
-
- $startDate = self::getDateValue($startDate);
- if (is_string($startDate)) {
- return Functions::VALUE();
- }
-
- $endDate = self::getDateValue($endDate);
- if (is_string($endDate)) {
- return Functions::VALUE();
- }
-
- // Execute function
- $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
- $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
-
- $diff = $PHPStartDateObject->diff($PHPEndDateObject);
- $days = $diff->days;
-
- if ($diff->invert) {
- $days = -$days;
- }
-
- return $days;
+ return DateTimeExcel\Days::between($endDate, $startDate);
}
/**
@@ -802,6 +322,11 @@ class DateTime
* Excel Function:
* DAYS360(startDate,endDate[,method])
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Days360::between()
+ * Use the between method in the DateTimeExcel\Days360 class instead
+ *
* @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
@@ -822,32 +347,7 @@ class DateTime
*/
public static function DAYS360($startDate = 0, $endDate = 0, $method = false)
{
- $startDate = Functions::flattenSingleValue($startDate);
- $endDate = Functions::flattenSingleValue($endDate);
-
- if (is_string($startDate = self::getDateValue($startDate))) {
- return Functions::VALUE();
- }
- if (is_string($endDate = self::getDateValue($endDate))) {
- return Functions::VALUE();
- }
-
- if (!is_bool($method)) {
- return Functions::VALUE();
- }
-
- // Execute function
- $PHPStartDateObject = Date::excelToDateTimeObject($startDate);
- $startDay = $PHPStartDateObject->format('j');
- $startMonth = $PHPStartDateObject->format('n');
- $startYear = $PHPStartDateObject->format('Y');
-
- $PHPEndDateObject = Date::excelToDateTimeObject($endDate);
- $endDay = $PHPEndDateObject->format('j');
- $endMonth = $PHPEndDateObject->format('n');
- $endYear = $PHPEndDateObject->format('Y');
-
- return self::dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, !$method);
+ return DateTimeExcel\Days360::between($startDate, $endDate, $method);
}
/**
@@ -860,6 +360,12 @@ class DateTime
*
* Excel Function:
* YEARFRAC(startDate,endDate[,method])
+ *
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\YearFrac::fraction()
+ * Use the fraction method in the DateTimeExcel\YearFrac class instead
+ *
* See https://lists.oasis-open.org/archives/office-formula/200806/msg00039.html
* for description of algorithm used in Excel
*
@@ -878,78 +384,7 @@ class DateTime
*/
public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0)
{
- $startDate = Functions::flattenSingleValue($startDate);
- $endDate = Functions::flattenSingleValue($endDate);
- $method = Functions::flattenSingleValue($method);
-
- if (is_string($startDate = self::getDateValue($startDate))) {
- return Functions::VALUE();
- }
- if (is_string($endDate = self::getDateValue($endDate))) {
- return Functions::VALUE();
- }
- if ($startDate > $endDate) {
- $temp = $startDate;
- $startDate = $endDate;
- $endDate = $temp;
- }
-
- if (((is_numeric($method)) && (!is_string($method))) || ($method == '')) {
- switch ($method) {
- case 0:
- return self::DAYS360($startDate, $endDate) / 360;
- case 1:
- $days = self::DATEDIF($startDate, $endDate);
- $startYear = self::YEAR($startDate);
- $endYear = self::YEAR($endDate);
- $years = $endYear - $startYear + 1;
- $startMonth = self::MONTHOFYEAR($startDate);
- $startDay = self::DAYOFMONTH($startDate);
- $endMonth = self::MONTHOFYEAR($endDate);
- $endDay = self::DAYOFMONTH($endDate);
- $startMonthDay = 100 * $startMonth + $startDay;
- $endMonthDay = 100 * $endMonth + $endDay;
- if ($years == 1) {
- if (self::isLeapYear($endYear)) {
- $tmpCalcAnnualBasis = 366;
- } else {
- $tmpCalcAnnualBasis = 365;
- }
- } elseif ($years == 2 && $startMonthDay >= $endMonthDay) {
- if (self::isLeapYear($startYear)) {
- if ($startMonthDay <= 229) {
- $tmpCalcAnnualBasis = 366;
- } else {
- $tmpCalcAnnualBasis = 365;
- }
- } elseif (self::isLeapYear($endYear)) {
- if ($endMonthDay >= 229) {
- $tmpCalcAnnualBasis = 366;
- } else {
- $tmpCalcAnnualBasis = 365;
- }
- } else {
- $tmpCalcAnnualBasis = 365;
- }
- } else {
- $tmpCalcAnnualBasis = 0;
- for ($year = $startYear; $year <= $endYear; ++$year) {
- $tmpCalcAnnualBasis += self::isLeapYear($year) ? 366 : 365;
- }
- $tmpCalcAnnualBasis /= $years;
- }
-
- return $days / $tmpCalcAnnualBasis;
- case 2:
- return self::DATEDIF($startDate, $endDate) / 360;
- case 3:
- return self::DATEDIF($startDate, $endDate) / 365;
- case 4:
- return self::DAYS360($startDate, $endDate, true) / 360;
- }
- }
-
- return Functions::VALUE();
+ return DateTimeExcel\YearFrac::fraction($startDate, $endDate, $method);
}
/**
@@ -963,71 +398,22 @@ class DateTime
* Excel Function:
* NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]])
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\NetworkDays::count()
+ * Use the count method in the DateTimeExcel\NetworkDays class instead
+ *
* @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
+ * @param mixed $dateArgs
*
* @return int|string Interval between the dates
*/
public static function NETWORKDAYS($startDate, $endDate, ...$dateArgs)
{
- // Retrieve the mandatory start and end date that are referenced in the function definition
- $startDate = Functions::flattenSingleValue($startDate);
- $endDate = Functions::flattenSingleValue($endDate);
- // Get the optional days
- $dateArgs = Functions::flattenArray($dateArgs);
-
- // Validate the start and end dates
- if (is_string($startDate = $sDate = self::getDateValue($startDate))) {
- return Functions::VALUE();
- }
- $startDate = (float) floor($startDate);
- if (is_string($endDate = $eDate = self::getDateValue($endDate))) {
- return Functions::VALUE();
- }
- $endDate = (float) floor($endDate);
-
- if ($sDate > $eDate) {
- $startDate = $eDate;
- $endDate = $sDate;
- }
-
- // Execute function
- $startDoW = 6 - self::WEEKDAY($startDate, 2);
- if ($startDoW < 0) {
- $startDoW = 5;
- }
- $endDoW = self::WEEKDAY($endDate, 2);
- if ($endDoW >= 6) {
- $endDoW = 0;
- }
-
- $wholeWeekDays = floor(($endDate - $startDate) / 7) * 5;
- $partWeekDays = $endDoW + $startDoW;
- if ($partWeekDays > 5) {
- $partWeekDays -= 5;
- }
-
- // Test any extra holiday parameters
- $holidayCountedArray = [];
- foreach ($dateArgs as $holidayDate) {
- if (is_string($holidayDate = self::getDateValue($holidayDate))) {
- return Functions::VALUE();
- }
- if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
- if ((self::WEEKDAY($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) {
- --$partWeekDays;
- $holidayCountedArray[] = $holidayDate;
- }
- }
- }
-
- if ($sDate > $eDate) {
- return 0 - ($wholeWeekDays + $partWeekDays);
- }
-
- return $wholeWeekDays + $partWeekDays;
+ return DateTimeExcel\NetworkDays::count($startDate, $endDate, ...$dateArgs);
}
/**
@@ -1041,95 +427,24 @@ class DateTime
* Excel Function:
* WORKDAY(startDate,endDays[,holidays[,holiday[,...]]])
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\WorkDay::date()
+ * Use the date method in the DateTimeExcel\WorkDay class instead
+ *
* @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param int $endDays The number of nonweekend and nonholiday days before or after
* startDate. A positive value for days yields a future date; a
* negative value yields a past date.
+ * @param mixed $dateArgs
*
* @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
* depending on the value of the ReturnDateType flag
*/
public static function WORKDAY($startDate, $endDays, ...$dateArgs)
{
- // Retrieve the mandatory start date and days that are referenced in the function definition
- $startDate = Functions::flattenSingleValue($startDate);
- $endDays = Functions::flattenSingleValue($endDays);
- // Get the optional days
- $dateArgs = Functions::flattenArray($dateArgs);
-
- if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) {
- return Functions::VALUE();
- }
- $startDate = (float) floor($startDate);
- $endDays = (int) floor($endDays);
- // If endDays is 0, we always return startDate
- if ($endDays == 0) {
- return $startDate;
- }
-
- $decrementing = $endDays < 0;
-
- // Adjust the start date if it falls over a weekend
-
- $startDoW = self::WEEKDAY($startDate, 3);
- if (self::WEEKDAY($startDate, 3) >= 5) {
- $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW;
- ($decrementing) ? $endDays++ : $endDays--;
- }
-
- // Add endDays
- $endDate = (float) $startDate + ((int) ($endDays / 5) * 7) + ($endDays % 5);
-
- // Adjust the calculated end date if it falls over a weekend
- $endDoW = self::WEEKDAY($endDate, 3);
- if ($endDoW >= 5) {
- $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
- }
-
- // Test any extra holiday parameters
- if (!empty($dateArgs)) {
- $holidayCountedArray = $holidayDates = [];
- foreach ($dateArgs as $holidayDate) {
- if (($holidayDate !== null) && (trim($holidayDate) > '')) {
- if (is_string($holidayDate = self::getDateValue($holidayDate))) {
- return Functions::VALUE();
- }
- if (self::WEEKDAY($holidayDate, 3) < 5) {
- $holidayDates[] = $holidayDate;
- }
- }
- }
- if ($decrementing) {
- rsort($holidayDates, SORT_NUMERIC);
- } else {
- sort($holidayDates, SORT_NUMERIC);
- }
- foreach ($holidayDates as $holidayDate) {
- if ($decrementing) {
- if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) {
- if (!in_array($holidayDate, $holidayCountedArray)) {
- --$endDate;
- $holidayCountedArray[] = $holidayDate;
- }
- }
- } else {
- if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
- if (!in_array($holidayDate, $holidayCountedArray)) {
- ++$endDate;
- $holidayCountedArray[] = $holidayDate;
- }
- }
- }
- // Adjust the calculated end date if it falls over a weekend
- $endDoW = self::WEEKDAY($endDate, 3);
- if ($endDoW >= 5) {
- $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
- }
- }
- }
-
- return self::returnIn3FormatsFloat($endDate);
+ return DateTimeExcel\WorkDay::date($startDate, $endDays, ...$dateArgs);
}
/**
@@ -1141,6 +456,11 @@ class DateTime
* Excel Function:
* DAY(dateValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\DateParts::day()
+ * Use the day method in the DateTimeExcel\DateParts class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
*
@@ -1148,27 +468,7 @@ class DateTime
*/
public static function DAYOFMONTH($dateValue = 1)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
-
- if ($dateValue === null || is_bool($dateValue)) {
- return (int) $dateValue;
- }
- if (is_string($dateValue = self::getDateValue($dateValue))) {
- return Functions::VALUE();
- }
-
- if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
- if ($dateValue < 0.0) {
- return Functions::NAN();
- } elseif ($dateValue < 1.0) {
- return 0;
- }
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
-
- return (int) $PHPDateObject->format('j');
+ return DateTimeExcel\DateParts::day($dateValue);
}
/**
@@ -1180,6 +480,11 @@ class DateTime
* Excel Function:
* WEEKDAY(dateValue[,style])
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Week::day()
+ * Use the day method in the DateTimeExcel\Week class instead
+ *
* @param float|int|string $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param int $style A number that determines the type of return value
@@ -1191,70 +496,169 @@ class DateTime
*/
public static function WEEKDAY($dateValue = 1, $style = 1)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
- self::nullFalseTrueToNumber($dateValue);
- $style = Functions::flattenSingleValue($style);
-
- if (!is_numeric($style)) {
- return Functions::VALUE();
- } elseif (($style < 1) || ($style > 3)) {
- return Functions::NAN();
- }
- $style = floor($style);
-
- $dateValue = self::getDateValue($dateValue);
- if (is_string($dateValue)) {
- return Functions::VALUE();
- }
- if ($dateValue < 0.0) {
- return Functions::NAN();
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
- self::silly1900($PHPDateObject);
- $DoW = (int) $PHPDateObject->format('w');
-
- switch ($style) {
- case 1:
- ++$DoW;
-
- break;
- case 2:
- if ($DoW === 0) {
- $DoW = 7;
- }
-
- break;
- case 3:
- if ($DoW === 0) {
- $DoW = 7;
- }
- --$DoW;
-
- break;
- }
-
- return $DoW;
+ return DateTimeExcel\Week::day($dateValue, $style);
}
+ /**
+ * STARTWEEK_SUNDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_SUNDAY instead
+ */
const STARTWEEK_SUNDAY = 1;
+
+ /**
+ * STARTWEEK_MONDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_MONDAY instead
+ */
const STARTWEEK_MONDAY = 2;
+
+ /**
+ * STARTWEEK_MONDAY_ALT.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_MONDAY_ALT instead
+ */
const STARTWEEK_MONDAY_ALT = 11;
+
+ /**
+ * STARTWEEK_TUESDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_TUESDAY instead
+ */
const STARTWEEK_TUESDAY = 12;
+
+ /**
+ * STARTWEEK_WEDNESDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_WEDNESDAY instead
+ */
const STARTWEEK_WEDNESDAY = 13;
+
+ /**
+ * STARTWEEK_THURSDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_THURSDAY instead
+ */
const STARTWEEK_THURSDAY = 14;
+
+ /**
+ * STARTWEEK_FRIDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_FRIDAY instead
+ */
const STARTWEEK_FRIDAY = 15;
+
+ /**
+ * STARTWEEK_SATURDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_SATURDAY instead
+ */
const STARTWEEK_SATURDAY = 16;
+
+ /**
+ * STARTWEEK_SUNDAY_ALT.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_SUNDAY_ALT instead
+ */
const STARTWEEK_SUNDAY_ALT = 17;
+
+ /**
+ * DOW_SUNDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_SUNDAY instead
+ */
const DOW_SUNDAY = 1;
+
+ /**
+ * DOW_MONDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_MONDAY instead
+ */
const DOW_MONDAY = 2;
+
+ /**
+ * DOW_TUESDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_TUESDAY instead
+ */
const DOW_TUESDAY = 3;
+
+ /**
+ * DOW_WEDNESDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_WEDNESDAY instead
+ */
const DOW_WEDNESDAY = 4;
+
+ /**
+ * DOW_THURSDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_THURSDAY instead
+ */
const DOW_THURSDAY = 5;
+
+ /**
+ * DOW_FRIDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_FRIDAY instead
+ */
const DOW_FRIDAY = 6;
+
+ /**
+ * DOW_SATURDAY.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\DOW_SATURDAY instead
+ */
const DOW_SATURDAY = 7;
+
+ /**
+ * STARTWEEK_MONDAY_ISO.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\STARTWEEK_MONDAY_ISO instead
+ */
const STARTWEEK_MONDAY_ISO = 21;
+
+ /**
+ * METHODARR.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use DateTimeExcel\Constants\METHODARR instead
+ */
const METHODARR = [
self::STARTWEEK_SUNDAY => self::DOW_SUNDAY,
self::DOW_MONDAY,
@@ -1281,6 +685,11 @@ class DateTime
* Excel Function:
* WEEKNUM(dateValue[,style])
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Week::number(()
+ * Use the number method in the DateTimeExcel\Week class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param int $method Week begins on Sunday or Monday
@@ -1299,67 +708,7 @@ class DateTime
*/
public static function WEEKNUM($dateValue = 1, $method = self::STARTWEEK_SUNDAY)
{
- $origDateValueNull = $dateValue === null;
- $dateValue = Functions::flattenSingleValue($dateValue);
- $method = Functions::flattenSingleValue($method);
- if (!is_numeric($method)) {
- return Functions::VALUE();
- }
-
- $method = (int) $method;
- if (!array_key_exists($method, self::METHODARR)) {
- return Functions::NaN();
- }
- $method = self::METHODARR[$method];
- if ($dateValue === null) { // boolean not allowed
- // This seems to be an additional Excel bug.
- if (self::buggyWeekNum1900($method)) {
- return 0;
- }
- //$dateValue = 1;
- $dateValue = (Date::getExcelCalendar() === DATE::CALENDAR_MAC_1904) ? 0 : 1;
- }
-
- $dateValue = self::getDateValue($dateValue);
- if (is_string($dateValue)) {
- return Functions::VALUE();
- }
- if ($dateValue < 0.0) {
- return Functions::NAN();
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
- if ($method == self::STARTWEEK_MONDAY_ISO) {
- self::silly1900($PHPDateObject);
-
- return (int) $PHPDateObject->format('W');
- }
- if (self::buggyWeekNum1904($method, $origDateValueNull, $PHPDateObject)) {
- return 0;
- }
- self::silly1900($PHPDateObject, '+ 5 years'); // 1905 calendar matches
- $dayOfYear = $PHPDateObject->format('z');
- $PHPDateObject->modify('-' . $dayOfYear . ' days');
- $firstDayOfFirstWeek = $PHPDateObject->format('w');
- $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7;
- $daysInFirstWeek += 7 * !$daysInFirstWeek;
- $endFirstWeek = $daysInFirstWeek - 1;
- $weekOfYear = floor(($dayOfYear - $endFirstWeek + 13) / 7);
-
- return (int) $weekOfYear;
- }
-
- private static function buggyWeekNum1900(int $method): bool
- {
- return $method === self::DOW_SUNDAY && Date::getExcelCalendar() === Date::CALENDAR_WINDOWS_1900;
- }
-
- private static function buggyWeekNum1904(int $method, bool $origNull, \DateTime $dateObject): bool
- {
- // This appears to be another Excel bug.
-
- return $method === self::DOW_SUNDAY && Date::getExcelCalendar() === Date::CALENDAR_MAC_1904 && !$origNull && $dateObject->format('Y-m-d') === '1904-01-01';
+ return DateTimeExcel\Week::number($dateValue, $method);
}
/**
@@ -1370,6 +719,11 @@ class DateTime
* Excel Function:
* ISOWEEKNUM(dateValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Week::isoWeekNumber()
+ * Use the isoWeekNumber method in the DateTimeExcel\Week class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
*
@@ -1377,22 +731,7 @@ class DateTime
*/
public static function ISOWEEKNUM($dateValue = 1)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
- self::nullFalseTrueToNumber($dateValue);
-
- $dateValue = self::getDateValue($dateValue);
- if (!is_numeric($dateValue)) {
- return Functions::VALUE();
- }
- if ($dateValue < 0.0) {
- return Functions::NAN();
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
- self::silly1900($PHPDateObject);
-
- return (int) $PHPDateObject->format('W');
+ return DateTimeExcel\Week::isoWeekNumber($dateValue);
}
/**
@@ -1404,6 +743,11 @@ class DateTime
* Excel Function:
* MONTH(dateValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\DateParts::month()
+ * Use the month method in the DateTimeExcel\DateParts class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
*
@@ -1411,21 +755,7 @@ class DateTime
*/
public static function MONTHOFYEAR($dateValue = 1)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
-
- if (empty($dateValue)) {
- $dateValue = 1;
- }
- if (is_string($dateValue = self::getDateValue($dateValue))) {
- return Functions::VALUE();
- } elseif ($dateValue < 0.0) {
- return Functions::NAN();
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
-
- return (int) $PHPDateObject->format('n');
+ return DateTimeExcel\DateParts::month($dateValue);
}
/**
@@ -1437,6 +767,11 @@ class DateTime
* Excel Function:
* YEAR(dateValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\DateParts::year()
+ * Use the ear method in the DateTimeExcel\DateParts class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
*
@@ -1444,20 +779,7 @@ class DateTime
*/
public static function YEAR($dateValue = 1)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
-
- if ($dateValue === null) {
- $dateValue = 1;
- } elseif (is_string($dateValue = self::getDateValue($dateValue))) {
- return Functions::VALUE();
- } elseif ($dateValue < 0.0) {
- return Functions::NAN();
- }
-
- // Execute function
- $PHPDateObject = Date::excelToDateTimeObject($dateValue);
-
- return (int) $PHPDateObject->format('Y');
+ return DateTimeExcel\DateParts::year($dateValue);
}
/**
@@ -1469,6 +791,11 @@ class DateTime
* Excel Function:
* HOUR(timeValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\TimeParts::hour()
+ * Use the hour method in the DateTimeExcel\TimeParts class instead
+ *
* @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard time string
*
@@ -1476,24 +803,7 @@ class DateTime
*/
public static function HOUROFDAY($timeValue = 0)
{
- $timeValue = Functions::flattenSingleValue($timeValue);
-
- if (!is_numeric($timeValue)) {
- // Gnumeric test removed - it operates like Excel
- $timeValue = self::getTimeValue($timeValue);
- if (is_string($timeValue)) {
- return Functions::VALUE();
- }
- }
- // Execute function
- if ($timeValue >= 1) {
- $timeValue = fmod($timeValue, 1);
- } elseif ($timeValue < 0.0) {
- return Functions::NAN();
- }
- $timeValue = Date::excelToTimestamp($timeValue);
-
- return (int) gmdate('G', $timeValue);
+ return DateTimeExcel\TimeParts::hour($timeValue);
}
/**
@@ -1505,6 +815,11 @@ class DateTime
* Excel Function:
* MINUTE(timeValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\TimeParts::minute()
+ * Use the minute method in the DateTimeExcel\TimeParts class instead
+ *
* @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard time string
*
@@ -1512,24 +827,7 @@ class DateTime
*/
public static function MINUTE($timeValue = 0)
{
- $timeValue = $timeTester = Functions::flattenSingleValue($timeValue);
-
- if (!is_numeric($timeValue)) {
- // Gnumeric test removed - it operates like Excel
- $timeValue = self::getTimeValue($timeValue);
- if (is_string($timeValue)) {
- return Functions::VALUE();
- }
- }
- // Execute function
- if ($timeValue >= 1) {
- $timeValue = fmod($timeValue, 1);
- } elseif ($timeValue < 0.0) {
- return Functions::NAN();
- }
- $timeValue = Date::excelToTimestamp($timeValue);
-
- return (int) gmdate('i', $timeValue);
+ return DateTimeExcel\TimeParts::minute($timeValue);
}
/**
@@ -1541,6 +839,11 @@ class DateTime
* Excel Function:
* SECOND(timeValue)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\TimeParts::second()
+ * Use the second method in the DateTimeExcel\TimeParts class instead
+ *
* @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard time string
*
@@ -1548,24 +851,7 @@ class DateTime
*/
public static function SECOND($timeValue = 0)
{
- $timeValue = Functions::flattenSingleValue($timeValue);
-
- if (!is_numeric($timeValue)) {
- // Gnumeric test removed - it operates like Excel
- $timeValue = self::getTimeValue($timeValue);
- if (is_string($timeValue)) {
- return Functions::VALUE();
- }
- }
- // Execute function
- if ($timeValue >= 1) {
- $timeValue = fmod($timeValue, 1);
- } elseif ($timeValue < 0.0) {
- return Functions::NAN();
- }
- $timeValue = Date::excelToTimestamp($timeValue);
-
- return (int) gmdate('s', $timeValue);
+ return DateTimeExcel\TimeParts::second($timeValue);
}
/**
@@ -1579,6 +865,11 @@ class DateTime
* Excel Function:
* EDATE(dateValue,adjustmentMonths)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Month::adjust()
+ * Use the adjust method in the DateTimeExcel\Edate class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param int $adjustmentMonths The number of months before or after start_date.
@@ -1590,22 +881,7 @@ class DateTime
*/
public static function EDATE($dateValue = 1, $adjustmentMonths = 0)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
- $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
-
- if (!is_numeric($adjustmentMonths)) {
- return Functions::VALUE();
- }
- $adjustmentMonths = floor($adjustmentMonths);
-
- if (is_string($dateValue = self::getDateValue($dateValue))) {
- return Functions::VALUE();
- }
-
- // Execute function
- $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths);
-
- return self::returnIn3FormatsObject($PHPDateObject);
+ return DateTimeExcel\Month::adjust($dateValue, $adjustmentMonths);
}
/**
@@ -1618,6 +894,11 @@ class DateTime
* Excel Function:
* EOMONTH(dateValue,adjustmentMonths)
*
+ * @Deprecated 1.18.0
+ *
+ * @See DateTimeExcel\Month::lastDay()
+ * Use the lastDay method in the DateTimeExcel\EoMonth class instead
+ *
* @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string
* @param int $adjustmentMonths The number of months before or after start_date.
@@ -1629,49 +910,6 @@ class DateTime
*/
public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0)
{
- $dateValue = Functions::flattenSingleValue($dateValue);
- $adjustmentMonths = Functions::flattenSingleValue($adjustmentMonths);
-
- if (!is_numeric($adjustmentMonths)) {
- return Functions::VALUE();
- }
- $adjustmentMonths = floor($adjustmentMonths);
-
- if (is_string($dateValue = self::getDateValue($dateValue))) {
- return Functions::VALUE();
- }
-
- // Execute function
- $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths + 1);
- $adjustDays = (int) $PHPDateObject->format('d');
- $adjustDaysString = '-' . $adjustDays . ' days';
- $PHPDateObject->modify($adjustDaysString);
-
- return self::returnIn3FormatsObject($PHPDateObject);
- }
-
- /**
- * Many functions accept null/false/true argument treated as 0/0/1.
- *
- * @param mixed $number
- */
- private static function nullFalseTrueToNumber(&$number): void
- {
- $number = Functions::flattenSingleValue($number);
- $baseYear = Date::getExcelCalendar();
- $nullVal = $baseYear === DATE::CALENDAR_MAC_1904 ? 0 : 1;
- if ($number === null) {
- $number = $nullVal;
- } elseif (is_bool($number)) {
- $number = $nullVal + (int) $number;
- }
- }
-
- private static function silly1900(\DateTime $PHPDateObject, string $mod = '-1 day'): void
- {
- $isoDate = $PHPDateObject->format('c');
- if ($isoDate < '1900-03-01') {
- $PHPDateObject->modify($mod);
- }
+ return DateTimeExcel\Month::lastDay($dateValue, $adjustmentMonths);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Constants.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Constants.php
new file mode 100644
index 00000000..1165eb1f
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Constants.php
@@ -0,0 +1,38 @@
+ self::DOW_SUNDAY,
+ self::DOW_MONDAY,
+ self::STARTWEEK_MONDAY_ALT => self::DOW_MONDAY,
+ self::DOW_TUESDAY,
+ self::DOW_WEDNESDAY,
+ self::DOW_THURSDAY,
+ self::DOW_FRIDAY,
+ self::DOW_SATURDAY,
+ self::DOW_SUNDAY,
+ self::STARTWEEK_MONDAY_ISO => self::STARTWEEK_MONDAY_ISO,
+ ];
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Current.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Current.php
new file mode 100644
index 00000000..7a70978e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Current.php
@@ -0,0 +1,59 @@
+format('c'));
+
+ return is_array($dateArray) ? Helpers::returnIn3FormatsArray($dateArray, true) : Functions::VALUE();
+ }
+
+ /**
+ * DATETIMENOW.
+ *
+ * Returns the current date and time.
+ * The NOW function is useful when you need to display the current date and time on a worksheet or
+ * calculate a value based on the current date and time, and have that value updated each time you
+ * open the worksheet.
+ *
+ * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date
+ * and time format of your regional settings. PhpSpreadsheet does not change cell formatting in this way.
+ *
+ * Excel Function:
+ * NOW()
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function now()
+ {
+ $dti = new DateTimeImmutable();
+ $dateArray = date_parse($dti->format('c'));
+
+ return is_array($dateArray) ? Helpers::returnIn3FormatsArray($dateArray) : Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php
new file mode 100644
index 00000000..d18e2371
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Date.php
@@ -0,0 +1,168 @@
+getMessage();
+ }
+
+ // Execute function
+ $excelDateValue = SharedDateHelper::formattedPHPToExcel($year, $month, $day);
+
+ return Helpers::returnIn3FormatsFloat($excelDateValue);
+ }
+
+ /**
+ * Convert year from multiple formats to int.
+ *
+ * @param mixed $year
+ */
+ private static function getYear($year, int $baseYear): int
+ {
+ $year = Functions::flattenSingleValue($year);
+ $year = ($year !== null) ? StringHelper::testStringAsNumeric((string) $year) : 0;
+ if (!is_numeric($year)) {
+ throw new Exception(Functions::VALUE());
+ }
+ $year = (int) $year;
+
+ if ($year < ($baseYear - 1900)) {
+ throw new Exception(Functions::NAN());
+ }
+ if ((($baseYear - 1900) !== 0) && ($year < $baseYear) && ($year >= 1900)) {
+ throw new Exception(Functions::NAN());
+ }
+
+ if (($year < $baseYear) && ($year >= ($baseYear - 1900))) {
+ $year += 1900;
+ }
+
+ return (int) $year;
+ }
+
+ /**
+ * Convert month from multiple formats to int.
+ *
+ * @param mixed $month
+ */
+ private static function getMonth($month): int
+ {
+ $month = Functions::flattenSingleValue($month);
+
+ if (($month !== null) && (!is_numeric($month))) {
+ $month = SharedDateHelper::monthStringToNumber($month);
+ }
+
+ $month = ($month !== null) ? StringHelper::testStringAsNumeric((string) $month) : 0;
+ if (!is_numeric($month)) {
+ throw new Exception(Functions::VALUE());
+ }
+
+ return (int) $month;
+ }
+
+ /**
+ * Convert day from multiple formats to int.
+ *
+ * @param mixed $day
+ */
+ private static function getDay($day): int
+ {
+ $day = Functions::flattenSingleValue($day);
+
+ if (($day !== null) && (!is_numeric($day))) {
+ $day = SharedDateHelper::dayStringToNumber($day);
+ }
+
+ $day = ($day !== null) ? StringHelper::testStringAsNumeric((string) $day) : 0;
+ if (!is_numeric($day)) {
+ throw new Exception(Functions::VALUE());
+ }
+
+ return (int) $day;
+ }
+
+ private static function adjustYearMonth(int &$year, int &$month, int $baseYear): void
+ {
+ if ($month < 1) {
+ // Handle year/month adjustment if month < 1
+ --$month;
+ $year += ceil($month / 12) - 1;
+ $month = 13 - abs($month % 12);
+ } elseif ($month > 12) {
+ // Handle year/month adjustment if month > 12
+ $year += floor($month / 12);
+ $month = ($month % 12);
+ }
+
+ // Re-validate the year parameter after adjustments
+ if (($year < $baseYear) || ($year >= 10000)) {
+ throw new Exception(Functions::NAN());
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php
new file mode 100644
index 00000000..37ea0315
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateParts.php
@@ -0,0 +1,127 @@
+= 0) {
+ return $weirdResult;
+ }
+
+ try {
+ $dateValue = Helpers::getDateValue($dateValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('j');
+ }
+
+ /**
+ * MONTHOFYEAR.
+ *
+ * Returns the month of a date represented by a serial number.
+ * The month is given as an integer, ranging from 1 (January) to 12 (December).
+ *
+ * Excel Function:
+ * MONTH(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Month of the year
+ */
+ public static function month($dateValue)
+ {
+ try {
+ $dateValue = Helpers::getDateValue($dateValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ if ($dateValue < 1 && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900) {
+ return 1;
+ }
+
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('n');
+ }
+
+ /**
+ * YEAR.
+ *
+ * Returns the year corresponding to a date.
+ * The year is returned as an integer in the range 1900-9999.
+ *
+ * Excel Function:
+ * YEAR(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Year
+ */
+ public static function year($dateValue)
+ {
+ try {
+ $dateValue = Helpers::getDateValue($dateValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($dateValue < 1 && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900) {
+ return 1900;
+ }
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+
+ return (int) $PHPDateObject->format('Y');
+ }
+
+ /**
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ */
+ private static function weirdCondition($dateValue): int
+ {
+ // Excel does not treat 0 consistently for DAY vs. (MONTH or YEAR)
+ if (SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900 && Functions::getCompatibilityMode() == Functions::COMPATIBILITY_EXCEL) {
+ if (is_bool($dateValue)) {
+ return (int) $dateValue;
+ }
+ if ($dateValue === null) {
+ return 0;
+ }
+ if (is_numeric($dateValue) && $dateValue < 1 && $dateValue >= 0) {
+ return 0;
+ }
+ }
+
+ return -1;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php
new file mode 100644
index 00000000..de767fca
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php
@@ -0,0 +1,151 @@
+ 31)) {
+ if ($yearFound) {
+ return Functions::VALUE();
+ }
+ if ($t < 100) {
+ $t += 1900;
+ }
+ $yearFound = true;
+ }
+ }
+ if (count($t1) === 1) {
+ // We've been fed a time value without any date
+ return ((strpos((string) $t, ':') === false)) ? Functions::Value() : 0.0;
+ }
+ unset($t);
+
+ $dateValue = self::t1ToString($t1, $dti, $yearFound);
+
+ $PHPDateArray = self::setUpArray($dateValue, $dti);
+
+ return self::finalResults($PHPDateArray, $dti, $baseYear);
+ }
+
+ private static function t1ToString(array $t1, DateTimeImmutable $dti, bool $yearFound): string
+ {
+ if (count($t1) == 2) {
+ // We only have two parts of the date: either day/month or month/year
+ if ($yearFound) {
+ array_unshift($t1, 1);
+ } else {
+ if (is_numeric($t1[1]) && $t1[1] > 29) {
+ $t1[1] += 1900;
+ array_unshift($t1, 1);
+ } else {
+ $t1[] = $dti->format('Y');
+ }
+ }
+ }
+ $dateValue = implode(' ', $t1);
+
+ return $dateValue;
+ }
+
+ /**
+ * Parse date.
+ *
+ * @return array|bool
+ */
+ private static function setUpArray(string $dateValue, DateTimeImmutable $dti)
+ {
+ $PHPDateArray = date_parse($dateValue);
+ if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
+ // If original count was 1, we've already returned.
+ // If it was 2, we added another.
+ // Therefore, neither of the first 2 stroks below can fail.
+ $testVal1 = strtok($dateValue, '- ');
+ $testVal2 = strtok('- ');
+ $testVal3 = strtok('- ') ?: $dti->format('Y');
+ Helpers::adjustYear((string) $testVal1, (string) $testVal2, $testVal3);
+ $PHPDateArray = date_parse($testVal1 . '-' . $testVal2 . '-' . $testVal3);
+ if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) {
+ $PHPDateArray = date_parse($testVal2 . '-' . $testVal1 . '-' . $testVal3);
+ }
+ }
+
+ return $PHPDateArray;
+ }
+
+ /**
+ * Final results.
+ *
+ * @param array|bool $PHPDateArray
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ private static function finalResults($PHPDateArray, DateTimeImmutable $dti, int $baseYear)
+ {
+ $retValue = Functions::Value();
+ if (is_array($PHPDateArray) && $PHPDateArray['error_count'] == 0) {
+ // Execute function
+ Helpers::replaceIfEmpty($PHPDateArray['year'], $dti->format('Y'));
+ if ($PHPDateArray['year'] < $baseYear) {
+ return Functions::VALUE();
+ }
+ Helpers::replaceIfEmpty($PHPDateArray['month'], $dti->format('m'));
+ Helpers::replaceIfEmpty($PHPDateArray['day'], $dti->format('d'));
+ $PHPDateArray['hour'] = 0;
+ $PHPDateArray['minute'] = 0;
+ $PHPDateArray['second'] = 0;
+ $month = (int) $PHPDateArray['month'];
+ $day = (int) $PHPDateArray['day'];
+ $year = (int) $PHPDateArray['year'];
+ if (!checkdate($month, $day, $year)) {
+ return ($year === 1900 && $month === 2 && $day === 29) ? Helpers::returnIn3FormatsFloat(60.0) : Functions::VALUE();
+ }
+ $retValue = Helpers::returnIn3FormatsArray($PHPDateArray, true);
+ }
+
+ return $retValue;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php
new file mode 100644
index 00000000..5a97d8df
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php
@@ -0,0 +1,51 @@
+getMessage();
+ }
+
+ // Execute function
+ $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);
+ $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);
+
+ $days = Functions::VALUE();
+ $diff = $PHPStartDateObject->diff($PHPEndDateObject);
+ if ($diff !== false && !is_bool($diff->days)) {
+ $days = $diff->days;
+ if ($diff->invert) {
+ $days = -$days;
+ }
+ }
+
+ return $days;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php
new file mode 100644
index 00000000..bbc5d16a
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php
@@ -0,0 +1,106 @@
+getMessage();
+ }
+
+ if (!is_bool($method)) {
+ return Functions::VALUE();
+ }
+
+ // Execute function
+ $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);
+ $startDay = $PHPStartDateObject->format('j');
+ $startMonth = $PHPStartDateObject->format('n');
+ $startYear = $PHPStartDateObject->format('Y');
+
+ $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);
+ $endDay = $PHPEndDateObject->format('j');
+ $endMonth = $PHPEndDateObject->format('n');
+ $endYear = $PHPEndDateObject->format('Y');
+
+ return self::dateDiff360((int) $startDay, (int) $startMonth, (int) $startYear, (int) $endDay, (int) $endMonth, (int) $endYear, !$method);
+ }
+
+ /**
+ * Return the number of days between two dates based on a 360 day calendar.
+ */
+ private static function dateDiff360(int $startDay, int $startMonth, int $startYear, int $endDay, int $endMonth, int $endYear, bool $methodUS): int
+ {
+ $startDay = self::getStartDay($startDay, $startMonth, $startYear, $methodUS);
+ $endDay = self::getEndDay($endDay, $endMonth, $endYear, $startDay, $methodUS);
+
+ return $endDay + $endMonth * 30 + $endYear * 360 - $startDay - $startMonth * 30 - $startYear * 360;
+ }
+
+ private static function getStartDay(int $startDay, int $startMonth, int $startYear, bool $methodUS): int
+ {
+ if ($startDay == 31) {
+ --$startDay;
+ } elseif ($methodUS && ($startMonth == 2 && ($startDay == 29 || ($startDay == 28 && !Helpers::isLeapYear($startYear))))) {
+ $startDay = 30;
+ }
+
+ return $startDay;
+ }
+
+ private static function getEndDay(int $endDay, int &$endMonth, int &$endYear, int $startDay, bool $methodUS): int
+ {
+ if ($endDay == 31) {
+ if ($methodUS && $startDay != 30) {
+ $endDay = 1;
+ if ($endMonth == 12) {
+ ++$endYear;
+ $endMonth = 1;
+ } else {
+ ++$endMonth;
+ }
+ } else {
+ $endDay = 30;
+ }
+ }
+
+ return $endDay;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php
new file mode 100644
index 00000000..6adeca17
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php
@@ -0,0 +1,146 @@
+getMessage();
+ }
+
+ // Execute function
+ $PHPStartDateObject = SharedDateHelper::excelToDateTimeObject($startDate);
+ $startDays = (int) $PHPStartDateObject->format('j');
+ $startMonths = (int) $PHPStartDateObject->format('n');
+ $startYears = (int) $PHPStartDateObject->format('Y');
+
+ $PHPEndDateObject = SharedDateHelper::excelToDateTimeObject($endDate);
+ $endDays = (int) $PHPEndDateObject->format('j');
+ $endMonths = (int) $PHPEndDateObject->format('n');
+ $endYears = (int) $PHPEndDateObject->format('Y');
+
+ $PHPDiffDateObject = $PHPEndDateObject->diff($PHPStartDateObject);
+
+ $retVal = false;
+ $retVal = self::replaceRetValue($retVal, $unit, 'D') ?? self::datedifD($difference);
+ $retVal = self::replaceRetValue($retVal, $unit, 'M') ?? self::datedifM($PHPDiffDateObject);
+ $retVal = self::replaceRetValue($retVal, $unit, 'MD') ?? self::datedifMD($startDays, $endDays, $PHPEndDateObject, $PHPDiffDateObject);
+ $retVal = self::replaceRetValue($retVal, $unit, 'Y') ?? self::datedifY($PHPDiffDateObject);
+ $retVal = self::replaceRetValue($retVal, $unit, 'YD') ?? self::datedifYD($difference, $startYears, $endYears, $PHPStartDateObject, $PHPEndDateObject);
+ $retVal = self::replaceRetValue($retVal, $unit, 'YM') ?? self::datedifYM($PHPDiffDateObject);
+
+ return is_bool($retVal) ? Functions::VALUE() : $retVal;
+ }
+
+ private static function initialDiff(float $startDate, float $endDate): float
+ {
+ // Validate parameters
+ if ($startDate > $endDate) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $endDate - $startDate;
+ }
+
+ /**
+ * Decide whether it's time to set retVal.
+ *
+ * @param bool|int $retVal
+ *
+ * @return null|bool|int
+ */
+ private static function replaceRetValue($retVal, string $unit, string $compare)
+ {
+ if ($retVal !== false || $unit !== $compare) {
+ return $retVal;
+ }
+
+ return null;
+ }
+
+ private static function datedifD(float $difference): int
+ {
+ return (int) $difference;
+ }
+
+ private static function datedifM(DateInterval $PHPDiffDateObject): int
+ {
+ return 12 * (int) $PHPDiffDateObject->format('%y') + (int) $PHPDiffDateObject->format('%m');
+ }
+
+ private static function datedifMD(int $startDays, int $endDays, DateTime $PHPEndDateObject, DateInterval $PHPDiffDateObject): int
+ {
+ if ($endDays < $startDays) {
+ $retVal = $endDays;
+ $PHPEndDateObject->modify('-' . $endDays . ' days');
+ $adjustDays = (int) $PHPEndDateObject->format('j');
+ $retVal += ($adjustDays - $startDays);
+ } else {
+ $retVal = (int) $PHPDiffDateObject->format('%d');
+ }
+
+ return $retVal;
+ }
+
+ private static function datedifY(DateInterval $PHPDiffDateObject): int
+ {
+ return (int) $PHPDiffDateObject->format('%y');
+ }
+
+ private static function datedifYD(float $difference, int $startYears, int $endYears, DateTime $PHPStartDateObject, DateTime $PHPEndDateObject): int
+ {
+ $retVal = (int) $difference;
+ if ($endYears > $startYears) {
+ $isLeapStartYear = $PHPStartDateObject->format('L');
+ $wasLeapEndYear = $PHPEndDateObject->format('L');
+
+ // Adjust end year to be as close as possible as start year
+ while ($PHPEndDateObject >= $PHPStartDateObject) {
+ $PHPEndDateObject->modify('-1 year');
+ $endYears = $PHPEndDateObject->format('Y');
+ }
+ $PHPEndDateObject->modify('+1 year');
+
+ // Get the result
+ $retVal = $PHPEndDateObject->diff($PHPStartDateObject)->days;
+
+ // Adjust for leap years cases
+ $isLeapEndYear = $PHPEndDateObject->format('L');
+ $limit = new DateTime($PHPEndDateObject->format('Y-02-29'));
+ if (!$isLeapStartYear && !$wasLeapEndYear && $isLeapEndYear && $PHPEndDateObject >= $limit) {
+ --$retVal;
+ }
+ }
+
+ return (int) $retVal;
+ }
+
+ private static function datedifYM(DateInterval $PHPDiffDateObject): int
+ {
+ return (int) $PHPDiffDateObject->format('%m');
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php
new file mode 100644
index 00000000..9503401c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Helpers.php
@@ -0,0 +1,285 @@
+format('m');
+ $oYear = (int) $PHPDateObject->format('Y');
+
+ $adjustmentMonthsString = (string) $adjustmentMonths;
+ if ($adjustmentMonths > 0) {
+ $adjustmentMonthsString = '+' . $adjustmentMonths;
+ }
+ if ($adjustmentMonths != 0) {
+ $PHPDateObject->modify($adjustmentMonthsString . ' months');
+ }
+ $nMonth = (int) $PHPDateObject->format('m');
+ $nYear = (int) $PHPDateObject->format('Y');
+
+ $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12);
+ if ($monthDiff != $adjustmentMonths) {
+ $adjustDays = (int) $PHPDateObject->format('d');
+ $adjustDaysString = '-' . $adjustDays . ' days';
+ $PHPDateObject->modify($adjustDaysString);
+ }
+
+ return $PHPDateObject;
+ }
+
+ /**
+ * Help reduce perceived complexity of some tests.
+ *
+ * @param mixed $value
+ * @param mixed $altValue
+ */
+ public static function replaceIfEmpty(&$value, $altValue): void
+ {
+ $value = $value ?: $altValue;
+ }
+
+ /**
+ * Adjust year in ambiguous situations.
+ */
+ public static function adjustYear(string $testVal1, string $testVal2, string &$testVal3): void
+ {
+ if (!is_numeric($testVal1) || $testVal1 < 31) {
+ if (!is_numeric($testVal2) || $testVal2 < 12) {
+ if (is_numeric($testVal3) && $testVal3 < 12) {
+ $testVal3 += 2000;
+ }
+ }
+ }
+ }
+
+ /**
+ * Return result in one of three formats.
+ *
+ * @return mixed
+ */
+ public static function returnIn3FormatsArray(array $dateArray, bool $noFrac = false)
+ {
+ $retType = Functions::getReturnDateType();
+ if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
+ return new DateTime(
+ $dateArray['year']
+ . '-' . $dateArray['month']
+ . '-' . $dateArray['day']
+ . ' ' . $dateArray['hour']
+ . ':' . $dateArray['minute']
+ . ':' . $dateArray['second']
+ );
+ }
+ $excelDateValue =
+ SharedDateHelper::formattedPHPToExcel(
+ $dateArray['year'],
+ $dateArray['month'],
+ $dateArray['day'],
+ $dateArray['hour'],
+ $dateArray['minute'],
+ $dateArray['second']
+ );
+ if ($retType === Functions::RETURNDATE_EXCEL) {
+ return $noFrac ? floor($excelDateValue) : (float) $excelDateValue;
+ }
+ // RETURNDATE_UNIX_TIMESTAMP)
+
+ return (int) SharedDateHelper::excelToTimestamp($excelDateValue);
+ }
+
+ /**
+ * Return result in one of three formats.
+ *
+ * @return mixed
+ */
+ public static function returnIn3FormatsFloat(float $excelDateValue)
+ {
+ $retType = Functions::getReturnDateType();
+ if ($retType === Functions::RETURNDATE_EXCEL) {
+ return $excelDateValue;
+ }
+ if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
+ return (int) SharedDateHelper::excelToTimestamp($excelDateValue);
+ }
+ // RETURNDATE_PHP_DATETIME_OBJECT
+
+ return SharedDateHelper::excelToDateTimeObject($excelDateValue);
+ }
+
+ /**
+ * Return result in one of three formats.
+ *
+ * @return mixed
+ */
+ public static function returnIn3FormatsObject(DateTime $PHPDateObject)
+ {
+ $retType = Functions::getReturnDateType();
+ if ($retType === Functions::RETURNDATE_PHP_DATETIME_OBJECT) {
+ return $PHPDateObject;
+ }
+ if ($retType === Functions::RETURNDATE_EXCEL) {
+ return (float) SharedDateHelper::PHPToExcel($PHPDateObject);
+ }
+ // RETURNDATE_UNIX_TIMESTAMP
+ $stamp = SharedDateHelper::PHPToExcel($PHPDateObject);
+ $stamp = is_bool($stamp) ? ((int) $stamp) : $stamp;
+
+ return (int) SharedDateHelper::excelToTimestamp($stamp);
+ }
+
+ private static function baseDate(): int
+ {
+ if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {
+ return 0;
+ }
+ if (SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_MAC_1904) {
+ return 0;
+ }
+
+ return 1;
+ }
+
+ /**
+ * Many functions accept null/false/true argument treated as 0/0/1.
+ *
+ * @param mixed $number
+ */
+ public static function nullFalseTrueToNumber(&$number, bool $allowBool = true): void
+ {
+ $number = Functions::flattenSingleValue($number);
+ $nullVal = self::baseDate();
+ if ($number === null) {
+ $number = $nullVal;
+ } elseif ($allowBool && is_bool($number)) {
+ $number = $nullVal + (int) $number;
+ }
+ }
+
+ /**
+ * Many functions accept null argument treated as 0.
+ *
+ * @param mixed $number
+ *
+ * @return float|int
+ */
+ public static function validateNumericNull($number)
+ {
+ $number = Functions::flattenSingleValue($number);
+ if ($number === null) {
+ return 0;
+ }
+ if (is_int($number)) {
+ return $number;
+ }
+ if (is_numeric($number)) {
+ return (float) $number;
+ }
+
+ throw new Exception(Functions::VALUE());
+ }
+
+ /**
+ * Many functions accept null/false/true argument treated as 0/0/1.
+ *
+ * @param mixed $number
+ *
+ * @return float
+ */
+ public static function validateNotNegative($number)
+ {
+ if (!is_numeric($number)) {
+ throw new Exception(Functions::VALUE());
+ }
+ if ($number >= 0) {
+ return (float) $number;
+ }
+
+ throw new Exception(Functions::NAN());
+ }
+
+ public static function silly1900(DateTime $PHPDateObject, string $mod = '-1 day'): void
+ {
+ $isoDate = $PHPDateObject->format('c');
+ if ($isoDate < '1900-03-01') {
+ $PHPDateObject->modify($mod);
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php
new file mode 100644
index 00000000..560b7a80
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php
@@ -0,0 +1,82 @@
+getMessage();
+ }
+ $adjustmentMonths = floor($adjustmentMonths);
+
+ // Execute function
+ $PHPDateObject = Helpers::adjustDateByMonths($dateValue, $adjustmentMonths);
+
+ return Helpers::returnIn3FormatsObject($PHPDateObject);
+ }
+
+ /**
+ * EOMONTH.
+ *
+ * Returns the date value for the last day of the month that is the indicated number of months
+ * before or after start_date.
+ * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.
+ *
+ * Excel Function:
+ * EOMONTH(dateValue,adjustmentMonths)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param int $adjustmentMonths The number of months before or after start_date.
+ * A positive value for months yields a future date;
+ * a negative value yields a past date.
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function lastDay($dateValue, $adjustmentMonths)
+ {
+ try {
+ $dateValue = Helpers::getDateValue($dateValue, false);
+ $adjustmentMonths = Helpers::validateNumericNull($adjustmentMonths);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ $adjustmentMonths = floor($adjustmentMonths);
+
+ // Execute function
+ $PHPDateObject = Helpers::adjustDateByMonths($dateValue, $adjustmentMonths + 1);
+ $adjustDays = (int) $PHPDateObject->format('d');
+ $adjustDaysString = '-' . $adjustDays . ' days';
+ $PHPDateObject->modify($adjustDaysString);
+
+ return Helpers::returnIn3FormatsObject($PHPDateObject);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php
new file mode 100644
index 00000000..d0f53cf3
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/NetworkDays.php
@@ -0,0 +1,102 @@
+getMessage();
+ }
+
+ // Execute function
+ $startDow = self::calcStartDow($startDate);
+ $endDow = self::calcEndDow($endDate);
+ $wholeWeekDays = (int) floor(($endDate - $startDate) / 7) * 5;
+ $partWeekDays = self::calcPartWeekDays($startDow, $endDow);
+
+ // Test any extra holiday parameters
+ $holidayCountedArray = [];
+ foreach ($holidayArray as $holidayDate) {
+ if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
+ if ((Week::day($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) {
+ --$partWeekDays;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ }
+
+ return self::applySign($wholeWeekDays + $partWeekDays, $sDate, $eDate);
+ }
+
+ private static function calcStartDow(float $startDate): int
+ {
+ $startDow = 6 - (int) Week::day($startDate, 2);
+ if ($startDow < 0) {
+ $startDow = 5;
+ }
+
+ return $startDow;
+ }
+
+ private static function calcEndDow(float $endDate): int
+ {
+ $endDow = (int) Week::day($endDate, 2);
+ if ($endDow >= 6) {
+ $endDow = 0;
+ }
+
+ return $endDow;
+ }
+
+ private static function calcPartWeekDays(int $startDow, int $endDow): int
+ {
+ $partWeekDays = $endDow + $startDow;
+ if ($partWeekDays > 5) {
+ $partWeekDays -= 5;
+ }
+
+ return $partWeekDays;
+ }
+
+ private static function applySign(int $result, float $sDate, float $eDate): int
+ {
+ return ($sDate > $eDate) ? -$result : $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php
new file mode 100644
index 00000000..fb5e4965
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Time.php
@@ -0,0 +1,119 @@
+getMessage();
+ }
+
+ self::adjustSecond($second, $minute);
+ self::adjustMinute($minute, $hour);
+
+ if ($hour > 23) {
+ $hour = $hour % 24;
+ } elseif ($hour < 0) {
+ return Functions::NAN();
+ }
+
+ // Execute function
+ $retType = Functions::getReturnDateType();
+ if ($retType === Functions::RETURNDATE_EXCEL) {
+ $calendar = SharedDateHelper::getExcelCalendar();
+ $date = (int) ($calendar !== SharedDateHelper::CALENDAR_WINDOWS_1900);
+
+ return (float) SharedDateHelper::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);
+ }
+ if ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
+ return (int) SharedDateHelper::excelToTimestamp(SharedDateHelper::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600
+ }
+ // RETURNDATE_PHP_DATETIME_OBJECT
+ // Hour has already been normalized (0-23) above
+ $phpDateObject = new DateTime('1900-01-01 ' . $hour . ':' . $minute . ':' . $second);
+
+ return $phpDateObject;
+ }
+
+ private static function adjustSecond(int &$second, int &$minute): void
+ {
+ if ($second < 0) {
+ $minute += floor($second / 60);
+ $second = 60 - abs($second % 60);
+ if ($second == 60) {
+ $second = 0;
+ }
+ } elseif ($second >= 60) {
+ $minute += floor($second / 60);
+ $second = $second % 60;
+ }
+ }
+
+ private static function adjustMinute(int &$minute, int &$hour): void
+ {
+ if ($minute < 0) {
+ $hour += floor($minute / 60);
+ $minute = 60 - abs($minute % 60);
+ if ($minute == 60) {
+ $minute = 0;
+ }
+ } elseif ($minute >= 60) {
+ $hour += floor($minute / 60);
+ $minute = $minute % 60;
+ }
+ }
+
+ /**
+ * @param mixed $value expect int
+ */
+ private static function toIntWithNullBool($value): int
+ {
+ $value = Functions::flattenSingleValue($value);
+ $value = $value ?? 0;
+ if (is_bool($value)) {
+ $value = (int) $value;
+ }
+ if (!is_numeric($value)) {
+ throw new Exception(Functions::VALUE());
+ }
+
+ return (int) $value;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php
new file mode 100644
index 00000000..49cd983d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeParts.php
@@ -0,0 +1,112 @@
+getMessage();
+ }
+
+ // Execute function
+ $timeValue = fmod($timeValue, 1);
+ $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);
+
+ return (int) $timeValue->format('H');
+ }
+
+ /**
+ * MINUTE.
+ *
+ * Returns the minutes of a time value.
+ * The minute is given as an integer, ranging from 0 to 59.
+ *
+ * Excel Function:
+ * MINUTE(timeValue)
+ *
+ * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard time string
+ *
+ * @return int|string Minute
+ */
+ public static function minute($timeValue)
+ {
+ try {
+ $timeValue = Functions::flattenSingleValue($timeValue);
+ Helpers::nullFalseTrueToNumber($timeValue);
+ if (!is_numeric($timeValue)) {
+ $timeValue = Helpers::getTimeValue($timeValue);
+ }
+ Helpers::validateNotNegative($timeValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Execute function
+ $timeValue = fmod($timeValue, 1);
+ $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);
+
+ return (int) $timeValue->format('i');
+ }
+
+ /**
+ * SECOND.
+ *
+ * Returns the seconds of a time value.
+ * The minute is given as an integer, ranging from 0 to 59.
+ *
+ * Excel Function:
+ * SECOND(timeValue)
+ *
+ * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard time string
+ *
+ * @return int|string Second
+ */
+ public static function second($timeValue)
+ {
+ try {
+ $timeValue = Functions::flattenSingleValue($timeValue);
+ Helpers::nullFalseTrueToNumber($timeValue);
+ if (!is_numeric($timeValue)) {
+ $timeValue = Helpers::getTimeValue($timeValue);
+ }
+ Helpers::validateNotNegative($timeValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Execute function
+ $timeValue = fmod($timeValue, 1);
+ $timeValue = SharedDateHelper::excelToDateTimeObject($timeValue);
+
+ return (int) $timeValue->format('s');
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php
new file mode 100644
index 00000000..73b7ba91
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php
@@ -0,0 +1,61 @@
+ 24) {
+ $arraySplit[0] = ($arraySplit[0] % 24);
+ $timeValue = implode(':', $arraySplit);
+ }
+
+ $PHPDateArray = date_parse($timeValue);
+ $retValue = Functions::VALUE();
+ if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) {
+ // OpenOffice-specific code removed - it works just like Excel
+ $excelDateValue = SharedDateHelper::formattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1;
+
+ $retType = Functions::getReturnDateType();
+ if ($retType === Functions::RETURNDATE_EXCEL) {
+ $retValue = (float) $excelDateValue;
+ } elseif ($retType === Functions::RETURNDATE_UNIX_TIMESTAMP) {
+ $retValue = (int) $phpDateValue = SharedDateHelper::excelToTimestamp($excelDateValue + 25569) - 3600;
+ } else {
+ $retValue = new DateTime('1900-01-01 ' . $PHPDateArray['hour'] . ':' . $PHPDateArray['minute'] . ':' . $PHPDateArray['second']);
+ }
+ }
+
+ return $retValue;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php
new file mode 100644
index 00000000..66362221
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Week.php
@@ -0,0 +1,254 @@
+getMessage();
+ }
+
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+ if ($method == Constants::STARTWEEK_MONDAY_ISO) {
+ Helpers::silly1900($PHPDateObject);
+
+ return (int) $PHPDateObject->format('W');
+ }
+ if (self::buggyWeekNum1904($method, $origDateValueNull, $PHPDateObject)) {
+ return 0;
+ }
+ Helpers::silly1900($PHPDateObject, '+ 5 years'); // 1905 calendar matches
+ $dayOfYear = (int) $PHPDateObject->format('z');
+ $PHPDateObject->modify('-' . $dayOfYear . ' days');
+ $firstDayOfFirstWeek = (int) $PHPDateObject->format('w');
+ $daysInFirstWeek = (6 - $firstDayOfFirstWeek + $method) % 7;
+ $daysInFirstWeek += 7 * !$daysInFirstWeek;
+ $endFirstWeek = $daysInFirstWeek - 1;
+ $weekOfYear = floor(($dayOfYear - $endFirstWeek + 13) / 7);
+
+ return (int) $weekOfYear;
+ }
+
+ /**
+ * ISOWEEKNUM.
+ *
+ * Returns the ISO 8601 week number of the year for a specified date.
+ *
+ * Excel Function:
+ * ISOWEEKNUM(dateValue)
+ *
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ *
+ * @return int|string Week Number
+ */
+ public static function isoWeekNumber($dateValue)
+ {
+ if (self::apparentBug($dateValue)) {
+ return 52;
+ }
+
+ try {
+ $dateValue = Helpers::getDateValue($dateValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+ Helpers::silly1900($PHPDateObject);
+
+ return (int) $PHPDateObject->format('W');
+ }
+
+ /**
+ * WEEKDAY.
+ *
+ * Returns the day of the week for a specified date. The day is given as an integer
+ * ranging from 0 to 7 (dependent on the requested style).
+ *
+ * Excel Function:
+ * WEEKDAY(dateValue[,style])
+ *
+ * @param null|float|int|string $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ * @param mixed $style A number that determines the type of return value
+ * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday).
+ * 2 Numbers 1 (Monday) through 7 (Sunday).
+ * 3 Numbers 0 (Monday) through 6 (Sunday).
+ *
+ * @return int|string Day of the week value
+ */
+ public static function day($dateValue, $style = 1)
+ {
+ try {
+ $dateValue = Helpers::getDateValue($dateValue);
+ $style = self::validateStyle($style);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Execute function
+ $PHPDateObject = SharedDateHelper::excelToDateTimeObject($dateValue);
+ Helpers::silly1900($PHPDateObject);
+ $DoW = (int) $PHPDateObject->format('w');
+
+ switch ($style) {
+ case 1:
+ ++$DoW;
+
+ break;
+ case 2:
+ $DoW = self::dow0Becomes7($DoW);
+
+ break;
+ case 3:
+ $DoW = self::dow0Becomes7($DoW) - 1;
+
+ break;
+ }
+
+ return $DoW;
+ }
+
+ /**
+ * @param mixed $style expect int
+ */
+ private static function validateStyle($style): int
+ {
+ $style = Functions::flattenSingleValue($style);
+
+ if (!is_numeric($style)) {
+ throw new Exception(Functions::VALUE());
+ }
+ $style = (int) $style;
+ if (($style < 1) || ($style > 3)) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $style;
+ }
+
+ private static function dow0Becomes7(int $DoW): int
+ {
+ return ($DoW === 0) ? 7 : $DoW;
+ }
+
+ /**
+ * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
+ * PHP DateTime object, or a standard date string
+ */
+ private static function apparentBug($dateValue): bool
+ {
+ if (SharedDateHelper::getExcelCalendar() !== SharedDateHelper::CALENDAR_MAC_1904) {
+ if (is_bool($dateValue)) {
+ return true;
+ }
+ if (is_numeric($dateValue) && !((int) $dateValue)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Validate dateValue parameter.
+ *
+ * @param mixed $dateValue
+ */
+ private static function validateDateValue($dateValue): float
+ {
+ if (is_bool($dateValue)) {
+ throw new Exception(Functions::VALUE());
+ }
+
+ return Helpers::getDateValue($dateValue);
+ }
+
+ /**
+ * Validate method parameter.
+ *
+ * @param mixed $method
+ */
+ private static function validateMethod($method): int
+ {
+ if ($method === null) {
+ $method = Constants::STARTWEEK_SUNDAY;
+ }
+ $method = Functions::flattenSingleValue($method);
+ if (!is_numeric($method)) {
+ throw new Exception(Functions::VALUE());
+ }
+
+ $method = (int) $method;
+ if (!array_key_exists($method, Constants::METHODARR)) {
+ throw new Exception(Functions::NAN());
+ }
+ $method = Constants::METHODARR[$method];
+
+ return $method;
+ }
+
+ private static function buggyWeekNum1900(int $method): bool
+ {
+ return $method === Constants::DOW_SUNDAY && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_WINDOWS_1900;
+ }
+
+ private static function buggyWeekNum1904(int $method, bool $origNull, DateTime $dateObject): bool
+ {
+ // This appears to be another Excel bug.
+
+ return $method === Constants::DOW_SUNDAY && SharedDateHelper::getExcelCalendar() === SharedDateHelper::CALENDAR_MAC_1904 &&
+ !$origNull && $dateObject->format('Y-m-d') === '1904-01-01';
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php
new file mode 100644
index 00000000..89e47b96
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/WorkDay.php
@@ -0,0 +1,189 @@
+getMessage();
+ }
+
+ $startDate = (float) floor($startDate);
+ $endDays = (int) floor($endDays);
+ // If endDays is 0, we always return startDate
+ if ($endDays == 0) {
+ return $startDate;
+ }
+ if ($endDays < 0) {
+ return self::decrementing($startDate, $endDays, $holidayArray);
+ }
+
+ return self::incrementing($startDate, $endDays, $holidayArray);
+ }
+
+ /**
+ * Use incrementing logic to determine Workday.
+ *
+ * @return mixed
+ */
+ private static function incrementing(float $startDate, int $endDays, array $holidayArray)
+ {
+ // Adjust the start date if it falls over a weekend
+
+ $startDoW = self::getWeekDay($startDate, 3);
+ if (self::getWeekDay($startDate, 3) >= 5) {
+ $startDate += 7 - $startDoW;
+ --$endDays;
+ }
+
+ // Add endDays
+ $endDate = (float) $startDate + ((int) ($endDays / 5) * 7);
+ $endDays = $endDays % 5;
+ while ($endDays > 0) {
+ ++$endDate;
+ // Adjust the calculated end date if it falls over a weekend
+ $endDow = self::getWeekDay($endDate, 3);
+ if ($endDow >= 5) {
+ $endDate += 7 - $endDow;
+ }
+ --$endDays;
+ }
+
+ // Test any extra holiday parameters
+ if (!empty($holidayArray)) {
+ $endDate = self::incrementingArray($startDate, $endDate, $holidayArray);
+ }
+
+ return Helpers::returnIn3FormatsFloat($endDate);
+ }
+
+ private static function incrementingArray(float $startDate, float $endDate, array $holidayArray): float
+ {
+ $holidayCountedArray = $holidayDates = [];
+ foreach ($holidayArray as $holidayDate) {
+ if (self::getWeekDay($holidayDate, 3) < 5) {
+ $holidayDates[] = $holidayDate;
+ }
+ }
+ sort($holidayDates, SORT_NUMERIC);
+ foreach ($holidayDates as $holidayDate) {
+ if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) {
+ if (!in_array($holidayDate, $holidayCountedArray)) {
+ ++$endDate;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ // Adjust the calculated end date if it falls over a weekend
+ $endDoW = self::getWeekDay($endDate, 3);
+ if ($endDoW >= 5) {
+ $endDate += 7 - $endDoW;
+ }
+ }
+
+ return $endDate;
+ }
+
+ /**
+ * Use decrementing logic to determine Workday.
+ *
+ * @return mixed
+ */
+ private static function decrementing(float $startDate, int $endDays, array $holidayArray)
+ {
+ // Adjust the start date if it falls over a weekend
+
+ $startDoW = self::getWeekDay($startDate, 3);
+ if (self::getWeekDay($startDate, 3) >= 5) {
+ $startDate += -$startDoW + 4;
+ ++$endDays;
+ }
+
+ // Add endDays
+ $endDate = (float) $startDate + ((int) ($endDays / 5) * 7);
+ $endDays = $endDays % 5;
+ while ($endDays < 0) {
+ --$endDate;
+ // Adjust the calculated end date if it falls over a weekend
+ $endDow = self::getWeekDay($endDate, 3);
+ if ($endDow >= 5) {
+ $endDate += 4 - $endDow;
+ }
+ ++$endDays;
+ }
+
+ // Test any extra holiday parameters
+ if (!empty($holidayArray)) {
+ $endDate = self::decrementingArray($startDate, $endDate, $holidayArray);
+ }
+
+ return Helpers::returnIn3FormatsFloat($endDate);
+ }
+
+ private static function decrementingArray(float $startDate, float $endDate, array $holidayArray): float
+ {
+ $holidayCountedArray = $holidayDates = [];
+ foreach ($holidayArray as $holidayDate) {
+ if (self::getWeekDay($holidayDate, 3) < 5) {
+ $holidayDates[] = $holidayDate;
+ }
+ }
+ rsort($holidayDates, SORT_NUMERIC);
+ foreach ($holidayDates as $holidayDate) {
+ if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) {
+ if (!in_array($holidayDate, $holidayCountedArray)) {
+ --$endDate;
+ $holidayCountedArray[] = $holidayDate;
+ }
+ }
+ // Adjust the calculated end date if it falls over a weekend
+ $endDoW = self::getWeekDay($endDate, 3);
+ if ($endDoW >= 5) {
+ $endDate += -$endDoW + 4;
+ }
+ }
+
+ return $endDate;
+ }
+
+ private static function getWeekDay(float $date, int $wd): int
+ {
+ $result = Week::day($date, $wd);
+
+ return is_string($result) ? -1 : $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php
new file mode 100644
index 00000000..da2ac12f
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/YearFrac.php
@@ -0,0 +1,120 @@
+getMessage();
+ }
+
+ switch ($method) {
+ case 0:
+ return Days360::between($startDate, $endDate) / 360;
+ case 1:
+ return self::method1($startDate, $endDate);
+ case 2:
+ return Difference::interval($startDate, $endDate) / 360;
+ case 3:
+ return Difference::interval($startDate, $endDate) / 365;
+ case 4:
+ return Days360::between($startDate, $endDate, true) / 360;
+ }
+
+ return Functions::NAN();
+ }
+
+ /**
+ * Excel 1900 calendar treats date argument of null as 1900-01-00. Really.
+ *
+ * @param mixed $startDate
+ * @param mixed $endDate
+ */
+ private static function excelBug(float $sDate, $startDate, $endDate, int $method): float
+ {
+ if (Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE && SharedDateHelper::getExcelCalendar() !== SharedDateHelper::CALENDAR_MAC_1904) {
+ if ($endDate === null && $startDate !== null) {
+ if (DateParts::month($sDate) == 12 && DateParts::day($sDate) === 31 && $method === 0) {
+ $sDate += 2;
+ } else {
+ ++$sDate;
+ }
+ }
+ }
+
+ return $sDate;
+ }
+
+ private static function method1(float $startDate, float $endDate): float
+ {
+ $days = Difference::interval($startDate, $endDate);
+ $startYear = (int) DateParts::year($startDate);
+ $endYear = (int) DateParts::year($endDate);
+ $years = $endYear - $startYear + 1;
+ $startMonth = (int) DateParts::month($startDate);
+ $startDay = (int) DateParts::day($startDate);
+ $endMonth = (int) DateParts::month($endDate);
+ $endDay = (int) DateParts::day($endDate);
+ $startMonthDay = 100 * $startMonth + $startDay;
+ $endMonthDay = 100 * $endMonth + $endDay;
+ if ($years == 1) {
+ $tmpCalcAnnualBasis = 365 + (int) Helpers::isLeapYear($endYear);
+ } elseif ($years == 2 && $startMonthDay >= $endMonthDay) {
+ if (Helpers::isLeapYear($startYear)) {
+ $tmpCalcAnnualBasis = 365 + (int) ($startMonthDay <= 229);
+ } elseif (Helpers::isLeapYear($endYear)) {
+ $tmpCalcAnnualBasis = 365 + (int) ($endMonthDay >= 229);
+ } else {
+ $tmpCalcAnnualBasis = 365;
+ }
+ } else {
+ $tmpCalcAnnualBasis = 0;
+ for ($year = $startYear; $year <= $endYear; ++$year) {
+ $tmpCalcAnnualBasis += 365 + (int) Helpers::isLeapYear($year);
+ }
+ $tmpCalcAnnualBasis /= $years;
+ }
+
+ return $days / $tmpCalcAnnualBasis;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
index f311fe99..a70ddac5 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php
@@ -3,14 +3,21 @@
namespace PhpOffice\PhpSpreadsheet\Calculation;
use Complex\Complex;
-use Complex\Exception as ComplexException;
+use PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexFunctions;
+use PhpOffice\PhpSpreadsheet\Calculation\Engineering\ComplexOperations;
+/**
+ * @deprecated 1.18.0
+ */
class Engineering
{
/**
* EULER.
+ *
+ * @deprecated 1.18.0
+ * @see Use Engineering\Constants\EULER instead
*/
- const EULER = 2.71828182845904523536;
+ public const EULER = 2.71828182845904523536;
/**
* parseComplex.
@@ -149,7 +156,7 @@ class Engineering
*
* @see Use the toDecimal() method in the Engineering\ConvertBinary class instead
*
- * @param string $x The binary number (as a string) that you want to convert. The number
+ * @param mixed $x The binary number (as a string) that you want to convert. The number
* cannot contain more than 10 characters (10 bits). The most significant
* bit of number is the sign bit. The remaining 9 bits are magnitude bits.
* Negative numbers are represented using two's-complement notation.
@@ -175,13 +182,13 @@ class Engineering
*
* @see Use the toHex() method in the Engineering\ConvertBinary class instead
*
- * @param string $x The binary number (as a string) that you want to convert. The number
+ * @param mixed $x The binary number (as a string) that you want to convert. The number
* cannot contain more than 10 characters (10 bits). The most significant
* bit of number is the sign bit. The remaining 9 bits are magnitude bits.
* Negative numbers are represented using two's-complement notation.
* If number is not a valid binary number, or if number contains more than
* 10 characters (10 bits), BIN2HEX returns the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, BIN2HEX uses the
+ * @param mixed $places The number of characters to use. If places is omitted, BIN2HEX uses the
* minimum number of characters necessary. Places is useful for padding the
* return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -207,13 +214,13 @@ class Engineering
*
* @see Use the toOctal() method in the Engineering\ConvertBinary class instead
*
- * @param string $x The binary number (as a string) that you want to convert. The number
+ * @param mixed $x The binary number (as a string) that you want to convert. The number
* cannot contain more than 10 characters (10 bits). The most significant
* bit of number is the sign bit. The remaining 9 bits are magnitude bits.
* Negative numbers are represented using two's-complement notation.
* If number is not a valid binary number, or if number contains more than
* 10 characters (10 bits), BIN2OCT returns the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, BIN2OCT uses the
+ * @param mixed $places The number of characters to use. If places is omitted, BIN2OCT uses the
* minimum number of characters necessary. Places is useful for padding the
* return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -239,7 +246,7 @@ class Engineering
*
* @see Use the toBinary() method in the Engineering\ConvertDecimal class instead
*
- * @param string $x The decimal integer you want to convert. If number is negative,
+ * @param mixed $x The decimal integer you want to convert. If number is negative,
* valid place values are ignored and DEC2BIN returns a 10-character
* (10-bit) binary number in which the most significant bit is the sign
* bit. The remaining 9 bits are magnitude bits. Negative numbers are
@@ -249,7 +256,7 @@ class Engineering
* If number is nonnumeric, DEC2BIN returns the #VALUE! error value.
* If DEC2BIN requires more than places characters, it returns the #NUM!
* error value.
- * @param int $places The number of characters to use. If places is omitted, DEC2BIN uses
+ * @param mixed $places The number of characters to use. If places is omitted, DEC2BIN uses
* the minimum number of characters necessary. Places is useful for
* padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -275,7 +282,7 @@ class Engineering
*
* @see Use the toHex() method in the Engineering\ConvertDecimal class instead
*
- * @param string $x The decimal integer you want to convert. If number is negative,
+ * @param mixed $x The decimal integer you want to convert. If number is negative,
* places is ignored and DEC2HEX returns a 10-character (40-bit)
* hexadecimal number in which the most significant bit is the sign
* bit. The remaining 39 bits are magnitude bits. Negative numbers
@@ -285,7 +292,7 @@ class Engineering
* If number is nonnumeric, DEC2HEX returns the #VALUE! error value.
* If DEC2HEX requires more than places characters, it returns the
* #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, DEC2HEX uses
+ * @param mixed $places The number of characters to use. If places is omitted, DEC2HEX uses
* the minimum number of characters necessary. Places is useful for
* padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -311,7 +318,7 @@ class Engineering
*
* @see Use the toOctal() method in the Engineering\ConvertDecimal class instead
*
- * @param string $x The decimal integer you want to convert. If number is negative,
+ * @param mixed $x The decimal integer you want to convert. If number is negative,
* places is ignored and DEC2OCT returns a 10-character (30-bit)
* octal number in which the most significant bit is the sign bit.
* The remaining 29 bits are magnitude bits. Negative numbers are
@@ -321,7 +328,7 @@ class Engineering
* If number is nonnumeric, DEC2OCT returns the #VALUE! error value.
* If DEC2OCT requires more than places characters, it returns the
* #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, DEC2OCT uses
+ * @param mixed $places The number of characters to use. If places is omitted, DEC2OCT uses
* the minimum number of characters necessary. Places is useful for
* padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -347,7 +354,7 @@ class Engineering
*
* @see Use the toBinary() method in the Engineering\ConvertHex class instead
*
- * @param string $x the hexadecimal number you want to convert.
+ * @param mixed $x the hexadecimal number (as a string) that you want to convert.
* Number cannot contain more than 10 characters.
* The most significant bit of number is the sign bit (40th bit from the right).
* The remaining 9 bits are magnitude bits.
@@ -357,7 +364,7 @@ class Engineering
* and if number is positive, it cannot be greater than 1FF.
* If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value.
* If HEX2BIN requires more than places characters, it returns the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted,
+ * @param mixed $places The number of characters to use. If places is omitted,
* HEX2BIN uses the minimum number of characters necessary. Places
* is useful for padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -383,7 +390,7 @@ class Engineering
*
* @see Use the toDecimal() method in the Engineering\ConvertHex class instead
*
- * @param string $x The hexadecimal number you want to convert. This number cannot
+ * @param mixed $x The hexadecimal number (as a string) that you want to convert. This number cannot
* contain more than 10 characters (40 bits). The most significant
* bit of number is the sign bit. The remaining 39 bits are magnitude
* bits. Negative numbers are represented using two's-complement
@@ -410,7 +417,7 @@ class Engineering
*
* @see Use the toOctal() method in the Engineering\ConvertHex class instead
*
- * @param string $x The hexadecimal number you want to convert. Number cannot
+ * @param mixed $x The hexadecimal number (as a string) that you want to convert. Number cannot
* contain more than 10 characters. The most significant bit of
* number is the sign bit. The remaining 39 bits are magnitude
* bits. Negative numbers are represented using two's-complement
@@ -423,7 +430,7 @@ class Engineering
* the #NUM! error value.
* If HEX2OCT requires more than places characters, it returns
* the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, HEX2OCT
+ * @param mixed $places The number of characters to use. If places is omitted, HEX2OCT
* uses the minimum number of characters necessary. Places is
* useful for padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -450,7 +457,7 @@ class Engineering
*
* @see Use the toBinary() method in the Engineering\ConvertOctal class instead
*
- * @param string $x The octal number you want to convert. Number may not
+ * @param mixed $x The octal number you want to convert. Number may not
* contain more than 10 characters. The most significant
* bit of number is the sign bit. The remaining 29 bits
* are magnitude bits. Negative numbers are represented
@@ -463,7 +470,7 @@ class Engineering
* the #NUM! error value.
* If OCT2BIN requires more than places characters, it
* returns the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted,
+ * @param mixed $places The number of characters to use. If places is omitted,
* OCT2BIN uses the minimum number of characters necessary.
* Places is useful for padding the return value with
* leading 0s (zeros).
@@ -492,7 +499,7 @@ class Engineering
*
* @see Use the toDecimal() method in the Engineering\ConvertOctal class instead
*
- * @param string $x The octal number you want to convert. Number may not contain
+ * @param mixed $x The octal number you want to convert. Number may not contain
* more than 10 octal characters (30 bits). The most significant
* bit of number is the sign bit. The remaining 29 bits are
* magnitude bits. Negative numbers are represented using
@@ -519,7 +526,7 @@ class Engineering
*
* @see Use the toHex() method in the Engineering\ConvertOctal class instead
*
- * @param string $x The octal number you want to convert. Number may not contain
+ * @param mixed $x The octal number you want to convert. Number may not contain
* more than 10 octal characters (30 bits). The most significant
* bit of number is the sign bit. The remaining 29 bits are
* magnitude bits. Negative numbers are represented using
@@ -530,7 +537,7 @@ class Engineering
* #NUM! error value.
* If OCT2HEX requires more than places characters, it returns
* the #NUM! error value.
- * @param int $places The number of characters to use. If places is omitted, OCT2HEX
+ * @param mixed $places The number of characters to use. If places is omitted, OCT2HEX
* uses the minimum number of characters necessary. Places is useful
* for padding the return value with leading 0s (zeros).
* If places is not an integer, it is truncated.
@@ -552,6 +559,10 @@ class Engineering
* Excel Function:
* COMPLEX(realNumber,imaginary[,suffix])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the COMPLEX() method in the Engineering\Complex class instead
+ *
* @param float $realNumber the real coefficient of the complex number
* @param float $imaginary the imaginary coefficient of the complex number
* @param string $suffix The suffix for the imaginary component of the complex number.
@@ -561,20 +572,7 @@ class Engineering
*/
public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i')
{
- $realNumber = ($realNumber === null) ? 0.0 : Functions::flattenSingleValue($realNumber);
- $imaginary = ($imaginary === null) ? 0.0 : Functions::flattenSingleValue($imaginary);
- $suffix = ($suffix === null) ? 'i' : Functions::flattenSingleValue($suffix);
-
- if (
- ((is_numeric($realNumber)) && (is_numeric($imaginary))) &&
- (($suffix == 'i') || ($suffix == 'j') || ($suffix == ''))
- ) {
- $complex = new Complex($realNumber, $imaginary, $suffix);
-
- return (string) $complex;
- }
-
- return Functions::VALUE();
+ return Engineering\Complex::COMPLEX($realNumber, $imaginary, $suffix);
}
/**
@@ -585,16 +583,18 @@ class Engineering
* Excel Function:
* IMAGINARY(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMAGINARY() method in the Engineering\Complex class instead
+ *
* @param string $complexNumber the complex number for which you want the imaginary
* coefficient
*
- * @return float
+ * @return float|string
*/
public static function IMAGINARY($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (new Complex($complexNumber))->getImaginary();
+ return Engineering\Complex::IMAGINARY($complexNumber);
}
/**
@@ -605,15 +605,17 @@ class Engineering
* Excel Function:
* IMREAL(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMREAL() method in the Engineering\Complex class instead
+ *
* @param string $complexNumber the complex number for which you want the real coefficient
*
- * @return float
+ * @return float|string
*/
public static function IMREAL($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (new Complex($complexNumber))->getReal();
+ return Engineering\Complex::IMREAL($complexNumber);
}
/**
@@ -624,15 +626,17 @@ class Engineering
* Excel Function:
* IMABS(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMABS() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the absolute value
*
- * @return float
+ * @return float|string
*/
public static function IMABS($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (new Complex($complexNumber))->abs();
+ return ComplexFunctions::IMABS($complexNumber);
}
/**
@@ -644,20 +648,17 @@ class Engineering
* Excel Function:
* IMARGUMENT(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMARGUMENT() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the argument theta
*
* @return float|string
*/
public static function IMARGUMENT($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- $complex = new Complex($complexNumber);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return Functions::DIV0();
- }
-
- return $complex->argument();
+ return ComplexFunctions::IMARGUMENT($complexNumber);
}
/**
@@ -668,15 +669,17 @@ class Engineering
* Excel Function:
* IMCONJUGATE(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMARGUMENT() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the conjugate
*
* @return string
*/
public static function IMCONJUGATE($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->conjugate();
+ return ComplexFunctions::IMCONJUGATE($complexNumber);
}
/**
@@ -687,15 +690,17 @@ class Engineering
* Excel Function:
* IMCOS(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMCOS() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the cosine
*
* @return float|string
*/
public static function IMCOS($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->cos();
+ return ComplexFunctions::IMCOS($complexNumber);
}
/**
@@ -706,15 +711,17 @@ class Engineering
* Excel Function:
* IMCOSH(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMCOSH() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the hyperbolic cosine
*
* @return float|string
*/
public static function IMCOSH($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->cosh();
+ return ComplexFunctions::IMCOSH($complexNumber);
}
/**
@@ -725,15 +732,17 @@ class Engineering
* Excel Function:
* IMCOT(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMCOT() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the cotangent
*
* @return float|string
*/
public static function IMCOT($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->cot();
+ return ComplexFunctions::IMCOT($complexNumber);
}
/**
@@ -744,15 +753,17 @@ class Engineering
* Excel Function:
* IMCSC(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMCSC() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the cosecant
*
* @return float|string
*/
public static function IMCSC($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->csc();
+ return ComplexFunctions::IMCSC($complexNumber);
}
/**
@@ -763,15 +774,17 @@ class Engineering
* Excel Function:
* IMCSCH(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMCSCH() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the hyperbolic cosecant
*
* @return float|string
*/
public static function IMCSCH($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->csch();
+ return ComplexFunctions::IMCSCH($complexNumber);
}
/**
@@ -782,15 +795,17 @@ class Engineering
* Excel Function:
* IMSIN(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSIN() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the sine
*
* @return float|string
*/
public static function IMSIN($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->sin();
+ return ComplexFunctions::IMSIN($complexNumber);
}
/**
@@ -801,15 +816,17 @@ class Engineering
* Excel Function:
* IMSINH(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSINH() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the hyperbolic sine
*
* @return float|string
*/
public static function IMSINH($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->sinh();
+ return ComplexFunctions::IMSINH($complexNumber);
}
/**
@@ -820,15 +837,17 @@ class Engineering
* Excel Function:
* IMSEC(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSEC() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the secant
*
* @return float|string
*/
public static function IMSEC($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->sec();
+ return ComplexFunctions::IMSEC($complexNumber);
}
/**
@@ -839,15 +858,17 @@ class Engineering
* Excel Function:
* IMSECH(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSECH() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the hyperbolic secant
*
* @return float|string
*/
public static function IMSECH($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->sech();
+ return ComplexFunctions::IMSECH($complexNumber);
}
/**
@@ -858,15 +879,17 @@ class Engineering
* Excel Function:
* IMTAN(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMTAN() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the tangent
*
* @return float|string
*/
public static function IMTAN($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->tan();
+ return ComplexFunctions::IMTAN($complexNumber);
}
/**
@@ -877,20 +900,17 @@ class Engineering
* Excel Function:
* IMSQRT(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSQRT() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the square root
*
* @return string
*/
public static function IMSQRT($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- $theta = self::IMARGUMENT($complexNumber);
- if ($theta === Functions::DIV0()) {
- return '0';
- }
-
- return (string) (new Complex($complexNumber))->sqrt();
+ return ComplexFunctions::IMSQRT($complexNumber);
}
/**
@@ -901,20 +921,17 @@ class Engineering
* Excel Function:
* IMLN(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMLN() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the natural logarithm
*
* @return string
*/
public static function IMLN($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- $complex = new Complex($complexNumber);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return Functions::NAN();
- }
-
- return (string) (new Complex($complexNumber))->ln();
+ return ComplexFunctions::IMLN($complexNumber);
}
/**
@@ -925,20 +942,17 @@ class Engineering
* Excel Function:
* IMLOG10(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMLOG10() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the common logarithm
*
* @return string
*/
public static function IMLOG10($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- $complex = new Complex($complexNumber);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return Functions::NAN();
- }
-
- return (string) (new Complex($complexNumber))->log10();
+ return ComplexFunctions::IMLOG10($complexNumber);
}
/**
@@ -949,20 +963,17 @@ class Engineering
* Excel Function:
* IMLOG2(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMLOG2() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the base-2 logarithm
*
* @return string
*/
public static function IMLOG2($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- $complex = new Complex($complexNumber);
- if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
- return Functions::NAN();
- }
-
- return (string) (new Complex($complexNumber))->log2();
+ return ComplexFunctions::IMLOG2($complexNumber);
}
/**
@@ -973,15 +984,17 @@ class Engineering
* Excel Function:
* IMEXP(complexNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMEXP() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number for which you want the exponential
*
* @return string
*/
public static function IMEXP($complexNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
-
- return (string) (new Complex($complexNumber))->exp();
+ return ComplexFunctions::IMEXP($complexNumber);
}
/**
@@ -992,6 +1005,10 @@ class Engineering
* Excel Function:
* IMPOWER(complexNumber,realNumber)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMPOWER() method in the Engineering\ComplexFunctions class instead
+ *
* @param string $complexNumber the complex number you want to raise to a power
* @param float $realNumber the power to which you want to raise the complex number
*
@@ -999,14 +1016,7 @@ class Engineering
*/
public static function IMPOWER($complexNumber, $realNumber)
{
- $complexNumber = Functions::flattenSingleValue($complexNumber);
- $realNumber = Functions::flattenSingleValue($realNumber);
-
- if (!is_numeric($realNumber)) {
- return Functions::VALUE();
- }
-
- return (string) (new Complex($complexNumber))->pow($realNumber);
+ return ComplexFunctions::IMPOWER($complexNumber, $realNumber);
}
/**
@@ -1017,6 +1027,10 @@ class Engineering
* Excel Function:
* IMDIV(complexDividend,complexDivisor)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMDIV() method in the Engineering\ComplexOperations class instead
+ *
* @param string $complexDividend the complex numerator or dividend
* @param string $complexDivisor the complex denominator or divisor
*
@@ -1024,14 +1038,7 @@ class Engineering
*/
public static function IMDIV($complexDividend, $complexDivisor)
{
- $complexDividend = Functions::flattenSingleValue($complexDividend);
- $complexDivisor = Functions::flattenSingleValue($complexDivisor);
-
- try {
- return (string) (new Complex($complexDividend))->divideby(new Complex($complexDivisor));
- } catch (ComplexException $e) {
- return Functions::NAN();
- }
+ return ComplexOperations::IMDIV($complexDividend, $complexDivisor);
}
/**
@@ -1042,6 +1049,10 @@ class Engineering
* Excel Function:
* IMSUB(complexNumber1,complexNumber2)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSUB() method in the Engineering\ComplexOperations class instead
+ *
* @param string $complexNumber1 the complex number from which to subtract complexNumber2
* @param string $complexNumber2 the complex number to subtract from complexNumber1
*
@@ -1049,14 +1060,7 @@ class Engineering
*/
public static function IMSUB($complexNumber1, $complexNumber2)
{
- $complexNumber1 = Functions::flattenSingleValue($complexNumber1);
- $complexNumber2 = Functions::flattenSingleValue($complexNumber2);
-
- try {
- return (string) (new Complex($complexNumber1))->subtract(new Complex($complexNumber2));
- } catch (ComplexException $e) {
- return Functions::NAN();
- }
+ return ComplexOperations::IMSUB($complexNumber1, $complexNumber2);
}
/**
@@ -1067,26 +1071,17 @@ class Engineering
* Excel Function:
* IMSUM(complexNumber[,complexNumber[,...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMSUM() method in the Engineering\ComplexOperations class instead
+ *
* @param string ...$complexNumbers Series of complex numbers to add
*
* @return string
*/
public static function IMSUM(...$complexNumbers)
{
- // Return value
- $returnValue = new Complex(0.0);
- $aArgs = Functions::flattenArray($complexNumbers);
-
- try {
- // Loop through the arguments
- foreach ($aArgs as $complex) {
- $returnValue = $returnValue->add(new Complex($complex));
- }
- } catch (ComplexException $e) {
- return Functions::NAN();
- }
-
- return (string) $returnValue;
+ return ComplexOperations::IMSUM(...$complexNumbers);
}
/**
@@ -1097,26 +1092,17 @@ class Engineering
* Excel Function:
* IMPRODUCT(complexNumber[,complexNumber[,...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the IMPRODUCT() method in the Engineering\ComplexOperations class instead
+ *
* @param string ...$complexNumbers Series of complex numbers to multiply
*
* @return string
*/
public static function IMPRODUCT(...$complexNumbers)
{
- // Return value
- $returnValue = new Complex(1.0);
- $aArgs = Functions::flattenArray($complexNumbers);
-
- try {
- // Loop through the arguments
- foreach ($aArgs as $complex) {
- $returnValue = $returnValue->multiply(new Complex($complex));
- }
- } catch (ComplexException $e) {
- return Functions::NAN();
- }
-
- return (string) $returnValue;
+ return ComplexOperations::IMPRODUCT(...$complexNumbers);
}
/**
@@ -1409,7 +1395,7 @@ class Engineering
*
* @see Use the getConversionMultipliers() method in the ConvertUOM class instead
*
- * @return array of mixed
+ * @return mixed[]
*/
public static function getConversionMultipliers()
{
@@ -1426,7 +1412,7 @@ class Engineering
*
* @see Use the getBinaryConversionMultipliers() method in the ConvertUOM class instead
*
- * @return array of mixed
+ * @return mixed[]
*/
public static function getBinaryConversionMultipliers()
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselI.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselI.php
index eda5c12b..ea2577cd 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselI.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselI.php
@@ -2,8 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Engineering;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
class BesselI
{
@@ -16,9 +16,12 @@ class BesselI
* Excel Function:
* BESSELI(x,ord)
*
- * @param float $x The value at which to evaluate the function.
+ * NOTE: The MS Excel implementation of the BESSELI function is still not accurate.
+ * This code provides a more accurate calculation
+ *
+ * @param mixed $x A float value at which to evaluate the function.
* If x is nonnumeric, BESSELI returns the #VALUE! error value.
- * @param int $ord The order of the Bessel function.
+ * @param mixed $ord The integer order of the Bessel function.
* If ord is not an integer, it is truncated.
* If $ord is nonnumeric, BESSELI returns the #VALUE! error value.
* If $ord < 0, BESSELI returns the #NUM! error value.
@@ -27,46 +30,108 @@ class BesselI
*/
public static function BESSELI($x, $ord)
{
- $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
- $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+ $x = Functions::flattenSingleValue($x);
+ $ord = Functions::flattenSingleValue($ord);
- if ((is_numeric($x)) && (is_numeric($ord))) {
- $ord = (int) floor($ord);
- if ($ord < 0) {
- return Functions::NAN();
- }
-
- $fResult = self::calculate($x, $ord);
-
- return (is_nan($fResult)) ? Functions::NAN() : $fResult;
+ try {
+ $x = EngineeringValidations::validateFloat($x);
+ $ord = EngineeringValidations::validateInt($ord);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if ($ord < 0) {
+ return Functions::NAN();
+ }
+
+ $fResult = self::calculate($x, $ord);
+
+ return (is_nan($fResult)) ? Functions::NAN() : $fResult;
}
private static function calculate(float $x, int $ord): float
{
- if (abs($x) <= 30) {
- $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord);
- $ordK = 1;
- $fSqrX = ($x * $x) / 4;
- do {
- $fTerm *= $fSqrX;
- $fTerm /= ($ordK * ($ordK + $ord));
- $fResult += $fTerm;
- } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
-
- return $fResult;
+ // special cases
+ switch ($ord) {
+ case 0:
+ return self::besselI0($x);
+ case 1:
+ return self::besselI1($x);
}
- $f_2_PI = 2 * M_PI;
+ return self::besselI2($x, $ord);
+ }
- $fXAbs = abs($x);
- $fResult = exp($fXAbs) / sqrt($f_2_PI * $fXAbs);
- if (($ord & 1) && ($x < 0)) {
- $fResult = -$fResult;
+ private static function besselI0(float $x): float
+ {
+ $ax = abs($x);
+
+ if ($ax < 3.75) {
+ $y = $x / 3.75;
+ $y = $y * $y;
+
+ return 1.0 + $y * (3.5156229 + $y * (3.0899424 + $y * (1.2067492
+ + $y * (0.2659732 + $y * (0.360768e-1 + $y * 0.45813e-2)))));
}
- return $fResult;
+ $y = 3.75 / $ax;
+
+ return (exp($ax) / sqrt($ax)) * (0.39894228 + $y * (0.1328592e-1 + $y * (0.225319e-2 + $y * (-0.157565e-2
+ + $y * (0.916281e-2 + $y * (-0.2057706e-1 + $y * (0.2635537e-1 +
+ $y * (-0.1647633e-1 + $y * 0.392377e-2))))))));
+ }
+
+ private static function besselI1(float $x): float
+ {
+ $ax = abs($x);
+
+ if ($ax < 3.75) {
+ $y = $x / 3.75;
+ $y = $y * $y;
+ $ans = $ax * (0.5 + $y * (0.87890594 + $y * (0.51498869 + $y * (0.15084934 + $y * (0.2658733e-1 +
+ $y * (0.301532e-2 + $y * 0.32411e-3))))));
+
+ return ($x < 0.0) ? -$ans : $ans;
+ }
+
+ $y = 3.75 / $ax;
+ $ans = 0.2282967e-1 + $y * (-0.2895312e-1 + $y * (0.1787654e-1 - $y * 0.420059e-2));
+ $ans = 0.39894228 + $y * (-0.3988024e-1 + $y * (-0.362018e-2 + $y * (0.163801e-2 +
+ $y * (-0.1031555e-1 + $y * $ans))));
+ $ans *= exp($ax) / sqrt($ax);
+
+ return ($x < 0.0) ? -$ans : $ans;
+ }
+
+ private static function besselI2(float $x, int $ord): float
+ {
+ if ($x === 0.0) {
+ return 0.0;
+ }
+
+ $tox = 2.0 / abs($x);
+ $bip = 0;
+ $ans = 0.0;
+ $bi = 1.0;
+
+ for ($j = 2 * ($ord + (int) sqrt(40.0 * $ord)); $j > 0; --$j) {
+ $bim = $bip + $j * $tox * $bi;
+ $bip = $bi;
+ $bi = $bim;
+
+ if (abs($bi) > 1.0e+12) {
+ $ans *= 1.0e-12;
+ $bi *= 1.0e-12;
+ $bip *= 1.0e-12;
+ }
+
+ if ($j === $ord) {
+ $ans = $bip;
+ }
+ }
+
+ $ans *= self::besselI0($x) / $bi;
+
+ return ($x < 0.0 && (($ord % 2) === 1)) ? -$ans : $ans;
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
index 62dd343a..7ea45a74 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselJ.php
@@ -2,8 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Engineering;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
class BesselJ
{
@@ -15,9 +15,13 @@ class BesselJ
* Excel Function:
* BESSELJ(x,ord)
*
- * @param float $x The value at which to evaluate the function.
+ * NOTE: The MS Excel implementation of the BESSELJ function is still not accurate, particularly for higher order
+ * values with x < -8 and x > 8. This code provides a more accurate calculation
+ *
+ * @param mixed $x A float value at which to evaluate the function.
* If x is nonnumeric, BESSELJ returns the #VALUE! error value.
- * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
+ * @param mixed $ord The integer order of the Bessel function.
+ * If ord is not an integer, it is truncated.
* If $ord is nonnumeric, BESSELJ returns the #VALUE! error value.
* If $ord < 0, BESSELJ returns the #NUM! error value.
*
@@ -25,47 +29,144 @@ class BesselJ
*/
public static function BESSELJ($x, $ord)
{
- $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
- $ord = ($ord === null) ? 0.0 : Functions::flattenSingleValue($ord);
+ $x = Functions::flattenSingleValue($x);
+ $ord = Functions::flattenSingleValue($ord);
- if ((is_numeric($x)) && (is_numeric($ord))) {
- $ord = (int) floor($ord);
- if ($ord < 0) {
- return Functions::NAN();
- }
-
- $fResult = self::calculate($x, $ord);
-
- return (is_nan($fResult)) ? Functions::NAN() : $fResult;
+ try {
+ $x = EngineeringValidations::validateFloat($x);
+ $ord = EngineeringValidations::validateInt($ord);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if ($ord < 0) {
+ return Functions::NAN();
+ }
+
+ $fResult = self::calculate($x, $ord);
+
+ return (is_nan($fResult)) ? Functions::NAN() : $fResult;
}
private static function calculate(float $x, int $ord): float
{
- if (abs($x) <= 30) {
- $fResult = $fTerm = ($x / 2) ** $ord / MathTrig::FACT($ord);
- $ordK = 1;
- $fSqrX = ($x * $x) / -4;
- do {
- $fTerm *= $fSqrX;
- $fTerm /= ($ordK * ($ordK + $ord));
- $fResult += $fTerm;
- } while ((abs($fTerm) > 1e-12) && (++$ordK < 100));
-
- return $fResult;
+ // special cases
+ switch ($ord) {
+ case 0:
+ return self::besselJ0($x);
+ case 1:
+ return self::besselJ1($x);
}
- $f_PI_DIV_2 = M_PI / 2;
- $f_PI_DIV_4 = M_PI / 4;
+ return self::besselJ2($x, $ord);
+ }
- $fXAbs = abs($x);
- $fResult = sqrt(Functions::M_2DIVPI / $fXAbs) * cos($fXAbs - $ord * $f_PI_DIV_2 - $f_PI_DIV_4);
- if (($ord & 1) && ($x < 0)) {
- $fResult = -$fResult;
+ private static function besselJ0(float $x): float
+ {
+ $ax = abs($x);
+
+ if ($ax < 8.0) {
+ $y = $x * $x;
+ $ans1 = 57568490574.0 + $y * (-13362590354.0 + $y * (651619640.7 + $y * (-11214424.18 + $y *
+ (77392.33017 + $y * (-184.9052456)))));
+ $ans2 = 57568490411.0 + $y * (1029532985.0 + $y * (9494680.718 + $y * (59272.64853 + $y *
+ (267.8532712 + $y * 1.0))));
+
+ return $ans1 / $ans2;
}
- return $fResult;
+ $z = 8.0 / $ax;
+ $y = $z * $z;
+ $xx = $ax - 0.785398164;
+ $ans1 = 1.0 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));
+ $ans2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y *
+ (0.7621095161e-6 - $y * 0.934935152e-7)));
+
+ return sqrt(0.636619772 / $ax) * (cos($xx) * $ans1 - $z * sin($xx) * $ans2);
+ }
+
+ private static function besselJ1(float $x): float
+ {
+ $ax = abs($x);
+
+ if ($ax < 8.0) {
+ $y = $x * $x;
+ $ans1 = $x * (72362614232.0 + $y * (-7895059235.0 + $y * (242396853.1 + $y *
+ (-2972611.439 + $y * (15704.48260 + $y * (-30.16036606))))));
+ $ans2 = 144725228442.0 + $y * (2300535178.0 + $y * (18583304.74 + $y * (99447.43394 + $y *
+ (376.9991397 + $y * 1.0))));
+
+ return $ans1 / $ans2;
+ }
+
+ $z = 8.0 / $ax;
+ $y = $z * $z;
+ $xx = $ax - 2.356194491;
+
+ $ans1 = 1.0 + $y * (0.183105e-2 + $y * (-0.3516396496e-4 + $y * (0.2457520174e-5 + $y * (-0.240337019e-6))));
+ $ans2 = 0.04687499995 + $y * (-0.2002690873e-3 + $y * (0.8449199096e-5 + $y *
+ (-0.88228987e-6 + $y * 0.105787412e-6)));
+ $ans = sqrt(0.636619772 / $ax) * (cos($xx) * $ans1 - $z * sin($xx) * $ans2);
+
+ return ($x < 0.0) ? -$ans : $ans;
+ }
+
+ private static function besselJ2(float $x, int $ord): float
+ {
+ $ax = abs($x);
+ if ($ax === 0.0) {
+ return 0.0;
+ }
+
+ if ($ax > $ord) {
+ return self::besselj2a($ax, $ord, $x);
+ }
+
+ return self::besselj2b($ax, $ord, $x);
+ }
+
+ private static function besselj2a(float $ax, int $ord, float $x)
+ {
+ $tox = 2.0 / $ax;
+ $bjm = self::besselJ0($ax);
+ $bj = self::besselJ1($ax);
+ for ($j = 1; $j < $ord; ++$j) {
+ $bjp = $j * $tox * $bj - $bjm;
+ $bjm = $bj;
+ $bj = $bjp;
+ }
+ $ans = $bj;
+
+ return ($x < 0.0 && ($ord % 2) == 1) ? -$ans : $ans;
+ }
+
+ private static function besselj2b(float $ax, int $ord, float $x)
+ {
+ $tox = 2.0 / $ax;
+ $jsum = false;
+ $bjp = $ans = $sum = 0.0;
+ $bj = 1.0;
+ for ($j = 2 * ($ord + (int) sqrt(40.0 * $ord)); $j > 0; --$j) {
+ $bjm = $j * $tox * $bj - $bjp;
+ $bjp = $bj;
+ $bj = $bjm;
+ if (abs($bj) > 1.0e+10) {
+ $bj *= 1.0e-10;
+ $bjp *= 1.0e-10;
+ $ans *= 1.0e-10;
+ $sum *= 1.0e-10;
+ }
+ if ($jsum === true) {
+ $sum += $bj;
+ }
+ $jsum = !$jsum;
+ if ($j === $ord) {
+ $ans = $bjp;
+ }
+ }
+ $sum = 2.0 * $sum - $bj;
+ $ans /= $sum;
+
+ return ($x < 0.0 && ($ord % 2) === 1) ? -$ans : $ans;
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselK.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselK.php
index f64f38b0..8facdffc 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselK.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselK.php
@@ -2,6 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Engineering;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class BesselK
@@ -15,75 +16,81 @@ class BesselK
* Excel Function:
* BESSELK(x,ord)
*
- * @param float $x The value at which to evaluate the function.
+ * @param mixed $x A float value at which to evaluate the function.
* If x is nonnumeric, BESSELK returns the #VALUE! error value.
- * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
+ * @param mixed $ord The integer order of the Bessel function.
+ * If ord is not an integer, it is truncated.
* If $ord is nonnumeric, BESSELK returns the #VALUE! error value.
- * If $ord < 0, BESSELK returns the #NUM! error value.
+ * If $ord < 0, BESSELKI returns the #NUM! error value.
*
* @return float|string Result, or a string containing an error
*/
public static function BESSELK($x, $ord)
{
- $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
- $ord = ($ord === null) ? 0 : Functions::flattenSingleValue($ord);
+ $x = Functions::flattenSingleValue($x);
+ $ord = Functions::flattenSingleValue($ord);
- if ((is_numeric($x)) && (is_numeric($ord))) {
- if (($ord < 0) || ($x == 0.0)) {
- return Functions::NAN();
- }
-
- switch (floor($ord)) {
- case 0:
- $fBk = self::besselK0($x);
-
- break;
- case 1:
- $fBk = self::besselK1($x);
-
- break;
- default:
- $fBk = self::besselK2($x, $ord);
- }
-
- return (is_nan($fBk)) ? Functions::NAN() : $fBk;
+ try {
+ $x = EngineeringValidations::validateFloat($x);
+ $ord = EngineeringValidations::validateInt($ord);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if (($ord < 0) || ($x <= 0.0)) {
+ return Functions::NAN();
+ }
+
+ $fBk = self::calculate($x, $ord);
+
+ return (is_nan($fBk)) ? Functions::NAN() : $fBk;
}
- private static function besselK0(float $fNum): float
+ private static function calculate(float $x, int $ord): float
{
- if ($fNum <= 2) {
- $fNum2 = $fNum * 0.5;
+ // special cases
+ switch ($ord) {
+ case 0:
+ return self::besselK0($x);
+ case 1:
+ return self::besselK1($x);
+ }
+
+ return self::besselK2($x, $ord);
+ }
+
+ private static function besselK0(float $x): float
+ {
+ if ($x <= 2) {
+ $fNum2 = $x * 0.5;
$y = ($fNum2 * $fNum2);
- return -log($fNum2) * BesselI::BESSELI($fNum, 0) +
+ return -log($fNum2) * BesselI::BESSELI($x, 0) +
(-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y *
(0.10750e-3 + $y * 0.74e-5))))));
}
- $y = 2 / $fNum;
+ $y = 2 / $x;
- return exp(-$fNum) / sqrt($fNum) *
+ return exp(-$x) / sqrt($x) *
(1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y *
(0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3))))));
}
- private static function besselK1(float $fNum): float
+ private static function besselK1(float $x): float
{
- if ($fNum <= 2) {
- $fNum2 = $fNum * 0.5;
+ if ($x <= 2) {
+ $fNum2 = $x * 0.5;
$y = ($fNum2 * $fNum2);
- return log($fNum2) * BesselI::BESSELI($fNum, 1) +
+ return log($fNum2) * BesselI::BESSELI($x, 1) +
(1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y *
- (-0.110404e-2 + $y * (-0.4686e-4))))))) / $fNum;
+ (-0.110404e-2 + $y * (-0.4686e-4))))))) / $x;
}
- $y = 2 / $fNum;
+ $y = 2 / $x;
- return exp(-$fNum) / sqrt($fNum) *
+ return exp(-$x) / sqrt($x) *
(1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y *
(0.325614e-2 + $y * (-0.68245e-3)))))));
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselY.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselY.php
index 3bda914c..7f387497 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselY.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BesselY.php
@@ -2,6 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Engineering;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class BesselY
@@ -14,83 +15,96 @@ class BesselY
* Excel Function:
* BESSELY(x,ord)
*
- * @param float $x The value at which to evaluate the function.
- * If x is nonnumeric, BESSELY returns the #VALUE! error value.
- * @param int $ord The order of the Bessel function. If n is not an integer, it is truncated.
- * If $ord is nonnumeric, BESSELY returns the #VALUE! error value.
- * If $ord < 0, BESSELY returns the #NUM! error value.
+ * @param mixed $x A float value at which to evaluate the function.
+ * If x is nonnumeric, BESSELY returns the #VALUE! error value.
+ * @param mixed $ord The integer order of the Bessel function.
+ * If ord is not an integer, it is truncated.
+ * If $ord is nonnumeric, BESSELY returns the #VALUE! error value.
+ * If $ord < 0, BESSELY returns the #NUM! error value.
*
* @return float|string Result, or a string containing an error
*/
public static function BESSELY($x, $ord)
{
- $x = ($x === null) ? 0.0 : Functions::flattenSingleValue($x);
- $ord = ($ord === null) ? 0 : Functions::flattenSingleValue($ord);
+ $x = Functions::flattenSingleValue($x);
+ $ord = Functions::flattenSingleValue($ord);
- if ((is_numeric($x)) && (is_numeric($ord))) {
- if (($ord < 0) || ($x == 0.0)) {
- return Functions::NAN();
- }
-
- switch (floor($ord)) {
- case 0:
- $fBy = self::besselY0($x);
-
- break;
- case 1:
- $fBy = self::besselY1($x);
-
- break;
- default:
- $fBy = self::besselY2($x, $ord);
- }
-
- return (is_nan($fBy)) ? Functions::NAN() : $fBy;
+ try {
+ $x = EngineeringValidations::validateFloat($x);
+ $ord = EngineeringValidations::validateInt($ord);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if (($ord < 0) || ($x <= 0.0)) {
+ return Functions::NAN();
+ }
+
+ $fBy = self::calculate($x, $ord);
+
+ return (is_nan($fBy)) ? Functions::NAN() : $fBy;
}
- private static function besselY0(float $fNum): float
+ private static function calculate(float $x, int $ord): float
{
- if ($fNum < 8.0) {
- $y = ($fNum * $fNum);
- $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y *
+ // special cases
+ switch ($ord) {
+ case 0:
+ return self::besselY0($x);
+ case 1:
+ return self::besselY1($x);
+ }
+
+ return self::besselY2($x, $ord);
+ }
+
+ private static function besselY0(float $x): float
+ {
+ if ($x < 8.0) {
+ $y = ($x * $x);
+ $ans1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y *
(-86327.92757 + $y * 228.4622733))));
- $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y *
+ $ans2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y *
(47447.26470 + $y * (226.1030244 + $y))));
- return $f1 / $f2 + 0.636619772 * BesselJ::BESSELJ($fNum, 0) * log($fNum);
+ return $ans1 / $ans2 + 0.636619772 * BesselJ::BESSELJ($x, 0) * log($x);
}
- $z = 8.0 / $fNum;
+ $z = 8.0 / $x;
$y = ($z * $z);
- $xx = $fNum - 0.785398164;
- $f1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));
- $f2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y *
+ $xx = $x - 0.785398164;
+ $ans1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6)));
+ $ans2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y *
(-0.934945152e-7))));
- return sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2);
+ return sqrt(0.636619772 / $x) * (sin($xx) * $ans1 + $z * cos($xx) * $ans2);
}
- private static function besselY1(float $fNum): float
+ private static function besselY1(float $x): float
{
- if ($fNum < 8.0) {
- $y = ($fNum * $fNum);
- $f1 = $fNum * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y *
+ if ($x < 8.0) {
+ $y = ($x * $x);
+ $ans1 = $x * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y *
(0.7349264551e9 + $y * (-0.4237922726e7 + $y * 0.8511937935e4)))));
- $f2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y *
+ $ans2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y *
(0.1020426050e6 + $y * (0.3549632885e3 + $y)))));
- return $f1 / $f2 + 0.636619772 * (BesselJ::BESSELJ($fNum, 1) * log($fNum) - 1 / $fNum);
+ return ($ans1 / $ans2) + 0.636619772 * (BesselJ::BESSELJ($x, 1) * log($x) - 1 / $x);
}
- return sqrt(0.636619772 / $fNum) * sin($fNum - 2.356194491);
+ $z = 8.0 / $x;
+ $y = $z * $z;
+ $xx = $x - 2.356194491;
+ $ans1 = 1.0 + $y * (0.183105e-2 + $y * (-0.3516396496e-4 + $y * (0.2457520174e-5 + $y * (-0.240337019e-6))));
+ $ans2 = 0.04687499995 + $y * (-0.2002690873e-3 + $y * (0.8449199096e-5 + $y *
+ (-0.88228987e-6 + $y * 0.105787412e-6)));
+
+ return sqrt(0.636619772 / $x) * (sin($xx) * $ans1 + $z * cos($xx) * $ans2);
}
- private static function besselY2(float $x, int $ord)
+ private static function besselY2(float $x, int $ord): float
{
- $fTox = 2 / $x;
+ $fTox = 2.0 / $x;
$fBym = self::besselY0($x);
$fBy = self::besselY1($x);
for ($n = 1; $n < $ord; ++$n) {
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BitWise.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
index 494b5685..9958f054 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/BitWise.php
@@ -7,6 +7,18 @@ use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class BitWise
{
+ const SPLIT_DIVISOR = 2 ** 24;
+
+ /**
+ * Split a number into upper and lower portions for full 32-bit support.
+ *
+ * @param float|int $number
+ */
+ private static function splitNumber($number): array
+ {
+ return [floor($number / self::SPLIT_DIVISOR), fmod($number, self::SPLIT_DIVISOR)];
+ }
+
/**
* BITAND.
*
@@ -28,8 +40,10 @@ class BitWise
} catch (Exception $e) {
return $e->getMessage();
}
+ $split1 = self::splitNumber($number1);
+ $split2 = self::splitNumber($number2);
- return $number1 & $number2;
+ return self::SPLIT_DIVISOR * ($split1[0] & $split2[0]) + ($split1[1] & $split2[1]);
}
/**
@@ -54,7 +68,10 @@ class BitWise
return $e->getMessage();
}
- return $number1 | $number2;
+ $split1 = self::splitNumber($number1);
+ $split2 = self::splitNumber($number2);
+
+ return self::SPLIT_DIVISOR * ($split1[0] | $split2[0]) + ($split1[1] | $split2[1]);
}
/**
@@ -79,7 +96,10 @@ class BitWise
return $e->getMessage();
}
- return $number1 ^ $number2;
+ $split1 = self::splitNumber($number1);
+ $split2 = self::splitNumber($number2);
+
+ return self::SPLIT_DIVISOR * ($split1[0] ^ $split2[0]) + ($split1[1] ^ $split2[1]);
}
/**
@@ -93,19 +113,18 @@ class BitWise
* @param int $number
* @param int $shiftAmount
*
- * @return int|string
+ * @return float|int|string
*/
public static function BITLSHIFT($number, $shiftAmount)
{
try {
$number = self::validateBitwiseArgument($number);
+ $shiftAmount = self::validateShiftAmount($shiftAmount);
} catch (Exception $e) {
return $e->getMessage();
}
- $shiftAmount = Functions::flattenSingleValue($shiftAmount);
-
- $result = $number << $shiftAmount;
+ $result = floor($number * (2 ** $shiftAmount));
if ($result > 2 ** 48 - 1) {
return Functions::NAN();
}
@@ -124,19 +143,49 @@ class BitWise
* @param int $number
* @param int $shiftAmount
*
- * @return int|string
+ * @return float|int|string
*/
public static function BITRSHIFT($number, $shiftAmount)
{
try {
$number = self::validateBitwiseArgument($number);
+ $shiftAmount = self::validateShiftAmount($shiftAmount);
} catch (Exception $e) {
return $e->getMessage();
}
- $shiftAmount = Functions::flattenSingleValue($shiftAmount);
+ $result = floor($number / (2 ** $shiftAmount));
+ if ($result > 2 ** 48 - 1) { // possible because shiftAmount can be negative
+ return Functions::NAN();
+ }
- return $number >> $shiftAmount;
+ return $result;
+ }
+
+ /**
+ * Validate arguments passed to the bitwise functions.
+ *
+ * @param mixed $value
+ *
+ * @return float|int
+ */
+ private static function validateBitwiseArgument($value)
+ {
+ self::nullFalseTrueToNumber($value);
+
+ if (is_numeric($value)) {
+ if ($value == floor($value)) {
+ if (($value > 2 ** 48 - 1) || ($value < 0)) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return floor($value);
+ }
+
+ throw new Exception(Functions::NAN());
+ }
+
+ throw new Exception(Functions::VALUE());
}
/**
@@ -146,25 +195,33 @@ class BitWise
*
* @return int
*/
- private static function validateBitwiseArgument($value)
+ private static function validateShiftAmount($value)
{
- $value = Functions::flattenSingleValue($value);
+ self::nullFalseTrueToNumber($value);
- if (is_int($value)) {
- return $value;
- } elseif (is_numeric($value)) {
- if ($value == (int) ($value)) {
- $value = (int) ($value);
- if (($value > 2 ** 48 - 1) || ($value < 0)) {
- throw new Exception(Functions::NAN());
- }
-
- return $value;
+ if (is_numeric($value)) {
+ if (abs($value) > 53) {
+ throw new Exception(Functions::NAN());
}
- throw new Exception(Functions::NAN());
+ return (int) $value;
}
throw new Exception(Functions::VALUE());
}
+
+ /**
+ * Many functions accept null/false/true argument treated as 0/0/1.
+ *
+ * @param mixed $number
+ */
+ public static function nullFalseTrueToNumber(&$number): void
+ {
+ $number = Functions::flattenSingleValue($number);
+ if ($number === null) {
+ $number = 0;
+ } elseif (is_bool($number)) {
+ $number = (int) $number;
+ }
+ }
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Compare.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Compare.php
index d875174e..0a634206 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Compare.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Compare.php
@@ -2,6 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Engineering;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class Compare
@@ -27,8 +28,11 @@ class Compare
$a = Functions::flattenSingleValue($a);
$b = Functions::flattenSingleValue($b);
- if (!is_numeric($a) || !is_numeric($b)) {
- return Functions::VALUE();
+ try {
+ $a = EngineeringValidations::validateFloat($a);
+ $b = EngineeringValidations::validateFloat($b);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
return (int) ($a == $b);
@@ -54,8 +58,11 @@ class Compare
$number = Functions::flattenSingleValue($number);
$step = Functions::flattenSingleValue($step);
- if (!is_numeric($number) || !is_numeric($step)) {
- return Functions::VALUE();
+ try {
+ $number = EngineeringValidations::validateFloat($number);
+ $step = EngineeringValidations::validateFloat($step);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
return (int) ($number >= $step);
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php
new file mode 100644
index 00000000..1c2f5f77
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php
@@ -0,0 +1,99 @@
+getMessage();
+ }
+
+ if (($suffix == 'i') || ($suffix == 'j') || ($suffix == '')) {
+ $complex = new ComplexObject($realNumber, $imaginary, $suffix);
+
+ return (string) $complex;
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * IMAGINARY.
+ *
+ * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMAGINARY(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the imaginary
+ * coefficient
+ *
+ * @return float|string
+ */
+ public static function IMAGINARY($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return $complex->getImaginary();
+ }
+
+ /**
+ * IMREAL.
+ *
+ * Returns the real coefficient of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMREAL(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the real coefficient
+ *
+ * @return float|string
+ */
+ public static function IMREAL($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return $complex->getReal();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php
new file mode 100644
index 00000000..3f37f373
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexFunctions.php
@@ -0,0 +1,513 @@
+abs();
+ }
+
+ /**
+ * IMARGUMENT.
+ *
+ * Returns the argument theta of a complex number, i.e. the angle in radians from the real
+ * axis to the representation of the number in polar coordinates.
+ *
+ * Excel Function:
+ * IMARGUMENT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the argument theta
+ *
+ * @return float|string
+ */
+ public static function IMARGUMENT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::DIV0();
+ }
+
+ return $complex->argument();
+ }
+
+ /**
+ * IMCONJUGATE.
+ *
+ * Returns the complex conjugate of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCONJUGATE(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the conjugate
+ *
+ * @return string
+ */
+ public static function IMCONJUGATE($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->conjugate();
+ }
+
+ /**
+ * IMCOS.
+ *
+ * Returns the cosine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOS(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cosine
+ *
+ * @return float|string
+ */
+ public static function IMCOS($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->cos();
+ }
+
+ /**
+ * IMCOSH.
+ *
+ * Returns the hyperbolic cosine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOSH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic cosine
+ *
+ * @return float|string
+ */
+ public static function IMCOSH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->cosh();
+ }
+
+ /**
+ * IMCOT.
+ *
+ * Returns the cotangent of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCOT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cotangent
+ *
+ * @return float|string
+ */
+ public static function IMCOT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->cot();
+ }
+
+ /**
+ * IMCSC.
+ *
+ * Returns the cosecant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCSC(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the cosecant
+ *
+ * @return float|string
+ */
+ public static function IMCSC($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->csc();
+ }
+
+ /**
+ * IMCSCH.
+ *
+ * Returns the hyperbolic cosecant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMCSCH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic cosecant
+ *
+ * @return float|string
+ */
+ public static function IMCSCH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->csch();
+ }
+
+ /**
+ * IMSIN.
+ *
+ * Returns the sine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSIN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the sine
+ *
+ * @return float|string
+ */
+ public static function IMSIN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->sin();
+ }
+
+ /**
+ * IMSINH.
+ *
+ * Returns the hyperbolic sine of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSINH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic sine
+ *
+ * @return float|string
+ */
+ public static function IMSINH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->sinh();
+ }
+
+ /**
+ * IMSEC.
+ *
+ * Returns the secant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSEC(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the secant
+ *
+ * @return float|string
+ */
+ public static function IMSEC($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->sec();
+ }
+
+ /**
+ * IMSECH.
+ *
+ * Returns the hyperbolic secant of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSECH(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the hyperbolic secant
+ *
+ * @return float|string
+ */
+ public static function IMSECH($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->sech();
+ }
+
+ /**
+ * IMTAN.
+ *
+ * Returns the tangent of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMTAN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the tangent
+ *
+ * @return float|string
+ */
+ public static function IMTAN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->tan();
+ }
+
+ /**
+ * IMSQRT.
+ *
+ * Returns the square root of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSQRT(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the square root
+ *
+ * @return string
+ */
+ public static function IMSQRT($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ $theta = self::IMARGUMENT($complexNumber);
+ if ($theta === Functions::DIV0()) {
+ return '0';
+ }
+
+ return (string) $complex->sqrt();
+ }
+
+ /**
+ * IMLN.
+ *
+ * Returns the natural logarithm of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLN(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the natural logarithm
+ *
+ * @return string
+ */
+ public static function IMLN($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->ln();
+ }
+
+ /**
+ * IMLOG10.
+ *
+ * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLOG10(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the common logarithm
+ *
+ * @return string
+ */
+ public static function IMLOG10($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->log10();
+ }
+
+ /**
+ * IMLOG2.
+ *
+ * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMLOG2(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the base-2 logarithm
+ *
+ * @return string
+ */
+ public static function IMLOG2($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->log2();
+ }
+
+ /**
+ * IMEXP.
+ *
+ * Returns the exponential of a complex number in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMEXP(complexNumber)
+ *
+ * @param string $complexNumber the complex number for which you want the exponential
+ *
+ * @return string
+ */
+ public static function IMEXP($complexNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $complex->exp();
+ }
+
+ /**
+ * IMPOWER.
+ *
+ * Returns a complex number in x + yi or x + yj text format raised to a power.
+ *
+ * Excel Function:
+ * IMPOWER(complexNumber,realNumber)
+ *
+ * @param string $complexNumber the complex number you want to raise to a power
+ * @param float $realNumber the power to which you want to raise the complex number
+ *
+ * @return string
+ */
+ public static function IMPOWER($complexNumber, $realNumber)
+ {
+ $complexNumber = Functions::flattenSingleValue($complexNumber);
+ $realNumber = Functions::flattenSingleValue($realNumber);
+
+ try {
+ $complex = new ComplexObject($complexNumber);
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ if (!is_numeric($realNumber)) {
+ return Functions::VALUE();
+ }
+
+ return (string) $complex->pow($realNumber);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php
new file mode 100644
index 00000000..681aad8c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ComplexOperations.php
@@ -0,0 +1,120 @@
+divideby(new ComplexObject($complexDivisor));
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+ }
+
+ /**
+ * IMSUB.
+ *
+ * Returns the difference of two complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSUB(complexNumber1,complexNumber2)
+ *
+ * @param string $complexNumber1 the complex number from which to subtract complexNumber2
+ * @param string $complexNumber2 the complex number to subtract from complexNumber1
+ *
+ * @return string
+ */
+ public static function IMSUB($complexNumber1, $complexNumber2)
+ {
+ $complexNumber1 = Functions::flattenSingleValue($complexNumber1);
+ $complexNumber2 = Functions::flattenSingleValue($complexNumber2);
+
+ try {
+ return (string) (new ComplexObject($complexNumber1))->subtract(new ComplexObject($complexNumber2));
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+ }
+
+ /**
+ * IMSUM.
+ *
+ * Returns the sum of two or more complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMSUM(complexNumber[,complexNumber[,...]])
+ *
+ * @param string ...$complexNumbers Series of complex numbers to add
+ *
+ * @return string
+ */
+ public static function IMSUM(...$complexNumbers)
+ {
+ // Return value
+ $returnValue = new ComplexObject(0.0);
+ $aArgs = Functions::flattenArray($complexNumbers);
+
+ try {
+ // Loop through the arguments
+ foreach ($aArgs as $complex) {
+ $returnValue = $returnValue->add(new ComplexObject($complex));
+ }
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $returnValue;
+ }
+
+ /**
+ * IMPRODUCT.
+ *
+ * Returns the product of two or more complex numbers in x + yi or x + yj text format.
+ *
+ * Excel Function:
+ * IMPRODUCT(complexNumber[,complexNumber[,...]])
+ *
+ * @param string ...$complexNumbers Series of complex numbers to multiply
+ *
+ * @return string
+ */
+ public static function IMPRODUCT(...$complexNumbers)
+ {
+ // Return value
+ $returnValue = new ComplexObject(1.0);
+ $aArgs = Functions::flattenArray($complexNumbers);
+
+ try {
+ // Loop through the arguments
+ foreach ($aArgs as $complex) {
+ $returnValue = $returnValue->multiply(new ComplexObject($complex));
+ }
+ } catch (ComplexException $e) {
+ return Functions::NAN();
+ }
+
+ return (string) $returnValue;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Constants.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Constants.php
new file mode 100644
index 00000000..a926db6e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Constants.php
@@ -0,0 +1,11 @@
+ 10) {
throw new Exception(Functions::NAN());
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php
index 57f9fc41..a662b78d 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php
@@ -25,7 +25,7 @@ class ConvertBinary extends ConvertBase
public static function toDecimal($value): string
{
try {
- $value = self::validateValue(Functions::flattenSingleValue($value), true);
+ $value = self::validateValue(Functions::flattenSingleValue($value));
$value = self::validateBinary($value);
} catch (Exception $e) {
return $e->getMessage();
@@ -38,7 +38,7 @@ class ConvertBinary extends ConvertBase
return '-' . (512 - bindec($value));
}
- return bindec($value);
+ return (string) bindec($value);
}
/**
@@ -65,7 +65,7 @@ class ConvertBinary extends ConvertBase
public static function toHex($value, $places = null): string
{
try {
- $value = self::validateValue(Functions::flattenSingleValue($value), true);
+ $value = self::validateValue(Functions::flattenSingleValue($value));
$value = self::validateBinary($value);
$places = self::validatePlaces(Functions::flattenSingleValue($places));
} catch (Exception $e) {
@@ -73,8 +73,11 @@ class ConvertBinary extends ConvertBase
}
if (strlen($value) == 10) {
- // Two's Complement
- return str_repeat('F', 8) . substr(strtoupper(dechex((int) bindec(substr($value, -9)))), -2);
+ $high2 = substr($value, 0, 2);
+ $low8 = substr($value, 2);
+ $xarr = ['00' => '00000000', '01' => '00000001', '10' => 'FFFFFFFE', '11' => 'FFFFFFFF'];
+
+ return $xarr[$high2] . strtoupper(substr('0' . dechex((int) bindec($low8)), -2));
}
$hexVal = (string) strtoupper(dechex((int) bindec($value)));
@@ -105,16 +108,15 @@ class ConvertBinary extends ConvertBase
public static function toOctal($value, $places = null): string
{
try {
- $value = self::validateValue(Functions::flattenSingleValue($value), true);
+ $value = self::validateValue(Functions::flattenSingleValue($value));
$value = self::validateBinary($value);
$places = self::validatePlaces(Functions::flattenSingleValue($places));
} catch (Exception $e) {
return $e->getMessage();
}
- if (strlen($value) == 10) {
- // Two's Complement
- return str_repeat('7', 7) . substr(strtoupper(decoct((int) bindec(substr($value, -9)))), -3);
+ if (strlen($value) == 10 && substr($value, 0, 1) === '1') { // Two's Complement
+ return str_repeat('7', 6) . strtoupper(decoct((int) bindec("11$value")));
}
$octVal = (string) decoct((int) bindec($value));
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php
index bd249633..a34332fb 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertDecimal.php
@@ -7,6 +7,13 @@ use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class ConvertDecimal extends ConvertBase
{
+ const LARGEST_OCTAL_IN_DECIMAL = 536870911;
+ const SMALLEST_OCTAL_IN_DECIMAL = -536870912;
+ const LARGEST_BINARY_IN_DECIMAL = 511;
+ const SMALLEST_BINARY_IN_DECIMAL = -512;
+ const LARGEST_HEX_IN_DECIMAL = 549755813887;
+ const SMALLEST_HEX_IN_DECIMAL = -549755813888;
+
/**
* toBinary.
*
@@ -43,16 +50,13 @@ class ConvertDecimal extends ConvertBase
}
$value = (int) floor((float) $value);
- if ($value < -512 || $value > 511) {
+ if ($value > self::LARGEST_BINARY_IN_DECIMAL || $value < self::SMALLEST_BINARY_IN_DECIMAL) {
return Functions::NAN();
}
$r = decbin($value);
// Two's Complement
$r = substr($r, -10);
- if (strlen($r) >= 11) {
- return Functions::NAN();
- }
return self::nbrConversionFormat($r, $places);
}
@@ -92,16 +96,37 @@ class ConvertDecimal extends ConvertBase
return $e->getMessage();
}
- $value = (int) floor((float) $value);
- $r = strtoupper(dechex($value));
- if (strlen($r) == 8) {
- // Two's Complement
- $r = 'FF' . $r;
+ $value = floor((float) $value);
+ if ($value > self::LARGEST_HEX_IN_DECIMAL || $value < self::SMALLEST_HEX_IN_DECIMAL) {
+ return Functions::NAN();
}
+ $r = strtoupper(dechex((int) $value));
+ $r = self::hex32bit($value, $r);
return self::nbrConversionFormat($r, $places);
}
+ public static function hex32bit(float $value, string $hexstr, bool $force = false): string
+ {
+ if (PHP_INT_SIZE === 4 || $force) {
+ if ($value >= 2 ** 32) {
+ $quotient = (int) ($value / (2 ** 32));
+
+ return strtoupper(substr('0' . dechex($quotient), -2) . $hexstr);
+ }
+ if ($value < -(2 ** 32)) {
+ $quotient = 256 - (int) ceil((-$value) / (2 ** 32));
+
+ return strtoupper(substr('0' . dechex($quotient), -2) . substr("00000000$hexstr", -8));
+ }
+ if ($value < 0) {
+ return "FF$hexstr";
+ }
+ }
+
+ return $hexstr;
+ }
+
/**
* toOctal.
*
@@ -138,11 +163,11 @@ class ConvertDecimal extends ConvertBase
}
$value = (int) floor((float) $value);
- $r = decoct($value);
- if (strlen($r) == 11) {
- // Two's Complement
- $r = substr($r, -10);
+ if ($value > self::LARGEST_OCTAL_IN_DECIMAL || $value < self::SMALLEST_OCTAL_IN_DECIMAL) {
+ return Functions::NAN();
}
+ $r = decoct($value);
+ $r = substr($r, -10);
return self::nbrConversionFormat($r, $places);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php
index 9147bf08..de1b0704 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertHex.php
@@ -42,7 +42,9 @@ class ConvertHex extends ConvertBase
return $e->getMessage();
}
- return ConvertDecimal::toBinary(self::toDecimal($value), $places);
+ $dec = self::toDecimal($value);
+
+ return ConvertDecimal::toBinary($dec, $places);
}
/**
@@ -83,10 +85,10 @@ class ConvertHex extends ConvertBase
$binX[$i] = ($binX[$i] == '1' ? '0' : '1');
}
- return (bindec($binX) + 1) * -1;
+ return (string) ((bindec($binX) + 1) * -1);
}
- return bindec($binX);
+ return (string) bindec($binX);
}
/**
@@ -129,9 +131,6 @@ class ConvertHex extends ConvertBase
}
$decimal = self::toDecimal($value);
- if ($decimal < -536870912 || $decimal > 536870911) {
- return Functions::NAN();
- }
return ConvertDecimal::toOctal($decimal, $places);
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php
index 1e8823ad..1181e2ee 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertOctal.php
@@ -85,10 +85,10 @@ class ConvertOctal extends ConvertBase
$binX[$i] = ($binX[$i] == '1' ? '0' : '1');
}
- return (bindec($binX) + 1) * -1;
+ return (string) ((bindec($binX) + 1) * -1);
}
- return bindec($binX);
+ return (string) bindec($binX);
}
/**
@@ -127,14 +127,16 @@ class ConvertOctal extends ConvertBase
return $e->getMessage();
}
- $hexVal = strtoupper(dechex((int) self::toDecimal((int) $value)));
+ $hexVal = strtoupper(dechex((int) self::toDecimal($value)));
+ $hexVal = (PHP_INT_SIZE === 4 && strlen($value) === 10 && $value[0] >= '4') ? "FF$hexVal" : $hexVal;
return self::nbrConversionFormat($hexVal, $places);
}
protected static function validateOctal(string $value): string
{
- if (strlen($value) > preg_match_all('/[01234567]/', $value)) {
+ $numDigits = (int) preg_match_all('/[01234567]/', $value);
+ if (strlen($value) > $numDigits || $numDigits > 10) {
throw new Exception(Functions::NAN());
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php
index 0aafe05e..d169ae54 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertUOM.php
@@ -490,7 +490,7 @@ class ConvertUOM
* getConversionMultipliers
* Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM().
*
- * @return array of mixed
+ * @return mixed[]
*/
public static function getConversionMultipliers()
{
@@ -501,7 +501,7 @@ class ConvertUOM
* getBinaryConversionMultipliers
* Returns an array of the additional Multiplier prefixes that can be used with Information Units of Measure in CONVERTUOM().
*
- * @return array of mixed
+ * @return mixed[]
*/
public static function getBinaryConversionMultipliers()
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/EngineeringValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/EngineeringValidations.php
new file mode 100644
index 00000000..01630af3
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/EngineeringValidations.php
@@ -0,0 +1,33 @@
+format('d') == $testDate->format('t');
- }
-
- private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next)
- {
- $months = 12 / $frequency;
-
- $result = Date::excelToDateTimeObject($maturity);
- $eom = self::isLastDayOfMonth($result);
-
- while ($settlement < Date::PHPToExcel($result)) {
- $result->modify('-' . $months . ' months');
- }
- if ($next) {
- $result->modify('+' . $months . ' months');
- }
-
- if ($eom) {
- $result->modify('-1 day');
- }
-
- return Date::PHPToExcel($result);
- }
-
- private static function isValidFrequency($frequency)
- {
- if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * daysPerYear.
- *
- * Returns the number of days in a specified year, as defined by the "basis" value
- *
- * @param int|string $year The year against which we're testing
- * @param int|string $basis The type of day count:
- * 0 or omitted US (NASD) 360
- * 1 Actual (365 or 366 in a leap year)
- * 2 360
- * 3 365
- * 4 European 360
- *
- * @return int|string Result, or a string containing an error
- */
- private static function daysPerYear($year, $basis = 0)
- {
- switch ($basis) {
- case 0:
- case 2:
- case 4:
- $daysPerYear = 360;
-
- break;
- case 3:
- $daysPerYear = 365;
-
- break;
- case 1:
- $daysPerYear = (DateTime::isLeapYear($year)) ? 366 : 365;
-
- break;
- default:
- return Functions::NAN();
- }
-
- return $daysPerYear;
- }
-
- private static function interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)
- {
- $pmt = self::PMT($rate, $nper, $pv, $fv, $type);
- $capital = $pv;
- for ($i = 1; $i <= $per; ++$i) {
- $interest = ($type && $i == 1) ? 0 : -$capital * $rate;
- $principal = $pmt - $interest;
- $capital += $principal;
- }
-
- return [$interest, $principal];
- }
-
/**
* ACCRINT.
*
* Returns the accrued interest for a security that pays periodic interest.
*
* Excel Function:
- * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis])
+ * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis][,calc_method])
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\AccruedInterest::periodic()
+ * Use the periodic() method in the Financial\Securities\AccruedInterest class instead
*
* @param mixed $issue the security's issue date
- * @param mixed $firstinterest the security's first interest date
+ * @param mixed $firstInterest the security's first interest date
* @param mixed $settlement The security's settlement date.
- * The security settlement date is the date after the issue date
- * when the security is traded to the buyer.
- * @param float $rate the security's annual coupon rate
- * @param float $par The security's par value.
- * If you omit par, ACCRINT uses $1,000.
- * @param int $frequency the number of coupon payments per year.
- * Valid frequency values are:
- * 1 Annual
- * 2 Semi-Annual
- * 4 Quarterly
- * @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * The security settlement date is the date after the issue date
+ * when the security is traded to the buyer.
+ * @param mixed $rate the security's annual coupon rate
+ * @param mixed $parValue The security's par value.
+ * If you omit par, ACCRINT uses $1,000.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ * @param mixed $calcMethod
+ * If true, use Issue to Settlement
+ * If false, use FirstInterest to Settlement
*
* @return float|string Result, or a string containing an error
*/
- public static function ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0)
- {
- $issue = Functions::flattenSingleValue($issue);
- $firstinterest = Functions::flattenSingleValue($firstinterest);
- $settlement = Functions::flattenSingleValue($settlement);
- $rate = Functions::flattenSingleValue($rate);
- $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par);
- $frequency = ($frequency === null) ? 1 : Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($rate)) && (is_numeric($par))) {
- $rate = (float) $rate;
- $par = (float) $par;
- if (($rate <= 0) || ($par <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
- if (!is_numeric($daysBetweenIssueAndSettlement)) {
- // return date error
- return $daysBetweenIssueAndSettlement;
- }
-
- return $par * $rate * $daysBetweenIssueAndSettlement;
- }
-
- return Functions::VALUE();
+ public static function ACCRINT(
+ $issue,
+ $firstInterest,
+ $settlement,
+ $rate,
+ $parValue = 1000,
+ $frequency = 1,
+ $basis = 0,
+ $calcMethod = true
+ ) {
+ return Securities\AccruedInterest::periodic(
+ $issue,
+ $firstInterest,
+ $settlement,
+ $rate,
+ $parValue,
+ $frequency,
+ $basis,
+ $calcMethod
+ );
}
/**
@@ -173,45 +87,28 @@ class Financial
* Excel Function:
* ACCRINTM(issue,settlement,rate[,par[,basis]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\AccruedInterest::atMaturity()
+ * Use the atMaturity() method in the Financial\Securities\AccruedInterest class instead
+ *
* @param mixed $issue The security's issue date
* @param mixed $settlement The security's settlement (or maturity) date
- * @param float $rate The security's annual coupon rate
- * @param float $par The security's par value.
- * If you omit par, ACCRINT uses $1,000.
- * @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * @param mixed $rate The security's annual coupon rate
+ * @param mixed $parValue The security's par value.
+ * If you omit par, ACCRINT uses $1,000.
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string Result, or a string containing an error
*/
- public static function ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0)
+ public static function ACCRINTM($issue, $settlement, $rate, $parValue = 1000, $basis = 0)
{
- $issue = Functions::flattenSingleValue($issue);
- $settlement = Functions::flattenSingleValue($settlement);
- $rate = Functions::flattenSingleValue($rate);
- $par = ($par === null) ? 1000 : Functions::flattenSingleValue($par);
- $basis = ($basis === null) ? 0 : Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($rate)) && (is_numeric($par))) {
- $rate = (float) $rate;
- $par = (float) $par;
- if (($rate <= 0) || ($par <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
- if (!is_numeric($daysBetweenIssueAndSettlement)) {
- // return date error
- return $daysBetweenIssueAndSettlement;
- }
-
- return $par * $rate * $daysBetweenIssueAndSettlement;
- }
-
- return Functions::VALUE();
+ return Securities\AccruedInterest::atMaturity($issue, $settlement, $rate, $parValue, $basis);
}
/**
@@ -229,6 +126,11 @@ class Financial
* Excel Function:
* AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Amortization::AMORDEGRC()
+ * Use the AMORDEGRC() method in the Financial\Amortization class instead
+ *
* @param float $cost The cost of the asset
* @param mixed $purchased Date of the purchase of the asset
* @param mixed $firstPeriod Date of the end of the first period
@@ -236,67 +138,17 @@ class Financial
* @param float $period The period
* @param float $rate Rate of depreciation
* @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string (string containing the error type if there is an error)
*/
public static function AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)
{
- $cost = Functions::flattenSingleValue($cost);
- $purchased = Functions::flattenSingleValue($purchased);
- $firstPeriod = Functions::flattenSingleValue($firstPeriod);
- $salvage = Functions::flattenSingleValue($salvage);
- $period = floor(Functions::flattenSingleValue($period));
- $rate = Functions::flattenSingleValue($rate);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
- $yearFrac = DateTime::YEARFRAC($purchased, $firstPeriod, $basis);
- if (is_string($yearFrac)) {
- return $yearFrac;
- }
-
- // The depreciation coefficients are:
- // Life of assets (1/rate) Depreciation coefficient
- // Less than 3 years 1
- // Between 3 and 4 years 1.5
- // Between 5 and 6 years 2
- // More than 6 years 2.5
- $fUsePer = 1.0 / $rate;
- if ($fUsePer < 3.0) {
- $amortiseCoeff = 1.0;
- } elseif ($fUsePer < 5.0) {
- $amortiseCoeff = 1.5;
- } elseif ($fUsePer <= 6.0) {
- $amortiseCoeff = 2.0;
- } else {
- $amortiseCoeff = 2.5;
- }
-
- $rate *= $amortiseCoeff;
- $fNRate = round($yearFrac * $rate * $cost, 0);
- $cost -= $fNRate;
- $fRest = $cost - $salvage;
-
- for ($n = 0; $n < $period; ++$n) {
- $fNRate = round($rate * $cost, 0);
- $fRest -= $fNRate;
-
- if ($fRest < 0.0) {
- switch ($period - $n) {
- case 0:
- case 1:
- return round($cost * 0.5, 0);
- default:
- return 0.0;
- }
- }
- $cost -= $fNRate;
- }
-
- return $fNRate;
+ return Amortization::AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis);
}
/**
@@ -309,6 +161,11 @@ class Financial
* Excel Function:
* AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Amortization::AMORLINC()
+ * Use the AMORLINC() method in the Financial\Amortization class instead
+ *
* @param float $cost The cost of the asset
* @param mixed $purchased Date of the purchase of the asset
* @param mixed $firstPeriod Date of the end of the first period
@@ -316,49 +173,17 @@ class Financial
* @param float $period The period
* @param float $rate Rate of depreciation
* @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string (string containing the error type if there is an error)
*/
public static function AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0)
{
- $cost = Functions::flattenSingleValue($cost);
- $purchased = Functions::flattenSingleValue($purchased);
- $firstPeriod = Functions::flattenSingleValue($firstPeriod);
- $salvage = Functions::flattenSingleValue($salvage);
- $period = Functions::flattenSingleValue($period);
- $rate = Functions::flattenSingleValue($rate);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- $fOneRate = $cost * $rate;
- $fCostDelta = $cost - $salvage;
- // Note, quirky variation for leap years on the YEARFRAC for this function
- $purchasedYear = DateTime::YEAR($purchased);
- $yearFrac = DateTime::YEARFRAC($purchased, $firstPeriod, $basis);
- if (is_string($yearFrac)) {
- return $yearFrac;
- }
-
- if (($basis == 1) && ($yearFrac < 1) && (DateTime::isLeapYear($purchasedYear))) {
- $yearFrac *= 365 / 366;
- }
-
- $f0Rate = $yearFrac * $rate * $cost;
- $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate);
-
- if ($period == 0) {
- return $f0Rate;
- } elseif ($period <= $nNumOfFullPeriods) {
- return $fOneRate;
- } elseif ($period == ($nNumOfFullPeriods + 1)) {
- return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate;
- }
-
- return 0.0;
+ return Amortization::AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis);
}
/**
@@ -369,6 +194,11 @@ class Financial
* Excel Function:
* COUPDAYBS(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPDAYBS()
+ * Use the COUPDAYBS() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -390,34 +220,7 @@ class Financial
*/
public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
- $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
-
- if ($basis == 1) {
- return abs(DateTime::DAYS($prev, $settlement));
- }
-
- return DateTime::YEARFRAC($prev, $settlement, $basis) * $daysPerYear;
+ return Coupons::COUPDAYBS($settlement, $maturity, $frequency, $basis);
}
/**
@@ -428,6 +231,11 @@ class Financial
* Excel Function:
* COUPDAYS(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPDAYS()
+ * Use the COUPDAYS() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -449,45 +257,7 @@ class Financial
*/
public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- switch ($basis) {
- case 3:
- // Actual/365
- return 365 / $frequency;
- case 1:
- // Actual/actual
- if ($frequency == 1) {
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
-
- return $daysPerYear / $frequency;
- }
- $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
- $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
-
- return $next - $prev;
- default:
- // US (NASD) 30/360, Actual/360 or European 30/360
- return 360 / $frequency;
- }
+ return Coupons::COUPDAYS($settlement, $maturity, $frequency, $basis);
}
/**
@@ -498,6 +268,11 @@ class Financial
* Excel Function:
* COUPDAYSNC(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPDAYSNC()
+ * Use the COUPDAYSNC() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -519,30 +294,7 @@ class Financial
*/
public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
- $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
-
- return DateTime::YEARFRAC($settlement, $next, $basis) * $daysPerYear;
+ return Coupons::COUPDAYSNC($settlement, $maturity, $frequency, $basis);
}
/**
@@ -553,6 +305,11 @@ class Financial
* Excel Function:
* COUPNCD(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPNCD()
+ * Use the COUPNCD() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -575,27 +332,7 @@ class Financial
*/
public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
+ return Coupons::COUPNCD($settlement, $maturity, $frequency, $basis);
}
/**
@@ -607,6 +344,11 @@ class Financial
* Excel Function:
* COUPNUM(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPNUM()
+ * Use the COUPNUM() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -628,29 +370,7 @@ class Financial
*/
public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- $yearsBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, 0);
-
- return ceil($yearsBetweenSettlementAndMaturity * $frequency);
+ return Coupons::COUPNUM($settlement, $maturity, $frequency, $basis);
}
/**
@@ -661,6 +381,11 @@ class Financial
* Excel Function:
* COUPPCD(settlement,maturity,frequency[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Coupons::COUPPCD()
+ * Use the COUPPCD() method in the Financial\Coupons class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -683,27 +408,7 @@ class Financial
*/
public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $frequency = (int) Functions::flattenSingleValue($frequency);
- $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);
-
- if (is_string($settlement = DateTime::getDateValue($settlement))) {
- return Functions::VALUE();
- }
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (
- ($settlement >= $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- return self::couponFirstPeriodDate($settlement, $maturity, $frequency, false);
+ return Coupons::COUPPCD($settlement, $maturity, $frequency, $basis);
}
/**
@@ -714,47 +419,26 @@ class Financial
* Excel Function:
* CUMIPMT(rate,nper,pv,start,end[,type])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Cumulative::interest()
+ * Use the interest() method in the Financial\CashFlow\Constant\Periodic\Cumulative class instead
+ *
* @param float $rate The Interest rate
* @param int $nper The total number of payment periods
* @param float $pv Present Value
* @param int $start The first period in the calculation.
- * Payment periods are numbered beginning with 1.
+ * Payment periods are numbered beginning with 1.
* @param int $end the last period in the calculation
* @param int $type A number 0 or 1 and indicates when payments are due:
- * 0 or omitted At the end of the period.
- * 1 At the beginning of the period.
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
*
* @return float|string
*/
public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $nper = (int) Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $start = (int) Functions::flattenSingleValue($start);
- $end = (int) Functions::flattenSingleValue($end);
- $type = (int) Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
- if ($start < 1 || $start > $end) {
- return Functions::VALUE();
- }
-
- // Calculate
- $interest = 0;
- for ($per = $start; $per <= $end; ++$per) {
- $ipmt = self::IPMT($rate, $per, $nper, $pv, 0, $type);
- if (is_string($ipmt)) {
- return $ipmt;
- }
-
- $interest += $ipmt;
- }
-
- return $interest;
+ return Financial\CashFlow\Constant\Periodic\Cumulative::interest($rate, $nper, $pv, $start, $end, $type);
}
/**
@@ -765,47 +449,26 @@ class Financial
* Excel Function:
* CUMPRINC(rate,nper,pv,start,end[,type])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Cumulative::principal()
+ * Use the principal() method in the Financial\CashFlow\Constant\Periodic\Cumulative class instead
+ *
* @param float $rate The Interest rate
* @param int $nper The total number of payment periods
* @param float $pv Present Value
* @param int $start The first period in the calculation.
- * Payment periods are numbered beginning with 1.
+ * Payment periods are numbered beginning with 1.
* @param int $end the last period in the calculation
* @param int $type A number 0 or 1 and indicates when payments are due:
- * 0 or omitted At the end of the period.
- * 1 At the beginning of the period.
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
*
* @return float|string
*/
public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $nper = (int) Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $start = (int) Functions::flattenSingleValue($start);
- $end = (int) Functions::flattenSingleValue($end);
- $type = (int) Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
- if ($start < 1 || $start > $end) {
- return Functions::VALUE();
- }
-
- // Calculate
- $principal = 0;
- for ($per = $start; $per <= $end; ++$per) {
- $ppmt = self::PPMT($rate, $per, $nper, $pv, 0, $type);
- if (is_string($ppmt)) {
- return $ppmt;
- }
-
- $principal += $ppmt;
- }
-
- return $principal;
+ return Financial\CashFlow\Constant\Periodic\Cumulative::principal($rate, $nper, $pv, $start, $end, $type);
}
/**
@@ -821,6 +484,11 @@ class Financial
* Excel Function:
* DB(cost,salvage,life,period[,month])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Depreciation::DB()
+ * Use the DB() method in the Financial\Depreciation class instead
+ *
* @param float $cost Initial cost of the asset
* @param float $salvage Value at the end of the depreciation.
* (Sometimes called the salvage value of the asset)
@@ -835,46 +503,7 @@ class Financial
*/
public static function DB($cost, $salvage, $life, $period, $month = 12)
{
- $cost = Functions::flattenSingleValue($cost);
- $salvage = Functions::flattenSingleValue($salvage);
- $life = Functions::flattenSingleValue($life);
- $period = Functions::flattenSingleValue($period);
- $month = Functions::flattenSingleValue($month);
-
- // Validate
- if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($month))) {
- $cost = (float) $cost;
- $salvage = (float) $salvage;
- $life = (int) $life;
- $period = (int) $period;
- $month = (int) $month;
- if ($cost == 0) {
- return 0.0;
- } elseif (($cost < 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($month < 1)) {
- return Functions::NAN();
- }
- // Set Fixed Depreciation Rate
- $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);
- $fixedDepreciationRate = round($fixedDepreciationRate, 3);
-
- // Loop through each period calculating the depreciation
- $previousDepreciation = 0;
- $depreciation = 0;
- for ($per = 1; $per <= $period; ++$per) {
- if ($per == 1) {
- $depreciation = $cost * $fixedDepreciationRate * $month / 12;
- } elseif ($per == ($life + 1)) {
- $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12;
- } else {
- $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate;
- }
- $previousDepreciation += $depreciation;
- }
-
- return $depreciation;
- }
-
- return Functions::VALUE();
+ return Depreciation::DB($cost, $salvage, $life, $period, $month);
}
/**
@@ -886,6 +515,11 @@ class Financial
* Excel Function:
* DDB(cost,salvage,life,period[,factor])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Depreciation::DDB()
+ * Use the DDB() method in the Financial\Depreciation class instead
+ *
* @param float $cost Initial cost of the asset
* @param float $salvage Value at the end of the depreciation.
* (Sometimes called the salvage value of the asset)
@@ -901,38 +535,7 @@ class Financial
*/
public static function DDB($cost, $salvage, $life, $period, $factor = 2.0)
{
- $cost = Functions::flattenSingleValue($cost);
- $salvage = Functions::flattenSingleValue($salvage);
- $life = Functions::flattenSingleValue($life);
- $period = Functions::flattenSingleValue($period);
- $factor = Functions::flattenSingleValue($factor);
-
- // Validate
- if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($factor))) {
- $cost = (float) $cost;
- $salvage = (float) $salvage;
- $life = (int) $life;
- $period = (int) $period;
- $factor = (float) $factor;
- if (($cost <= 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($factor <= 0.0) || ($period > $life)) {
- return Functions::NAN();
- }
- // Set Fixed Depreciation Rate
- $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);
- $fixedDepreciationRate = round($fixedDepreciationRate, 3);
-
- // Loop through each period calculating the depreciation
- $previousDepreciation = 0;
- $depreciation = 0;
- for ($per = 1; $per <= $period; ++$per) {
- $depreciation = min(($cost - $previousDepreciation) * ($factor / $life), ($cost - $salvage - $previousDepreciation));
- $previousDepreciation += $depreciation;
- }
-
- return $depreciation;
- }
-
- return Functions::VALUE();
+ return Depreciation::DDB($cost, $salvage, $life, $period, $factor);
}
/**
@@ -943,6 +546,11 @@ class Financial
* Excel Function:
* DISC(settlement,maturity,price,redemption[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Rates::discount()
+ * Use the discount() method in the Financial\Securities\Rates class instead
+ *
* @param mixed $settlement The security's settlement date.
* The security settlement date is the date after the issue
* date when the security is traded to the buyer.
@@ -961,30 +569,7 @@ class Financial
*/
public static function DISC($settlement, $maturity, $price, $redemption, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $price = Functions::flattenSingleValue($price);
- $redemption = Functions::flattenSingleValue($redemption);
- $basis = Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($price)) && (is_numeric($redemption)) && (is_numeric($basis))) {
- $price = (float) $price;
- $redemption = (float) $redemption;
- $basis = (int) $basis;
- if (($price <= 0) || ($redemption <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
-
- return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity;
- }
-
- return Functions::VALUE();
+ return Financial\Securities\Rates::discount($settlement, $maturity, $price, $redemption, $basis);
}
/**
@@ -997,6 +582,11 @@ class Financial
* Excel Function:
* DOLLARDE(fractional_dollar,fraction)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Dollar::decimal()
+ * Use the decimal() method in the Financial\Dollar class instead
+ *
* @param float $fractional_dollar Fractional Dollar
* @param int $fraction Fraction
*
@@ -1004,23 +594,7 @@ class Financial
*/
public static function DOLLARDE($fractional_dollar = null, $fraction = 0)
{
- $fractional_dollar = Functions::flattenSingleValue($fractional_dollar);
- $fraction = (int) Functions::flattenSingleValue($fraction);
-
- // Validate parameters
- if ($fractional_dollar === null || $fraction < 0) {
- return Functions::NAN();
- }
- if ($fraction == 0) {
- return Functions::DIV0();
- }
-
- $dollars = floor($fractional_dollar);
- $cents = fmod($fractional_dollar, 1);
- $cents /= $fraction;
- $cents *= 10 ** ceil(log10($fraction));
-
- return $dollars + $cents;
+ return Dollar::decimal($fractional_dollar, $fraction);
}
/**
@@ -1033,6 +607,11 @@ class Financial
* Excel Function:
* DOLLARFR(decimal_dollar,fraction)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Dollar::fractional()
+ * Use the fractional() method in the Financial\Dollar class instead
+ *
* @param float $decimal_dollar Decimal Dollar
* @param int $fraction Fraction
*
@@ -1040,23 +619,7 @@ class Financial
*/
public static function DOLLARFR($decimal_dollar = null, $fraction = 0)
{
- $decimal_dollar = Functions::flattenSingleValue($decimal_dollar);
- $fraction = (int) Functions::flattenSingleValue($fraction);
-
- // Validate parameters
- if ($decimal_dollar === null || $fraction < 0) {
- return Functions::NAN();
- }
- if ($fraction == 0) {
- return Functions::DIV0();
- }
-
- $dollars = floor($decimal_dollar);
- $cents = fmod($decimal_dollar, 1);
- $cents *= $fraction;
- $cents *= 10 ** (-ceil(log10($fraction)));
-
- return $dollars + $cents;
+ return Dollar::fractional($decimal_dollar, $fraction);
}
/**
@@ -1068,22 +631,19 @@ class Financial
* Excel Function:
* EFFECT(nominal_rate,npery)
*
- * @param float $nominal_rate Nominal interest rate
- * @param int $npery Number of compounding payments per year
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\InterestRate::effective()
+ * Use the effective() method in the Financial\InterestRate class instead
+ *
+ * @param float $nominalRate Nominal interest rate
+ * @param int $periodsPerYear Number of compounding payments per year
*
* @return float|string
*/
- public static function EFFECT($nominal_rate = 0, $npery = 0)
+ public static function EFFECT($nominalRate = 0, $periodsPerYear = 0)
{
- $nominal_rate = Functions::flattenSingleValue($nominal_rate);
- $npery = (int) Functions::flattenSingleValue($npery);
-
- // Validate parameters
- if ($nominal_rate <= 0 || $npery < 1) {
- return Functions::NAN();
- }
-
- return (1 + $nominal_rate / $npery) ** $npery - 1;
+ return Financial\InterestRate::effective($nominalRate, $periodsPerYear);
}
/**
@@ -1094,6 +654,11 @@ class Financial
* Excel Function:
* FV(rate,nper,pmt[,pv[,type]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic::futureValue()
+ * Use the futureValue() method in the Financial\CashFlow\Constant\Periodic class instead
+ *
* @param float $rate The interest rate per period
* @param int $nper Total number of payment periods in an annuity
* @param float $pmt The payment made each period: it cannot change over the
@@ -1109,23 +674,7 @@ class Financial
*/
public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $nper = Functions::flattenSingleValue($nper);
- $pmt = Functions::flattenSingleValue($pmt);
- $pv = Functions::flattenSingleValue($pv);
- $type = Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
-
- // Calculate
- if ($rate !== null && $rate != 0) {
- return -$pv * (1 + $rate) ** $nper - $pmt * (1 + $rate * $type) * ((1 + $rate) ** $nper - 1) / $rate;
- }
-
- return -$pv - $pmt * $nper;
+ return Financial\CashFlow\Constant\Periodic::futureValue($rate, $nper, $pmt, $pv, $type);
}
/**
@@ -1137,21 +686,19 @@ class Financial
* Excel Function:
* FVSCHEDULE(principal,schedule)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Single::futureValue()
+ * Use the futureValue() method in the Financial\CashFlow\Single class instead
+ *
* @param float $principal the present value
* @param float[] $schedule an array of interest rates to apply
*
- * @return float
+ * @return float|string
*/
public static function FVSCHEDULE($principal, $schedule)
{
- $principal = Functions::flattenSingleValue($principal);
- $schedule = Functions::flattenArray($schedule);
-
- foreach ($schedule as $rate) {
- $principal *= 1 + $rate;
- }
-
- return $principal;
+ return Financial\CashFlow\Single::futureValue($principal, $schedule);
}
/**
@@ -1162,57 +709,46 @@ class Financial
* Excel Function:
* INTRATE(settlement,maturity,investment,redemption[,basis])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Rates::interest()
+ * Use the interest() method in the Financial\Securities\Rates class instead
+ *
* @param mixed $settlement The security's settlement date.
- * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
+ * The maturity date is the date when the security expires.
* @param int $investment the amount invested in the security
* @param int $redemption the amount to be received at maturity
* @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string
*/
public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $investment = Functions::flattenSingleValue($investment);
- $redemption = Functions::flattenSingleValue($redemption);
- $basis = Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($investment)) && (is_numeric($redemption)) && (is_numeric($basis))) {
- $investment = (float) $investment;
- $redemption = (float) $redemption;
- $basis = (int) $basis;
- if (($investment <= 0) || ($redemption <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
-
- return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity);
- }
-
- return Functions::VALUE();
+ return Financial\Securities\Rates::interest($settlement, $maturity, $investment, $redemption, $basis);
}
/**
* IPMT.
*
- * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
+ * Returns the interest payment for a given period for an investment based on periodic, constant payments
+ * and a constant interest rate.
*
* Excel Function:
* IPMT(rate,per,nper,pv[,fv][,type])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Interest::payment()
+ * Use the payment() method in the Financial\CashFlow\Constant\Periodic class instead
+ *
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
* @param int $nper Number of periods
@@ -1224,25 +760,7 @@ class Financial
*/
public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $per = (int) Functions::flattenSingleValue($per);
- $nper = (int) Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
- $type = (int) Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
- if ($per <= 0 || $per > $nper) {
- return Functions::NAN();
- }
-
- // Calculate
- $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type);
-
- return $interestAndPrincipal[0];
+ return Financial\CashFlow\Constant\Periodic\Interest::payment($rate, $per, $nper, $pv, $fv, $type);
}
/**
@@ -1257,63 +775,22 @@ class Financial
* Excel Function:
* IRR(values[,guess])
*
- * @param float[] $values An array or a reference to cells that contain numbers for which you want
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Variable\Periodic::rate()
+ * Use the rate() method in the Financial\CashFlow\Variable\Periodic class instead
+ *
+ * @param mixed $values An array or a reference to cells that contain numbers for which you want
* to calculate the internal rate of return.
* Values must contain at least one positive value and one negative value to
* calculate the internal rate of return.
- * @param float $guess A number that you guess is close to the result of IRR
+ * @param mixed $guess A number that you guess is close to the result of IRR
*
* @return float|string
*/
public static function IRR($values, $guess = 0.1)
{
- if (!is_array($values)) {
- return Functions::VALUE();
- }
- $values = Functions::flattenArray($values);
- $guess = Functions::flattenSingleValue($guess);
-
- // create an initial range, with a root somewhere between 0 and guess
- $x1 = 0.0;
- $x2 = $guess;
- $f1 = self::NPV($x1, $values);
- $f2 = self::NPV($x2, $values);
- for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
- if (($f1 * $f2) < 0.0) {
- break;
- }
- if (abs($f1) < abs($f2)) {
- $f1 = self::NPV($x1 += 1.6 * ($x1 - $x2), $values);
- } else {
- $f2 = self::NPV($x2 += 1.6 * ($x2 - $x1), $values);
- }
- }
- if (($f1 * $f2) > 0.0) {
- return Functions::VALUE();
- }
-
- $f = self::NPV($x1, $values);
- if ($f < 0.0) {
- $rtb = $x1;
- $dx = $x2 - $x1;
- } else {
- $rtb = $x2;
- $dx = $x1 - $x2;
- }
-
- for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
- $dx *= 0.5;
- $x_mid = $rtb + $dx;
- $f_mid = self::NPV($x_mid, $values);
- if ($f_mid <= 0.0) {
- $rtb = $x_mid;
- }
- if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
- return $x_mid;
- }
- }
-
- return Functions::VALUE();
+ return Financial\CashFlow\Variable\Periodic::rate($values, $guess);
}
/**
@@ -1322,7 +799,12 @@ class Financial
* Returns the interest payment for an investment based on an interest rate and a constant payment schedule.
*
* Excel Function:
- * =ISPMT(interest_rate, period, number_payments, PV)
+ * =ISPMT(interest_rate, period, number_payments, pv)
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Interest::schedulePayment()
+ * Use the schedulePayment() method in the Financial\CashFlow\Constant\Periodic class instead
*
* interest_rate is the interest rate for the investment
*
@@ -1330,32 +812,11 @@ class Financial
*
* number_payments is the number of payments for the annuity
*
- * PV is the loan amount or present value of the payments
+ * pv is the loan amount or present value of the payments
*/
public static function ISPMT(...$args)
{
- // Return value
- $returnValue = 0;
-
- // Get the parameters
- $aArgs = Functions::flattenArray($args);
- $interestRate = array_shift($aArgs);
- $period = array_shift($aArgs);
- $numberPeriods = array_shift($aArgs);
- $principleRemaining = array_shift($aArgs);
-
- // Calculate
- $principlePayment = ($principleRemaining * 1.0) / ($numberPeriods * 1.0);
- for ($i = 0; $i <= $period; ++$i) {
- $returnValue = $interestRate * $principleRemaining * -1;
- $principleRemaining -= $principlePayment;
- // principle needs to be 0 after the last payment, don't let floating point screw it up
- if ($i == $numberPeriods) {
- $returnValue = 0;
- }
- }
-
- return $returnValue;
+ return Financial\CashFlow\Constant\Periodic\Interest::schedulePayment(...$args);
}
/**
@@ -1367,44 +828,22 @@ class Financial
* Excel Function:
* MIRR(values,finance_rate, reinvestment_rate)
*
- * @param float[] $values An array or a reference to cells that contain a series of payments and
- * income occurring at regular intervals.
- * Payments are negative value, income is positive values.
- * @param float $finance_rate The interest rate you pay on the money used in the cash flows
- * @param float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Variable\Periodic::modifiedRate()
+ * Use the modifiedRate() method in the Financial\CashFlow\Variable\Periodic class instead
+ *
+ * @param mixed $values An array or a reference to cells that contain a series of payments and
+ * income occurring at regular intervals.
+ * Payments are negative value, income is positive values.
+ * @param mixed $finance_rate The interest rate you pay on the money used in the cash flows
+ * @param mixed $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them
*
* @return float|string Result, or a string containing an error
*/
public static function MIRR($values, $finance_rate, $reinvestment_rate)
{
- if (!is_array($values)) {
- return Functions::VALUE();
- }
- $values = Functions::flattenArray($values);
- $finance_rate = Functions::flattenSingleValue($finance_rate);
- $reinvestment_rate = Functions::flattenSingleValue($reinvestment_rate);
- $n = count($values);
-
- $rr = 1.0 + $reinvestment_rate;
- $fr = 1.0 + $finance_rate;
-
- $npv_pos = $npv_neg = 0.0;
- foreach ($values as $i => $v) {
- if ($v >= 0) {
- $npv_pos += $v / $rr ** $i;
- } else {
- $npv_neg += $v / $fr ** $i;
- }
- }
-
- if (($npv_neg == 0) || ($npv_pos == 0) || ($reinvestment_rate <= -1)) {
- return Functions::VALUE();
- }
-
- $mirr = ((-$npv_pos * $rr ** $n)
- / ($npv_neg * ($rr))) ** (1.0 / ($n - 1)) - 1.0;
-
- return is_finite($mirr) ? $mirr : Functions::VALUE();
+ return Financial\CashFlow\Variable\Periodic::modifiedRate($values, $finance_rate, $reinvestment_rate);
}
/**
@@ -1412,23 +851,22 @@ class Financial
*
* Returns the nominal interest rate given the effective rate and the number of compounding payments per year.
*
- * @param float $effect_rate Effective interest rate
- * @param int $npery Number of compounding payments per year
+ * Excel Function:
+ * NOMINAL(effect_rate, npery)
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\InterestRate::nominal()
+ * Use the nominal() method in the Financial\InterestRate class instead
+ *
+ * @param float $effectiveRate Effective interest rate
+ * @param int $periodsPerYear Number of compounding payments per year
*
* @return float|string Result, or a string containing an error
*/
- public static function NOMINAL($effect_rate = 0, $npery = 0)
+ public static function NOMINAL($effectiveRate = 0, $periodsPerYear = 0)
{
- $effect_rate = Functions::flattenSingleValue($effect_rate);
- $npery = (int) Functions::flattenSingleValue($npery);
-
- // Validate parameters
- if ($effect_rate <= 0 || $npery < 1) {
- return Functions::NAN();
- }
-
- // Calculate
- return $npery * (($effect_rate + 1) ** (1 / $npery) - 1);
+ return InterestRate::nominal($effectiveRate, $periodsPerYear);
}
/**
@@ -1436,6 +874,8 @@ class Financial
*
* Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.
*
+ * @Deprecated 1.18.0
+ *
* @param float $rate Interest rate per period
* @param int $pmt Periodic payment (annuity)
* @param float $pv Present Value
@@ -1443,33 +883,13 @@ class Financial
* @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
*
* @return float|string Result, or a string containing an error
+ *
+ *@see Financial\CashFlow\Constant\Periodic::periods()
+ * Use the periods() method in the Financial\CashFlow\Constant\Periodic class instead
*/
public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $pmt = Functions::flattenSingleValue($pmt);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
- $type = Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
-
- // Calculate
- if ($rate !== null && $rate != 0) {
- if ($pmt == 0 && $pv == 0) {
- return Functions::NAN();
- }
-
- return log(($pmt * (1 + $rate * $type) / $rate - $fv) / ($pv + $pmt * (1 + $rate * $type) / $rate)) / log(1 + $rate);
- }
- if ($pmt == 0) {
- return Functions::NAN();
- }
-
- return (-$pv - $fv) / $pmt;
+ return Financial\CashFlow\Constant\Periodic::periods($rate, $pmt, $pv, $fv, $type);
}
/**
@@ -1477,28 +897,16 @@ class Financial
*
* Returns the Net Present Value of a cash flow series given a discount rate.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Variable\Periodic::presentValue()
+ * Use the presentValue() method in the Financial\CashFlow\Variable\Periodic class instead
+ *
* @return float
*/
public static function NPV(...$args)
{
- // Return value
- $returnValue = 0;
-
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
-
- // Calculate
- $rate = array_shift($aArgs);
- $countArgs = count($aArgs);
- for ($i = 1; $i <= $countArgs; ++$i) {
- // Is it a numeric value?
- if (is_numeric($aArgs[$i - 1])) {
- $returnValue += $aArgs[$i - 1] / (1 + $rate) ** $i;
- }
- }
-
- // Return
- return $returnValue;
+ return Financial\CashFlow\Variable\Periodic::presentValue(...$args);
}
/**
@@ -1506,6 +914,11 @@ class Financial
*
* Calculates the number of periods required for an investment to reach a specified value.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Single::periods()
+ * Use the periods() method in the Financial\CashFlow\Single class instead
+ *
* @param float $rate Interest rate per period
* @param float $pv Present Value
* @param float $fv Future Value
@@ -1514,18 +927,7 @@ class Financial
*/
public static function PDURATION($rate = 0, $pv = 0, $fv = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
-
- // Validate parameters
- if (!is_numeric($rate) || !is_numeric($pv) || !is_numeric($fv)) {
- return Functions::VALUE();
- } elseif ($rate <= 0.0 || $pv <= 0.0 || $fv <= 0.0) {
- return Functions::NAN();
- }
-
- return (log($fv) - log($pv)) / log(1 + $rate);
+ return Financial\CashFlow\Single::periods($rate, $pv, $fv);
}
/**
@@ -1533,6 +935,11 @@ class Financial
*
* Returns the constant payment (annuity) for a cash flow with a constant interest rate.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Payments::annuity()
+ * Use the annuity() method in the Financial\CashFlow\Constant\Periodic\Payments class instead
+ *
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pv Present Value
@@ -1543,29 +950,19 @@ class Financial
*/
public static function PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $nper = Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
- $type = Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
-
- // Calculate
- if ($rate !== null && $rate != 0) {
- return (-$fv - $pv * (1 + $rate) ** $nper) / (1 + $rate * $type) / (((1 + $rate) ** $nper - 1) / $rate);
- }
-
- return (-$pv - $fv) / $nper;
+ return Financial\CashFlow\Constant\Periodic\Payments::annuity($rate, $nper, $pv, $fv, $type);
}
/**
* PPMT.
*
- * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate.
+ * Returns the interest payment for a given period for an investment based on periodic, constant payments
+ * and a constant interest rate.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Payments::interestPayment()
+ * Use the interestPayment() method in the Financial\CashFlow\Constant\Periodic\Payments class instead
*
* @param float $rate Interest rate per period
* @param int $per Period for which we want to find the interest
@@ -1578,100 +975,43 @@ class Financial
*/
public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $per = (int) Functions::flattenSingleValue($per);
- $nper = (int) Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
- $type = (int) Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
- if ($per <= 0 || $per > $nper) {
- return Functions::NAN();
- }
-
- // Calculate
- $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type);
-
- return $interestAndPrincipal[1];
- }
-
- private static function validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis)
- {
- if (is_string($settlement)) {
- return Functions::VALUE();
- }
- if (is_string($maturity)) {
- return Functions::VALUE();
- }
- if (!is_numeric($rate)) {
- return Functions::VALUE();
- }
- if (!is_numeric($yield)) {
- return Functions::VALUE();
- }
- if (!is_numeric($redemption)) {
- return Functions::VALUE();
- }
- if (!is_numeric($frequency)) {
- return Functions::VALUE();
- }
- if (!is_numeric($basis)) {
- return Functions::VALUE();
- }
-
- return '';
+ return Financial\CashFlow\Constant\Periodic\Payments::interestPayment($rate, $per, $nper, $pv, $fv, $type);
}
+ /**
+ * PRICE.
+ *
+ * Returns the price per $100 face value of a security that pays periodic interest.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Price::price()
+ * Use the price() method in the Financial\Securities\Price class instead
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param float $rate the security's annual coupon rate
+ * @param float $yield the security's annual yield
+ * @param float $redemption The number of coupon payments per year.
+ * For annual payments, frequency = 1;
+ * for semiannual, frequency = 2;
+ * for quarterly, frequency = 4.
+ * @param int $frequency
+ * @param int $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $rate = Functions::flattenSingleValue($rate);
- $yield = Functions::flattenSingleValue($yield);
- $redemption = Functions::flattenSingleValue($redemption);
- $frequency = Functions::flattenSingleValue($frequency);
- $basis = Functions::flattenSingleValue($basis);
-
- $settlement = DateTime::getDateValue($settlement);
- $maturity = DateTime::getDateValue($maturity);
- $rslt = self::validatePrice($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
- if ($rslt) {
- return $rslt;
- }
- $rate = (float) $rate;
- $yield = (float) $yield;
- $redemption = (float) $redemption;
- $frequency = (int) $frequency;
- $basis = (int) $basis;
-
- if (
- ($settlement > $maturity) ||
- (!self::isValidFrequency($frequency)) ||
- (($basis < 0) || ($basis > 4))
- ) {
- return Functions::NAN();
- }
-
- $dsc = self::COUPDAYSNC($settlement, $maturity, $frequency, $basis);
- $e = self::COUPDAYS($settlement, $maturity, $frequency, $basis);
- $n = self::COUPNUM($settlement, $maturity, $frequency, $basis);
- $a = self::COUPDAYBS($settlement, $maturity, $frequency, $basis);
-
- $baseYF = 1.0 + ($yield / $frequency);
- $rfp = 100 * ($rate / $frequency);
- $de = $dsc / $e;
-
- $result = $redemption / $baseYF ** (--$n + $de);
- for ($k = 0; $k <= $n; ++$k) {
- $result += $rfp / ($baseYF ** ($k + $de));
- }
- $result -= $rfp * ($a / $e);
-
- return $result;
+ return Securities\Price::price($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis);
}
/**
@@ -1679,10 +1019,16 @@ class Financial
*
* Returns the price per $100 face value of a discounted security.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Price::priceDiscounted()
+ * Use the priceDiscounted() method in the Financial\Securities\Price class instead
+ *
* @param mixed $settlement The security's settlement date.
- * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
+ * The maturity date is the date when the security expires.
* @param int $discount The security's discount rate
* @param int $redemption The security's redemption value per $100 face value
* @param int $basis The type of day count to use.
@@ -1696,27 +1042,7 @@ class Financial
*/
public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $discount = (float) Functions::flattenSingleValue($discount);
- $redemption = (float) Functions::flattenSingleValue($redemption);
- $basis = (int) Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($discount)) && (is_numeric($redemption)) && (is_numeric($basis))) {
- if (($discount <= 0) || ($redemption <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
-
- return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity);
- }
-
- return Functions::VALUE();
+ return Securities\Price::priceDiscounted($settlement, $maturity, $discount, $redemption, $basis);
}
/**
@@ -1724,10 +1050,16 @@ class Financial
*
* Returns the price per $100 face value of a security that pays interest at maturity.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Price::priceAtMaturity()
+ * Use the priceAtMaturity() method in the Financial\Securities\Price class instead
+ *
* @param mixed $settlement The security's settlement date.
- * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security's settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
+ * The maturity date is the date when the security expires.
* @param mixed $issue The security's issue date
* @param int $rate The security's interest rate at date of issue
* @param int $yield The security's annual yield
@@ -1742,47 +1074,7 @@ class Financial
*/
public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $issue = Functions::flattenSingleValue($issue);
- $rate = Functions::flattenSingleValue($rate);
- $yield = Functions::flattenSingleValue($yield);
- $basis = (int) Functions::flattenSingleValue($basis);
-
- // Validate
- if (is_numeric($rate) && is_numeric($yield)) {
- if (($rate <= 0) || ($yield <= 0)) {
- return Functions::NAN();
- }
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
- if (!is_numeric($daysPerYear)) {
- return $daysPerYear;
- }
- $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
- if (!is_numeric($daysBetweenIssueAndSettlement)) {
- // return date error
- return $daysBetweenIssueAndSettlement;
- }
- $daysBetweenIssueAndSettlement *= $daysPerYear;
- $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis);
- if (!is_numeric($daysBetweenIssueAndMaturity)) {
- // return date error
- return $daysBetweenIssueAndMaturity;
- }
- $daysBetweenIssueAndMaturity *= $daysPerYear;
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
- $daysBetweenSettlementAndMaturity *= $daysPerYear;
-
- return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) /
- (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) -
- (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100);
- }
-
- return Functions::VALUE();
+ return Securities\Price::priceAtMaturity($settlement, $maturity, $issue, $rate, $yield, $basis);
}
/**
@@ -1790,6 +1082,11 @@ class Financial
*
* Returns the Present Value of a cash flow with constant payments and interest rate (annuities).
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic::presentValue()
+ * Use the presentValue() method in the Financial\CashFlow\Constant\Periodic class instead
+ *
* @param float $rate Interest rate per period
* @param int $nper Number of periods
* @param float $pmt Periodic payment (annuity)
@@ -1800,23 +1097,7 @@ class Financial
*/
public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0)
{
- $rate = Functions::flattenSingleValue($rate);
- $nper = Functions::flattenSingleValue($nper);
- $pmt = Functions::flattenSingleValue($pmt);
- $fv = Functions::flattenSingleValue($fv);
- $type = Functions::flattenSingleValue($type);
-
- // Validate parameters
- if ($type != 0 && $type != 1) {
- return Functions::NAN();
- }
-
- // Calculate
- if ($rate !== null && $rate != 0) {
- return (-$pmt * (1 + $rate * $type) * (((1 + $rate) ** $nper - 1) / $rate) - $fv) / (1 + $rate) ** $nper;
- }
-
- return -$fv - $pmt * $nper;
+ return Financial\CashFlow\Constant\Periodic::presentValue($rate, $nper, $pmt, $fv, $type);
}
/**
@@ -1830,112 +1111,63 @@ class Financial
* Excel Function:
* RATE(nper,pmt,pv[,fv[,type[,guess]]])
*
- * @param float $nper The total number of payment periods in an annuity
- * @param float $pmt The payment made each period and cannot change over the life
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Constant\Periodic\Interest::rate()
+ * Use the rate() method in the Financial\CashFlow\Constant\Periodic class instead
+ *
+ * @param mixed $nper The total number of payment periods in an annuity
+ * @param mixed $pmt The payment made each period and cannot change over the life
* of the annuity.
* Typically, pmt includes principal and interest but no other
* fees or taxes.
- * @param float $pv The present value - the total amount that a series of future
+ * @param mixed $pv The present value - the total amount that a series of future
* payments is worth now
- * @param float $fv The future value, or a cash balance you want to attain after
+ * @param mixed $fv The future value, or a cash balance you want to attain after
* the last payment is made. If fv is omitted, it is assumed
* to be 0 (the future value of a loan, for example, is 0).
- * @param int $type A number 0 or 1 and indicates when payments are due:
+ * @param mixed $type A number 0 or 1 and indicates when payments are due:
* 0 or omitted At the end of the period.
* 1 At the beginning of the period.
- * @param float $guess Your guess for what the rate will be.
+ * @param mixed $guess Your guess for what the rate will be.
* If you omit guess, it is assumed to be 10 percent.
*
* @return float|string
*/
public static function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1)
{
- $nper = (int) Functions::flattenSingleValue($nper);
- $pmt = Functions::flattenSingleValue($pmt);
- $pv = Functions::flattenSingleValue($pv);
- $fv = ($fv === null) ? 0.0 : Functions::flattenSingleValue($fv);
- $type = ($type === null) ? 0 : (int) Functions::flattenSingleValue($type);
- $guess = ($guess === null) ? 0.1 : Functions::flattenSingleValue($guess);
-
- $rate = $guess;
- // rest of code adapted from python/numpy
- $close = false;
- $iter = 0;
- while (!$close && $iter < self::FINANCIAL_MAX_ITERATIONS) {
- $nextdiff = self::rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type);
- if (!is_numeric($nextdiff)) {
- break;
- }
- $rate1 = $rate - $nextdiff;
- $close = abs($rate1 - $rate) < self::FINANCIAL_PRECISION;
- ++$iter;
- $rate = $rate1;
- }
-
- return $close ? $rate : Functions::NAN();
- }
-
- private static function rateNextGuess($rate, $nper, $pmt, $pv, $fv, $type)
- {
- if ($rate == 0) {
- return Functions::NAN();
- }
- $tt1 = ($rate + 1) ** $nper;
- $tt2 = ($rate + 1) ** ($nper - 1);
- $numerator = $fv + $tt1 * $pv + $pmt * ($tt1 - 1) * ($rate * $type + 1) / $rate;
- $denominator = $nper * $tt2 * $pv - $pmt * ($tt1 - 1) * ($rate * $type + 1) / ($rate * $rate)
- + $nper * $pmt * $tt2 * ($rate * $type + 1) / $rate
- + $pmt * ($tt1 - 1) * $type / $rate;
- if ($denominator == 0) {
- return Functions::NAN();
- }
-
- return $numerator / $denominator;
+ return Financial\CashFlow\Constant\Periodic\Interest::rate($nper, $pmt, $pv, $fv, $type, $guess);
}
/**
* RECEIVED.
*
- * Returns the price per $100 face value of a discounted security.
+ * Returns the amount received at maturity for a fully invested Security.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Price::received()
+ * Use the received() method in the Financial\Securities\Price class instead
*
* @param mixed $settlement The security's settlement date.
- * The security settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
- * @param int $investment The amount invested in the security
- * @param int $discount The security's discount rate
- * @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * The maturity date is the date when the security expires.
+ * @param mixed $investment The amount invested in the security
+ * @param mixed $discount The security's discount rate
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string Result, or a string containing an error
*/
public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $investment = (float) Functions::flattenSingleValue($investment);
- $discount = (float) Functions::flattenSingleValue($discount);
- $basis = (int) Functions::flattenSingleValue($basis);
-
- // Validate
- if ((is_numeric($investment)) && (is_numeric($discount)) && (is_numeric($basis))) {
- if (($investment <= 0) || ($discount <= 0)) {
- return Functions::NAN();
- }
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
-
- return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity));
- }
-
- return Functions::VALUE();
+ return Financial\Securities\Price::received($settlement, $maturity, $investment, $discount, $basis);
}
/**
@@ -1943,6 +1175,11 @@ class Financial
*
* Calculates the interest rate required for an investment to grow to a specified future value .
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Single::interestRate()
+ * Use the interestRate() method in the Financial\CashFlow\Single class instead
+ *
* @param float $nper The number of periods over which the investment is made
* @param float $pv Present Value
* @param float $fv Future Value
@@ -1951,18 +1188,7 @@ class Financial
*/
public static function RRI($nper = 0, $pv = 0, $fv = 0)
{
- $nper = Functions::flattenSingleValue($nper);
- $pv = Functions::flattenSingleValue($pv);
- $fv = Functions::flattenSingleValue($fv);
-
- // Validate parameters
- if (!is_numeric($nper) || !is_numeric($pv) || !is_numeric($fv)) {
- return Functions::VALUE();
- } elseif ($nper <= 0.0 || $pv <= 0.0 || $fv < 0.0) {
- return Functions::NAN();
- }
-
- return ($fv / $pv) ** (1 / $nper) - 1;
+ return Financial\CashFlow\Single::interestRate($nper, $pv, $fv);
}
/**
@@ -1970,6 +1196,11 @@ class Financial
*
* Returns the straight-line depreciation of an asset for one period
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Depreciation::SLN()
+ * Use the SLN() method in the Financial\Depreciation class instead
+ *
* @param mixed $cost Initial cost of the asset
* @param mixed $salvage Value at the end of the depreciation
* @param mixed $life Number of periods over which the asset is depreciated
@@ -1978,20 +1209,7 @@ class Financial
*/
public static function SLN($cost, $salvage, $life)
{
- $cost = Functions::flattenSingleValue($cost);
- $salvage = Functions::flattenSingleValue($salvage);
- $life = Functions::flattenSingleValue($life);
-
- // Calculate
- if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) {
- if ($life < 0) {
- return Functions::NAN();
- }
-
- return ($cost - $salvage) / $life;
- }
-
- return Functions::VALUE();
+ return Depreciation::SLN($cost, $salvage, $life);
}
/**
@@ -1999,6 +1217,11 @@ class Financial
*
* Returns the sum-of-years' digits depreciation of an asset for a specified period.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Depreciation::SYD()
+ * Use the SYD() method in the Financial\Depreciation class instead
+ *
* @param mixed $cost Initial cost of the asset
* @param mixed $salvage Value at the end of the depreciation
* @param mixed $life Number of periods over which the asset is depreciated
@@ -2008,21 +1231,7 @@ class Financial
*/
public static function SYD($cost, $salvage, $life, $period)
{
- $cost = Functions::flattenSingleValue($cost);
- $salvage = Functions::flattenSingleValue($salvage);
- $life = Functions::flattenSingleValue($life);
- $period = Functions::flattenSingleValue($period);
-
- // Calculate
- if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period))) {
- if (($life < 1) || ($period > $life)) {
- return Functions::NAN();
- }
-
- return (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1));
- }
-
- return Functions::VALUE();
+ return Depreciation::SYD($cost, $salvage, $life, $period);
}
/**
@@ -2030,8 +1239,14 @@ class Financial
*
* Returns the bond-equivalent yield for a Treasury bill.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\TreasuryBill::bondEquivalentYield()
+ * Use the bondEquivalentYield() method in the Financial\TreasuryBill class instead
+ *
* @param mixed $settlement The Treasury bill's settlement date.
- * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * The Treasury bill's settlement date is the date after the issue date when the
+ * Treasury bill is traded to the buyer.
* @param mixed $maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int $discount The Treasury bill's discount rate
@@ -2040,37 +1255,22 @@ class Financial
*/
public static function TBILLEQ($settlement, $maturity, $discount)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $discount = Functions::flattenSingleValue($discount);
-
- // Use TBILLPRICE for validation
- $testValue = self::TBILLPRICE($settlement, $maturity, $discount);
- if (is_string($testValue)) {
- return $testValue;
- }
-
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {
- ++$maturity;
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
- } else {
- $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
- }
-
- return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity);
+ return TreasuryBill::bondEquivalentYield($settlement, $maturity, $discount);
}
/**
* TBILLPRICE.
*
- * Returns the yield for a Treasury bill.
+ * Returns the price per $100 face value for a Treasury bill.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\TreasuryBill::price()
+ * Use the price() method in the Financial\TreasuryBill class instead
*
* @param mixed $settlement The Treasury bill's settlement date.
- * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * The Treasury bill's settlement date is the date after the issue date
+ * when the Treasury bill is traded to the buyer.
* @param mixed $maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int $discount The Treasury bill's discount rate
@@ -2079,44 +1279,7 @@ class Financial
*/
public static function TBILLPRICE($settlement, $maturity, $discount)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $discount = Functions::flattenSingleValue($discount);
-
- if (is_string($maturity = DateTime::getDateValue($maturity))) {
- return Functions::VALUE();
- }
-
- // Validate
- if (is_numeric($discount)) {
- if ($discount <= 0) {
- return Functions::NAN();
- }
-
- if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {
- ++$maturity;
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
- } else {
- $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
- }
-
- if ($daysBetweenSettlementAndMaturity > self::daysPerYear(DateTime::YEAR($maturity), 1)) {
- return Functions::NAN();
- }
-
- $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360));
- if ($price <= 0) {
- return Functions::NAN();
- }
-
- return $price;
- }
-
- return Functions::VALUE();
+ return TreasuryBill::price($settlement, $maturity, $discount);
}
/**
@@ -2124,8 +1287,14 @@ class Financial
*
* Returns the yield for a Treasury bill.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\TreasuryBill::yield()
+ * Use the yield() method in the Financial\TreasuryBill class instead
+ *
* @param mixed $settlement The Treasury bill's settlement date.
- * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer.
+ * The Treasury bill's settlement date is the date after the issue date
+ * when the Treasury bill is traded to the buyer.
* @param mixed $maturity The Treasury bill's maturity date.
* The maturity date is the date when the Treasury bill expires.
* @param int $price The Treasury bill's price per $100 face value
@@ -2134,113 +1303,7 @@ class Financial
*/
public static function TBILLYIELD($settlement, $maturity, $price)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $price = Functions::flattenSingleValue($price);
-
- // Validate
- if (is_numeric($price)) {
- if ($price <= 0) {
- return Functions::NAN();
- }
-
- if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
- ++$maturity;
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity) * 360;
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
- } else {
- $daysBetweenSettlementAndMaturity = (DateTime::getDateValue($maturity) - DateTime::getDateValue($settlement));
- }
-
- if ($daysBetweenSettlementAndMaturity > 360) {
- return Functions::NAN();
- }
-
- return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity);
- }
-
- return Functions::VALUE();
- }
-
- private static function bothNegAndPos($neg, $pos)
- {
- return $neg && $pos;
- }
-
- private static function xirrPart2(&$values)
- {
- $valCount = count($values);
- $foundpos = false;
- $foundneg = false;
- for ($i = 0; $i < $valCount; ++$i) {
- $fld = $values[$i];
- if (!is_numeric($fld)) {
- return Functions::VALUE();
- } elseif ($fld > 0) {
- $foundpos = true;
- } elseif ($fld < 0) {
- $foundneg = true;
- }
- }
- if (!self::bothNegAndPos($foundneg, $foundpos)) {
- return Functions::NAN();
- }
-
- return '';
- }
-
- private static function xirrPart1(&$values, &$dates)
- {
- if ((!is_array($values)) && (!is_array($dates))) {
- return Functions::NA();
- }
- $values = Functions::flattenArray($values);
- $dates = Functions::flattenArray($dates);
- if (count($values) != count($dates)) {
- return Functions::NAN();
- }
-
- $datesCount = count($dates);
- for ($i = 0; $i < $datesCount; ++$i) {
- $dates[$i] = DateTime::getDateValue($dates[$i]);
- if (!is_numeric($dates[$i])) {
- return Functions::VALUE();
- }
- }
-
- return self::xirrPart2($values);
- }
-
- private static function xirrPart3($values, $dates, $x1, $x2)
- {
- $f = self::xnpvOrdered($x1, $values, $dates, false);
- if ($f < 0.0) {
- $rtb = $x1;
- $dx = $x2 - $x1;
- } else {
- $rtb = $x2;
- $dx = $x1 - $x2;
- }
-
- $rslt = Functions::VALUE();
- for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
- $dx *= 0.5;
- $x_mid = $rtb + $dx;
- $f_mid = self::xnpvOrdered($x_mid, $values, $dates, false);
- if ($f_mid <= 0.0) {
- $rtb = $x_mid;
- }
- if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
- $rslt = $x_mid;
-
- break;
- }
- }
-
- return $rslt;
+ return TreasuryBill::yield($settlement, $maturity, $price);
}
/**
@@ -2251,6 +1314,11 @@ class Financial
* Excel Function:
* =XIRR(values,dates,guess)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Variable\NonPeriodic::rate()
+ * Use the rate() method in the Financial\CashFlow\Variable\NonPeriodic class instead
+ *
* @param float[] $values A series of cash flow payments
* The series of values must contain at least one positive value & one negative value
* @param mixed[] $dates A series of payment dates
@@ -2262,37 +1330,7 @@ class Financial
*/
public static function XIRR($values, $dates, $guess = 0.1)
{
- $rslt = self::xirrPart1($values, $dates);
- if ($rslt) {
- return $rslt;
- }
-
- // create an initial range, with a root somewhere between 0 and guess
- $guess = Functions::flattenSingleValue($guess);
- $x1 = 0.0;
- $x2 = $guess ?: 0.1;
- $f1 = self::xnpvOrdered($x1, $values, $dates, false);
- $f2 = self::xnpvOrdered($x2, $values, $dates, false);
- $found = false;
- for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
- if (!is_numeric($f1) || !is_numeric($f2)) {
- break;
- }
- if (($f1 * $f2) < 0.0) {
- $found = true;
-
- break;
- } elseif (abs($f1) < abs($f2)) {
- $f1 = self::xnpvOrdered($x1 += 1.6 * ($x1 - $x2), $values, $dates, false);
- } else {
- $f2 = self::xnpvOrdered($x2 += 1.6 * ($x2 - $x1), $values, $dates, false);
- }
- }
- if (!$found) {
- return Functions::NAN();
- }
-
- return self::xirrPart3($values, $dates, $x1, $x2);
+ return Financial\CashFlow\Variable\NonPeriodic::rate($values, $dates, $guess);
}
/**
@@ -2304,74 +1342,27 @@ class Financial
* Excel Function:
* =XNPV(rate,values,dates)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\CashFlow\Variable\NonPeriodic::presentValue()
+ * Use the presentValue() method in the Financial\CashFlow\Variable\NonPeriodic class instead
+ *
* @param float $rate the discount rate to apply to the cash flows
- * @param float[] $values A series of cash flows that corresponds to a schedule of payments in dates.
- * The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment.
- * If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year.
- * The series of values must contain at least one positive value and one negative value.
- * @param mixed[] $dates A schedule of payment dates that corresponds to the cash flow payments.
- * The first payment date indicates the beginning of the schedule of payments.
- * All other dates must be later than this date, but they may occur in any order.
+ * @param float[] $values A series of cash flows that corresponds to a schedule of payments in dates.
+ * The first payment is optional and corresponds to a cost or payment that occurs
+ * at the beginning of the investment.
+ * If the first value is a cost or payment, it must be a negative value.
+ * All succeeding payments are discounted based on a 365-day year.
+ * The series of values must contain at least one positive value and one negative value.
+ * @param mixed[] $dates A schedule of payment dates that corresponds to the cash flow payments.
+ * The first payment date indicates the beginning of the schedule of payments.
+ * All other dates must be later than this date, but they may occur in any order.
*
* @return float|mixed|string
*/
public static function XNPV($rate, $values, $dates)
{
- return self::xnpvOrdered($rate, $values, $dates, true);
- }
-
- private static function validateXnpv($rate, $values, $dates)
- {
- if (!is_numeric($rate)) {
- return Functions::VALUE();
- }
- $valCount = count($values);
- if ($valCount != count($dates)) {
- return Functions::NAN();
- }
- if ($valCount > 1 && ((min($values) > 0) || (max($values) < 0))) {
- return Functions::NAN();
- }
- $date0 = DateTime::getDateValue($dates[0]);
- if (is_string($date0)) {
- return Functions::VALUE();
- }
-
- return '';
- }
-
- private static function xnpvOrdered($rate, $values, $dates, $ordered = true)
- {
- $rate = Functions::flattenSingleValue($rate);
- $values = Functions::flattenArray($values);
- $dates = Functions::flattenArray($dates);
- $valCount = count($values);
- $date0 = DateTime::getDateValue($dates[0]);
- $rslt = self::validateXnpv($rate, $values, $dates);
- if ($rslt) {
- return $rslt;
- }
- $xnpv = 0.0;
- for ($i = 0; $i < $valCount; ++$i) {
- if (!is_numeric($values[$i])) {
- return Functions::VALUE();
- }
- $datei = DateTime::getDateValue($dates[$i]);
- if (is_string($datei)) {
- return Functions::VALUE();
- }
- if ($date0 > $datei) {
- $dif = $ordered ? Functions::NAN() : -DateTime::DATEDIF($datei, $date0, 'd');
- } else {
- $dif = DateTime::DATEDIF($date0, $datei, 'd');
- }
- if (!is_numeric($dif)) {
- return $dif;
- }
- $xnpv += $values[$i] / (1 + $rate) ** ($dif / 365);
- }
-
- return is_finite($xnpv) ? $xnpv : Functions::VALUE();
+ return Financial\CashFlow\Variable\NonPeriodic::presentValue($rate, $values, $dates);
}
/**
@@ -2379,10 +1370,16 @@ class Financial
*
* Returns the annual yield of a security that pays interest at maturity.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Yields::yieldDiscounted()
+ * Use the yieldDiscounted() method in the Financial\Securities\Yields class instead
+ *
* @param mixed $settlement The security's settlement date.
- * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security's settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
+ * The maturity date is the date when the security expires.
* @param int $price The security's price per $100 face value
* @param int $redemption The security's redemption value per $100 face value
* @param int $basis The type of day count to use.
@@ -2396,32 +1393,7 @@ class Financial
*/
public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $price = Functions::flattenSingleValue($price);
- $redemption = Functions::flattenSingleValue($redemption);
- $basis = (int) Functions::flattenSingleValue($basis);
-
- // Validate
- if (is_numeric($price) && is_numeric($redemption)) {
- if (($price <= 0) || ($redemption <= 0)) {
- return Functions::NAN();
- }
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
- if (!is_numeric($daysPerYear)) {
- return $daysPerYear;
- }
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
- $daysBetweenSettlementAndMaturity *= $daysPerYear;
-
- return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity);
- }
-
- return Functions::VALUE();
+ return Securities\Yields::yieldDiscounted($settlement, $maturity, $price, $redemption, $basis);
}
/**
@@ -2429,64 +1401,30 @@ class Financial
*
* Returns the annual yield of a security that pays interest at maturity.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Financial\Securities\Yields::yieldAtMaturity()
+ * Use the yieldAtMaturity() method in the Financial\Securities\Yields class instead
+ *
* @param mixed $settlement The security's settlement date.
- * The security's settlement date is the date after the issue date when the security is traded to the buyer.
+ * The security's settlement date is the date after the issue date when the security
+ * is traded to the buyer.
* @param mixed $maturity The security's maturity date.
- * The maturity date is the date when the security expires.
+ * The maturity date is the date when the security expires.
* @param mixed $issue The security's issue date
* @param int $rate The security's interest rate at date of issue
* @param int $price The security's price per $100 face value
* @param int $basis The type of day count to use.
- * 0 or omitted US (NASD) 30/360
- * 1 Actual/actual
- * 2 Actual/360
- * 3 Actual/365
- * 4 European 30/360
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
*
* @return float|string Result, or a string containing an error
*/
public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0)
{
- $settlement = Functions::flattenSingleValue($settlement);
- $maturity = Functions::flattenSingleValue($maturity);
- $issue = Functions::flattenSingleValue($issue);
- $rate = Functions::flattenSingleValue($rate);
- $price = Functions::flattenSingleValue($price);
- $basis = (int) Functions::flattenSingleValue($basis);
-
- // Validate
- if (is_numeric($rate) && is_numeric($price)) {
- if (($rate <= 0) || ($price <= 0)) {
- return Functions::NAN();
- }
- $daysPerYear = self::daysPerYear(DateTime::YEAR($settlement), $basis);
- if (!is_numeric($daysPerYear)) {
- return $daysPerYear;
- }
- $daysBetweenIssueAndSettlement = DateTime::YEARFRAC($issue, $settlement, $basis);
- if (!is_numeric($daysBetweenIssueAndSettlement)) {
- // return date error
- return $daysBetweenIssueAndSettlement;
- }
- $daysBetweenIssueAndSettlement *= $daysPerYear;
- $daysBetweenIssueAndMaturity = DateTime::YEARFRAC($issue, $maturity, $basis);
- if (!is_numeric($daysBetweenIssueAndMaturity)) {
- // return date error
- return $daysBetweenIssueAndMaturity;
- }
- $daysBetweenIssueAndMaturity *= $daysPerYear;
- $daysBetweenSettlementAndMaturity = DateTime::YEARFRAC($settlement, $maturity, $basis);
- if (!is_numeric($daysBetweenSettlementAndMaturity)) {
- // return date error
- return $daysBetweenSettlementAndMaturity;
- }
- $daysBetweenSettlementAndMaturity *= $daysPerYear;
-
- return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) /
- (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) *
- ($daysPerYear / $daysBetweenSettlementAndMaturity);
- }
-
- return Functions::VALUE();
+ return Securities\Yields::yieldAtMaturity($settlement, $maturity, $issue, $rate, $price, $basis);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Amortization.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Amortization.php
new file mode 100644
index 00000000..ba7fb521
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Amortization.php
@@ -0,0 +1,210 @@
+getMessage();
+ }
+
+ $yearFrac = DateTimeExcel\YearFrac::fraction($purchased, $firstPeriod, $basis);
+ if (is_string($yearFrac)) {
+ return $yearFrac;
+ }
+
+ $amortiseCoeff = self::getAmortizationCoefficient($rate);
+
+ $rate *= $amortiseCoeff;
+ $fNRate = round($yearFrac * $rate * $cost, 0);
+ $cost -= $fNRate;
+ $fRest = $cost - $salvage;
+
+ for ($n = 0; $n < $period; ++$n) {
+ $fNRate = round($rate * $cost, 0);
+ $fRest -= $fNRate;
+
+ if ($fRest < 0.0) {
+ switch ($period - $n) {
+ case 0:
+ case 1:
+ return round($cost * 0.5, 0);
+ default:
+ return 0.0;
+ }
+ }
+ $cost -= $fNRate;
+ }
+
+ return $fNRate;
+ }
+
+ /**
+ * AMORLINC.
+ *
+ * Returns the depreciation for each accounting period.
+ * This function is provided for the French accounting system. If an asset is purchased in
+ * the middle of the accounting period, the prorated depreciation is taken into account.
+ *
+ * Excel Function:
+ * AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis])
+ *
+ * @param mixed $cost The cost of the asset as a float
+ * @param mixed $purchased Date of the purchase of the asset
+ * @param mixed $firstPeriod Date of the end of the first period
+ * @param mixed $salvage The salvage value at the end of the life of the asset
+ * @param mixed $period The period as a float
+ * @param mixed $rate Rate of depreciation as float
+ * @param mixed $basis Integer indicating the type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string (string containing the error type if there is an error)
+ */
+ public static function AMORLINC(
+ $cost,
+ $purchased,
+ $firstPeriod,
+ $salvage,
+ $period,
+ $rate,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $cost = Functions::flattenSingleValue($cost);
+ $purchased = Functions::flattenSingleValue($purchased);
+ $firstPeriod = Functions::flattenSingleValue($firstPeriod);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $period = Functions::flattenSingleValue($period);
+ $rate = Functions::flattenSingleValue($rate);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $cost = FinancialValidations::validateFloat($cost);
+ $purchased = FinancialValidations::validateDate($purchased);
+ $firstPeriod = FinancialValidations::validateDate($firstPeriod);
+ $salvage = FinancialValidations::validateFloat($salvage);
+ $period = FinancialValidations::validateFloat($period);
+ $rate = FinancialValidations::validateFloat($rate);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $fOneRate = $cost * $rate;
+ $fCostDelta = $cost - $salvage;
+ // Note, quirky variation for leap years on the YEARFRAC for this function
+ $purchasedYear = DateTimeExcel\DateParts::year($purchased);
+ $yearFrac = DateTimeExcel\YearFrac::fraction($purchased, $firstPeriod, $basis);
+ if (is_string($yearFrac)) {
+ return $yearFrac;
+ }
+
+ if (
+ ($basis == FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL) &&
+ ($yearFrac < 1) && (DateTimeExcel\Helpers::isLeapYear($purchasedYear))
+ ) {
+ $yearFrac *= 365 / 366;
+ }
+
+ $f0Rate = $yearFrac * $rate * $cost;
+ $nNumOfFullPeriods = (int) (($cost - $salvage - $f0Rate) / $fOneRate);
+
+ if ($period == 0) {
+ return $f0Rate;
+ } elseif ($period <= $nNumOfFullPeriods) {
+ return $fOneRate;
+ } elseif ($period == ($nNumOfFullPeriods + 1)) {
+ return $fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate;
+ }
+
+ return 0.0;
+ }
+
+ private static function getAmortizationCoefficient(float $rate): float
+ {
+ // The depreciation coefficients are:
+ // Life of assets (1/rate) Depreciation coefficient
+ // Less than 3 years 1
+ // Between 3 and 4 years 1.5
+ // Between 5 and 6 years 2
+ // More than 6 years 2.5
+ $fUsePer = 1.0 / $rate;
+
+ if ($fUsePer < 3.0) {
+ return 1.0;
+ } elseif ($fUsePer < 4.0) {
+ return 1.5;
+ } elseif ($fUsePer <= 6.0) {
+ return 2.0;
+ }
+
+ return 2.5;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php
new file mode 100644
index 00000000..fde68860
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/CashFlowValidations.php
@@ -0,0 +1,56 @@
+getMessage();
+ }
+
+ return self::calculateFutureValue($rate, $numberOfPeriods, $payment, $presentValue, $type);
+ }
+
+ /**
+ * PV.
+ *
+ * Returns the Present Value of a cash flow with constant payments and interest rate (annuities).
+ *
+ * @param mixed $rate Interest rate per period
+ * @param mixed $numberOfPeriods Number of periods as an integer
+ * @param mixed $payment Periodic payment (annuity)
+ * @param mixed $futureValue Future Value
+ * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function presentValue(
+ $rate,
+ $numberOfPeriods,
+ $payment = 0.0,
+ $futureValue = 0.0,
+ $type = FinancialConstants::PAYMENT_END_OF_PERIOD
+ ) {
+ $rate = Functions::flattenSingleValue($rate);
+ $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
+ $payment = ($payment === null) ? 0.0 : Functions::flattenSingleValue($payment);
+ $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);
+ $type = ($type === null) ? FinancialConstants::PAYMENT_END_OF_PERIOD : Functions::flattenSingleValue($type);
+
+ try {
+ $rate = CashFlowValidations::validateRate($rate);
+ $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);
+ $payment = CashFlowValidations::validateFloat($payment);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ $type = CashFlowValidations::validatePeriodType($type);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($numberOfPeriods < 0) {
+ return Functions::NAN();
+ }
+
+ return self::calculatePresentValue($rate, $numberOfPeriods, $payment, $futureValue, $type);
+ }
+
+ /**
+ * NPER.
+ *
+ * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.
+ *
+ * @param mixed $rate Interest rate per period
+ * @param mixed $payment Periodic payment (annuity)
+ * @param mixed $presentValue Present Value
+ * @param mixed $futureValue Future Value
+ * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function periods(
+ $rate,
+ $payment,
+ $presentValue,
+ $futureValue = 0.0,
+ $type = FinancialConstants::PAYMENT_END_OF_PERIOD
+ ) {
+ $rate = Functions::flattenSingleValue($rate);
+ $payment = Functions::flattenSingleValue($payment);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);
+ $type = ($type === null) ? FinancialConstants::PAYMENT_END_OF_PERIOD : Functions::flattenSingleValue($type);
+
+ try {
+ $rate = CashFlowValidations::validateRate($rate);
+ $payment = CashFlowValidations::validateFloat($payment);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ $type = CashFlowValidations::validatePeriodType($type);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($payment == 0.0) {
+ return Functions::NAN();
+ }
+
+ return self::calculatePeriods($rate, $payment, $presentValue, $futureValue, $type);
+ }
+
+ private static function calculateFutureValue(
+ float $rate,
+ int $numberOfPeriods,
+ float $payment,
+ float $presentValue,
+ int $type
+ ): float {
+ if ($rate !== null && $rate != 0) {
+ return -$presentValue *
+ (1 + $rate) ** $numberOfPeriods - $payment * (1 + $rate * $type) * ((1 + $rate) ** $numberOfPeriods - 1)
+ / $rate;
+ }
+
+ return -$presentValue - $payment * $numberOfPeriods;
+ }
+
+ private static function calculatePresentValue(
+ float $rate,
+ int $numberOfPeriods,
+ float $payment,
+ float $futureValue,
+ int $type
+ ): float {
+ if ($rate != 0.0) {
+ return (-$payment * (1 + $rate * $type)
+ * (((1 + $rate) ** $numberOfPeriods - 1) / $rate) - $futureValue) / (1 + $rate) ** $numberOfPeriods;
+ }
+
+ return -$futureValue - $payment * $numberOfPeriods;
+ }
+
+ /**
+ * @return float|string
+ */
+ private static function calculatePeriods(
+ float $rate,
+ float $payment,
+ float $presentValue,
+ float $futureValue,
+ int $type
+ ) {
+ if ($rate != 0.0) {
+ if ($presentValue == 0.0) {
+ return Functions::NAN();
+ }
+
+ return log(($payment * (1 + $rate * $type) / $rate - $futureValue) /
+ ($presentValue + $payment * (1 + $rate * $type) / $rate)) / log(1 + $rate);
+ }
+
+ return (-$presentValue - $futureValue) / $payment;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php
new file mode 100644
index 00000000..b7f6011c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Cumulative.php
@@ -0,0 +1,141 @@
+getMessage();
+ }
+
+ // Validate parameters
+ if ($start < 1 || $start > $end) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ $interest = 0;
+ for ($per = $start; $per <= $end; ++$per) {
+ $ipmt = Interest::payment($rate, $per, $periods, $presentValue, 0, $type);
+ if (is_string($ipmt)) {
+ return $ipmt;
+ }
+
+ $interest += $ipmt;
+ }
+
+ return $interest;
+ }
+
+ /**
+ * CUMPRINC.
+ *
+ * Returns the cumulative principal paid on a loan between the start and end periods.
+ *
+ * Excel Function:
+ * CUMPRINC(rate,nper,pv,start,end[,type])
+ *
+ * @param mixed $rate The Interest rate
+ * @param mixed $periods The total number of payment periods as an integer
+ * @param mixed $presentValue Present Value
+ * @param mixed $start The first period in the calculation.
+ * Payment periods are numbered beginning with 1.
+ * @param mixed $end the last period in the calculation
+ * @param mixed $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ *
+ * @return float|string
+ */
+ public static function principal(
+ $rate,
+ $periods,
+ $presentValue,
+ $start,
+ $end,
+ $type = FinancialConstants::PAYMENT_END_OF_PERIOD
+ ) {
+ $rate = Functions::flattenSingleValue($rate);
+ $periods = Functions::flattenSingleValue($periods);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $start = Functions::flattenSingleValue($start);
+ $end = Functions::flattenSingleValue($end);
+ $type = ($type === null) ? FinancialConstants::PAYMENT_END_OF_PERIOD : Functions::flattenSingleValue($type);
+
+ try {
+ $rate = CashFlowValidations::validateRate($rate);
+ $periods = CashFlowValidations::validateInt($periods);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $start = CashFlowValidations::validateInt($start);
+ $end = CashFlowValidations::validateInt($end);
+ $type = CashFlowValidations::validatePeriodType($type);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($start < 1 || $start > $end) {
+ return Functions::VALUE();
+ }
+
+ // Calculate
+ $principal = 0;
+ for ($per = $start; $per <= $end; ++$per) {
+ $ppmt = Payments::interestPayment($rate, $per, $periods, $presentValue, 0, $type);
+ if (is_string($ppmt)) {
+ return $ppmt;
+ }
+
+ $principal += $ppmt;
+ }
+
+ return $principal;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
new file mode 100644
index 00000000..56d2e379
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Interest.php
@@ -0,0 +1,216 @@
+getMessage();
+ }
+
+ // Validate parameters
+ if ($period <= 0 || $period > $numberOfPeriods) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ $interestAndPrincipal = new InterestAndPrincipal(
+ $interestRate,
+ $period,
+ $numberOfPeriods,
+ $presentValue,
+ $futureValue,
+ $type
+ );
+
+ return $interestAndPrincipal->interest();
+ }
+
+ /**
+ * ISPMT.
+ *
+ * Returns the interest payment for an investment based on an interest rate and a constant payment schedule.
+ *
+ * Excel Function:
+ * =ISPMT(interest_rate, period, number_payments, pv)
+ *
+ * @param mixed $interestRate is the interest rate for the investment
+ * @param mixed $period is the period to calculate the interest rate. It must be betweeen 1 and number_payments.
+ * @param mixed $numberOfPeriods is the number of payments for the annuity
+ * @param mixed $principleRemaining is the loan amount or present value of the payments
+ */
+ public static function schedulePayment($interestRate, $period, $numberOfPeriods, $principleRemaining)
+ {
+ $interestRate = Functions::flattenSingleValue($interestRate);
+ $period = Functions::flattenSingleValue($period);
+ $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
+ $principleRemaining = Functions::flattenSingleValue($principleRemaining);
+
+ try {
+ $interestRate = CashFlowValidations::validateRate($interestRate);
+ $period = CashFlowValidations::validateInt($period);
+ $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);
+ $principleRemaining = CashFlowValidations::validateFloat($principleRemaining);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($period <= 0 || $period > $numberOfPeriods) {
+ return Functions::NAN();
+ }
+
+ // Return value
+ $returnValue = 0;
+
+ // Calculate
+ $principlePayment = ($principleRemaining * 1.0) / ($numberOfPeriods * 1.0);
+ for ($i = 0; $i <= $period; ++$i) {
+ $returnValue = $interestRate * $principleRemaining * -1;
+ $principleRemaining -= $principlePayment;
+ // principle needs to be 0 after the last payment, don't let floating point screw it up
+ if ($i == $numberOfPeriods) {
+ $returnValue = 0.0;
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * RATE.
+ *
+ * Returns the interest rate per period of an annuity.
+ * RATE is calculated by iteration and can have zero or more solutions.
+ * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations,
+ * RATE returns the #NUM! error value.
+ *
+ * Excel Function:
+ * RATE(nper,pmt,pv[,fv[,type[,guess]]])
+ *
+ * @param mixed $numberOfPeriods The total number of payment periods in an annuity
+ * @param mixed $payment The payment made each period and cannot change over the life of the annuity.
+ * Typically, pmt includes principal and interest but no other fees or taxes.
+ * @param mixed $presentValue The present value - the total amount that a series of future payments is worth now
+ * @param mixed $futureValue The future value, or a cash balance you want to attain after the last payment is made.
+ * If fv is omitted, it is assumed to be 0 (the future value of a loan,
+ * for example, is 0).
+ * @param mixed $type A number 0 or 1 and indicates when payments are due:
+ * 0 or omitted At the end of the period.
+ * 1 At the beginning of the period.
+ * @param mixed $guess Your guess for what the rate will be.
+ * If you omit guess, it is assumed to be 10 percent.
+ *
+ * @return float|string
+ */
+ public static function rate(
+ $numberOfPeriods,
+ $payment,
+ $presentValue,
+ $futureValue = 0.0,
+ $type = FinancialConstants::PAYMENT_END_OF_PERIOD,
+ $guess = 0.1
+ ) {
+ $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
+ $payment = Functions::flattenSingleValue($payment);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);
+ $type = ($type === null) ? FinancialConstants::PAYMENT_END_OF_PERIOD : Functions::flattenSingleValue($type);
+ $guess = ($guess === null) ? 0.1 : Functions::flattenSingleValue($guess);
+
+ try {
+ $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);
+ $payment = CashFlowValidations::validateFloat($payment);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ $type = CashFlowValidations::validatePeriodType($type);
+ $guess = CashFlowValidations::validateFloat($guess);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $rate = $guess;
+ // rest of code adapted from python/numpy
+ $close = false;
+ $iter = 0;
+ while (!$close && $iter < self::FINANCIAL_MAX_ITERATIONS) {
+ $nextdiff = self::rateNextGuess($rate, $numberOfPeriods, $payment, $presentValue, $futureValue, $type);
+ if (!is_numeric($nextdiff)) {
+ break;
+ }
+ $rate1 = $rate - $nextdiff;
+ $close = abs($rate1 - $rate) < self::FINANCIAL_PRECISION;
+ ++$iter;
+ $rate = $rate1;
+ }
+
+ return $close ? $rate : Functions::NAN();
+ }
+
+ private static function rateNextGuess($rate, $numberOfPeriods, $payment, $presentValue, $futureValue, $type)
+ {
+ if ($rate == 0.0) {
+ return Functions::NAN();
+ }
+ $tt1 = ($rate + 1) ** $numberOfPeriods;
+ $tt2 = ($rate + 1) ** ($numberOfPeriods - 1);
+ $numerator = $futureValue + $tt1 * $presentValue + $payment * ($tt1 - 1) * ($rate * $type + 1) / $rate;
+ $denominator = $numberOfPeriods * $tt2 * $presentValue - $payment * ($tt1 - 1)
+ * ($rate * $type + 1) / ($rate * $rate) + $numberOfPeriods
+ * $payment * $tt2 * ($rate * $type + 1) / $rate + $payment * ($tt1 - 1) * $type / $rate;
+ if ($denominator == 0) {
+ return Functions::NAN();
+ }
+
+ return $numerator / $denominator;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
new file mode 100644
index 00000000..ca989e00
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/InterestAndPrincipal.php
@@ -0,0 +1,44 @@
+interest = $interest;
+ $this->principal = $principal;
+ }
+
+ public function interest(): float
+ {
+ return $this->interest;
+ }
+
+ public function principal(): float
+ {
+ return $this->principal;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php
new file mode 100644
index 00000000..e103f923
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Constant/Periodic/Payments.php
@@ -0,0 +1,115 @@
+getMessage();
+ }
+
+ // Calculate
+ if ($interestRate != 0.0) {
+ return (-$futureValue - $presentValue * (1 + $interestRate) ** $numberOfPeriods) /
+ (1 + $interestRate * $type) / (((1 + $interestRate) ** $numberOfPeriods - 1) / $interestRate);
+ }
+
+ return (-$presentValue - $futureValue) / $numberOfPeriods;
+ }
+
+ /**
+ * PPMT.
+ *
+ * Returns the interest payment for a given period for an investment based on periodic, constant payments
+ * and a constant interest rate.
+ *
+ * @param mixed $interestRate Interest rate per period
+ * @param mixed $period Period for which we want to find the interest
+ * @param mixed $numberOfPeriods Number of periods
+ * @param mixed $presentValue Present Value
+ * @param mixed $futureValue Future Value
+ * @param mixed $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function interestPayment(
+ $interestRate,
+ $period,
+ $numberOfPeriods,
+ $presentValue,
+ $futureValue = 0,
+ $type = FinancialConstants::PAYMENT_END_OF_PERIOD
+ ) {
+ $interestRate = Functions::flattenSingleValue($interestRate);
+ $period = Functions::flattenSingleValue($period);
+ $numberOfPeriods = Functions::flattenSingleValue($numberOfPeriods);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $futureValue = ($futureValue === null) ? 0.0 : Functions::flattenSingleValue($futureValue);
+ $type = ($type === null) ? FinancialConstants::PAYMENT_END_OF_PERIOD : Functions::flattenSingleValue($type);
+
+ try {
+ $interestRate = CashFlowValidations::validateRate($interestRate);
+ $period = CashFlowValidations::validateInt($period);
+ $numberOfPeriods = CashFlowValidations::validateInt($numberOfPeriods);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ $type = CashFlowValidations::validatePeriodType($type);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($period <= 0 || $period > $numberOfPeriods) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ $interestAndPrincipal = new InterestAndPrincipal(
+ $interestRate,
+ $period,
+ $numberOfPeriods,
+ $presentValue,
+ $futureValue,
+ $type
+ );
+
+ return $interestAndPrincipal->principal();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php
new file mode 100644
index 00000000..a30634da
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Single.php
@@ -0,0 +1,108 @@
+getMessage();
+ }
+
+ return $principal;
+ }
+
+ /**
+ * PDURATION.
+ *
+ * Calculates the number of periods required for an investment to reach a specified value.
+ *
+ * @param mixed $rate Interest rate per period
+ * @param mixed $presentValue Present Value
+ * @param mixed $futureValue Future Value
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function periods($rate, $presentValue, $futureValue)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $futureValue = Functions::flattenSingleValue($futureValue);
+
+ try {
+ $rate = CashFlowValidations::validateRate($rate);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($rate <= 0.0 || $presentValue <= 0.0 || $futureValue <= 0.0) {
+ return Functions::NAN();
+ }
+
+ return (log($futureValue) - log($presentValue)) / log(1 + $rate);
+ }
+
+ /**
+ * RRI.
+ *
+ * Calculates the interest rate required for an investment to grow to a specified future value .
+ *
+ * @param float $periods The number of periods over which the investment is made
+ * @param float $presentValue Present Value
+ * @param float $futureValue Future Value
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function interestRate($periods = 0.0, $presentValue = 0.0, $futureValue = 0.0)
+ {
+ $periods = Functions::flattenSingleValue($periods);
+ $presentValue = Functions::flattenSingleValue($presentValue);
+ $futureValue = Functions::flattenSingleValue($futureValue);
+
+ try {
+ $periods = CashFlowValidations::validateFloat($periods);
+ $presentValue = CashFlowValidations::validatePresentValue($presentValue);
+ $futureValue = CashFlowValidations::validateFutureValue($futureValue);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if ($periods <= 0.0 || $presentValue <= 0.0 || $futureValue < 0.0) {
+ return Functions::NAN();
+ }
+
+ return ($futureValue / $presentValue) ** (1 / $periods) - 1;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
new file mode 100644
index 00000000..6a32bdfc
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/NonPeriodic.php
@@ -0,0 +1,225 @@
+getMessage();
+ }
+ }
+
+ return self::xirrPart2($values);
+ }
+
+ private static function xirrPart2(&$values)
+ {
+ $valCount = count($values);
+ $foundpos = false;
+ $foundneg = false;
+ for ($i = 0; $i < $valCount; ++$i) {
+ $fld = $values[$i];
+ if (!is_numeric($fld)) {
+ return Functions::VALUE();
+ } elseif ($fld > 0) {
+ $foundpos = true;
+ } elseif ($fld < 0) {
+ $foundneg = true;
+ }
+ }
+ if (!self::bothNegAndPos($foundneg, $foundpos)) {
+ return Functions::NAN();
+ }
+
+ return '';
+ }
+
+ private static function xirrPart3($values, $dates, $x1, $x2)
+ {
+ $f = self::xnpvOrdered($x1, $values, $dates, false);
+ if ($f < 0.0) {
+ $rtb = $x1;
+ $dx = $x2 - $x1;
+ } else {
+ $rtb = $x2;
+ $dx = $x1 - $x2;
+ }
+
+ $rslt = Functions::VALUE();
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ $dx *= 0.5;
+ $x_mid = $rtb + $dx;
+ $f_mid = self::xnpvOrdered($x_mid, $values, $dates, false);
+ if ($f_mid <= 0.0) {
+ $rtb = $x_mid;
+ }
+ if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
+ $rslt = $x_mid;
+
+ break;
+ }
+ }
+
+ return $rslt;
+ }
+
+ private static function xnpvOrdered($rate, $values, $dates, $ordered = true)
+ {
+ $rate = Functions::flattenSingleValue($rate);
+ $values = Functions::flattenArray($values);
+ $dates = Functions::flattenArray($dates);
+ $valCount = count($values);
+
+ try {
+ self::validateXnpv($rate, $values, $dates);
+ $date0 = DateTimeExcel\Helpers::getDateValue($dates[0]);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $xnpv = 0.0;
+ for ($i = 0; $i < $valCount; ++$i) {
+ if (!is_numeric($values[$i])) {
+ return Functions::VALUE();
+ }
+
+ try {
+ $datei = DateTimeExcel\Helpers::getDateValue($dates[$i]);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ if ($date0 > $datei) {
+ $dif = $ordered ? Functions::NAN() : -((int) DateTimeExcel\Difference::interval($datei, $date0, 'd'));
+ } else {
+ $dif = DateTimeExcel\Difference::interval($date0, $datei, 'd');
+ }
+ if (!is_numeric($dif)) {
+ return $dif;
+ }
+ $xnpv += $values[$i] / (1 + $rate) ** ($dif / 365);
+ }
+
+ return is_finite($xnpv) ? $xnpv : Functions::VALUE();
+ }
+
+ private static function validateXnpv($rate, $values, $dates): void
+ {
+ if (!is_numeric($rate)) {
+ throw new Exception(Functions::VALUE());
+ }
+ $valCount = count($values);
+ if ($valCount != count($dates)) {
+ throw new Exception(Functions::NAN());
+ }
+ if ($valCount > 1 && ((min($values) > 0) || (max($values) < 0))) {
+ throw new Exception(Functions::NAN());
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php
new file mode 100644
index 00000000..c42df0c3
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/CashFlow/Variable/Periodic.php
@@ -0,0 +1,160 @@
+ 0.0) {
+ return Functions::VALUE();
+ }
+
+ $f = self::presentValue($x1, $values);
+ if ($f < 0.0) {
+ $rtb = $x1;
+ $dx = $x2 - $x1;
+ } else {
+ $rtb = $x2;
+ $dx = $x1 - $x2;
+ }
+
+ for ($i = 0; $i < self::FINANCIAL_MAX_ITERATIONS; ++$i) {
+ $dx *= 0.5;
+ $x_mid = $rtb + $dx;
+ $f_mid = self::presentValue($x_mid, $values);
+ if ($f_mid <= 0.0) {
+ $rtb = $x_mid;
+ }
+ if ((abs($f_mid) < self::FINANCIAL_PRECISION) || (abs($dx) < self::FINANCIAL_PRECISION)) {
+ return $x_mid;
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * MIRR.
+ *
+ * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both
+ * the cost of the investment and the interest received on reinvestment of cash.
+ *
+ * Excel Function:
+ * MIRR(values,finance_rate, reinvestment_rate)
+ *
+ * @param mixed $values An array or a reference to cells that contain a series of payments and
+ * income occurring at regular intervals.
+ * Payments are negative value, income is positive values.
+ * @param mixed $financeRate The interest rate you pay on the money used in the cash flows
+ * @param mixed $reinvestmentRate The interest rate you receive on the cash flows as you reinvest them
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function modifiedRate($values, $financeRate, $reinvestmentRate)
+ {
+ if (!is_array($values)) {
+ return Functions::VALUE();
+ }
+ $values = Functions::flattenArray($values);
+ $financeRate = Functions::flattenSingleValue($financeRate);
+ $reinvestmentRate = Functions::flattenSingleValue($reinvestmentRate);
+ $n = count($values);
+
+ $rr = 1.0 + $reinvestmentRate;
+ $fr = 1.0 + $financeRate;
+
+ $npvPos = $npvNeg = 0.0;
+ foreach ($values as $i => $v) {
+ if ($v >= 0) {
+ $npvPos += $v / $rr ** $i;
+ } else {
+ $npvNeg += $v / $fr ** $i;
+ }
+ }
+
+ if (($npvNeg === 0.0) || ($npvPos === 0.0) || ($reinvestmentRate <= -1.0)) {
+ return Functions::VALUE();
+ }
+
+ $mirr = ((-$npvPos * $rr ** $n)
+ / ($npvNeg * ($rr))) ** (1.0 / ($n - 1)) - 1.0;
+
+ return is_finite($mirr) ? $mirr : Functions::VALUE();
+ }
+
+ /**
+ * NPV.
+ *
+ * Returns the Net Present Value of a cash flow series given a discount rate.
+ *
+ * @param mixed $rate
+ *
+ * @return float
+ */
+ public static function presentValue($rate, ...$args)
+ {
+ $returnValue = 0;
+
+ $rate = Functions::flattenSingleValue($rate);
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $countArgs = count($aArgs);
+ for ($i = 1; $i <= $countArgs; ++$i) {
+ // Is it a numeric value?
+ if (is_numeric($aArgs[$i - 1])) {
+ $returnValue += $aArgs[$i - 1] / (1 + $rate) ** $i;
+ }
+ }
+
+ return $returnValue;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Constants.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Constants.php
new file mode 100644
index 00000000..17740b0a
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Constants.php
@@ -0,0 +1,19 @@
+getMessage();
+ }
+
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+ if (is_string($daysPerYear)) {
+ return Functions::VALUE();
+ }
+ $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);
+
+ if ($basis === FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL) {
+ return abs((float) DateTimeExcel\Days::between($prev, $settlement));
+ }
+
+ return (float) DateTimeExcel\YearFrac::fraction($prev, $settlement, $basis) * $daysPerYear;
+ }
+
+ /**
+ * COUPDAYS.
+ *
+ * Returns the number of days in the coupon period that contains the settlement date.
+ *
+ * Excel Function:
+ * COUPDAYS(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use (int).
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function COUPDAYS(
+ $settlement,
+ $maturity,
+ $frequency,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ self::validateCouponPeriod($settlement, $maturity);
+ $frequency = FinancialValidations::validateFrequency($frequency);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ switch ($basis) {
+ case FinancialConstants::BASIS_DAYS_PER_YEAR_365:
+ // Actual/365
+ return 365 / $frequency;
+ case FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL:
+ // Actual/actual
+ if ($frequency == FinancialConstants::FREQUENCY_ANNUAL) {
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+
+ return $daysPerYear / $frequency;
+ }
+ $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);
+ $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);
+
+ return $next - $prev;
+ default:
+ // US (NASD) 30/360, Actual/360 or European 30/360
+ return 360 / $frequency;
+ }
+ }
+
+ /**
+ * COUPDAYSNC.
+ *
+ * Returns the number of days from the settlement date to the next coupon date.
+ *
+ * Excel Function:
+ * COUPDAYSNC(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use (int) .
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function COUPDAYSNC(
+ $settlement,
+ $maturity,
+ $frequency,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ self::validateCouponPeriod($settlement, $maturity);
+ $frequency = FinancialValidations::validateFrequency($frequency);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+ $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);
+
+ if ($basis === FinancialConstants::BASIS_DAYS_PER_YEAR_NASD) {
+ $settlementDate = Date::excelToDateTimeObject($settlement);
+ $settlementEoM = Helpers::isLastDayOfMonth($settlementDate);
+ if ($settlementEoM) {
+ ++$settlement;
+ }
+ }
+
+ return (float) DateTimeExcel\YearFrac::fraction($settlement, $next, $basis) * $daysPerYear;
+ }
+
+ /**
+ * COUPNCD.
+ *
+ * Returns the next coupon date after the settlement date.
+ *
+ * Excel Function:
+ * COUPNCD(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use (int).
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function COUPNCD(
+ $settlement,
+ $maturity,
+ $frequency,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ self::validateCouponPeriod($settlement, $maturity);
+ $frequency = FinancialValidations::validateFrequency($frequency);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);
+ }
+
+ /**
+ * COUPNUM.
+ *
+ * Returns the number of coupons payable between the settlement date and maturity date,
+ * rounded up to the nearest whole coupon.
+ *
+ * Excel Function:
+ * COUPNUM(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use (int).
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return int|string
+ */
+ public static function COUPNUM(
+ $settlement,
+ $maturity,
+ $frequency,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ self::validateCouponPeriod($settlement, $maturity);
+ $frequency = FinancialValidations::validateFrequency($frequency);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $yearsBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction(
+ $settlement,
+ $maturity,
+ FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ );
+
+ return (int) ceil((float) $yearsBetweenSettlementAndMaturity * $frequency);
+ }
+
+ /**
+ * COUPPCD.
+ *
+ * Returns the previous coupon date before the settlement date.
+ *
+ * Excel Function:
+ * COUPPCD(settlement,maturity,frequency[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue
+ * date when the security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $frequency The number of coupon payments per year.
+ * Valid frequency values are:
+ * 1 Annual
+ * 2 Semi-Annual
+ * 4 Quarterly
+ * @param mixed $basis The type of day count to use (int).
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
+ * depending on the value of the ReturnDateType flag
+ */
+ public static function COUPPCD(
+ $settlement,
+ $maturity,
+ $frequency,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $frequency = Functions::flattenSingleValue($frequency);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ self::validateCouponPeriod($settlement, $maturity);
+ $frequency = FinancialValidations::validateFrequency($frequency);
+ $basis = FinancialValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);
+ }
+
+ private static function monthsDiff(DateTime $result, int $months, string $plusOrMinus, int $day, bool $lastDayFlag): void
+ {
+ $result->setDate((int) $result->format('Y'), (int) $result->format('m'), 1);
+ $result->modify("$plusOrMinus $months months");
+ $daysInMonth = (int) $result->format('t');
+ $result->setDate((int) $result->format('Y'), (int) $result->format('m'), $lastDayFlag ? $daysInMonth : min($day, $daysInMonth));
+ }
+
+ private static function couponFirstPeriodDate(float $settlement, float $maturity, int $frequency, bool $next): float
+ {
+ $months = 12 / $frequency;
+
+ $result = Date::excelToDateTimeObject($maturity);
+ $day = (int) $result->format('d');
+ $lastDayFlag = Helpers::isLastDayOfMonth($result);
+
+ while ($settlement < Date::PHPToExcel($result)) {
+ self::monthsDiff($result, $months, '-', $day, $lastDayFlag);
+ }
+ if ($next === true) {
+ self::monthsDiff($result, $months, '+', $day, $lastDayFlag);
+ }
+
+ return (float) Date::PHPToExcel($result);
+ }
+
+ private static function validateCouponPeriod(float $settlement, float $maturity): void
+ {
+ if ($settlement >= $maturity) {
+ throw new Exception(Functions::NAN());
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
new file mode 100644
index 00000000..650a4861
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Depreciation.php
@@ -0,0 +1,266 @@
+getMessage();
+ }
+
+ if ($cost === 0.0) {
+ return 0.0;
+ }
+
+ // Set Fixed Depreciation Rate
+ $fixedDepreciationRate = 1 - ($salvage / $cost) ** (1 / $life);
+ $fixedDepreciationRate = round($fixedDepreciationRate, 3);
+
+ // Loop through each period calculating the depreciation
+ // TODO Handle period value between 0 and 1 (e.g. 0.5)
+ $previousDepreciation = 0;
+ $depreciation = 0;
+ for ($per = 1; $per <= $period; ++$per) {
+ if ($per == 1) {
+ $depreciation = $cost * $fixedDepreciationRate * $month / 12;
+ } elseif ($per == ($life + 1)) {
+ $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12;
+ } else {
+ $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate;
+ }
+ $previousDepreciation += $depreciation;
+ }
+
+ return $depreciation;
+ }
+
+ /**
+ * DDB.
+ *
+ * Returns the depreciation of an asset for a specified period using the
+ * double-declining balance method or some other method you specify.
+ *
+ * Excel Function:
+ * DDB(cost,salvage,life,period[,factor])
+ *
+ * @param mixed $cost Initial cost of the asset
+ * @param mixed $salvage Value at the end of the depreciation.
+ * (Sometimes called the salvage value of the asset)
+ * @param mixed $life Number of periods over which the asset is depreciated.
+ * (Sometimes called the useful life of the asset)
+ * @param mixed $period The period for which you want to calculate the
+ * depreciation. Period must use the same units as life.
+ * @param mixed $factor The rate at which the balance declines.
+ * If factor is omitted, it is assumed to be 2 (the
+ * double-declining balance method).
+ *
+ * @return float|string
+ */
+ public static function DDB($cost, $salvage, $life, $period, $factor = 2.0)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+ $period = Functions::flattenSingleValue($period);
+ $factor = Functions::flattenSingleValue($factor);
+
+ try {
+ $cost = self::validateCost($cost);
+ $salvage = self::validateSalvage($salvage);
+ $life = self::validateLife($life);
+ $period = self::validatePeriod($period);
+ $factor = self::validateFactor($factor);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($period > $life) {
+ return Functions::NAN();
+ }
+
+ // Loop through each period calculating the depreciation
+ // TODO Handling for fractional $period values
+ $previousDepreciation = 0;
+ $depreciation = 0;
+ for ($per = 1; $per <= $period; ++$per) {
+ $depreciation = min(
+ ($cost - $previousDepreciation) * ($factor / $life),
+ ($cost - $salvage - $previousDepreciation)
+ );
+ $previousDepreciation += $depreciation;
+ }
+
+ return $depreciation;
+ }
+
+ /**
+ * SLN.
+ *
+ * Returns the straight-line depreciation of an asset for one period
+ *
+ * @param mixed $cost Initial cost of the asset
+ * @param mixed $salvage Value at the end of the depreciation
+ * @param mixed $life Number of periods over which the asset is depreciated
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function SLN($cost, $salvage, $life)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+
+ try {
+ $cost = self::validateCost($cost, true);
+ $salvage = self::validateSalvage($salvage, true);
+ $life = self::validateLife($life, true);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($life === 0.0) {
+ return Functions::DIV0();
+ }
+
+ return ($cost - $salvage) / $life;
+ }
+
+ /**
+ * SYD.
+ *
+ * Returns the sum-of-years' digits depreciation of an asset for a specified period.
+ *
+ * @param mixed $cost Initial cost of the asset
+ * @param mixed $salvage Value at the end of the depreciation
+ * @param mixed $life Number of periods over which the asset is depreciated
+ * @param mixed $period Period
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function SYD($cost, $salvage, $life, $period)
+ {
+ $cost = Functions::flattenSingleValue($cost);
+ $salvage = Functions::flattenSingleValue($salvage);
+ $life = Functions::flattenSingleValue($life);
+ $period = Functions::flattenSingleValue($period);
+
+ try {
+ $cost = self::validateCost($cost, true);
+ $salvage = self::validateSalvage($salvage);
+ $life = self::validateLife($life);
+ $period = self::validatePeriod($period);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($period > $life) {
+ return Functions::NAN();
+ }
+
+ $syd = (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1));
+
+ return $syd;
+ }
+
+ private static function validateCost($cost, bool $negativeValueAllowed = false): float
+ {
+ $cost = FinancialValidations::validateFloat($cost);
+ if ($cost < 0.0 && $negativeValueAllowed === false) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $cost;
+ }
+
+ private static function validateSalvage($salvage, bool $negativeValueAllowed = false): float
+ {
+ $salvage = FinancialValidations::validateFloat($salvage);
+ if ($salvage < 0.0 && $negativeValueAllowed === false) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $salvage;
+ }
+
+ private static function validateLife($life, bool $negativeValueAllowed = false): float
+ {
+ $life = FinancialValidations::validateFloat($life);
+ if ($life < 0.0 && $negativeValueAllowed === false) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $life;
+ }
+
+ private static function validatePeriod($period, bool $negativeValueAllowed = false): float
+ {
+ $period = FinancialValidations::validateFloat($period);
+ if ($period <= 0.0 && $negativeValueAllowed === false) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $period;
+ }
+
+ private static function validateMonth($month): int
+ {
+ $month = FinancialValidations::validateInt($month);
+ if ($month < 1) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $month;
+ }
+
+ private static function validateFactor($factor): float
+ {
+ $factor = FinancialValidations::validateFloat($factor);
+ if ($factor <= 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $factor;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Dollar.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Dollar.php
new file mode 100644
index 00000000..7bebb391
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Dollar.php
@@ -0,0 +1,97 @@
+ 4)) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $basis;
+ }
+
+ /**
+ * @param mixed $price
+ */
+ public static function validatePrice($price): float
+ {
+ $price = self::validateFloat($price);
+ if ($price < 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $price;
+ }
+
+ /**
+ * @param mixed $parValue
+ */
+ public static function validateParValue($parValue): float
+ {
+ $parValue = self::validateFloat($parValue);
+ if ($parValue < 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $parValue;
+ }
+
+ /**
+ * @param mixed $yield
+ */
+ public static function validateYield($yield): float
+ {
+ $yield = self::validateFloat($yield);
+ if ($yield < 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $yield;
+ }
+
+ /**
+ * @param mixed $discount
+ */
+ public static function validateDiscount($discount): float
+ {
+ $discount = self::validateFloat($discount);
+ if ($discount <= 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $discount;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Helpers.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Helpers.php
new file mode 100644
index 00000000..d339b134
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Helpers.php
@@ -0,0 +1,58 @@
+format('d') === $date->format('t');
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/InterestRate.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/InterestRate.php
new file mode 100644
index 00000000..72df31e1
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/InterestRate.php
@@ -0,0 +1,72 @@
+getMessage();
+ }
+
+ if ($nominalRate <= 0 || $periodsPerYear < 1) {
+ return Functions::NAN();
+ }
+
+ return ((1 + $nominalRate / $periodsPerYear) ** $periodsPerYear) - 1;
+ }
+
+ /**
+ * NOMINAL.
+ *
+ * Returns the nominal interest rate given the effective rate and the number of compounding payments per year.
+ *
+ * @param mixed $effectiveRate Effective interest rate as a float
+ * @param mixed $periodsPerYear Integer number of compounding payments per year
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function nominal($effectiveRate = 0, $periodsPerYear = 0)
+ {
+ $effectiveRate = Functions::flattenSingleValue($effectiveRate);
+ $periodsPerYear = Functions::flattenSingleValue($periodsPerYear);
+
+ try {
+ $effectiveRate = FinancialValidations::validateFloat($effectiveRate);
+ $periodsPerYear = FinancialValidations::validateInt($periodsPerYear);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($effectiveRate <= 0 || $periodsPerYear < 1) {
+ return Functions::NAN();
+ }
+
+ // Calculate
+ return $periodsPerYear * (($effectiveRate + 1) ** (1 / $periodsPerYear) - 1);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php
new file mode 100644
index 00000000..e167429b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/AccruedInterest.php
@@ -0,0 +1,151 @@
+getMessage();
+ }
+
+ $daysBetweenIssueAndSettlement = YearFrac::fraction($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+ $daysBetweenFirstInterestAndSettlement = YearFrac::fraction($firstInterest, $settlement, $basis);
+ if (!is_numeric($daysBetweenFirstInterestAndSettlement)) {
+ // return date error
+ return $daysBetweenFirstInterestAndSettlement;
+ }
+
+ return $parValue * $rate * $daysBetweenIssueAndSettlement;
+ }
+
+ /**
+ * ACCRINTM.
+ *
+ * Returns the accrued interest for a security that pays interest at maturity.
+ *
+ * Excel Function:
+ * ACCRINTM(issue,settlement,rate[,par[,basis]])
+ *
+ * @param mixed $issue The security's issue date
+ * @param mixed $settlement The security's settlement (or maturity) date
+ * @param mixed $rate The security's annual coupon rate
+ * @param mixed $parValue The security's par value.
+ * If you omit parValue, ACCRINT uses $1,000.
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function atMaturity(
+ $issue,
+ $settlement,
+ $rate,
+ $parValue = 1000,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $issue = Functions::flattenSingleValue($issue);
+ $settlement = Functions::flattenSingleValue($settlement);
+ $rate = Functions::flattenSingleValue($rate);
+ $parValue = ($parValue === null) ? 1000 : Functions::flattenSingleValue($parValue);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $issue = SecurityValidations::validateIssueDate($issue);
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ SecurityValidations::validateSecurityPeriod($issue, $settlement);
+ $rate = SecurityValidations::validateRate($rate);
+ $parValue = SecurityValidations::validateParValue($parValue);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysBetweenIssueAndSettlement = YearFrac::fraction($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+
+ return $parValue * $rate * $daysBetweenIssueAndSettlement;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php
new file mode 100644
index 00000000..7d8d5a32
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Price.php
@@ -0,0 +1,283 @@
+getMessage();
+ }
+
+ $dsc = Coupons::COUPDAYSNC($settlement, $maturity, $frequency, $basis);
+ $e = Coupons::COUPDAYS($settlement, $maturity, $frequency, $basis);
+ $n = Coupons::COUPNUM($settlement, $maturity, $frequency, $basis);
+ $a = Coupons::COUPDAYBS($settlement, $maturity, $frequency, $basis);
+
+ $baseYF = 1.0 + ($yield / $frequency);
+ $rfp = 100 * ($rate / $frequency);
+ $de = $dsc / $e;
+
+ $result = $redemption / $baseYF ** (--$n + $de);
+ for ($k = 0; $k <= $n; ++$k) {
+ $result += $rfp / ($baseYF ** ($k + $de));
+ }
+ $result -= $rfp * ($a / $e);
+
+ return $result;
+ }
+
+ /**
+ * PRICEDISC.
+ *
+ * Returns the price per $100 face value of a discounted security.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $discount The security's discount rate
+ * @param mixed $redemption The security's redemption value per $100 face value
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function priceDiscounted(
+ $settlement,
+ $maturity,
+ $discount,
+ $redemption,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $discount = Functions::flattenSingleValue($discount);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ $maturity = SecurityValidations::validateMaturityDate($maturity);
+ SecurityValidations::validateSecurityPeriod($settlement, $maturity);
+ $discount = SecurityValidations::validateDiscount($discount);
+ $redemption = SecurityValidations::validateRedemption($redemption);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity);
+ }
+
+ /**
+ * PRICEMAT.
+ *
+ * Returns the price per $100 face value of a security that pays interest at maturity.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security's settlement date is the date after the issue date when the
+ * security is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $issue The security's issue date
+ * @param mixed $rate The security's interest rate at date of issue
+ * @param mixed $yield The security's annual yield
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function priceAtMaturity(
+ $settlement,
+ $maturity,
+ $issue,
+ $rate,
+ $yield,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $issue = Functions::flattenSingleValue($issue);
+ $rate = Functions::flattenSingleValue($rate);
+ $yield = Functions::flattenSingleValue($yield);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ $maturity = SecurityValidations::validateMaturityDate($maturity);
+ SecurityValidations::validateSecurityPeriod($settlement, $maturity);
+ $issue = SecurityValidations::validateIssueDate($issue);
+ $rate = SecurityValidations::validateRate($rate);
+ $yield = SecurityValidations::validateYield($yield);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenIssueAndSettlement = DateTimeExcel\YearFrac::fraction($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+ $daysBetweenIssueAndSettlement *= $daysPerYear;
+ $daysBetweenIssueAndMaturity = DateTimeExcel\YearFrac::fraction($issue, $maturity, $basis);
+ if (!is_numeric($daysBetweenIssueAndMaturity)) {
+ // return date error
+ return $daysBetweenIssueAndMaturity;
+ }
+ $daysBetweenIssueAndMaturity *= $daysPerYear;
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return (100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) /
+ (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) -
+ (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100);
+ }
+
+ /**
+ * RECEIVED.
+ *
+ * Returns the amount received at maturity for a fully invested Security.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $investment The amount invested in the security
+ * @param mixed $discount The security's discount rate
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function received(
+ $settlement,
+ $maturity,
+ $investment,
+ $discount,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $investment = Functions::flattenSingleValue($investment);
+ $discount = Functions::flattenSingleValue($discount);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ $maturity = SecurityValidations::validateMaturityDate($maturity);
+ SecurityValidations::validateSecurityPeriod($settlement, $maturity);
+ $investment = SecurityValidations::validateFloat($investment);
+ $discount = SecurityValidations::validateDiscount($discount);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($investment <= 0) {
+ return Functions::NAN();
+ }
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return $investment / (1 - ($discount * $daysBetweenSettlementAndMaturity));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php
new file mode 100644
index 00000000..c5c5211b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Rates.php
@@ -0,0 +1,137 @@
+getMessage();
+ }
+
+ if ($price <= 0.0) {
+ return Functions::NAN();
+ }
+
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return (1 - $price / $redemption) / $daysBetweenSettlementAndMaturity;
+ }
+
+ /**
+ * INTRATE.
+ *
+ * Returns the interest rate for a fully invested security.
+ *
+ * Excel Function:
+ * INTRATE(settlement,maturity,investment,redemption[,basis])
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security settlement date is the date after the issue date when the security
+ * is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $investment the amount invested in the security
+ * @param mixed $redemption the amount to be received at maturity
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string
+ */
+ public static function interest(
+ $settlement,
+ $maturity,
+ $investment,
+ $redemption,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $investment = Functions::flattenSingleValue($investment);
+ $redemption = Functions::flattenSingleValue($redemption);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ $maturity = SecurityValidations::validateMaturityDate($maturity);
+ SecurityValidations::validateSecurityPeriod($settlement, $maturity);
+ $investment = SecurityValidations::validateFloat($investment);
+ $redemption = SecurityValidations::validateRedemption($redemption);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($investment <= 0) {
+ return Functions::NAN();
+ }
+
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+
+ return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php
new file mode 100644
index 00000000..497197b8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/SecurityValidations.php
@@ -0,0 +1,42 @@
+= $maturity) {
+ throw new Exception(Functions::NAN());
+ }
+ }
+
+ /**
+ * @param mixed $redemption
+ */
+ public static function validateRedemption($redemption): float
+ {
+ $redemption = self::validateFloat($redemption);
+ if ($redemption <= 0.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $redemption;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php
new file mode 100644
index 00000000..aa626935
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/Securities/Yields.php
@@ -0,0 +1,153 @@
+getMessage();
+ }
+
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity);
+ }
+
+ /**
+ * YIELDMAT.
+ *
+ * Returns the annual yield of a security that pays interest at maturity.
+ *
+ * @param mixed $settlement The security's settlement date.
+ * The security's settlement date is the date after the issue date when the security
+ * is traded to the buyer.
+ * @param mixed $maturity The security's maturity date.
+ * The maturity date is the date when the security expires.
+ * @param mixed $issue The security's issue date
+ * @param mixed $rate The security's interest rate at date of issue
+ * @param mixed $price The security's price per $100 face value
+ * @param mixed $basis The type of day count to use.
+ * 0 or omitted US (NASD) 30/360
+ * 1 Actual/actual
+ * 2 Actual/360
+ * 3 Actual/365
+ * 4 European 30/360
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function yieldAtMaturity(
+ $settlement,
+ $maturity,
+ $issue,
+ $rate,
+ $price,
+ $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ ) {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $issue = Functions::flattenSingleValue($issue);
+ $rate = Functions::flattenSingleValue($rate);
+ $price = Functions::flattenSingleValue($price);
+ $basis = ($basis === null)
+ ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD
+ : Functions::flattenSingleValue($basis);
+
+ try {
+ $settlement = SecurityValidations::validateSettlementDate($settlement);
+ $maturity = SecurityValidations::validateMaturityDate($maturity);
+ SecurityValidations::validateSecurityPeriod($settlement, $maturity);
+ $issue = SecurityValidations::validateIssueDate($issue);
+ $rate = SecurityValidations::validateRate($rate);
+ $price = SecurityValidations::validatePrice($price);
+ $basis = SecurityValidations::validateBasis($basis);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysPerYear = Helpers::daysPerYear(DateTimeExcel\DateParts::year($settlement), $basis);
+ if (!is_numeric($daysPerYear)) {
+ return $daysPerYear;
+ }
+ $daysBetweenIssueAndSettlement = DateTimeExcel\YearFrac::fraction($issue, $settlement, $basis);
+ if (!is_numeric($daysBetweenIssueAndSettlement)) {
+ // return date error
+ return $daysBetweenIssueAndSettlement;
+ }
+ $daysBetweenIssueAndSettlement *= $daysPerYear;
+ $daysBetweenIssueAndMaturity = DateTimeExcel\YearFrac::fraction($issue, $maturity, $basis);
+ if (!is_numeric($daysBetweenIssueAndMaturity)) {
+ // return date error
+ return $daysBetweenIssueAndMaturity;
+ }
+ $daysBetweenIssueAndMaturity *= $daysPerYear;
+ $daysBetweenSettlementAndMaturity = DateTimeExcel\YearFrac::fraction($settlement, $maturity, $basis);
+ if (!is_numeric($daysBetweenSettlementAndMaturity)) {
+ // return date error
+ return $daysBetweenSettlementAndMaturity;
+ }
+ $daysBetweenSettlementAndMaturity *= $daysPerYear;
+
+ return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) -
+ (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) /
+ (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) *
+ ($daysPerYear / $daysBetweenSettlementAndMaturity);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php
new file mode 100644
index 00000000..c60af0b0
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/TreasuryBill.php
@@ -0,0 +1,147 @@
+getMessage();
+ }
+
+ if ($discount <= 0) {
+ return Functions::NAN();
+ }
+
+ $daysBetweenSettlementAndMaturity = $maturity - $settlement;
+ $daysPerYear = Helpers::daysPerYear(
+ DateTimeExcel\DateParts::year($maturity),
+ FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL
+ );
+
+ if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {
+ return Functions::NAN();
+ }
+
+ return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity);
+ }
+
+ /**
+ * TBILLPRICE.
+ *
+ * Returns the price per $100 face value for a Treasury bill.
+ *
+ * @param mixed $settlement The Treasury bill's settlement date.
+ * The Treasury bill's settlement date is the date after the issue date
+ * when the Treasury bill is traded to the buyer.
+ * @param mixed $maturity The Treasury bill's maturity date.
+ * The maturity date is the date when the Treasury bill expires.
+ * @param mixed $discount The Treasury bill's discount rate
+ *
+ * @return float|string Result, or a string containing an error
+ */
+ public static function price($settlement, $maturity, $discount)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $discount = Functions::flattenSingleValue($discount);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ $discount = FinancialValidations::validateFloat($discount);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($discount <= 0) {
+ return Functions::NAN();
+ }
+
+ $daysBetweenSettlementAndMaturity = $maturity - $settlement;
+ $daysPerYear = Helpers::daysPerYear(
+ DateTimeExcel\DateParts::year($maturity),
+ FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL
+ );
+
+ if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {
+ return Functions::NAN();
+ }
+
+ $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360));
+ if ($price < 0.0) {
+ return Functions::NAN();
+ }
+
+ return $price;
+ }
+
+ /**
+ * TBILLYIELD.
+ *
+ * Returns the yield for a Treasury bill.
+ *
+ * @param mixed $settlement The Treasury bill's settlement date.
+ * The Treasury bill's settlement date is the date after the issue date when
+ * the Treasury bill is traded to the buyer.
+ * @param mixed $maturity The Treasury bill's maturity date.
+ * The maturity date is the date when the Treasury bill expires.
+ * @param mixed $price The Treasury bill's price per $100 face value
+ *
+ * @return float|string
+ */
+ public static function yield($settlement, $maturity, $price)
+ {
+ $settlement = Functions::flattenSingleValue($settlement);
+ $maturity = Functions::flattenSingleValue($maturity);
+ $price = Functions::flattenSingleValue($price);
+
+ try {
+ $settlement = FinancialValidations::validateSettlementDate($settlement);
+ $maturity = FinancialValidations::validateMaturityDate($maturity);
+ $price = FinancialValidations::validatePrice($price);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $daysBetweenSettlementAndMaturity = $maturity - $settlement;
+ $daysPerYear = Helpers::daysPerYear(
+ DateTimeExcel\DateParts::year($maturity),
+ FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL
+ );
+
+ if ($daysBetweenSettlementAndMaturity > $daysPerYear || $daysBetweenSettlementAndMaturity < 0) {
+ return Functions::NAN();
+ }
+
+ return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php
index c11af834..cd1402fd 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/FormulaParser.php
@@ -90,10 +90,8 @@ class FormulaParser
* Get Token.
*
* @param int $pId Token id
- *
- * @return string
*/
- public function getToken($pId = 0)
+ public function getToken(int $pId = 0): FormulaToken
{
if (isset($this->tokens[$pId])) {
return $this->tokens[$pId];
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php
index 022e6be5..aea2323e 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Functions.php
@@ -303,7 +303,7 @@ class Functions
*
* @param mixed $value Value to check
*
- * @return bool
+ * @return int|string
*/
public static function errorType($value = '')
{
@@ -576,7 +576,7 @@ class Functions
/**
* Convert a multi-dimensional array to a simple 1-dimensional array.
*
- * @param array $array Array to be flattened
+ * @param array|mixed $array Array to be flattened
*
* @return array Flattened array
*/
@@ -609,7 +609,7 @@ class Functions
/**
* Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing.
*
- * @param array $array Array to be flattened
+ * @param array|mixed $array Array to be flattened
*
* @return array Flattened array
*/
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical/Conditional.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical/Conditional.php
index 12256d34..e84d0f33 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical/Conditional.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Logical/Conditional.php
@@ -83,11 +83,11 @@ class Conditional
$targetValue = Functions::flattenSingleValue($arguments[0]);
$argc = count($arguments) - 1;
$switchCount = floor($argc / 2);
- $switchSatisfied = false;
$hasDefaultClause = $argc % 2 !== 0;
- $defaultClause = $argc % 2 === 0 ? null : $arguments[count($arguments) - 1];
+ $defaultClause = $argc % 2 === 0 ? null : $arguments[$argc];
- if ($switchCount) {
+ $switchSatisfied = false;
+ if ($switchCount > 0) {
for ($index = 0; $index < $switchCount; ++$index) {
if ($targetValue == $arguments[$index * 2 + 1]) {
$result = $arguments[$index * 2 + 2];
@@ -98,7 +98,7 @@ class Conditional
}
}
- if (!$switchSatisfied) {
+ if ($switchSatisfied !== true) {
$result = $hasDefaultClause ? $defaultClause : Functions::NA();
}
}
@@ -161,12 +161,14 @@ class Conditional
*/
public static function IFS(...$arguments)
{
- if (count($arguments) % 2 != 0) {
+ $argumentCount = count($arguments);
+
+ if ($argumentCount % 2 != 0) {
return Functions::NA();
}
// We use instance of Exception as a falseValue in order to prevent string collision with value in cell
$falseValueException = new Exception();
- for ($i = 0; $i < count($arguments); $i += 2) {
+ for ($i = 0; $i < $argumentCount; $i += 2) {
$testValue = ($arguments[$i] === null) ? '' : Functions::flattenSingleValue($arguments[$i]);
$returnIfTrue = ($arguments[$i + 1] === null) ? '' : Functions::flattenSingleValue($arguments[$i + 1]);
$result = self::statementIf($testValue, $returnIfTrue, $falseValueException);
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php
index 45aa9239..c213396d 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef.php
@@ -2,11 +2,20 @@
namespace PhpOffice\PhpSpreadsheet\Calculation;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Address;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\HLookup;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Indirect;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Lookup;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Matrix;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\Offset;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\RowColumnInformation;
+use PhpOffice\PhpSpreadsheet\Calculation\LookupRef\VLookup;
use PhpOffice\PhpSpreadsheet\Cell\Cell;
-use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
-use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
+/**
+ * @deprecated 1.18.0
+ */
class LookupRef
{
/**
@@ -17,15 +26,20 @@ class LookupRef
* Excel Function:
* =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText])
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Address::cell()
+ * Use the cell() method in the LookupRef\Address class instead
+ *
* @param mixed $row Row number to use in the cell reference
* @param mixed $column Column number to use in the cell reference
* @param int $relativity Flag indicating the type of reference to return
* 1 or omitted Absolute
- * 2 Absolute row; relative column
- * 3 Relative row; absolute column
- * 4 Relative
+ * 2 Absolute row; relative column
+ * 3 Relative row; absolute column
+ * 4 Relative
* @param bool $referenceStyle A logical value that specifies the A1 or R1C1 reference style.
- * TRUE or omitted CELL_ADDRESS returns an A1-style reference
+ * TRUE or omitted CELL_ADDRESS returns an A1-style reference
* FALSE CELL_ADDRESS returns an R1C1-style reference
* @param string $sheetText Optional Name of worksheet to use
*
@@ -33,87 +47,34 @@ class LookupRef
*/
public static function cellAddress($row, $column, $relativity = 1, $referenceStyle = true, $sheetText = '')
{
- $row = Functions::flattenSingleValue($row);
- $column = Functions::flattenSingleValue($column);
- $relativity = Functions::flattenSingleValue($relativity);
- $sheetText = Functions::flattenSingleValue($sheetText);
-
- if (($row < 1) || ($column < 1)) {
- return Functions::VALUE();
- }
-
- if ($sheetText > '') {
- if (strpos($sheetText, ' ') !== false) {
- $sheetText = "'" . $sheetText . "'";
- }
- $sheetText .= '!';
- }
- if ((!is_bool($referenceStyle)) || $referenceStyle) {
- $rowRelative = $columnRelative = '$';
- $column = Coordinate::stringFromColumnIndex($column);
- if (($relativity == 2) || ($relativity == 4)) {
- $columnRelative = '';
- }
- if (($relativity == 3) || ($relativity == 4)) {
- $rowRelative = '';
- }
-
- return $sheetText . $columnRelative . $column . $rowRelative . $row;
- }
- if (($relativity == 2) || ($relativity == 4)) {
- $column = '[' . $column . ']';
- }
- if (($relativity == 3) || ($relativity == 4)) {
- $row = '[' . $row . ']';
- }
-
- return $sheetText . 'R' . $row . 'C' . $column;
+ return Address::cell($row, $column, $relativity, $referenceStyle, $sheetText);
}
/**
* COLUMN.
*
* Returns the column number of the given cell reference
- * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array.
- * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
- * reference of the cell in which the COLUMN function appears; otherwise this function returns 0.
+ * If the cell reference is a range of cells, COLUMN returns the column numbers of each column
+ * in the reference as a horizontal array.
+ * If cell reference is omitted, and the function is being called through the calculation engine,
+ * then it is assumed to be the reference of the cell in which the COLUMN function appears;
+ * otherwise this function returns 1.
*
* Excel Function:
* =COLUMN([cellAddress])
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\RowColumnInformation::COLUMN()
+ * Use the COLUMN() method in the LookupRef\RowColumnInformation class instead
+ *
* @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers
*
- * @return int|int[]
+ * @return int|int[]|string
*/
- public static function COLUMN($cellAddress = null)
+ public static function COLUMN($cellAddress = null, ?Cell $cell = null)
{
- if ($cellAddress === null || trim($cellAddress) === '') {
- return 0;
- }
-
- if (is_array($cellAddress)) {
- foreach ($cellAddress as $columnKey => $value) {
- $columnKey = preg_replace('/[^a-z]/i', '', $columnKey);
-
- return (int) Coordinate::columnIndexFromString($columnKey);
- }
- } else {
- [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
- if (strpos($cellAddress, ':') !== false) {
- [$startAddress, $endAddress] = explode(':', $cellAddress);
- $startAddress = preg_replace('/[^a-z]/i', '', $startAddress);
- $endAddress = preg_replace('/[^a-z]/i', '', $endAddress);
- $returnValue = [];
- do {
- $returnValue[] = (int) Coordinate::columnIndexFromString($startAddress);
- } while ($startAddress++ != $endAddress);
-
- return $returnValue;
- }
- $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress);
-
- return (int) Coordinate::columnIndexFromString($cellAddress);
- }
+ return RowColumnInformation::COLUMN($cellAddress, $cell);
}
/**
@@ -124,73 +85,46 @@ class LookupRef
* Excel Function:
* =COLUMNS(cellAddress)
*
- * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\RowColumnInformation::COLUMNS()
+ * Use the COLUMNS() method in the LookupRef\RowColumnInformation class instead
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells
+ * for which you want the number of columns
*
* @return int|string The number of columns in cellAddress, or a string if arguments are invalid
*/
public static function COLUMNS($cellAddress = null)
{
- if ($cellAddress === null || $cellAddress === '') {
- return 1;
- } elseif (!is_array($cellAddress)) {
- return Functions::VALUE();
- }
-
- reset($cellAddress);
- $isMatrix = (is_numeric(key($cellAddress)));
- [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
-
- if ($isMatrix) {
- return $rows;
- }
-
- return $columns;
+ return RowColumnInformation::COLUMNS($cellAddress);
}
/**
* ROW.
*
* Returns the row number of the given cell reference
- * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array.
- * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the
- * reference of the cell in which the ROW function appears; otherwise this function returns 0.
+ * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference
+ * as a vertical array.
+ * If cell reference is omitted, and the function is being called through the calculation engine,
+ * then it is assumed to be the reference of the cell in which the ROW function appears;
+ * otherwise this function returns 1.
*
* Excel Function:
* =ROW([cellAddress])
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\RowColumnInformation::ROW()
+ * Use the ROW() method in the LookupRef\RowColumnInformation class instead
+ *
* @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers
*
* @return int|mixed[]|string
*/
- public static function ROW($cellAddress = null)
+ public static function ROW($cellAddress = null, ?Cell $cell = null)
{
- if ($cellAddress === null || trim($cellAddress) === '') {
- return 0;
- }
-
- if (is_array($cellAddress)) {
- foreach ($cellAddress as $columnKey => $rowValue) {
- foreach ($rowValue as $rowKey => $cellValue) {
- return (int) preg_replace('/\D/', '', $rowKey);
- }
- }
- } else {
- [$sheet, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
- if (strpos($cellAddress, ':') !== false) {
- [$startAddress, $endAddress] = explode(':', $cellAddress);
- $startAddress = preg_replace('/\D/', '', $startAddress);
- $endAddress = preg_replace('/\D/', '', $endAddress);
- $returnValue = [];
- do {
- $returnValue[][] = (int) $startAddress;
- } while ($startAddress++ != $endAddress);
-
- return $returnValue;
- }
- [$cellAddress] = explode(':', $cellAddress);
-
- return (int) preg_replace('/\D/', '', $cellAddress);
- }
+ return RowColumnInformation::ROW($cellAddress, $cell);
}
/**
@@ -201,27 +135,19 @@ class LookupRef
* Excel Function:
* =ROWS(cellAddress)
*
- * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\RowColumnInformation::ROWS()
+ * Use the ROWS() method in the LookupRef\RowColumnInformation class instead
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells
+ * for which you want the number of rows
*
* @return int|string The number of rows in cellAddress, or a string if arguments are invalid
*/
public static function ROWS($cellAddress = null)
{
- if ($cellAddress === null || $cellAddress === '') {
- return 1;
- } elseif (!is_array($cellAddress)) {
- return Functions::VALUE();
- }
-
- reset($cellAddress);
- $isMatrix = (is_numeric(key($cellAddress)));
- [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
-
- if ($isMatrix) {
- return $columns;
- }
-
- return $rows;
+ return RowColumnInformation::ROWS($cellAddress);
}
/**
@@ -230,29 +156,20 @@ class LookupRef
* Excel Function:
* =HYPERLINK(linkURL,displayName)
*
- * @param string $linkURL Value to check, is also the value returned when no error
- * @param string $displayName Value to return when testValue is an error condition
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Hyperlink::set()
+ * Use the set() method in the LookupRef\Hyperlink class instead
+ *
+ * @param mixed $linkURL Expect string. Value to check, is also the value returned when no error
+ * @param mixed $displayName Expect string. Value to return when testValue is an error condition
* @param Cell $pCell The cell to set the hyperlink in
*
- * @return mixed The value of $displayName (or $linkURL if $displayName was blank)
+ * @return string The value of $displayName (or $linkURL if $displayName was blank)
*/
public static function HYPERLINK($linkURL = '', $displayName = null, ?Cell $pCell = null)
{
- $linkURL = ($linkURL === null) ? '' : Functions::flattenSingleValue($linkURL);
- $displayName = ($displayName === null) ? '' : Functions::flattenSingleValue($displayName);
-
- if ((!is_object($pCell)) || (trim($linkURL) == '')) {
- return Functions::REF();
- }
-
- if ((is_object($displayName)) || trim($displayName) == '') {
- $displayName = $linkURL;
- }
-
- $pCell->getHyperlink()->setUrl($linkURL);
- $pCell->getHyperlink()->setTooltip($displayName);
-
- return $displayName;
+ return LookupRef\Hyperlink::set($linkURL, $displayName, $pCell);
}
/**
@@ -264,56 +181,21 @@ class LookupRef
* Excel Function:
* =INDIRECT(cellAddress)
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Indirect::INDIRECT()
+ * Use the INDIRECT() method in the LookupRef\Indirect class instead
+ *
* NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010
*
- * @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula)
+ * @param array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula)
* @param Cell $pCell The current cell (containing this formula)
*
- * @return mixed The cells referenced by cellAddress
- *
- * @TODO Support for the optional a1 parameter introduced in Excel 2010
+ * @return array|string An array containing a cell or range of cells, or a string on error
*/
- public static function INDIRECT($cellAddress = null, ?Cell $pCell = null)
+ public static function INDIRECT($cellAddress, Cell $pCell)
{
- $cellAddress = Functions::flattenSingleValue($cellAddress);
- if ($cellAddress === null || $cellAddress === '') {
- return Functions::REF();
- }
-
- $cellAddress1 = $cellAddress;
- $cellAddress2 = null;
- if (strpos($cellAddress, ':') !== false) {
- [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);
- }
-
- if (
- (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
- (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))
- ) {
- if (!preg_match('/^' . Calculation::CALCULATION_REGEXP_DEFINEDNAME . '$/i', $cellAddress1, $matches)) {
- return Functions::REF();
- }
-
- if (strpos($cellAddress, '!') !== false) {
- [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
- $sheetName = trim($sheetName, "'");
- $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
- } else {
- $pSheet = $pCell->getWorksheet();
- }
-
- return Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, false);
- }
-
- if (strpos($cellAddress, '!') !== false) {
- [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
- $sheetName = trim($sheetName, "'");
- $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
- } else {
- $pSheet = $pCell->getWorksheet();
- }
-
- return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false);
+ return Indirect::INDIRECT($cellAddress, true, $pCell);
}
/**
@@ -326,87 +208,34 @@ class LookupRef
* Excel Function:
* =OFFSET(cellAddress, rows, cols, [height], [width])
*
- * @param null|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or
- * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value.
- * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to.
- * Using 5 as the rows argument specifies that the upper-left cell in the reference is
- * five rows below reference. Rows can be positive (which means below the starting reference)
- * or negative (which means above the starting reference).
- * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result
- * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the
- * reference is five columns to the right of reference. Cols can be positive (which means
- * to the right of the starting reference) or negative (which means to the left of the
- * starting reference).
- * @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number.
- * @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number.
+ * @Deprecated 1.18.0
*
- * @return string A reference to a cell or range of cells
+ * @see LookupRef\Offset::OFFSET()
+ * Use the OFFSET() method in the LookupRef\Offset class instead
+ *
+ * @param null|string $cellAddress The reference from which you want to base the offset.
+ * Reference must refer to a cell or range of adjacent cells;
+ * otherwise, OFFSET returns the #VALUE! error value.
+ * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to.
+ * Using 5 as the rows argument specifies that the upper-left cell in the
+ * reference is five rows below reference. Rows can be positive (which means
+ * below the starting reference) or negative (which means above the starting
+ * reference).
+ * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell
+ * of the result to refer to. Using 5 as the cols argument specifies that the
+ * upper-left cell in the reference is five columns to the right of reference.
+ * Cols can be positive (which means to the right of the starting reference)
+ * or negative (which means to the left of the starting reference).
+ * @param mixed $height The height, in number of rows, that you want the returned reference to be.
+ * Height must be a positive number.
+ * @param mixed $width The width, in number of columns, that you want the returned reference to be.
+ * Width must be a positive number.
+ *
+ * @return array|string An array containing a cell or range of cells, or a string on error
*/
public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null, ?Cell $pCell = null)
{
- $rows = Functions::flattenSingleValue($rows);
- $columns = Functions::flattenSingleValue($columns);
- $height = Functions::flattenSingleValue($height);
- $width = Functions::flattenSingleValue($width);
- if ($cellAddress === null) {
- return 0;
- }
-
- if (!is_object($pCell)) {
- return Functions::REF();
- }
-
- $sheetName = null;
- if (strpos($cellAddress, '!')) {
- [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
- $sheetName = trim($sheetName, "'");
- }
- if (strpos($cellAddress, ':')) {
- [$startCell, $endCell] = explode(':', $cellAddress);
- } else {
- $startCell = $endCell = $cellAddress;
- }
- [$startCellColumn, $startCellRow] = Coordinate::coordinateFromString($startCell);
- [$endCellColumn, $endCellRow] = Coordinate::coordinateFromString($endCell);
-
- $startCellRow += $rows;
- $startCellColumn = Coordinate::columnIndexFromString($startCellColumn) - 1;
- $startCellColumn += $columns;
-
- if (($startCellRow <= 0) || ($startCellColumn < 0)) {
- return Functions::REF();
- }
- $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1;
- if (($width != null) && (!is_object($width))) {
- $endCellColumn = $startCellColumn + $width - 1;
- } else {
- $endCellColumn += $columns;
- }
- $startCellColumn = Coordinate::stringFromColumnIndex($startCellColumn + 1);
-
- if (($height != null) && (!is_object($height))) {
- $endCellRow = $startCellRow + $height - 1;
- } else {
- $endCellRow += $rows;
- }
-
- if (($endCellRow <= 0) || ($endCellColumn < 0)) {
- return Functions::REF();
- }
- $endCellColumn = Coordinate::stringFromColumnIndex($endCellColumn + 1);
-
- $cellAddress = $startCellColumn . $startCellRow;
- if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) {
- $cellAddress .= ':' . $endCellColumn . $endCellRow;
- }
-
- if ($sheetName !== null) {
- $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName);
- } else {
- $pSheet = $pCell->getWorksheet();
- }
-
- return Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false);
+ return Offset::OFFSET($cellAddress, $rows, $columns, $height, $width, $pCell);
}
/**
@@ -418,31 +247,16 @@ class LookupRef
* Excel Function:
* =CHOOSE(index_num, value1, [value2], ...)
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Selection::choose()
+ * Use the choose() method in the LookupRef\Selection class instead
+ *
* @return mixed The selected value
*/
public static function CHOOSE(...$chooseArgs)
{
- $chosenEntry = Functions::flattenArray(array_shift($chooseArgs));
- $entryCount = count($chooseArgs) - 1;
-
- if (is_array($chosenEntry)) {
- $chosenEntry = array_shift($chosenEntry);
- }
- if ((is_numeric($chosenEntry)) && (!is_bool($chosenEntry))) {
- --$chosenEntry;
- } else {
- return Functions::VALUE();
- }
- $chosenEntry = floor($chosenEntry);
- if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) {
- return Functions::VALUE();
- }
-
- if (is_array($chooseArgs[$chosenEntry])) {
- return Functions::flattenArray($chooseArgs[$chosenEntry]);
- }
-
- return $chooseArgs[$chosenEntry];
+ return LookupRef\Selection::choose(...$chooseArgs);
}
/**
@@ -453,6 +267,11 @@ class LookupRef
* Excel Function:
* =MATCH(lookup_value, lookup_array, [match_type])
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\ExcelMatch::MATCH()
+ * Use the MATCH() method in the LookupRef\ExcelMatch class instead
+ *
* @param mixed $lookupValue The value that you want to match in lookup_array
* @param mixed $lookupArray The range of cells being searched
* @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below.
@@ -462,145 +281,7 @@ class LookupRef
*/
public static function MATCH($lookupValue, $lookupArray, $matchType = 1)
{
- $lookupArray = Functions::flattenArray($lookupArray);
- $lookupValue = Functions::flattenSingleValue($lookupValue);
- $matchType = ($matchType === null) ? 1 : (int) Functions::flattenSingleValue($matchType);
-
- // MATCH is not case sensitive, so we convert lookup value to be lower cased in case it's string type.
- if (is_string($lookupValue)) {
- $lookupValue = StringHelper::strToLower($lookupValue);
- }
-
- // Lookup_value type has to be number, text, or logical values
- if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {
- return Functions::NA();
- }
-
- // Match_type is 0, 1 or -1
- if (($matchType !== 0) && ($matchType !== -1) && ($matchType !== 1)) {
- return Functions::NA();
- }
-
- // Lookup_array should not be empty
- $lookupArraySize = count($lookupArray);
- if ($lookupArraySize <= 0) {
- return Functions::NA();
- }
-
- if ($matchType == 1) {
- // If match_type is 1 the list has to be processed from last to first
-
- $lookupArray = array_reverse($lookupArray);
- $keySet = array_reverse(array_keys($lookupArray));
- }
-
- // Lookup_array should contain only number, text, or logical values, or empty (null) cells
- foreach ($lookupArray as $i => $lookupArrayValue) {
- // check the type of the value
- if (
- (!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) &&
- (!is_bool($lookupArrayValue)) && ($lookupArrayValue !== null)
- ) {
- return Functions::NA();
- }
- // Convert strings to lowercase for case-insensitive testing
- if (is_string($lookupArrayValue)) {
- $lookupArray[$i] = StringHelper::strToLower($lookupArrayValue);
- }
- if (($lookupArrayValue === null) && (($matchType == 1) || ($matchType == -1))) {
- unset($lookupArray[$i]);
- }
- }
-
- // **
- // find the match
- // **
-
- if ($matchType === 0 || $matchType === 1) {
- foreach ($lookupArray as $i => $lookupArrayValue) {
- $typeMatch = ((gettype($lookupValue) === gettype($lookupArrayValue)) || (is_numeric($lookupValue) && is_numeric($lookupArrayValue)));
- $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue;
- $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue;
- $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch;
-
- if ($matchType === 0) {
- if ($typeMatch && is_string($lookupValue) && (bool) preg_match('/([\?\*])/', $lookupValue)) {
- $splitString = $lookupValue;
- $chars = array_map(function ($i) use ($splitString) {
- return mb_substr($splitString, $i, 1);
- }, range(0, mb_strlen($splitString) - 1));
-
- $length = count($chars);
- $pattern = '/^';
- for ($j = 0; $j < $length; ++$j) {
- if ($chars[$j] === '~') {
- if (isset($chars[$j + 1])) {
- if ($chars[$j + 1] === '*') {
- $pattern .= preg_quote($chars[$j + 1], '/');
- ++$j;
- } elseif ($chars[$j + 1] === '?') {
- $pattern .= preg_quote($chars[$j + 1], '/');
- ++$j;
- }
- } else {
- $pattern .= preg_quote($chars[$j], '/');
- }
- } elseif ($chars[$j] === '*') {
- $pattern .= '.*';
- } elseif ($chars[$j] === '?') {
- $pattern .= '.{1}';
- } else {
- $pattern .= preg_quote($chars[$j], '/');
- }
- }
-
- $pattern .= '$/';
- if ((bool) preg_match($pattern, $lookupArrayValue)) {
- // exact match
- return $i + 1;
- }
- } elseif ($exactMatch) {
- // exact match
- return $i + 1;
- }
- } elseif (($matchType === 1) && $typeMatch && ($lookupArrayValue <= $lookupValue)) {
- $i = array_search($i, $keySet);
-
- // The current value is the (first) match
- return $i + 1;
- }
- }
- } else {
- $maxValueKey = null;
-
- // The basic algorithm is:
- // Iterate and keep the highest match until the next element is smaller than the searched value.
- // Return immediately if perfect match is found
- foreach ($lookupArray as $i => $lookupArrayValue) {
- $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue);
- $exactTypeMatch = $typeMatch && $lookupArrayValue === $lookupValue;
- $nonOnlyNumericExactMatch = !$typeMatch && $lookupArrayValue === $lookupValue;
- $exactMatch = $exactTypeMatch || $nonOnlyNumericExactMatch;
-
- if ($exactMatch) {
- // Another "special" case. If a perfect match is found,
- // the algorithm gives up immediately
- return $i + 1;
- } elseif ($typeMatch & $lookupArrayValue >= $lookupValue) {
- $maxValueKey = $i + 1;
- } elseif ($typeMatch & $lookupArrayValue < $lookupValue) {
- //Excel algorithm gives up immediately if the first element is smaller than the searched value
- break;
- }
- }
-
- if ($maxValueKey !== null) {
- return $maxValueKey;
- }
- }
-
- // Unsuccessful in finding a match, return #N/A error value
- return Functions::NA();
+ return LookupRef\ExcelMatch::MATCH($lookupValue, $lookupArray, $matchType);
}
/**
@@ -611,262 +292,99 @@ class LookupRef
* Excel Function:
* =INDEX(range_array, row_num, [column_num])
*
- * @param mixed $arrayValues A range of cells or an array constant
- * @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required.
- * @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required.
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Matrix::index()
+ * Use the index() method in the LookupRef\Matrix class instead
+ *
+ * @param mixed $rowNum The row in the array or range from which to return a value.
+ * If row_num is omitted, column_num is required.
+ * @param mixed $columnNum The column in the array or range from which to return a value.
+ * If column_num is omitted, row_num is required.
+ * @param mixed $matrix
*
* @return mixed the value of a specified cell or array of cells
*/
- public static function INDEX($arrayValues, $rowNum = 0, $columnNum = 0)
+ public static function INDEX($matrix, $rowNum = 0, $columnNum = 0)
{
- $rowNum = Functions::flattenSingleValue($rowNum);
- $columnNum = Functions::flattenSingleValue($columnNum);
-
- if (($rowNum < 0) || ($columnNum < 0)) {
- return Functions::VALUE();
- }
-
- if (!is_array($arrayValues) || ($rowNum > count($arrayValues))) {
- return Functions::REF();
- }
-
- $rowKeys = array_keys($arrayValues);
- $columnKeys = @array_keys($arrayValues[$rowKeys[0]]);
-
- if ($columnNum > count($columnKeys)) {
- return Functions::VALUE();
- } elseif ($columnNum == 0) {
- if ($rowNum == 0) {
- return $arrayValues;
- }
- $rowNum = $rowKeys[--$rowNum];
- $returnArray = [];
- foreach ($arrayValues as $arrayColumn) {
- if (is_array($arrayColumn)) {
- if (isset($arrayColumn[$rowNum])) {
- $returnArray[] = $arrayColumn[$rowNum];
- } else {
- return [$rowNum => $arrayValues[$rowNum]];
- }
- } else {
- return $arrayValues[$rowNum];
- }
- }
-
- return $returnArray;
- }
- $columnNum = $columnKeys[--$columnNum];
- if ($rowNum > count($rowKeys)) {
- return Functions::VALUE();
- } elseif ($rowNum == 0) {
- return $arrayValues[$columnNum];
- }
- $rowNum = $rowKeys[--$rowNum];
-
- return $arrayValues[$rowNum][$columnNum];
+ return Matrix::index($matrix, $rowNum, $columnNum);
}
/**
* TRANSPOSE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Matrix::transpose()
+ * Use the transpose() method in the LookupRef\Matrix class instead
+ *
* @param array $matrixData A matrix of values
*
* @return array
*
- * Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix
+ * Unlike the Excel TRANSPOSE function, which will only work on a single row or column,
+ * this function will transpose a full matrix
*/
public static function TRANSPOSE($matrixData)
{
- $returnMatrix = [];
- if (!is_array($matrixData)) {
- $matrixData = [[$matrixData]];
- }
-
- $column = 0;
- foreach ($matrixData as $matrixRow) {
- $row = 0;
- foreach ($matrixRow as $matrixCell) {
- $returnMatrix[$row][$column] = $matrixCell;
- ++$row;
- }
- ++$column;
- }
-
- return $returnMatrix;
- }
-
- private static function vlookupSort($a, $b)
- {
- reset($a);
- $firstColumn = key($a);
- $aLower = StringHelper::strToLower($a[$firstColumn]);
- $bLower = StringHelper::strToLower($b[$firstColumn]);
- if ($aLower == $bLower) {
- return 0;
- }
-
- return ($aLower < $bLower) ? -1 : 1;
+ return Matrix::transpose($matrixData);
}
/**
* VLOOKUP
- * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number.
+ * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value
+ * in the same row based on the index_number.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\VLookup::lookup()
+ * Use the lookup() method in the LookupRef\VLookup class instead
*
* @param mixed $lookup_value The value that you want to match in lookup_array
* @param mixed $lookup_array The range of cells being searched
- * @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1.
+ * @param mixed $index_number The column number in table_array from which the matching value must be returned.
+ * The first column is 1.
* @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
*
* @return mixed The value of the found cell
*/
public static function VLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true)
{
- $lookup_value = Functions::flattenSingleValue($lookup_value);
- $index_number = Functions::flattenSingleValue($index_number);
- $not_exact_match = Functions::flattenSingleValue($not_exact_match);
-
- // index_number must be greater than or equal to 1
- if ($index_number < 1) {
- return Functions::VALUE();
- }
-
- // index_number must be less than or equal to the number of columns in lookup_array
- if ((!is_array($lookup_array)) || (empty($lookup_array))) {
- return Functions::REF();
- }
- $f = array_keys($lookup_array);
- $firstRow = array_pop($f);
- if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) {
- return Functions::REF();
- }
- $columnKeys = array_keys($lookup_array[$firstRow]);
- $returnColumn = $columnKeys[--$index_number];
- $firstColumn = array_shift($columnKeys);
-
- if (!$not_exact_match) {
- uasort($lookup_array, ['self', 'vlookupSort']);
- }
-
- $lookupLower = StringHelper::strToLower($lookup_value);
- $rowNumber = $rowValue = false;
- foreach ($lookup_array as $rowKey => $rowData) {
- $firstLower = StringHelper::strToLower($rowData[$firstColumn]);
-
- // break if we have passed possible keys
- if (
- (is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) ||
- (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && ($firstLower > $lookupLower))
- ) {
- break;
- }
- // remember the last key, but only if datatypes match
- if (
- (is_numeric($lookup_value) && is_numeric($rowData[$firstColumn])) ||
- (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]))
- ) {
- if ($not_exact_match) {
- $rowNumber = $rowKey;
-
- continue;
- } elseif (
- ($firstLower == $lookupLower)
- // Spreadsheets software returns first exact match,
- // we have sorted and we might have broken key orders
- // we want the first one (by its initial index)
- && (($rowNumber == false) || ($rowKey < $rowNumber))
- ) {
- $rowNumber = $rowKey;
- }
- }
- }
-
- if ($rowNumber !== false) {
- // return the appropriate value
- return $lookup_array[$rowNumber][$returnColumn];
- }
-
- return Functions::NA();
+ return VLookup::lookup($lookup_value, $lookup_array, $index_number, $not_exact_match);
}
/**
* HLOOKUP
- * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number.
+ * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value
+ * in the same column based on the index_number.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\HLookup::lookup()
+ * Use the lookup() method in the LookupRef\HLookup class instead
*
* @param mixed $lookup_value The value that you want to match in lookup_array
* @param mixed $lookup_array The range of cells being searched
- * @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1.
+ * @param mixed $index_number The row number in table_array from which the matching value must be returned.
+ * The first row is 1.
* @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value
*
* @return mixed The value of the found cell
*/
public static function HLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true)
{
- $lookup_value = Functions::flattenSingleValue($lookup_value);
- $index_number = Functions::flattenSingleValue($index_number);
- $not_exact_match = Functions::flattenSingleValue($not_exact_match);
-
- // index_number must be greater than or equal to 1
- if ($index_number < 1) {
- return Functions::VALUE();
- }
-
- // index_number must be less than or equal to the number of columns in lookup_array
- if ((!is_array($lookup_array)) || (empty($lookup_array))) {
- return Functions::REF();
- }
- $f = array_keys($lookup_array);
- $firstRow = reset($f);
- if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array))) {
- return Functions::REF();
- }
-
- $firstkey = $f[0] - 1;
- $returnColumn = $firstkey + $index_number;
- $firstColumn = array_shift($f);
- $rowNumber = null;
- foreach ($lookup_array[$firstColumn] as $rowKey => $rowData) {
- // break if we have passed possible keys
- $bothNumeric = is_numeric($lookup_value) && is_numeric($rowData);
- $bothNotNumeric = !is_numeric($lookup_value) && !is_numeric($rowData);
- $lookupLower = StringHelper::strToLower($lookup_value);
- $rowDataLower = StringHelper::strToLower($rowData);
-
- if (
- $not_exact_match && (
- ($bothNumeric && $rowData > $lookup_value) ||
- ($bothNotNumeric && $rowDataLower > $lookupLower)
- )
- ) {
- break;
- }
-
- // Remember the last key, but only if datatypes match (as in VLOOKUP)
- if ($bothNumeric || $bothNotNumeric) {
- if ($not_exact_match) {
- $rowNumber = $rowKey;
-
- continue;
- } elseif (
- $rowDataLower === $lookupLower
- && ($rowNumber === null || $rowKey < $rowNumber)
- ) {
- $rowNumber = $rowKey;
- }
- }
- }
-
- if ($rowNumber !== null) {
- // otherwise return the appropriate value
- return $lookup_array[$returnColumn][$rowNumber];
- }
-
- return Functions::NA();
+ return HLookup::lookup($lookup_value, $lookup_array, $index_number, $not_exact_match);
}
/**
* LOOKUP
* The LOOKUP function searches for value either from a one-row or one-column range or from an array.
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Lookup::lookup()
+ * Use the lookup() method in the LookupRef\Lookup class instead
+ *
* @param mixed $lookup_value The value that you want to match in lookup_array
* @param mixed $lookup_vector The range of cells being searched
* @param null|mixed $result_vector The column from which the matching value must be returned
@@ -875,71 +393,17 @@ class LookupRef
*/
public static function LOOKUP($lookup_value, $lookup_vector, $result_vector = null)
{
- $lookup_value = Functions::flattenSingleValue($lookup_value);
-
- if (!is_array($lookup_vector)) {
- return Functions::NA();
- }
- $hasResultVector = isset($result_vector);
- $lookupRows = count($lookup_vector);
- $l = array_keys($lookup_vector);
- $l = array_shift($l);
- $lookupColumns = count($lookup_vector[$l]);
- // we correctly orient our results
- if (($lookupRows === 1 && $lookupColumns > 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) {
- $lookup_vector = self::TRANSPOSE($lookup_vector);
- $lookupRows = count($lookup_vector);
- $l = array_keys($lookup_vector);
- $lookupColumns = count($lookup_vector[array_shift($l)]);
- }
-
- if ($result_vector === null) {
- $result_vector = $lookup_vector;
- }
- $resultRows = count($result_vector);
- $l = array_keys($result_vector);
- $l = array_shift($l);
- $resultColumns = count($result_vector[$l]);
- // we correctly orient our results
- if ($resultRows === 1 && $resultColumns > 1) {
- $result_vector = self::TRANSPOSE($result_vector);
- $resultRows = count($result_vector);
- $r = array_keys($result_vector);
- $resultColumns = count($result_vector[array_shift($r)]);
- }
-
- if ($lookupRows === 2 && !$hasResultVector) {
- $result_vector = array_pop($lookup_vector);
- $lookup_vector = array_shift($lookup_vector);
- }
-
- if ($lookupColumns !== 2) {
- foreach ($lookup_vector as &$value) {
- if (is_array($value)) {
- $k = array_keys($value);
- $key1 = $key2 = array_shift($k);
- ++$key2;
- $dataValue1 = $value[$key1];
- } else {
- $key1 = 0;
- $key2 = 1;
- $dataValue1 = $value;
- }
- $dataValue2 = array_shift($result_vector);
- if (is_array($dataValue2)) {
- $dataValue2 = array_shift($dataValue2);
- }
- $value = [$key1 => $dataValue1, $key2 => $dataValue2];
- }
- unset($value);
- }
-
- return self::VLOOKUP($lookup_value, $lookup_vector, 2);
+ return Lookup::lookup($lookup_value, $lookup_vector, $result_vector);
}
/**
* FORMULATEXT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see LookupRef\Formula::text()
+ * Use the text() method in the LookupRef\Formula class instead
+ *
* @param mixed $cellReference The cell to check
* @param Cell $pCell The current cell (containing this formula)
*
@@ -947,22 +411,6 @@ class LookupRef
*/
public static function FORMULATEXT($cellReference = '', ?Cell $pCell = null)
{
- if ($pCell === null) {
- return Functions::REF();
- }
-
- preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellReference, $matches);
-
- $cellReference = $matches[6] . $matches[7];
- $worksheetName = trim($matches[3], "'");
- $worksheet = (!empty($worksheetName))
- ? $pCell->getWorksheet()->getParent()->getSheetByName($worksheetName)
- : $pCell->getWorksheet();
-
- if (!$worksheet->getCell($cellReference)->isFormula()) {
- return Functions::NA();
- }
-
- return $worksheet->getCell($cellReference)->getValue();
+ return LookupRef\Formula::text($cellReference, $pCell);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Address.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Address.php
new file mode 100644
index 00000000..58215f27
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Address.php
@@ -0,0 +1,98 @@
+ '') {
+ if (strpos($sheetName, ' ') !== false || strpos($sheetName, '[') !== false) {
+ $sheetName = "'{$sheetName}'";
+ }
+ $sheetName .= '!';
+ }
+
+ return $sheetName;
+ }
+
+ private static function formatAsA1(int $row, int $column, int $relativity, string $sheetName): string
+ {
+ $rowRelative = $columnRelative = '$';
+ if (($relativity == self::ADDRESS_COLUMN_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {
+ $columnRelative = '';
+ }
+ if (($relativity == self::ADDRESS_ROW_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {
+ $rowRelative = '';
+ }
+ $column = Coordinate::stringFromColumnIndex($column);
+
+ return "{$sheetName}{$columnRelative}{$column}{$rowRelative}{$row}";
+ }
+
+ private static function formatAsR1C1(int $row, int $column, int $relativity, string $sheetName): string
+ {
+ if (($relativity == self::ADDRESS_COLUMN_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {
+ $column = "[{$column}]";
+ }
+ if (($relativity == self::ADDRESS_ROW_RELATIVE) || ($relativity == self::ADDRESS_RELATIVE)) {
+ $row = "[{$row}]";
+ }
+
+ return "{$sheetName}R{$row}C{$column}";
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
new file mode 100644
index 00000000..71358bf3
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/ExcelMatch.php
@@ -0,0 +1,198 @@
+getMessage();
+ }
+
+ // MATCH() is not case sensitive, so we convert lookup value to be lower cased if it's a string type.
+ if (is_string($lookupValue)) {
+ $lookupValue = StringHelper::strToLower($lookupValue);
+ }
+
+ $valueKey = null;
+ switch ($matchType) {
+ case self::MATCHTYPE_LARGEST_VALUE:
+ $valueKey = self::matchLargestValue($lookupArray, $lookupValue, $keySet);
+
+ break;
+ case self::MATCHTYPE_FIRST_VALUE:
+ $valueKey = self::matchFirstValue($lookupArray, $lookupValue);
+
+ break;
+ case self::MATCHTYPE_SMALLEST_VALUE:
+ default:
+ $valueKey = self::matchSmallestValue($lookupArray, $lookupValue);
+ }
+
+ if ($valueKey !== null) {
+ return ++$valueKey;
+ }
+
+ // Unsuccessful in finding a match, return #N/A error value
+ return Functions::NA();
+ }
+
+ private static function matchFirstValue($lookupArray, $lookupValue)
+ {
+ $wildcardLookup = ((bool) preg_match('/([\?\*])/', $lookupValue));
+ $wildcard = WildcardMatch::wildcard($lookupValue);
+
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ $typeMatch = ((gettype($lookupValue) === gettype($lookupArrayValue)) ||
+ (is_numeric($lookupValue) && is_numeric($lookupArrayValue)));
+
+ if (
+ $typeMatch && is_string($lookupValue) &&
+ $wildcardLookup && WildcardMatch::compare($lookupArrayValue, $wildcard)
+ ) {
+ // wildcard match
+ return $i;
+ } elseif ($lookupArrayValue === $lookupValue) {
+ // exact match
+ return $i;
+ }
+ }
+
+ return null;
+ }
+
+ private static function matchLargestValue($lookupArray, $lookupValue, $keySet)
+ {
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ $typeMatch = ((gettype($lookupValue) === gettype($lookupArrayValue)) ||
+ (is_numeric($lookupValue) && is_numeric($lookupArrayValue)));
+
+ if ($typeMatch && ($lookupArrayValue <= $lookupValue)) {
+ return array_search($i, $keySet);
+ }
+ }
+
+ return null;
+ }
+
+ private static function matchSmallestValue($lookupArray, $lookupValue)
+ {
+ $valueKey = null;
+
+ // The basic algorithm is:
+ // Iterate and keep the highest match until the next element is smaller than the searched value.
+ // Return immediately if perfect match is found
+ foreach ($lookupArray as $i => $lookupArrayValue) {
+ $typeMatch = gettype($lookupValue) === gettype($lookupArrayValue);
+
+ if ($lookupArrayValue === $lookupValue) {
+ // Another "special" case. If a perfect match is found,
+ // the algorithm gives up immediately
+ return $i;
+ } elseif ($typeMatch && $lookupArrayValue >= $lookupValue) {
+ $valueKey = $i;
+ } elseif ($typeMatch && $lookupArrayValue < $lookupValue) {
+ //Excel algorithm gives up immediately if the first element is smaller than the searched value
+ break;
+ }
+ }
+
+ return $valueKey;
+ }
+
+ private static function validateLookupValue($lookupValue): void
+ {
+ // Lookup_value type has to be number, text, or logical values
+ if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {
+ throw new Exception(Functions::NA());
+ }
+ }
+
+ private static function validateMatchType($matchType): void
+ {
+ // Match_type is 0, 1 or -1
+ if (
+ ($matchType !== self::MATCHTYPE_FIRST_VALUE) &&
+ ($matchType !== self::MATCHTYPE_LARGEST_VALUE) && ($matchType !== self::MATCHTYPE_SMALLEST_VALUE)
+ ) {
+ throw new Exception(Functions::NA());
+ }
+ }
+
+ private static function validateLookupArray($lookupArray): void
+ {
+ // Lookup_array should not be empty
+ $lookupArraySize = count($lookupArray);
+ if ($lookupArraySize <= 0) {
+ throw new Exception(Functions::NA());
+ }
+ }
+
+ private static function prepareLookupArray($lookupArray, $matchType)
+ {
+ // Lookup_array should contain only number, text, or logical values, or empty (null) cells
+ foreach ($lookupArray as $i => $value) {
+ // check the type of the value
+ if ((!is_numeric($value)) && (!is_string($value)) && (!is_bool($value)) && ($value !== null)) {
+ throw new Exception(Functions::NA());
+ }
+ // Convert strings to lowercase for case-insensitive testing
+ if (is_string($value)) {
+ $lookupArray[$i] = StringHelper::strToLower($value);
+ }
+ if (
+ ($value === null) &&
+ (($matchType == self::MATCHTYPE_LARGEST_VALUE) || ($matchType == self::MATCHTYPE_SMALLEST_VALUE))
+ ) {
+ unset($lookupArray[$i]);
+ }
+ }
+
+ return $lookupArray;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Formula.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Formula.php
new file mode 100644
index 00000000..d96b5040
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Formula.php
@@ -0,0 +1,43 @@
+getWorksheet()->getParent()->getSheetByName($worksheetName)
+ : $pCell->getWorksheet();
+
+ if (
+ $worksheet === null ||
+ !$worksheet->cellExists($cellReference) ||
+ !$worksheet->getCell($cellReference)->isFormula()
+ ) {
+ return Functions::NA();
+ }
+
+ return $worksheet->getCell($cellReference)->getValue();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
new file mode 100644
index 00000000..96cfd7ab
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php
@@ -0,0 +1,86 @@
+getMessage();
+ }
+
+ $f = array_keys($lookupArray);
+ $firstRow = reset($f);
+ if ((!is_array($lookupArray[$firstRow])) || ($indexNumber > count($lookupArray))) {
+ return Functions::REF();
+ }
+
+ $firstkey = $f[0] - 1;
+ $returnColumn = $firstkey + $indexNumber;
+ $firstColumn = array_shift($f);
+ $rowNumber = self::hLookupSearch($lookupValue, $lookupArray, $firstColumn, $notExactMatch);
+
+ if ($rowNumber !== null) {
+ // otherwise return the appropriate value
+ return $lookupArray[$returnColumn][$rowNumber];
+ }
+
+ return Functions::NA();
+ }
+
+ private static function hLookupSearch($lookupValue, $lookupArray, $column, $notExactMatch)
+ {
+ $lookupLower = StringHelper::strToLower($lookupValue);
+
+ $rowNumber = null;
+ foreach ($lookupArray[$column] as $rowKey => $rowData) {
+ // break if we have passed possible keys
+ $bothNumeric = is_numeric($lookupValue) && is_numeric($rowData);
+ $bothNotNumeric = !is_numeric($lookupValue) && !is_numeric($rowData);
+ $cellDataLower = StringHelper::strToLower($rowData);
+
+ if (
+ $notExactMatch &&
+ (($bothNumeric && $rowData > $lookupValue) || ($bothNotNumeric && $cellDataLower > $lookupLower))
+ ) {
+ break;
+ }
+
+ $rowNumber = self::checkMatch(
+ $bothNumeric,
+ $bothNotNumeric,
+ $notExactMatch,
+ $rowKey,
+ $cellDataLower,
+ $lookupLower,
+ $rowNumber
+ );
+ }
+
+ return $rowNumber;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php
new file mode 100644
index 00000000..87ea7381
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Helpers.php
@@ -0,0 +1,74 @@
+getWorkSheet();
+ $sheetTitle = ($workSheet === null) ? '' : $workSheet->getTitle();
+ $value = preg_replace('/^=/', '', $namedRange->getValue());
+ self::adjustSheetTitle($sheetTitle, $value);
+ $cellAddress1 = $sheetTitle . $value;
+ $cellAddress = $cellAddress1;
+ $a1 = self::CELLADDRESS_USE_A1;
+ }
+ if (strpos($cellAddress, ':') !== false) {
+ [$cellAddress1, $cellAddress2] = explode(':', $cellAddress);
+ }
+ $cellAddress = self::convertR1C1($cellAddress1, $cellAddress2, $a1);
+
+ return [$cellAddress1, $cellAddress2, $cellAddress];
+ }
+
+ public static function extractWorksheet(string $cellAddress, Cell $pCell): array
+ {
+ $sheetName = '';
+ if (strpos($cellAddress, '!') !== false) {
+ [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ $sheetName = trim($sheetName, "'");
+ }
+
+ $pSheet = ($sheetName !== '')
+ ? $pCell->getWorksheet()->getParent()->getSheetByName($sheetName)
+ : $pCell->getWorksheet();
+
+ return [$cellAddress, $pSheet, $sheetName];
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Hyperlink.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Hyperlink.php
new file mode 100644
index 00000000..823d70c6
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Hyperlink.php
@@ -0,0 +1,40 @@
+getHyperlink()->setUrl($linkURL);
+ $pCell->getHyperlink()->setTooltip($displayName);
+
+ return $displayName;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php
new file mode 100644
index 00000000..d3314ff4
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Indirect.php
@@ -0,0 +1,97 @@
+getMessage();
+ }
+
+ [$cellAddress, $pSheet, $sheetName] = Helpers::extractWorksheet($cellAddress, $pCell);
+
+ [$cellAddress1, $cellAddress2, $cellAddress] = Helpers::extractCellAddresses($cellAddress, $a1, $pCell->getWorkSheet(), $sheetName);
+
+ if (
+ (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress1, $matches)) ||
+ (($cellAddress2 !== null) && (!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $cellAddress2, $matches)))
+ ) {
+ return Functions::REF();
+ }
+
+ return self::extractRequiredCells($pSheet, $cellAddress);
+ }
+
+ /**
+ * Extract range values.
+ *
+ * @return mixed Array of values in range if range contains more than one element.
+ * Otherwise, a single value is returned.
+ */
+ private static function extractRequiredCells(?Worksheet $pSheet, string $cellAddress)
+ {
+ return Calculation::getInstance($pSheet !== null ? $pSheet->getParent() : null)
+ ->extractCellRange($cellAddress, $pSheet, false);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
new file mode 100644
index 00000000..e21d35dc
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Lookup.php
@@ -0,0 +1,105 @@
+ 1) || (!$hasResultVector && $lookupRows === 2 && $lookupColumns !== 2)) {
+ $lookupVector = LookupRef\Matrix::transpose($lookupVector);
+ $lookupRows = self::rowCount($lookupVector);
+ $lookupColumns = self::columnCount($lookupVector);
+ }
+
+ $resultVector = self::verifyResultVector($lookupVector, $resultVector);
+
+ if ($lookupRows === 2 && !$hasResultVector) {
+ $resultVector = array_pop($lookupVector);
+ $lookupVector = array_shift($lookupVector);
+ }
+
+ if ($lookupColumns !== 2) {
+ $lookupVector = self::verifyLookupValues($lookupVector, $resultVector);
+ }
+
+ return VLookup::lookup($lookupValue, $lookupVector, 2);
+ }
+
+ private static function verifyLookupValues(array $lookupVector, array $resultVector): array
+ {
+ foreach ($lookupVector as &$value) {
+ if (is_array($value)) {
+ $k = array_keys($value);
+ $key1 = $key2 = array_shift($k);
+ ++$key2;
+ $dataValue1 = $value[$key1];
+ } else {
+ $key1 = 0;
+ $key2 = 1;
+ $dataValue1 = $value;
+ }
+
+ $dataValue2 = array_shift($resultVector);
+ if (is_array($dataValue2)) {
+ $dataValue2 = array_shift($dataValue2);
+ }
+ $value = [$key1 => $dataValue1, $key2 => $dataValue2];
+ }
+ unset($value);
+
+ return $lookupVector;
+ }
+
+ private static function verifyResultVector(array $lookupVector, $resultVector)
+ {
+ if ($resultVector === null) {
+ $resultVector = $lookupVector;
+ }
+
+ $resultRows = self::rowCount($resultVector);
+ $resultColumns = self::columnCount($resultVector);
+
+ // we correctly orient our results
+ if ($resultRows === 1 && $resultColumns > 1) {
+ $resultVector = LookupRef\Matrix::transpose($resultVector);
+ }
+
+ return $resultVector;
+ }
+
+ private static function rowCount(array $dataArray): int
+ {
+ return count($dataArray);
+ }
+
+ private static function columnCount(array $dataArray): int
+ {
+ $rowKeys = array_keys($dataArray);
+ $row = array_shift($rowKeys);
+
+ return count($dataArray[$row]);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
new file mode 100644
index 00000000..80fc99ad
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/LookupBase.php
@@ -0,0 +1,48 @@
+getMessage();
+ }
+
+ if (!is_array($matrix) || ($rowNum > count($matrix))) {
+ return Functions::REF();
+ }
+
+ $rowKeys = array_keys($matrix);
+ $columnKeys = @array_keys($matrix[$rowKeys[0]]);
+
+ if ($columnNum > count($columnKeys)) {
+ return Functions::REF();
+ }
+
+ if ($columnNum === 0) {
+ return self::extractRowValue($matrix, $rowKeys, $rowNum);
+ }
+
+ $columnNum = $columnKeys[--$columnNum];
+ if ($rowNum === 0) {
+ return array_map(
+ function ($value) {
+ return [$value];
+ },
+ array_column($matrix, $columnNum)
+ );
+ }
+ $rowNum = $rowKeys[--$rowNum];
+
+ return $matrix[$rowNum][$columnNum];
+ }
+
+ private static function extractRowValue(array $matrix, array $rowKeys, int $rowNum)
+ {
+ if ($rowNum === 0) {
+ return $matrix;
+ }
+
+ $rowNum = $rowKeys[--$rowNum];
+ $row = $matrix[$rowNum];
+ if (is_array($row)) {
+ return [$rowNum => $row];
+ }
+
+ return $row;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Offset.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
new file mode 100644
index 00000000..c027d83c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Offset.php
@@ -0,0 +1,136 @@
+getParent() : null)
+ ->extractCellRange($cellAddress, $pSheet, false);
+ }
+
+ private static function extractWorksheet($cellAddress, Cell $pCell): array
+ {
+ $sheetName = '';
+ if (strpos($cellAddress, '!') !== false) {
+ [$sheetName, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ $sheetName = trim($sheetName, "'");
+ }
+
+ $pSheet = ($sheetName !== '')
+ ? $pCell->getWorksheet()->getParent()->getSheetByName($sheetName)
+ : $pCell->getWorksheet();
+
+ return [$cellAddress, $pSheet];
+ }
+
+ private static function adjustEndCellColumnForWidth(string $endCellColumn, $width, int $startCellColumn, $columns)
+ {
+ $endCellColumn = Coordinate::columnIndexFromString($endCellColumn) - 1;
+ if (($width !== null) && (!is_object($width))) {
+ $endCellColumn = $startCellColumn + (int) $width - 1;
+ } else {
+ $endCellColumn += (int) $columns;
+ }
+
+ return $endCellColumn;
+ }
+
+ private static function adustEndCellRowForHeight($height, int $startCellRow, $rows, $endCellRow): int
+ {
+ if (($height !== null) && (!is_object($height))) {
+ $endCellRow = $startCellRow + (int) $height - 1;
+ } else {
+ $endCellRow += (int) $rows;
+ }
+
+ return $endCellRow;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
new file mode 100644
index 00000000..02c9a79e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/RowColumnInformation.php
@@ -0,0 +1,209 @@
+getColumn()) : 1;
+ }
+
+ /**
+ * COLUMN.
+ *
+ * Returns the column number of the given cell reference
+ * If the cell reference is a range of cells, COLUMN returns the column numbers of each column
+ * in the reference as a horizontal array.
+ * If cell reference is omitted, and the function is being called through the calculation engine,
+ * then it is assumed to be the reference of the cell in which the COLUMN function appears;
+ * otherwise this function returns 1.
+ *
+ * Excel Function:
+ * =COLUMN([cellAddress])
+ *
+ * @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers
+ *
+ * @return int|int[]
+ */
+ public static function COLUMN($cellAddress = null, ?Cell $pCell = null)
+ {
+ if (self::cellAddressNullOrWhitespace($cellAddress)) {
+ return self::cellColumn($pCell);
+ }
+
+ if (is_array($cellAddress)) {
+ foreach ($cellAddress as $columnKey => $value) {
+ $columnKey = preg_replace('/[^a-z]/i', '', $columnKey);
+
+ return (int) Coordinate::columnIndexFromString($columnKey);
+ }
+
+ return self::cellColumn($pCell);
+ }
+
+ $cellAddress = $cellAddress ?? '';
+ if ($pCell != null) {
+ [,, $sheetName] = Helpers::extractWorksheet($cellAddress, $pCell);
+ [,, $cellAddress] = Helpers::extractCellAddresses($cellAddress, true, $pCell->getWorksheet(), $sheetName);
+ }
+ [, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ if (strpos($cellAddress, ':') !== false) {
+ [$startAddress, $endAddress] = explode(':', $cellAddress);
+ $startAddress = preg_replace('/[^a-z]/i', '', $startAddress);
+ $endAddress = preg_replace('/[^a-z]/i', '', $endAddress);
+
+ return range(
+ (int) Coordinate::columnIndexFromString($startAddress),
+ (int) Coordinate::columnIndexFromString($endAddress)
+ );
+ }
+
+ $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress);
+
+ return (int) Coordinate::columnIndexFromString($cellAddress);
+ }
+
+ /**
+ * COLUMNS.
+ *
+ * Returns the number of columns in an array or reference.
+ *
+ * Excel Function:
+ * =COLUMNS(cellAddress)
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells
+ * for which you want the number of columns
+ *
+ * @return int|string The number of columns in cellAddress, or a string if arguments are invalid
+ */
+ public static function COLUMNS($cellAddress = null)
+ {
+ if (self::cellAddressNullOrWhitespace($cellAddress)) {
+ return 1;
+ }
+ if (!is_array($cellAddress)) {
+ return Functions::VALUE();
+ }
+
+ reset($cellAddress);
+ $isMatrix = (is_numeric(key($cellAddress)));
+ [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
+
+ if ($isMatrix) {
+ return $rows;
+ }
+
+ return $columns;
+ }
+
+ private static function cellRow(?Cell $pCell): int
+ {
+ return ($pCell !== null) ? $pCell->getRow() : 1;
+ }
+
+ /**
+ * ROW.
+ *
+ * Returns the row number of the given cell reference
+ * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference
+ * as a vertical array.
+ * If cell reference is omitted, and the function is being called through the calculation engine,
+ * then it is assumed to be the reference of the cell in which the ROW function appears;
+ * otherwise this function returns 1.
+ *
+ * Excel Function:
+ * =ROW([cellAddress])
+ *
+ * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers
+ *
+ * @return int|mixed[]|string
+ */
+ public static function ROW($cellAddress = null, ?Cell $pCell = null)
+ {
+ if (self::cellAddressNullOrWhitespace($cellAddress)) {
+ return self::cellRow($pCell);
+ }
+
+ if (is_array($cellAddress)) {
+ foreach ($cellAddress as $rowKey => $rowValue) {
+ foreach ($rowValue as $columnKey => $cellValue) {
+ return (int) preg_replace('/\D/', '', $rowKey);
+ }
+ }
+
+ return self::cellRow($pCell);
+ }
+
+ $cellAddress = $cellAddress ?? '';
+ if ($pCell !== null) {
+ [,, $sheetName] = Helpers::extractWorksheet($cellAddress, $pCell);
+ [,, $cellAddress] = Helpers::extractCellAddresses($cellAddress, true, $pCell->getWorksheet(), $sheetName);
+ }
+ [, $cellAddress] = Worksheet::extractSheetTitle($cellAddress, true);
+ if (strpos($cellAddress, ':') !== false) {
+ [$startAddress, $endAddress] = explode(':', $cellAddress);
+ $startAddress = preg_replace('/\D/', '', $startAddress);
+ $endAddress = preg_replace('/\D/', '', $endAddress);
+
+ return array_map(
+ function ($value) {
+ return [$value];
+ },
+ range($startAddress, $endAddress)
+ );
+ }
+ [$cellAddress] = explode(':', $cellAddress);
+
+ return (int) preg_replace('/\D/', '', $cellAddress);
+ }
+
+ /**
+ * ROWS.
+ *
+ * Returns the number of rows in an array or reference.
+ *
+ * Excel Function:
+ * =ROWS(cellAddress)
+ *
+ * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells
+ * for which you want the number of rows
+ *
+ * @return int|string The number of rows in cellAddress, or a string if arguments are invalid
+ */
+ public static function ROWS($cellAddress = null)
+ {
+ if (self::cellAddressNullOrWhitespace($cellAddress)) {
+ return 1;
+ }
+ if (!is_array($cellAddress)) {
+ return Functions::VALUE();
+ }
+
+ reset($cellAddress);
+ $isMatrix = (is_numeric(key($cellAddress)));
+ [$columns, $rows] = Calculation::getMatrixDimensions($cellAddress);
+
+ if ($isMatrix) {
+ return $columns;
+ }
+
+ return $rows;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Selection.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Selection.php
new file mode 100644
index 00000000..6c18d73b
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Selection.php
@@ -0,0 +1,46 @@
+ $entryCount)) {
+ return Functions::VALUE();
+ }
+
+ if (is_array($chooseArgs[$chosenEntry])) {
+ return Functions::flattenArray($chooseArgs[$chosenEntry]);
+ }
+
+ return $chooseArgs[$chosenEntry];
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
new file mode 100644
index 00000000..ddd5d9ee
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php
@@ -0,0 +1,105 @@
+getMessage();
+ }
+
+ $f = array_keys($lookupArray);
+ $firstRow = array_pop($f);
+ if ((!is_array($lookupArray[$firstRow])) || ($indexNumber > count($lookupArray[$firstRow]))) {
+ return Functions::REF();
+ }
+ $columnKeys = array_keys($lookupArray[$firstRow]);
+ $returnColumn = $columnKeys[--$indexNumber];
+ $firstColumn = array_shift($columnKeys);
+
+ if (!$notExactMatch) {
+ uasort($lookupArray, ['self', 'vlookupSort']);
+ }
+
+ $rowNumber = self::vLookupSearch($lookupValue, $lookupArray, $firstColumn, $notExactMatch);
+
+ if ($rowNumber !== null) {
+ // return the appropriate value
+ return $lookupArray[$rowNumber][$returnColumn];
+ }
+
+ return Functions::NA();
+ }
+
+ private static function vlookupSort($a, $b)
+ {
+ reset($a);
+ $firstColumn = key($a);
+ $aLower = StringHelper::strToLower($a[$firstColumn]);
+ $bLower = StringHelper::strToLower($b[$firstColumn]);
+
+ if ($aLower == $bLower) {
+ return 0;
+ }
+
+ return ($aLower < $bLower) ? -1 : 1;
+ }
+
+ private static function vLookupSearch($lookupValue, $lookupArray, $column, $notExactMatch)
+ {
+ $lookupLower = StringHelper::strToLower($lookupValue);
+
+ $rowNumber = null;
+ foreach ($lookupArray as $rowKey => $rowData) {
+ $bothNumeric = is_numeric($lookupValue) && is_numeric($rowData[$column]);
+ $bothNotNumeric = !is_numeric($lookupValue) && !is_numeric($rowData[$column]);
+ $cellDataLower = StringHelper::strToLower($rowData[$column]);
+
+ // break if we have passed possible keys
+ if (
+ $notExactMatch &&
+ (($bothNumeric && ($rowData[$column] > $lookupValue)) ||
+ ($bothNotNumeric && ($cellDataLower > $lookupLower)))
+ ) {
+ break;
+ }
+
+ $rowNumber = self::checkMatch(
+ $bothNumeric,
+ $bothNotNumeric,
+ $notExactMatch,
+ $rowKey,
+ $cellDataLower,
+ $lookupLower,
+ $rowNumber
+ );
+ }
+
+ return $rowNumber;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
index e72e24cd..ec251f6d 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig.php
@@ -2,45 +2,11 @@
namespace PhpOffice\PhpSpreadsheet\Calculation;
-use Exception;
-use Matrix\Exception as MatrixException;
-use Matrix\Matrix;
-
+/**
+ * @deprecated 1.18.0
+ */
class MathTrig
{
- //
- // Private method to return an array of the factors of the input value
- //
- private static function factors($value)
- {
- $startVal = floor(sqrt($value));
-
- $factorArray = [];
- for ($i = $startVal; $i > 1; --$i) {
- if (($value % $i) == 0) {
- $factorArray = array_merge($factorArray, self::factors($value / $i));
- $factorArray = array_merge($factorArray, self::factors($i));
- if ($i <= sqrt($value)) {
- break;
- }
- }
- }
- if (!empty($factorArray)) {
- rsort($factorArray);
-
- return $factorArray;
- }
-
- return [(int) $value];
- }
-
- private static function strSplit(string $roman): array
- {
- $rslt = str_split($roman);
-
- return is_array($rslt) ? $rslt : [];
- }
-
/**
* ARABIC.
*
@@ -49,75 +15,18 @@ class MathTrig
* Excel Function:
* ARABIC(text)
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Arabic::evaluate()
+ * Use the evaluate method in the MathTrig\Arabic class instead
+ *
* @param string $roman
*
* @return int|string the arabic numberal contrived from the roman numeral
*/
public static function ARABIC($roman)
{
- // An empty string should return 0
- $roman = substr(trim(strtoupper((string) Functions::flattenSingleValue($roman))), 0, 255);
- if ($roman === '') {
- return 0;
- }
-
- // Convert the roman numeral to an arabic number
- $negativeNumber = $roman[0] === '-';
- if ($negativeNumber) {
- $roman = substr($roman, 1);
- }
-
- try {
- $arabic = self::calculateArabic(self::strSplit($roman));
- } catch (Exception $e) {
- return Functions::VALUE(); // Invalid character detected
- }
-
- if ($negativeNumber) {
- $arabic *= -1; // The number should be negative
- }
-
- return $arabic;
- }
-
- /**
- * Recursively calculate the arabic value of a roman numeral.
- *
- * @param int $sum
- * @param int $subtract
- *
- * @return int
- */
- protected static function calculateArabic(array $roman, &$sum = 0, $subtract = 0)
- {
- $lookup = [
- 'M' => 1000,
- 'D' => 500,
- 'C' => 100,
- 'L' => 50,
- 'X' => 10,
- 'V' => 5,
- 'I' => 1,
- ];
-
- $numeral = array_shift($roman);
- if (!isset($lookup[$numeral])) {
- throw new Exception('Invalid character detected');
- }
-
- $arabic = $lookup[$numeral];
- if (count($roman) > 0 && isset($lookup[$roman[0]]) && $arabic < $lookup[$roman[0]]) {
- $subtract += $arabic;
- } else {
- $sum += ($arabic - $subtract);
- $subtract = 0;
- }
-
- if (count($roman) > 0) {
- self::calculateArabic($roman, $sum, $subtract);
- }
-
- return $sum;
+ return MathTrig\Arabic::evaluate($roman);
}
/**
@@ -136,6 +45,11 @@ class MathTrig
* Excel Function:
* ATAN2(xCoordinate,yCoordinate)
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Tangent::atan2()
+ * Use the atan2 method in the MathTrig\Trig\Tangent class instead
+ *
* @param float $xCoordinate the x-coordinate of the point
* @param float $yCoordinate the y-coordinate of the point
*
@@ -143,27 +57,7 @@ class MathTrig
*/
public static function ATAN2($xCoordinate = null, $yCoordinate = null)
{
- $xCoordinate = Functions::flattenSingleValue($xCoordinate);
- $yCoordinate = Functions::flattenSingleValue($yCoordinate);
-
- $xCoordinate = $xCoordinate ?? 0.0;
- $yCoordinate = $yCoordinate ?? 0.0;
-
- if (
- ((is_numeric($xCoordinate)) || (is_bool($xCoordinate))) &&
- ((is_numeric($yCoordinate))) || (is_bool($yCoordinate))
- ) {
- $xCoordinate = (float) $xCoordinate;
- $yCoordinate = (float) $yCoordinate;
-
- if (($xCoordinate == 0) && ($yCoordinate == 0)) {
- return Functions::DIV0();
- }
-
- return atan2($yCoordinate, $xCoordinate);
- }
-
- return Functions::VALUE();
+ return MathTrig\Trig\Tangent::atan2($xCoordinate, $yCoordinate);
}
/**
@@ -174,6 +68,11 @@ class MathTrig
* Excel Function:
* BASE(Number, Radix [Min_length])
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Base::evaluate()
+ * Use the evaluate method in the MathTrig\Base class instead
+ *
* @param float $number
* @param float $radix
* @param int $minLength
@@ -182,29 +81,7 @@ class MathTrig
*/
public static function BASE($number, $radix, $minLength = null)
{
- $number = Functions::flattenSingleValue($number);
- $radix = Functions::flattenSingleValue($radix);
- $minLength = Functions::flattenSingleValue($minLength);
-
- if (is_numeric($number) && is_numeric($radix) && ($minLength === null || is_numeric($minLength))) {
- // Truncate to an integer
- $number = (int) $number;
- $radix = (int) $radix;
- $minLength = (int) $minLength;
-
- if ($number < 0 || $number >= 2 ** 53 || $radix < 2 || $radix > 36) {
- return Functions::NAN(); // Numeric range constraints
- }
-
- $outcome = strtoupper((string) base_convert($number, 10, $radix));
- if ($minLength !== null) {
- $outcome = str_pad($outcome, $minLength, '0', STR_PAD_LEFT); // String padding
- }
-
- return $outcome;
- }
-
- return Functions::VALUE();
+ return MathTrig\Base::evaluate($number, $radix, $minLength);
}
/**
@@ -220,18 +97,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcCeiling() method in the MathTrig\Ceiling class instead
- *
* @param float $number the number you want to round
* @param float $significance the multiple to which you want to round
*
* @return float|string Rounded Number, or a string containing an error
*
- * @codeCoverageIgnore
+ * @see MathTrig\Ceiling::ceiling()
+ * Use the ceiling() method in the MathTrig\Ceiling class instead
*/
public static function CEILING($number, $significance = null)
{
- return MathTrig\Ceiling::funcCeiling($number, $significance);
+ return MathTrig\Ceiling::ceiling($number, $significance);
}
/**
@@ -243,27 +119,19 @@ class MathTrig
* Excel Function:
* COMBIN(numObjs,numInSet)
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Combinations::withoutRepetition()
+ * Use the withoutRepetition() method in the MathTrig\Combinations class instead
+ *
* @param int $numObjs Number of different objects
* @param int $numInSet Number of objects in each combination
*
- * @return int|string Number of combinations, or a string containing an error
+ * @return float|int|string Number of combinations, or a string containing an error
*/
public static function COMBIN($numObjs, $numInSet)
{
- $numObjs = Functions::flattenSingleValue($numObjs);
- $numInSet = Functions::flattenSingleValue($numInSet);
-
- if ((is_numeric($numObjs)) && (is_numeric($numInSet))) {
- if ($numObjs < $numInSet) {
- return Functions::NAN();
- } elseif ($numInSet < 0) {
- return Functions::NAN();
- }
-
- return round(self::FACT($numObjs) / self::FACT($numObjs - $numInSet)) / self::FACT($numInSet);
- }
-
- return Functions::VALUE();
+ return MathTrig\Combinations::withoutRepetition($numObjs, $numInSet);
}
/**
@@ -278,32 +146,31 @@ class MathTrig
* Excel Function:
* EVEN(number)
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Round::even()
+ * Use the even() method in the MathTrig\Round class instead
+ *
* @param float $number Number to round
*
- * @return int|string Rounded Number, or a string containing an error
+ * @return float|int|string Rounded Number, or a string containing an error
*/
public static function EVEN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if ($number === null) {
- return 0;
- } elseif (is_bool($number)) {
- $number = (int) $number;
- }
-
- if (is_numeric($number)) {
- return self::getEven((float) $number);
- }
-
- return Functions::VALUE();
+ return MathTrig\Round::even($number);
}
+ /**
+ * Helper function for Even.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Helpers::getEven()
+ * Use the evaluate() method in the MathTrig\Helpers class instead
+ */
public static function getEven(float $number): int
{
- $significance = 2 * self::returnSign($number);
-
- return (int) MathTrig\Ceiling::funcCeiling($number, $significance);
+ return (int) MathTrig\Helpers::getEven($number);
}
/**
@@ -315,35 +182,18 @@ class MathTrig
* Excel Function:
* FACT(factVal)
*
+ * @Deprecated 1.18.0
+ *
* @param float $factVal Factorial Value
*
- * @return int|string Factorial, or a string containing an error
+ * @return float|int|string Factorial, or a string containing an error
+ *
+ *@see MathTrig\Factorial::fact()
+ * Use the fact() method in the MathTrig\Factorial class instead
*/
public static function FACT($factVal)
{
- $factVal = Functions::flattenSingleValue($factVal);
-
- if (is_numeric($factVal)) {
- if ($factVal < 0) {
- return Functions::NAN();
- }
- $factLoop = floor($factVal);
- if (
- (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) &&
- ($factVal > $factLoop)
- ) {
- return Functions::NAN();
- }
-
- $factorial = 1;
- while ($factLoop > 1) {
- $factorial *= $factLoop--;
- }
-
- return $factorial;
- }
-
- return Functions::VALUE();
+ return MathTrig\Factorial::fact($factVal);
}
/**
@@ -354,29 +204,18 @@ class MathTrig
* Excel Function:
* FACTDOUBLE(factVal)
*
+ * @Deprecated 1.18.0
+ *
* @param float $factVal Factorial Value
*
- * @return int|string Double Factorial, or a string containing an error
+ * @return float|int|string Double Factorial, or a string containing an error
+ *
+ *@see MathTrig\Factorial::factDouble()
+ * Use the factDouble() method in the MathTrig\Factorial class instead
*/
public static function FACTDOUBLE($factVal)
{
- $factLoop = Functions::flattenSingleValue($factVal);
-
- if (is_numeric($factLoop)) {
- $factLoop = floor($factLoop);
- if ($factVal < 0) {
- return Functions::NAN();
- }
- $factorial = 1;
- while ($factLoop > 1) {
- $factorial *= $factLoop--;
- --$factLoop;
- }
-
- return $factorial;
- }
-
- return Functions::VALUE();
+ return MathTrig\Factorial::factDouble($factVal);
}
/**
@@ -389,18 +228,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcFloor() method in the MathTrig\Floor class instead
- *
* @param float $number Number to round
* @param float $significance Significance
*
* @return float|string Rounded Number, or a string containing an error
*
- * @codeCoverageIgnore
+ *@see MathTrig\Floor::floor()
+ * Use the floor() method in the MathTrig\Floor class instead
*/
public static function FLOOR($number, $significance = null)
{
- return MathTrig\Floor::funcFloor($number, $significance);
+ return MathTrig\Floor::floor($number, $significance);
}
/**
@@ -413,19 +251,18 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcFloorMath() method in the MathTrig\FloorMath class instead
- *
* @param float $number Number to round
* @param float $significance Significance
* @param int $mode direction to round negative numbers
*
* @return float|string Rounded Number, or a string containing an error
*
- * @codeCoverageIgnore
+ *@see MathTrig\Floor::math()
+ * Use the math() method in the MathTrig\Floor class instead
*/
public static function FLOORMATH($number, $significance = null, $mode = 0)
{
- return MathTrig\FloorMath::funcFloorMath($number, $significance, $mode);
+ return MathTrig\Floor::math($number, $significance, $mode);
}
/**
@@ -438,23 +275,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcFloorPrecise() method in the MathTrig\FloorPrecise class instead
- *
* @param float $number Number to round
* @param float $significance Significance
*
* @return float|string Rounded Number, or a string containing an error
*
- * @codeCoverageIgnore
+ *@see MathTrig\Floor::precise()
+ * Use the precise() method in the MathTrig\Floor class instead
*/
public static function FLOORPRECISE($number, $significance = 1)
{
- return MathTrig\FloorPrecise::funcFloorPrecise($number, $significance);
- }
-
- private static function evaluateGCD($a, $b)
- {
- return $b ? self::evaluateGCD($b, $a % $b) : $a;
+ return MathTrig\Floor::precise($number, $significance);
}
/**
@@ -467,17 +298,16 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcInt() method in the MathTrig\IntClass class instead
+ * @see MathTrig\IntClass::evaluate()
+ * Use the evaluate() method in the MathTrig\IntClass class instead
*
* @param float $number Number to cast to an integer
*
* @return int|string Integer value, or a string containing an error
- *
- * @codeCoverageIgnore
*/
public static function INT($number)
{
- return MathTrig\IntClass::funcInt($number);
+ return MathTrig\IntClass::evaluate($number);
}
/**
@@ -490,28 +320,18 @@ class MathTrig
* Excel Function:
* GCD(number1[,number2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Gcd::evaluate()
+ * Use the evaluate() method in the MathTrig\Gcd class instead
+ *
* @param mixed ...$args Data values
*
* @return int|mixed|string Greatest Common Divisor, or a string containing an error
*/
public static function GCD(...$args)
{
- $args = Functions::flattenArray($args);
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $value) {
- if (!is_numeric($value)) {
- return Functions::VALUE();
- } elseif ($value < 0) {
- return Functions::NAN();
- }
- }
-
- $gcd = (int) array_pop($args);
- do {
- $gcd = self::evaluateGCD($gcd, (int) array_pop($args));
- } while (!empty($args));
-
- return $gcd;
+ return MathTrig\Gcd::evaluate(...$args);
}
/**
@@ -525,45 +345,18 @@ class MathTrig
* Excel Function:
* LCM(number1[,number2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Lcm::evaluate()
+ * Use the evaluate() method in the MathTrig\Lcm class instead
+ *
* @param mixed ...$args Data values
*
* @return int|string Lowest Common Multiplier, or a string containing an error
*/
public static function LCM(...$args)
{
- $returnValue = 1;
- $allPoweredFactors = [];
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $value) {
- if (!is_numeric($value)) {
- return Functions::VALUE();
- }
- if ($value == 0) {
- return 0;
- } elseif ($value < 0) {
- return Functions::NAN();
- }
- $myFactors = self::factors(floor($value));
- $myCountedFactors = array_count_values($myFactors);
- $myPoweredFactors = [];
- foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) {
- $myPoweredFactors[$myCountedFactor] = $myCountedFactor ** $myCountedPower;
- }
- foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) {
- if (isset($allPoweredFactors[$myPoweredValue])) {
- if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) {
- $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
- }
- } else {
- $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
- }
- }
- }
- foreach ($allPoweredFactors as $allPoweredFactor) {
- $returnValue *= (int) $allPoweredFactor;
- }
-
- return $returnValue;
+ return MathTrig\Lcm::evaluate(...$args);
}
/**
@@ -574,24 +367,19 @@ class MathTrig
* Excel Function:
* LOG(number[,base])
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Logarithms::withBase()
+ * Use the withBase() method in the MathTrig\Logarithms class instead
+ *
* @param float $number The positive real number for which you want the logarithm
* @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
*
* @return float|string The result, or a string containing an error
*/
- public static function logBase($number = null, $base = 10)
+ public static function logBase($number, $base = 10)
{
- $number = Functions::flattenSingleValue($number);
- $base = ($base === null) ? 10 : (float) Functions::flattenSingleValue($base);
-
- if ((!is_numeric($base)) || (!is_numeric($number))) {
- return Functions::VALUE();
- }
- if (($base <= 0) || ($number <= 0)) {
- return Functions::NAN();
- }
-
- return log($number, $base);
+ return MathTrig\Logarithms::withBase($number, $base);
}
/**
@@ -602,46 +390,18 @@ class MathTrig
* Excel Function:
* MDETERM(array)
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\MatrixFunctions::determinant()
+ * Use the determinant() method in the MathTrig\MatrixFunctions class instead
+ *
* @param array $matrixValues A matrix of values
*
* @return float|string The result, or a string containing an error
*/
public static function MDETERM($matrixValues)
{
- $matrixData = [];
- if (!is_array($matrixValues)) {
- $matrixValues = [[$matrixValues]];
- }
-
- $row = $maxColumn = 0;
- foreach ($matrixValues as $matrixRow) {
- if (!is_array($matrixRow)) {
- $matrixRow = [$matrixRow];
- }
- $column = 0;
- foreach ($matrixRow as $matrixCell) {
- if ((is_string($matrixCell)) || ($matrixCell === null)) {
- return Functions::VALUE();
- }
- $matrixData[$row][$column] = $matrixCell;
- ++$column;
- }
- if ($column > $maxColumn) {
- $maxColumn = $column;
- }
- ++$row;
- }
-
- $matrix = new Matrix($matrixData);
- if (!$matrix->isSquare()) {
- return Functions::VALUE();
- }
-
- try {
- return $matrix->determinant();
- } catch (MatrixException $ex) {
- return Functions::VALUE();
- }
+ return MathTrig\MatrixFunctions::determinant($matrixValues);
}
/**
@@ -652,55 +412,28 @@ class MathTrig
* Excel Function:
* MINVERSE(array)
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\MatrixFunctions::inverse()
+ * Use the inverse() method in the MathTrig\MatrixFunctions class instead
+ *
* @param array $matrixValues A matrix of values
*
* @return array|string The result, or a string containing an error
*/
public static function MINVERSE($matrixValues)
{
- $matrixData = [];
- if (!is_array($matrixValues)) {
- $matrixValues = [[$matrixValues]];
- }
-
- $row = $maxColumn = 0;
- foreach ($matrixValues as $matrixRow) {
- if (!is_array($matrixRow)) {
- $matrixRow = [$matrixRow];
- }
- $column = 0;
- foreach ($matrixRow as $matrixCell) {
- if ((is_string($matrixCell)) || ($matrixCell === null)) {
- return Functions::VALUE();
- }
- $matrixData[$row][$column] = $matrixCell;
- ++$column;
- }
- if ($column > $maxColumn) {
- $maxColumn = $column;
- }
- ++$row;
- }
-
- $matrix = new Matrix($matrixData);
- if (!$matrix->isSquare()) {
- return Functions::VALUE();
- }
-
- if ($matrix->determinant() == 0.0) {
- return Functions::NAN();
- }
-
- try {
- return $matrix->inverse()->toArray();
- } catch (MatrixException $ex) {
- return Functions::VALUE();
- }
+ return MathTrig\MatrixFunctions::inverse($matrixValues);
}
/**
* MMULT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\MatrixFunctions::multiply()
+ * Use the multiply() method in the MathTrig\MatrixFunctions class instead
+ *
* @param array $matrixData1 A matrix of values
* @param array $matrixData2 A matrix of values
*
@@ -708,80 +441,25 @@ class MathTrig
*/
public static function MMULT($matrixData1, $matrixData2)
{
- $matrixAData = $matrixBData = [];
- if (!is_array($matrixData1)) {
- $matrixData1 = [[$matrixData1]];
- }
- if (!is_array($matrixData2)) {
- $matrixData2 = [[$matrixData2]];
- }
-
- try {
- $rowA = 0;
- foreach ($matrixData1 as $matrixRow) {
- if (!is_array($matrixRow)) {
- $matrixRow = [$matrixRow];
- }
- $columnA = 0;
- foreach ($matrixRow as $matrixCell) {
- if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
- return Functions::VALUE();
- }
- $matrixAData[$rowA][$columnA] = $matrixCell;
- ++$columnA;
- }
- ++$rowA;
- }
- $matrixA = new Matrix($matrixAData);
- $rowB = 0;
- foreach ($matrixData2 as $matrixRow) {
- if (!is_array($matrixRow)) {
- $matrixRow = [$matrixRow];
- }
- $columnB = 0;
- foreach ($matrixRow as $matrixCell) {
- if ((!is_numeric($matrixCell)) || ($matrixCell === null)) {
- return Functions::VALUE();
- }
- $matrixBData[$rowB][$columnB] = $matrixCell;
- ++$columnB;
- }
- ++$rowB;
- }
- $matrixB = new Matrix($matrixBData);
-
- if ($columnA != $rowB) {
- return Functions::VALUE();
- }
-
- return $matrixA->multiply($matrixB)->toArray();
- } catch (MatrixException $ex) {
- return Functions::VALUE();
- }
+ return MathTrig\MatrixFunctions::multiply($matrixData1, $matrixData2);
}
/**
* MOD.
*
+ * @Deprecated 1.18.0
+ *
+ * @see MathTrig\Operations::mod()
+ * Use the mod() method in the MathTrig\Operations class instead
+ *
* @param int $a Dividend
* @param int $b Divisor
*
- * @return int|string Remainder, or a string containing an error
+ * @return float|int|string Remainder, or a string containing an error
*/
public static function MOD($a = 1, $b = 1)
{
- $a = (float) Functions::flattenSingleValue($a);
- $b = (float) Functions::flattenSingleValue($b);
-
- if ($b == 0.0) {
- return Functions::DIV0();
- } elseif (($a < 0.0) && ($b > 0.0)) {
- return $b - fmod(abs($a), $b);
- } elseif (($a > 0.0) && ($b < 0.0)) {
- return $b + fmod($a, abs($b));
- }
-
- return fmod($a, $b);
+ return MathTrig\Operations::mod($a, $b);
}
/**
@@ -791,18 +469,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcMround() method in the MathTrig\Mround class instead
- *
* @param float $number Number to round
* @param int $multiple Multiple to which you want to round $number
*
* @return float|string Rounded Number, or a string containing an error
*
- * @codeCoverageIgnore
+ *@see MathTrig\Round::multiple()
+ * Use the multiple() method in the MathTrig\Mround class instead
*/
public static function MROUND($number, $multiple)
{
- return MathTrig\Mround::funcMround($number, $multiple);
+ return MathTrig\Round::multiple($number, $multiple);
}
/**
@@ -810,36 +487,18 @@ class MathTrig
*
* Returns the ratio of the factorial of a sum of values to the product of factorials.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Factorial::multinomial()
+ * Use the multinomial method in the MathTrig\Factorial class instead
+ *
* @param mixed[] $args An array of mixed values for the Data Series
*
* @return float|string The result, or a string containing an error
*/
public static function MULTINOMIAL(...$args)
{
- $summer = 0;
- $divisor = 1;
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $arg) {
- // Is it a numeric value?
- if (is_numeric($arg)) {
- if ($arg < 1) {
- return Functions::NAN();
- }
- $summer += floor($arg);
- $divisor *= self::FACT($arg);
- } else {
- return Functions::VALUE();
- }
- }
-
- // Return
- if ($summer > 0) {
- $summer = self::FACT($summer);
-
- return $summer / $divisor;
- }
-
- return 0;
+ return MathTrig\Factorial::multinomial(...$args);
}
/**
@@ -847,36 +506,18 @@ class MathTrig
*
* Returns number rounded up to the nearest odd integer.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Round::odd()
+ * Use the odd method in the MathTrig\Round class instead
+ *
* @param float $number Number to round
*
- * @return int|string Rounded Number, or a string containing an error
+ * @return float|int|string Rounded Number, or a string containing an error
*/
public static function ODD($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if ($number === null) {
- return 1;
- } elseif (is_bool($number)) {
- return 1;
- } elseif (is_numeric($number)) {
- $significance = self::returnSign($number);
- if ($significance == 0) {
- return 1;
- }
-
- $result = MathTrig\Ceiling::funcCeiling($number, $significance);
- if (is_string($result)) {
- return $result;
- }
- if ($result == self::getEven((float) $result)) {
- $result += $significance;
- }
-
- return (int) $result;
- }
-
- return Functions::VALUE();
+ return MathTrig\Round::odd($number);
}
/**
@@ -884,27 +525,19 @@ class MathTrig
*
* Computes x raised to the power y.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Operations::power()
+ * Use the evaluate method in the MathTrig\Power class instead
+ *
* @param float $x
* @param float $y
*
- * @return float|string The result, or a string containing an error
+ * @return float|int|string The result, or a string containing an error
*/
public static function POWER($x = 0, $y = 2)
{
- $x = Functions::flattenSingleValue($x);
- $y = Functions::flattenSingleValue($y);
-
- // Validate parameters
- if ($x == 0.0 && $y == 0.0) {
- return Functions::NAN();
- } elseif ($x == 0.0 && $y < 0.0) {
- return Functions::DIV0();
- }
-
- // Return
- $result = $x ** $y;
-
- return (!is_nan($result) && !is_infinite($result)) ? $result : Functions::NAN();
+ return MathTrig\Operations::power($x, $y);
}
/**
@@ -912,36 +545,21 @@ class MathTrig
*
* PRODUCT returns the product of all the values and cells referenced in the argument list.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Operations::product()
+ * Use the product method in the MathTrig\Operations class instead
+ *
* Excel Function:
* PRODUCT(value1[,value2[, ...]])
*
* @param mixed ...$args Data values
*
- * @return float
+ * @return float|string
*/
public static function PRODUCT(...$args)
{
- // Return value
- $returnValue = null;
-
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- if ($returnValue === null) {
- $returnValue = $arg;
- } else {
- $returnValue *= $arg;
- }
- }
- }
-
- // Return
- if ($returnValue === null) {
- return 0;
- }
-
- return $returnValue;
+ return MathTrig\Operations::product(...$args);
}
/**
@@ -950,56 +568,40 @@ class MathTrig
* QUOTIENT function returns the integer portion of a division. Numerator is the divided number
* and denominator is the divisor.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Operations::quotient()
+ * Use the quotient method in the MathTrig\Operations class instead
+ *
* Excel Function:
* QUOTIENT(value1[,value2[, ...]])
*
- * @param mixed ...$args Data values
+ * @param mixed $numerator
+ * @param mixed $denominator
*
- * @return float
+ * @return int|string
*/
- public static function QUOTIENT(...$args)
+ public static function QUOTIENT($numerator, $denominator)
{
- // Return value
- $returnValue = null;
-
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- if ($returnValue === null) {
- $returnValue = ($arg == 0) ? 0 : $arg;
- } else {
- if (($returnValue == 0) || ($arg == 0)) {
- $returnValue = 0;
- } else {
- $returnValue /= $arg;
- }
- }
- }
- }
-
- // Return
- return (int) $returnValue;
+ return MathTrig\Operations::quotient($numerator, $denominator);
}
/**
- * RAND.
+ * RAND/RANDBETWEEN.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Random::randBetween()
+ * Use the randBetween or randBetween method in the MathTrig\Random class instead
*
* @param int $min Minimal value
* @param int $max Maximal value
*
- * @return int Random number
+ * @return float|int|string Random number
*/
public static function RAND($min = 0, $max = 0)
{
- $min = Functions::flattenSingleValue($min);
- $max = Functions::flattenSingleValue($max);
-
- if ($min == 0 && $max == 0) {
- return (mt_rand(0, 10000000)) / 10000000;
- }
-
- return mt_rand($min, $max);
+ return MathTrig\Random::randBetween($min, $max);
}
/**
@@ -1009,18 +611,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcRoman() method in the MathTrig\Roman class instead
+ * @Ssee MathTrig\Roman::evaluate()
+ * Use the evaluate() method in the MathTrig\Roman class instead
*
* @param mixed $aValue Number to convert
* @param mixed $style Number indicating one of five possible forms
*
* @return string Roman numeral, or a string containing an error
- *
- * @codeCoverageIgnore
*/
public static function ROMAN($aValue, $style = 0)
{
- return MathTrig\Roman::funcRoman($aValue, $style);
+ return MathTrig\Roman::evaluate($aValue, $style);
}
/**
@@ -1030,18 +631,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcRoundUp() method in the MathTrig\RoundUp class instead
+ * @See MathTrig\Round::up()
+ * Use the up() method in the MathTrig\Round class instead
*
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
*
* @return float|string Rounded Number, or a string containing an error
- *
- * @codeCoverageIgnore
*/
public static function ROUNDUP($number, $digits)
{
- return MathTrig\RoundUp::funcRoundUp($number, $digits);
+ return MathTrig\Round::up($number, $digits);
}
/**
@@ -1051,18 +651,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcRoundDown() method in the MathTrig\RoundDown class instead
+ * @See MathTrig\Round::down()
+ * Use the down() method in the MathTrig\Round class instead
*
* @param float $number Number to round
* @param int $digits Number of digits to which you want to round $number
*
* @return float|string Rounded Number, or a string containing an error
- *
- * @codeCoverageIgnore
*/
public static function ROUNDDOWN($number, $digits)
{
- return MathTrig\RoundDown::funcRoundDown($number, $digits);
+ return MathTrig\Round::down($number, $digits);
}
/**
@@ -1070,37 +669,21 @@ class MathTrig
*
* Returns the sum of a power series
*
- * @param mixed[] $args An array of mixed values for the Data Series
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\SeriesSum::evaluate()
+ * Use the evaluate method in the MathTrig\SeriesSum class instead
+ *
+ * @param mixed $x Input value
+ * @param mixed $n Initial power
+ * @param mixed $m Step
+ * @param mixed[] $args An array of coefficients for the Data Series
*
* @return float|string The result, or a string containing an error
*/
- public static function SERIESSUM(...$args)
+ public static function SERIESSUM($x, $n, $m, ...$args)
{
- $returnValue = 0;
-
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
-
- $x = array_shift($aArgs);
- $n = array_shift($aArgs);
- $m = array_shift($aArgs);
-
- if ((is_numeric($x)) && (is_numeric($n)) && (is_numeric($m))) {
- // Calculate
- $i = 0;
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $returnValue += $arg * $x ** ($n + ($m * $i++));
- } else {
- return Functions::VALUE();
- }
- }
-
- return $returnValue;
- }
-
- return Functions::VALUE();
+ return MathTrig\SeriesSum::evaluate($x, $n, $m, ...$args);
}
/**
@@ -1109,27 +692,31 @@ class MathTrig
* Determines the sign of a number. Returns 1 if the number is positive, zero (0)
* if the number is 0, and -1 if the number is negative.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Sign::evaluate()
+ * Use the evaluate method in the MathTrig\Sign class instead
+ *
* @param float $number Number to round
*
* @return int|string sign value, or a string containing an error
*/
public static function SIGN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (is_bool($number)) {
- return (int) $number;
- }
- if (is_numeric($number)) {
- return self::returnSign($number);
- }
-
- return Functions::VALUE();
+ return MathTrig\Sign::evaluate($number);
}
+ /**
+ * returnSign = returns 0/-1/+1.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Helpers::returnSign()
+ * Use the returnSign method in the MathTrig\Helpers class instead
+ */
public static function returnSign(float $number): int
{
- return $number ? (($number > 0) ? 1 : -1) : 0;
+ return MathTrig\Helpers::returnSign($number);
}
/**
@@ -1137,57 +724,18 @@ class MathTrig
*
* Returns the square root of (number * pi).
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Sqrt::sqrt()
+ * Use the pi method in the MathTrig\Sqrt class instead
+ *
* @param float $number Number
*
* @return float|string Square Root of Number * Pi, or a string containing an error
*/
public static function SQRTPI($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (is_numeric($number)) {
- if ($number < 0) {
- return Functions::NAN();
- }
-
- return sqrt($number * M_PI);
- }
-
- return Functions::VALUE();
- }
-
- protected static function filterHiddenArgs($cellReference, $args)
- {
- return array_filter(
- $args,
- function ($index) use ($cellReference) {
- [, $row, $column] = explode('.', $index);
-
- return $cellReference->getWorksheet()->getRowDimension($row)->getVisible() &&
- $cellReference->getWorksheet()->getColumnDimension($column)->getVisible();
- },
- ARRAY_FILTER_USE_KEY
- );
- }
-
- protected static function filterFormulaArgs($cellReference, $args)
- {
- return array_filter(
- $args,
- function ($index) use ($cellReference) {
- [, $row, $column] = explode('.', $index);
- if ($cellReference->getWorksheet()->cellExists($column . $row)) {
- //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
- $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
- $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
-
- return !$isFormula || $cellFormula;
- }
-
- return true;
- },
- ARRAY_FILTER_USE_KEY
- );
+ return MathTrig\Sqrt::pi($number);
}
/**
@@ -1195,6 +743,11 @@ class MathTrig
*
* Returns a subtotal in a list or database.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Subtotal::evaluate()
+ * Use the evaluate method in the MathTrig\Subtotal class instead
+ *
* @param int $functionType
* A number 1 to 11 that specifies which function to
* use in calculating subtotals within a range
@@ -1208,45 +761,7 @@ class MathTrig
*/
public static function SUBTOTAL($functionType, ...$args)
{
- $cellReference = array_pop($args);
- $aArgs = Functions::flattenArrayIndexed($args);
- $subtotal = Functions::flattenSingleValue($functionType);
-
- // Calculate
- if ((is_numeric($subtotal)) && (!is_string($subtotal))) {
- if ($subtotal > 100) {
- $aArgs = self::filterHiddenArgs($cellReference, $aArgs);
- $subtotal -= 100;
- }
-
- $aArgs = self::filterFormulaArgs($cellReference, $aArgs);
- switch ($subtotal) {
- case 1:
- return Statistical\Averages::AVERAGE($aArgs);
- case 2:
- return Statistical\Counts::COUNT($aArgs);
- case 3:
- return Statistical\Counts::COUNTA($aArgs);
- case 4:
- return Statistical\Maximum::MAX($aArgs);
- case 5:
- return Statistical\Minimum::MIN($aArgs);
- case 6:
- return self::PRODUCT($aArgs);
- case 7:
- return Statistical\StandardDeviations::STDEV($aArgs);
- case 8:
- return Statistical\StandardDeviations::STDEVP($aArgs);
- case 9:
- return self::SUM($aArgs);
- case 10:
- return Statistical\Variances::VAR($aArgs);
- case 11:
- return Statistical\Variances::VARP($aArgs);
- }
- }
-
- return Functions::VALUE();
+ return MathTrig\Subtotal::evaluate($functionType, ...$args);
}
/**
@@ -1254,28 +769,21 @@ class MathTrig
*
* SUM computes the sum of all the values and cells referenced in the argument list.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Sum::sumErroringStrings()
+ * Use the sumErroringStrings method in the MathTrig\Sum class instead
+ *
* Excel Function:
* SUM(value1[,value2[, ...]])
*
* @param mixed ...$args Data values
*
- * @return float
+ * @return float|string
*/
public static function SUM(...$args)
{
- $returnValue = 0;
-
- // Loop through the arguments
- foreach (Functions::flattenArray($args) as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $returnValue += $arg;
- } elseif (Functions::isError($arg)) {
- return $arg;
- }
- }
-
- return $returnValue;
+ return MathTrig\Sum::sumIgnoringStrings(...$args);
}
/**
@@ -1295,7 +803,7 @@ class MathTrig
* @param string $criteria the criteria that defines which cells will be summed
* @param mixed $sumRange
*
- * @return float
+ * @return float|string
*/
public static function SUMIF($range, $criteria, $sumRange = [])
{
@@ -1317,7 +825,7 @@ class MathTrig
*
* @param mixed $args Data values
*
- * @return float
+ * @return null|float|string
*/
public static function SUMIFS(...$args)
{
@@ -1330,39 +838,18 @@ class MathTrig
* Excel Function:
* SUMPRODUCT(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Sum::product()
+ * Use the product method in the MathTrig\Sum class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function SUMPRODUCT(...$args)
{
- $arrayList = $args;
-
- $wrkArray = Functions::flattenArray(array_shift($arrayList));
- $wrkCellCount = count($wrkArray);
-
- for ($i = 0; $i < $wrkCellCount; ++$i) {
- if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) {
- $wrkArray[$i] = 0;
- }
- }
-
- foreach ($arrayList as $matrixData) {
- $array2 = Functions::flattenArray($matrixData);
- $count = count($array2);
- if ($wrkCellCount != $count) {
- return Functions::VALUE();
- }
-
- foreach ($array2 as $i => $val) {
- if ((!is_numeric($val)) || (is_string($val))) {
- $val = 0;
- }
- $wrkArray[$i] *= $val;
- }
- }
-
- return array_sum($wrkArray);
+ return MathTrig\Sum::product(...$args);
}
/**
@@ -1370,107 +857,75 @@ class MathTrig
*
* SUMSQ returns the sum of the squares of the arguments
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\SumSquares::sumSquare()
+ * Use the sumSquare method in the MathTrig\SumSquares class instead
+ *
* Excel Function:
* SUMSQ(value1[,value2[, ...]])
*
* @param mixed ...$args Data values
*
- * @return float
+ * @return float|string
*/
public static function SUMSQ(...$args)
{
- $returnValue = 0;
-
- // Loop through arguments
- foreach (Functions::flattenArray($args) as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $returnValue += ($arg * $arg);
- }
- }
-
- return $returnValue;
+ return MathTrig\SumSquares::sumSquare(...$args);
}
/**
* SUMX2MY2.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\SumSquares::sumXSquaredMinusYSquared()
+ * Use the sumXSquaredMinusYSquared method in the MathTrig\SumSquares class instead
+ *
* @param mixed[] $matrixData1 Matrix #1
* @param mixed[] $matrixData2 Matrix #2
*
- * @return float
+ * @return float|string
*/
public static function SUMX2MY2($matrixData1, $matrixData2)
{
- $array1 = Functions::flattenArray($matrixData1);
- $array2 = Functions::flattenArray($matrixData2);
- $count = min(count($array1), count($array2));
-
- $result = 0;
- for ($i = 0; $i < $count; ++$i) {
- if (
- ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
- ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
- ) {
- $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]);
- }
- }
-
- return $result;
+ return MathTrig\SumSquares::sumXSquaredMinusYSquared($matrixData1, $matrixData2);
}
/**
* SUMX2PY2.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\SumSquares::sumXSquaredPlusYSquared()
+ * Use the sumXSquaredPlusYSquared method in the MathTrig\SumSquares class instead
+ *
* @param mixed[] $matrixData1 Matrix #1
* @param mixed[] $matrixData2 Matrix #2
*
- * @return float
+ * @return float|string
*/
public static function SUMX2PY2($matrixData1, $matrixData2)
{
- $array1 = Functions::flattenArray($matrixData1);
- $array2 = Functions::flattenArray($matrixData2);
- $count = min(count($array1), count($array2));
-
- $result = 0;
- for ($i = 0; $i < $count; ++$i) {
- if (
- ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
- ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
- ) {
- $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]);
- }
- }
-
- return $result;
+ return MathTrig\SumSquares::sumXSquaredPlusYSquared($matrixData1, $matrixData2);
}
/**
* SUMXMY2.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\SumSquares::sumXMinusYSquared()
+ * Use the sumXMinusYSquared method in the MathTrig\SumSquares class instead
+ *
* @param mixed[] $matrixData1 Matrix #1
* @param mixed[] $matrixData2 Matrix #2
*
- * @return float
+ * @return float|string
*/
public static function SUMXMY2($matrixData1, $matrixData2)
{
- $array1 = Functions::flattenArray($matrixData1);
- $array2 = Functions::flattenArray($matrixData2);
- $count = min(count($array1), count($array2));
-
- $result = 0;
- for ($i = 0; $i < $count; ++$i) {
- if (
- ((is_numeric($array1[$i])) && (!is_string($array1[$i]))) &&
- ((is_numeric($array2[$i])) && (!is_string($array2[$i])))
- ) {
- $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]);
- }
- }
-
- return $result;
+ return MathTrig\SumSquares::sumXMinusYSquared($matrixData1, $matrixData2);
}
/**
@@ -1480,18 +935,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the funcTrunc() method in the MathTrig\Trunc class instead
+ * @see MathTrig\Trunc::evaluate()
+ * Use the evaluate() method in the MathTrig\Trunc class instead
*
* @param float $value
* @param int $digits
*
* @return float|string Truncated value, or a string containing an error
- *
- * @codeCoverageIgnore
*/
public static function TRUNC($value = 0, $digits = 0)
{
- return MathTrig\Trunc::funcTrunc($value, $digits);
+ return MathTrig\Trunc::evaluate($value, $digits);
}
/**
@@ -1499,21 +953,18 @@ class MathTrig
*
* Returns the secant of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Secant::sec()
+ * Use the sec method in the MathTrig\Trig\Secant class instead
+ *
* @param float $angle Number
*
* @return float|string The secant of the angle
*/
public static function SEC($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = cos($angle);
-
- return self::verySmallDivisor($result) ? Functions::DIV0() : (1 / $result);
+ return MathTrig\Trig\Secant::sec($angle);
}
/**
@@ -1521,21 +972,18 @@ class MathTrig
*
* Returns the hyperbolic secant of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Secant::sech()
+ * Use the sech method in the MathTrig\Trig\Secant class instead
+ *
* @param float $angle Number
*
* @return float|string The hyperbolic secant of the angle
*/
public static function SECH($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = cosh($angle);
-
- return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ return MathTrig\Trig\Secant::sech($angle);
}
/**
@@ -1543,21 +991,18 @@ class MathTrig
*
* Returns the cosecant of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosecant::csc()
+ * Use the csc method in the MathTrig\Trig\Cosecant class instead
+ *
* @param float $angle Number
*
* @return float|string The cosecant of the angle
*/
public static function CSC($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = sin($angle);
-
- return self::verySmallDivisor($result) ? Functions::DIV0() : (1 / $result);
+ return MathTrig\Trig\Cosecant::csc($angle);
}
/**
@@ -1565,21 +1010,18 @@ class MathTrig
*
* Returns the hyperbolic cosecant of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosecant::csch()
+ * Use the csch method in the MathTrig\Trig\Cosecant class instead
+ *
* @param float $angle Number
*
* @return float|string The hyperbolic cosecant of the angle
*/
public static function CSCH($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = sinh($angle);
-
- return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ return MathTrig\Trig\Cosecant::csch($angle);
}
/**
@@ -1587,21 +1029,18 @@ class MathTrig
*
* Returns the cotangent of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cotangent::cot()
+ * Use the cot method in the MathTrig\Trig\Cotangent class instead
+ *
* @param float $angle Number
*
* @return float|string The cotangent of the angle
*/
public static function COT($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = sin($angle);
-
- return self::verySmallDivisor($result) ? Functions::DIV0() : (cos($angle) / $result);
+ return MathTrig\Trig\Cotangent::cot($angle);
}
/**
@@ -1609,21 +1048,18 @@ class MathTrig
*
* Returns the hyperbolic cotangent of an angle.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cotangent::coth()
+ * Use the coth method in the MathTrig\Trig\Cotangent class instead
+ *
* @param float $angle Number
*
* @return float|string The hyperbolic cotangent of the angle
*/
public static function COTH($angle)
{
- $angle = Functions::flattenSingleValue($angle);
-
- if (!is_numeric($angle)) {
- return Functions::VALUE();
- }
-
- $result = tanh($angle);
-
- return ($result == 0.0) ? Functions::DIV0() : 1 / $result;
+ return MathTrig\Trig\Cotangent::coth($angle);
}
/**
@@ -1631,31 +1067,35 @@ class MathTrig
*
* Returns the arccotangent of a number.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cotangent::acot()
+ * Use the acot method in the MathTrig\Trig\Cotangent class instead
+ *
* @param float $number Number
*
* @return float|string The arccotangent of the number
*/
public static function ACOT($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return (M_PI / 2) - atan($number);
+ return MathTrig\Trig\Cotangent::acot($number);
}
/**
* Return NAN or value depending on argument.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Helpers::numberOrNan()
+ * Use the numberOrNan method in the MathTrig\Helpers class instead
+ *
* @param float $result Number
*
* @return float|string
*/
public static function numberOrNan($result)
{
- return is_nan($result) ? Functions::NAN() : $result;
+ return MathTrig\Helpers::numberOrNan($result);
}
/**
@@ -1663,21 +1103,18 @@ class MathTrig
*
* Returns the hyperbolic arccotangent of a number.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cotangent::acoth()
+ * Use the acoth method in the MathTrig\Trig\Cotangent class instead
+ *
* @param float $number Number
*
* @return float|string The hyperbolic arccotangent of the number
*/
public static function ACOTH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- $result = log(($number + 1) / ($number - 1)) / 2;
-
- return self::numberOrNan($result);
+ return MathTrig\Trig\Cotangent::acoth($number);
}
/**
@@ -1687,18 +1124,17 @@ class MathTrig
*
* @Deprecated 1.17.0
*
- * @see Use the builtinRound() method in the MathTrig\Round class instead
+ * @See MathTrig\Round::round()
+ * Use the round() method in the MathTrig\Round class instead
*
* @param mixed $number Should be numeric
* @param mixed $precision Should be int
*
* @return float|string Rounded number
- *
- * @codeCoverageIgnore
*/
public static function builtinROUND($number, $precision)
{
- return MathTrig\Round::builtinRound($number, $precision);
+ return MathTrig\Round::round($number, $precision);
}
/**
@@ -1706,24 +1142,28 @@ class MathTrig
*
* Returns the result of builtin function abs after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Absolute::evaluate()
+ * Use the evaluate method in the MathTrig\Absolute class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|int|string Rounded number
*/
public static function builtinABS($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return abs($number);
+ return MathTrig\Absolute::evaluate($number);
}
/**
* ACOS.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosine::acos()
+ * Use the acos method in the MathTrig\Trig\Cosine class instead
+ *
* Returns the result of builtin function acos after validating args.
*
* @param mixed $number Should be numeric
@@ -1732,13 +1172,7 @@ class MathTrig
*/
public static function builtinACOS($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::numberOrNan(acos($number));
+ return MathTrig\Trig\Cosine::acos($number);
}
/**
@@ -1746,19 +1180,18 @@ class MathTrig
*
* Returns the result of builtin function acosh after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosine::acosh()
+ * Use the acosh method in the MathTrig\Trig\Cosine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinACOSH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::numberOrNan(acosh($number));
+ return MathTrig\Trig\Cosine::acosh($number);
}
/**
@@ -1766,19 +1199,18 @@ class MathTrig
*
* Returns the result of builtin function asin after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Sine::asin()
+ * Use the asin method in the MathTrig\Trig\Sine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinASIN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::numberOrNan(asin($number));
+ return MathTrig\Trig\Sine::asin($number);
}
/**
@@ -1786,39 +1218,37 @@ class MathTrig
*
* Returns the result of builtin function asinh after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Sine::asinh()
+ * Use the asinh method in the MathTrig\Trig\Sine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinASINH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return asinh($number);
+ return MathTrig\Trig\Sine::asinh($number);
}
/**
- * ASIN.
+ * ATAN.
*
* Returns the result of builtin function atan after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Tangent::atan()
+ * Use the atan method in the MathTrig\Trig\Tangent class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinATAN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::numberOrNan(atan($number));
+ return MathTrig\Trig\Tangent::atan($number);
}
/**
@@ -1826,19 +1256,18 @@ class MathTrig
*
* Returns the result of builtin function atanh after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Tangent::atanh()
+ * Use the atanh method in the MathTrig\Trig\Tangent class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinATANH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return atanh($number);
+ return MathTrig\Trig\Tangent::atanh($number);
}
/**
@@ -1846,19 +1275,18 @@ class MathTrig
*
* Returns the result of builtin function cos after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosine::cos()
+ * Use the cos method in the MathTrig\Trig\Cosine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinCOS($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return cos($number);
+ return MathTrig\Trig\Cosine::cos($number);
}
/**
@@ -1866,19 +1294,18 @@ class MathTrig
*
* Returns the result of builtin function cos after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Cosine::cosh()
+ * Use the cosh method in the MathTrig\Trig\Cosine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinCOSH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return cosh($number);
+ return MathTrig\Trig\Cosine::cosh($number);
}
/**
@@ -1886,19 +1313,18 @@ class MathTrig
*
* Returns the result of builtin function rad2deg after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Angle::toDegrees()
+ * Use the toDegrees method in the MathTrig\Angle class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinDEGREES($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return rad2deg($number);
+ return MathTrig\Angle::toDegrees($number);
}
/**
@@ -1906,19 +1332,18 @@ class MathTrig
*
* Returns the result of builtin function exp after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Exp::evaluate()
+ * Use the evaluate method in the MathTrig\Exp class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinEXP($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return exp($number);
+ return MathTrig\Exp::evaluate($number);
}
/**
@@ -1926,19 +1351,18 @@ class MathTrig
*
* Returns the result of builtin function log after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Logarithms::natural()
+ * Use the natural method in the MathTrig\Logarithms class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinLN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return log($number);
+ return MathTrig\Logarithms::natural($number);
}
/**
@@ -1946,19 +1370,18 @@ class MathTrig
*
* Returns the result of builtin function log after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Logarithms::base10()
+ * Use the natural method in the MathTrig\Logarithms class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinLOG10($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return log10($number);
+ return MathTrig\Logarithms::base10($number);
}
/**
@@ -1966,19 +1389,18 @@ class MathTrig
*
* Returns the result of builtin function deg2rad after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Angle::toRadians()
+ * Use the toRadians method in the MathTrig\Angle class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinRADIANS($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return deg2rad($number);
+ return MathTrig\Angle::toRadians($number);
}
/**
@@ -1986,19 +1408,18 @@ class MathTrig
*
* Returns the result of builtin function sin after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Sine::evaluate()
+ * Use the sin method in the MathTrig\Trig\Sine class instead
+ *
* @param mixed $number Should be numeric
*
- * @return float|string Rounded number
+ * @return float|string sine
*/
public static function builtinSIN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return sin($number);
+ return MathTrig\Trig\Sine::sin($number);
}
/**
@@ -2006,19 +1427,18 @@ class MathTrig
*
* Returns the result of builtin function sinh after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Sine::sinh()
+ * Use the sinh method in the MathTrig\Trig\Sine class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinSINH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return sinh($number);
+ return MathTrig\Trig\Sine::sinh($number);
}
/**
@@ -2026,19 +1446,18 @@ class MathTrig
*
* Returns the result of builtin function sqrt after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Sqrt::sqrt()
+ * Use the sqrt method in the MathTrig\Sqrt class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinSQRT($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::numberOrNan(sqrt($number));
+ return MathTrig\Sqrt::sqrt($number);
}
/**
@@ -2046,19 +1465,18 @@ class MathTrig
*
* Returns the result of builtin function tan after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Tangent::tan()
+ * Use the tan method in the MathTrig\Trig\Tangent class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinTAN($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return self::verySmallDivisor(cos($number)) ? Functions::DIV0() : tan($number);
+ return MathTrig\Trig\Tangent::tan($number);
}
/**
@@ -2066,29 +1484,28 @@ class MathTrig
*
* Returns the result of builtin function sinh after validating args.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Trig\Tangent::tanh()
+ * Use the tanh method in the MathTrig\Trig\Tangent class instead
+ *
* @param mixed $number Should be numeric
*
* @return float|string Rounded number
*/
public static function builtinTANH($number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number)) {
- return Functions::VALUE();
- }
-
- return tanh($number);
- }
-
- private static function verySmallDivisor(float $number): bool
- {
- return abs($number) < 1.0E-12;
+ return MathTrig\Trig\Tangent::tanh($number);
}
/**
* Many functions accept null/false/true argument treated as 0/0/1.
*
+ * @Deprecated 1.18.0
+ *
+ * @See MathTrig\Helpers::validateNumericNullBool()
+ * Use the validateNumericNullBool method in the MathTrig\Helpers class instead
+ *
* @param mixed $number
*/
public static function nullFalseTrueToNumber(&$number): void
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php
new file mode 100644
index 00000000..9f1bd804
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Absolute.php
@@ -0,0 +1,28 @@
+getMessage();
+ }
+
+ return abs($number);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Angle.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Angle.php
new file mode 100644
index 00000000..3062481f
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Angle.php
@@ -0,0 +1,48 @@
+getMessage();
+ }
+
+ return rad2deg($number);
+ }
+
+ /**
+ * RADIANS.
+ *
+ * Returns the result of builtin function deg2rad after validating args.
+ *
+ * @param mixed $number Should be numeric
+ *
+ * @return float|string Rounded number
+ */
+ public static function toRadians($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return deg2rad($number);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php
new file mode 100644
index 00000000..b852eeac
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php
@@ -0,0 +1,103 @@
+ 1000,
+ 'D' => 500,
+ 'C' => 100,
+ 'L' => 50,
+ 'X' => 10,
+ 'V' => 5,
+ 'I' => 1,
+ ];
+
+ /**
+ * Recursively calculate the arabic value of a roman numeral.
+ *
+ * @param int $sum
+ * @param int $subtract
+ *
+ * @return int
+ */
+ private static function calculateArabic(array $roman, &$sum = 0, $subtract = 0)
+ {
+ $numeral = array_shift($roman);
+ if (!isset(self::ROMAN_LOOKUP[$numeral])) {
+ throw new Exception('Invalid character detected');
+ }
+
+ $arabic = self::ROMAN_LOOKUP[$numeral];
+ if (count($roman) > 0 && isset(self::ROMAN_LOOKUP[$roman[0]]) && $arabic < self::ROMAN_LOOKUP[$roman[0]]) {
+ $subtract += $arabic;
+ } else {
+ $sum += ($arabic - $subtract);
+ $subtract = 0;
+ }
+
+ if (count($roman) > 0) {
+ self::calculateArabic($roman, $sum, $subtract);
+ }
+
+ return $sum;
+ }
+
+ /**
+ * @param mixed $value
+ */
+ private static function mollifyScrutinizer($value): array
+ {
+ return is_array($value) ? $value : [];
+ }
+
+ private static function strSplit(string $roman): array
+ {
+ $rslt = str_split($roman);
+
+ return self::mollifyScrutinizer($rslt);
+ }
+
+ /**
+ * ARABIC.
+ *
+ * Converts a Roman numeral to an Arabic numeral.
+ *
+ * Excel Function:
+ * ARABIC(text)
+ *
+ * @param string $roman
+ *
+ * @return int|string the arabic numberal contrived from the roman numeral
+ */
+ public static function evaluate($roman)
+ {
+ // An empty string should return 0
+ $roman = substr(trim(strtoupper((string) Functions::flattenSingleValue($roman))), 0, 255);
+ if ($roman === '') {
+ return 0;
+ }
+
+ // Convert the roman numeral to an arabic number
+ $negativeNumber = $roman[0] === '-';
+ if ($negativeNumber) {
+ $roman = substr($roman, 1);
+ }
+
+ try {
+ $arabic = self::calculateArabic(self::strSplit($roman));
+ } catch (Exception $e) {
+ return Functions::VALUE(); // Invalid character detected
+ }
+
+ if ($negativeNumber) {
+ $arabic *= -1; // The number should be negative
+ }
+
+ return $arabic;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Base.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Base.php
new file mode 100644
index 00000000..4be7b7c7
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Base.php
@@ -0,0 +1,49 @@
+getMessage();
+ }
+ $minLength = Functions::flattenSingleValue($minLength);
+
+ if ($minLength === null || is_numeric($minLength)) {
+ if ($number < 0 || $number >= 2 ** 53 || $radix < 2 || $radix > 36) {
+ return Functions::NAN(); // Numeric range constraints
+ }
+
+ $outcome = strtoupper((string) base_convert("$number", 10, $radix));
+ if ($minLength !== null) {
+ $outcome = str_pad($outcome, (int) $minLength, '0', STR_PAD_LEFT); // String padding
+ }
+
+ return $outcome;
+ }
+
+ return Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php
index 6fdd6165..73f54a52 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Ceiling.php
@@ -2,9 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
-use Exception;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
class Ceiling
{
@@ -24,21 +23,92 @@ class Ceiling
*
* @return float|string Rounded Number, or a string containing an error
*/
- public static function funcCeiling($number, $significance = null)
+ public static function ceiling($number, $significance = null)
{
- MathTrig::nullFalseTrueToNumber($number);
- $significance = Functions::flattenSingleValue($significance);
-
if ($significance === null) {
self::floorCheck1Arg();
- $significance = ((float) $number < 0) ? -1 : 1;
}
- if ((is_numeric($number)) && (is_numeric($significance))) {
- return self::argumentsOk((float) $number, (float) $significance);
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ return self::argumentsOk((float) $number, (float) $significance);
+ }
+
+ /**
+ * CEILING.MATH.
+ *
+ * Round a number down to the nearest integer or to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * CEILING.MATH(number[,significance[,mode]])
+ *
+ * @param mixed $number Number to round
+ * @param mixed $significance Significance
+ * @param int $mode direction to round negative numbers
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function math($number, $significance = null, $mode = 0)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);
+ $mode = Helpers::validateNumericNullSubstitution($mode, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (empty($significance * $number)) {
+ return 0.0;
+ }
+ if (self::ceilingMathTest((float) $significance, (float) $number, (int) $mode)) {
+ return floor($number / $significance) * $significance;
+ }
+
+ return ceil($number / $significance) * $significance;
+ }
+
+ /**
+ * CEILING.PRECISE.
+ *
+ * Rounds number up, away from zero, to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * CEILING.PRECISE(number[,significance])
+ *
+ * @param mixed $number the number you want to round
+ * @param float $significance the multiple to which you want to round
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function precise($number, $significance = 1)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (!$significance) {
+ return 0.0;
+ }
+ $result = $number / abs($significance);
+
+ return ceil($result) * $significance * (($significance < 0) ? -1 : 1);
+ }
+
+ /**
+ * Let CEILINGMATH complexity pass Scrutinizer.
+ */
+ private static function ceilingMathTest(float $significance, float $number, int $mode): bool
+ {
+ return ((float) $significance < 0) || ((float) $number < 0 && !empty($mode));
}
/**
@@ -51,7 +121,7 @@ class Ceiling
if (empty($number * $significance)) {
return 0.0;
}
- if (MathTrig::returnSign($number) == MathTrig::returnSign($significance)) {
+ if (Helpers::returnSign($number) == Helpers::returnSign($significance)) {
return ceil($number / $significance) * $significance;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/CeilingMath.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/CeilingMath.php
deleted file mode 100644
index f94d1fe0..00000000
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/CeilingMath.php
+++ /dev/null
@@ -1,55 +0,0 @@
-getMessage();
+ }
+
+ return round(Factorial::fact($numObjs) / Factorial::fact($numObjs - $numInSet)) / Factorial::fact($numInSet);
+ }
+
+ /**
+ * COMBIN.
+ *
+ * Returns the number of combinations for a given number of items. Use COMBIN to
+ * determine the total possible number of groups for a given number of items.
+ *
+ * Excel Function:
+ * COMBIN(numObjs,numInSet)
+ *
+ * @param mixed $numObjs Number of different objects
+ * @param mixed $numInSet Number of objects in each combination
+ *
+ * @return float|int|string Number of combinations, or a string containing an error
+ */
+ public static function withRepetition($numObjs, $numInSet)
+ {
+ try {
+ $numObjs = Helpers::validateNumericNullSubstitution($numObjs, null);
+ $numInSet = Helpers::validateNumericNullSubstitution($numInSet, null);
+ Helpers::validateNotNegative($numInSet);
+ Helpers::validateNotNegative($numObjs);
+ $numObjs = (int) $numObjs;
+ $numInSet = (int) $numInSet;
+ // Microsoft documentation says following is true, but Excel
+ // does not enforce this restriction.
+ //Helpers::validateNotNegative($numObjs - $numInSet);
+ if ($numObjs === 0) {
+ Helpers::validateNotNegative(-$numInSet);
+
+ return 1;
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return round(Factorial::fact($numObjs + $numInSet - 1) / Factorial::fact($numObjs - 1)) / Factorial::fact($numInSet);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php
new file mode 100644
index 00000000..ce930a83
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php
@@ -0,0 +1,28 @@
+getMessage();
+ }
+
+ return exp($number);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php
new file mode 100644
index 00000000..f443f8e5
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Factorial.php
@@ -0,0 +1,110 @@
+getMessage();
+ }
+
+ $factLoop = floor($factVal);
+ if ($factVal > $factLoop) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ return Statistical\Distributions\Gamma::gammaValue($factVal + 1);
+ }
+ }
+
+ $factorial = 1;
+ while ($factLoop > 1) {
+ $factorial *= $factLoop--;
+ }
+
+ return $factorial;
+ }
+
+ /**
+ * FACTDOUBLE.
+ *
+ * Returns the double factorial of a number.
+ *
+ * Excel Function:
+ * FACTDOUBLE(factVal)
+ *
+ * @param float $factVal Factorial Value
+ *
+ * @return float|int|string Double Factorial, or a string containing an error
+ */
+ public static function factDouble($factVal)
+ {
+ try {
+ $factVal = Helpers::validateNumericNullSubstitution($factVal, 0);
+ Helpers::validateNotNegative($factVal);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $factLoop = floor($factVal);
+ $factorial = 1;
+ while ($factLoop > 1) {
+ $factorial *= $factLoop;
+ $factLoop -= 2;
+ }
+
+ return $factorial;
+ }
+
+ /**
+ * MULTINOMIAL.
+ *
+ * Returns the ratio of the factorial of a sum of values to the product of factorials.
+ *
+ * @param mixed[] $args An array of mixed values for the Data Series
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function multinomial(...$args)
+ {
+ $summer = 0;
+ $divisor = 1;
+
+ try {
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $argx) {
+ $arg = Helpers::validateNumericNullSubstitution($argx, null);
+ Helpers::validateNotNegative($arg);
+ $arg = (int) $arg;
+ $summer += $arg;
+ $divisor *= self::fact($arg);
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $summer = self::fact($summer);
+
+ return $summer / $divisor;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Floor.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Floor.php
index 0c65ee7c..04e12205 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Floor.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Floor.php
@@ -2,9 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
-use Exception;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
class Floor
{
@@ -24,26 +23,122 @@ class Floor
* Excel Function:
* FLOOR(number[,significance])
*
+ * @param mixed $number Expect float. Number to round
+ * @param mixed $significance Expect float. Significance
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function floor($number, $significance = null)
+ {
+ if ($significance === null) {
+ self::floorCheck1Arg();
+ }
+
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return self::argumentsOk((float) $number, (float) $significance);
+ }
+
+ /**
+ * FLOOR.MATH.
+ *
+ * Round a number down to the nearest integer or to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * FLOOR.MATH(number[,significance[,mode]])
+ *
+ * @param mixed $number Number to round
+ * @param mixed $significance Significance
+ * @param mixed $mode direction to round negative numbers
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function math($number, $significance = null, $mode = 0)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, ($number < 0) ? -1 : 1);
+ $mode = Helpers::validateNumericNullSubstitution($mode, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return self::argsOk((float) $number, (float) $significance, (int) $mode);
+ }
+
+ /**
+ * FLOOR.PRECISE.
+ *
+ * Rounds number down, toward zero, to the nearest multiple of significance.
+ *
+ * Excel Function:
+ * FLOOR.PRECISE(number[,significance])
+ *
* @param float $number Number to round
* @param float $significance Significance
*
* @return float|string Rounded Number, or a string containing an error
*/
- public static function funcFloor($number, $significance = null)
+ public static function precise($number, $significance = 1)
{
- MathTrig::nullFalseTrueToNumber($number);
- $significance = Functions::flattenSingleValue($significance);
-
- if ($significance === null) {
- self::floorCheck1Arg();
- $significance = MathTrig::returnSign((float) $number);
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $significance = Helpers::validateNumericNullSubstitution($significance, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- if ((is_numeric($number)) && (is_numeric($significance))) {
- return self::argumentsOk((float) $number, (float) $significance);
+ return self::argumentsOkPrecise((float) $number, (float) $significance);
+ }
+
+ /**
+ * Avoid Scrutinizer problems concerning complexity.
+ *
+ * @return float|string
+ */
+ private static function argumentsOkPrecise(float $number, float $significance)
+ {
+ if ($significance == 0.0) {
+ return Functions::DIV0();
+ }
+ if ($number == 0.0) {
+ return 0.0;
}
- return Functions::VALUE();
+ return floor($number / abs($significance)) * abs($significance);
+ }
+
+ /**
+ * Avoid Scrutinizer complexity problems.
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ private static function argsOk(float $number, float $significance, int $mode)
+ {
+ if (!$significance) {
+ return Functions::DIV0();
+ }
+ if (!$number) {
+ return 0.0;
+ }
+ if (self::floorMathTest($number, $significance, $mode)) {
+ return ceil($number / $significance) * $significance;
+ }
+
+ return floor($number / $significance) * $significance;
+ }
+
+ /**
+ * Let FLOORMATH complexity pass Scrutinizer.
+ */
+ private static function floorMathTest(float $number, float $significance, int $mode): bool
+ {
+ return Helpers::returnSign($significance) == -1 || (Helpers::returnSign($number) == -1 && !empty($mode));
}
/**
@@ -59,10 +154,10 @@ class Floor
if ($number == 0.0) {
return 0.0;
}
- if (MathTrig::returnSign($significance) == 1) {
+ if (Helpers::returnSign($significance) == 1) {
return floor($number / $significance) * $significance;
}
- if (MathTrig::returnSign($number) == -1 && MathTrig::returnSign($significance) == -1) {
+ if (Helpers::returnSign($number) == -1 && Helpers::returnSign($significance) == -1) {
return floor($number / $significance) * $significance;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/FloorMath.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/FloorMath.php
deleted file mode 100644
index cba78a53..00000000
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/FloorMath.php
+++ /dev/null
@@ -1,68 +0,0 @@
-getMessage();
+ }
+
+ if (count($arrayArgs) <= 0) {
+ return Functions::VALUE();
+ }
+ $gcd = (int) array_pop($arrayArgs);
+ do {
+ $gcd = self::evaluateGCD($gcd, (int) array_pop($arrayArgs));
+ } while (!empty($arrayArgs));
+
+ return $gcd;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php
new file mode 100644
index 00000000..b89644a9
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Helpers.php
@@ -0,0 +1,129 @@
+= 0.
+ *
+ * @param float|int $number
+ */
+ public static function validateNotNegative($number, ?string $except = null): void
+ {
+ if ($number >= 0) {
+ return;
+ }
+
+ throw new Exception($except ?? Functions::NAN());
+ }
+
+ /**
+ * Confirm number > 0.
+ *
+ * @param float|int $number
+ */
+ public static function validatePositive($number, ?string $except = null): void
+ {
+ if ($number > 0) {
+ return;
+ }
+
+ throw new Exception($except ?? Functions::NAN());
+ }
+
+ /**
+ * Confirm number != 0.
+ *
+ * @param float|int $number
+ */
+ public static function validateNotZero($number): void
+ {
+ if ($number) {
+ return;
+ }
+
+ throw new Exception(Functions::DIV0());
+ }
+
+ public static function returnSign(float $number): int
+ {
+ return $number ? (($number > 0) ? 1 : -1) : 0;
+ }
+
+ public static function getEven(float $number): float
+ {
+ $significance = 2 * self::returnSign($number);
+
+ return $significance ? (ceil($number / $significance) * $significance) : 0;
+ }
+
+ /**
+ * Return NAN or value depending on argument.
+ *
+ * @param float $result Number
+ *
+ * @return float|string
+ */
+ public static function numberOrNan($result)
+ {
+ return is_nan($result) ? Functions::NAN() : $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php
index 46784908..7aa3d06a 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/IntClass.php
@@ -2,8 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
-use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
class IntClass
{
@@ -19,13 +18,14 @@ class IntClass
*
* @return int|string Integer value, or a string containing an error
*/
- public static function funcInt($number)
+ public static function evaluate($number)
{
- MathTrig::nullFalseTrueToNumber($number);
- if (is_numeric($number)) {
- return (int) floor($number);
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ return (int) floor($number);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php
new file mode 100644
index 00000000..46e9816d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Lcm.php
@@ -0,0 +1,110 @@
+ 1; --$i) {
+ if (($value % $i) == 0) {
+ $factorArray = array_merge($factorArray, self::factors($value / $i));
+ $factorArray = array_merge($factorArray, self::factors($i));
+ if ($i <= sqrt($value)) {
+ break;
+ }
+ }
+ }
+ if (!empty($factorArray)) {
+ rsort($factorArray);
+
+ return $factorArray;
+ }
+
+ return [(int) $value];
+ }
+
+ /**
+ * LCM.
+ *
+ * Returns the lowest common multiplier of a series of numbers
+ * The least common multiple is the smallest positive integer that is a multiple
+ * of all integer arguments number1, number2, and so on. Use LCM to add fractions
+ * with different denominators.
+ *
+ * Excel Function:
+ * LCM(number1[,number2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return int|string Lowest Common Multiplier, or a string containing an error
+ */
+ public static function evaluate(...$args)
+ {
+ try {
+ $arrayArgs = [];
+ $anyZeros = 0;
+ $anyNonNulls = 0;
+ foreach (Functions::flattenArray($args) as $value1) {
+ $anyNonNulls += (int) ($value1 !== null);
+ $value = Helpers::validateNumericNullSubstitution($value1, 1);
+ Helpers::validateNotNegative($value);
+ $arrayArgs[] = (int) $value;
+ $anyZeros += (int) !((bool) $value);
+ }
+ self::testNonNulls($anyNonNulls);
+ if ($anyZeros) {
+ return 0;
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $returnValue = 1;
+ $allPoweredFactors = [];
+ // Loop through arguments
+ foreach ($arrayArgs as $value) {
+ $myFactors = self::factors(floor($value));
+ $myCountedFactors = array_count_values($myFactors);
+ $myPoweredFactors = [];
+ foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) {
+ $myPoweredFactors[$myCountedFactor] = $myCountedFactor ** $myCountedPower;
+ }
+ self::processPoweredFactors($allPoweredFactors, $myPoweredFactors);
+ }
+ foreach ($allPoweredFactors as $allPoweredFactor) {
+ $returnValue *= (int) $allPoweredFactor;
+ }
+
+ return $returnValue;
+ }
+
+ private static function processPoweredFactors(array &$allPoweredFactors, array &$myPoweredFactors): void
+ {
+ foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) {
+ if (isset($allPoweredFactors[$myPoweredValue])) {
+ if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) {
+ $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
+ }
+ } else {
+ $allPoweredFactors[$myPoweredValue] = $myPoweredFactor;
+ }
+ }
+ }
+
+ private static function testNonNulls(int $anyNonNulls): void
+ {
+ if (!$anyNonNulls) {
+ throw new Exception(Functions::VALUE());
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php
new file mode 100644
index 00000000..d6878d88
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Logarithms.php
@@ -0,0 +1,77 @@
+getMessage();
+ }
+
+ return log($number, $base);
+ }
+
+ /**
+ * LOG10.
+ *
+ * Returns the result of builtin function log after validating args.
+ *
+ * @param mixed $number Should be numeric
+ *
+ * @return float|string Rounded number
+ */
+ public static function base10($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ Helpers::validatePositive($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return log10($number);
+ }
+
+ /**
+ * LN.
+ *
+ * Returns the result of builtin function log after validating args.
+ *
+ * @param mixed $number Should be numeric
+ *
+ * @return float|string Rounded number
+ */
+ public static function natural($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ Helpers::validatePositive($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return log($number);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php
new file mode 100644
index 00000000..1e3224ea
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php
@@ -0,0 +1,138 @@
+determinant();
+ } catch (MatrixException $ex) {
+ return Functions::VALUE();
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ }
+
+ /**
+ * MINVERSE.
+ *
+ * Returns the inverse matrix for the matrix stored in an array.
+ *
+ * Excel Function:
+ * MINVERSE(array)
+ *
+ * @param mixed $matrixValues A matrix of values
+ *
+ * @return array|string The result, or a string containing an error
+ */
+ public static function inverse($matrixValues)
+ {
+ try {
+ $matrix = self::getMatrix($matrixValues);
+
+ return $matrix->inverse()->toArray();
+ } catch (MatrixException $e) {
+ return (strpos($e->getMessage(), 'determinant') === false) ? Functions::VALUE() : Functions::NAN();
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ }
+
+ /**
+ * MMULT.
+ *
+ * @param mixed $matrixData1 A matrix of values
+ * @param mixed $matrixData2 A matrix of values
+ *
+ * @return array|string The result, or a string containing an error
+ */
+ public static function multiply($matrixData1, $matrixData2)
+ {
+ try {
+ $matrixA = self::getMatrix($matrixData1);
+ $matrixB = self::getMatrix($matrixData2);
+
+ return $matrixA->multiply($matrixB)->toArray();
+ } catch (MatrixException $ex) {
+ return Functions::VALUE();
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ }
+
+ /**
+ * MUnit.
+ *
+ * @param mixed $dimension Number of rows and columns
+ *
+ * @return array|string The result, or a string containing an error
+ */
+ public static function identity($dimension)
+ {
+ try {
+ $dimension = (int) Helpers::validateNumericNullBool($dimension);
+ Helpers::validatePositive($dimension, Functions::VALUE());
+ $matrix = Builder::createFilledMatrix(0, $dimension)->toArray();
+ for ($x = 0; $x < $dimension; ++$x) {
+ $matrix[$x][$x] = 1;
+ }
+
+ return $matrix;
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Mround.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Mround.php
deleted file mode 100644
index 4c040dce..00000000
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Mround.php
+++ /dev/null
@@ -1,42 +0,0 @@
-getMessage();
+ }
+
+ if (($dividend < 0.0) && ($divisor > 0.0)) {
+ return $divisor - fmod(abs($dividend), $divisor);
+ }
+ if (($dividend > 0.0) && ($divisor < 0.0)) {
+ return $divisor + fmod($dividend, abs($divisor));
+ }
+
+ return fmod($dividend, $divisor);
+ }
+
+ /**
+ * POWER.
+ *
+ * Computes x raised to the power y.
+ *
+ * @param float|int $x
+ * @param float|int $y
+ *
+ * @return float|int|string The result, or a string containing an error
+ */
+ public static function power($x, $y)
+ {
+ try {
+ $x = Helpers::validateNumericNullBool($x);
+ $y = Helpers::validateNumericNullBool($y);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Validate parameters
+ if (!$x && !$y) {
+ return Functions::NAN();
+ }
+ if (!$x && $y < 0.0) {
+ return Functions::DIV0();
+ }
+
+ // Return
+ $result = $x ** $y;
+
+ return Helpers::numberOrNan($result);
+ }
+
+ /**
+ * PRODUCT.
+ *
+ * PRODUCT returns the product of all the values and cells referenced in the argument list.
+ *
+ * Excel Function:
+ * PRODUCT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function product(...$args)
+ {
+ // Return value
+ $returnValue = null;
+
+ // Loop through arguments
+ foreach (Functions::flattenArray($args) as $arg) {
+ // Is it a numeric value?
+ if (is_numeric($arg)) {
+ if ($returnValue === null) {
+ $returnValue = $arg;
+ } else {
+ $returnValue *= $arg;
+ }
+ } else {
+ return Functions::VALUE();
+ }
+ }
+
+ // Return
+ if ($returnValue === null) {
+ return 0;
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * QUOTIENT.
+ *
+ * QUOTIENT function returns the integer portion of a division. Numerator is the divided number
+ * and denominator is the divisor.
+ *
+ * Excel Function:
+ * QUOTIENT(value1,value2)
+ *
+ * @param mixed $numerator Expect float|int
+ * @param mixed $denominator Expect float|int
+ *
+ * @return int|string
+ */
+ public static function quotient($numerator, $denominator)
+ {
+ try {
+ $numerator = Helpers::validateNumericNullSubstitution($numerator, 0);
+ $denominator = Helpers::validateNumericNullSubstitution($denominator, 0);
+ Helpers::validateNotZero($denominator);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return (int) ($numerator / $denominator);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Random.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Random.php
new file mode 100644
index 00000000..963a789a
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Random.php
@@ -0,0 +1,39 @@
+getMessage();
+ }
+
+ return mt_rand($min, $max);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Roman.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Roman.php
index a461001b..71a6df3a 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Roman.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Roman.php
@@ -2,6 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
class Roman
@@ -768,6 +769,7 @@ class Roman
3998 => ['MMMLMVLIII', 'MMMXMVIII', 'MMMVMIII'],
3999 => ['MMMLMVLIV', 'MMMXMIX', 'MMMVMIV', 'MMMIM'],
];
+
private const THOUSANDS = ['', 'M', 'MM', 'MMM'];
private const HUNDREDS = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'];
private const TENS = ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'];
@@ -775,19 +777,14 @@ class Roman
const MAX_ROMAN_VALUE = 3999;
const MAX_ROMAN_STYLE = 4;
- private static function romanCut($num, $n)
- {
- return ($num - ($num % $n)) / $n;
- }
-
private static function valueOk(int $aValue, int $style): string
{
$origValue = $aValue;
- $m = self::romanCut($aValue, 1000);
+ $m = \intdiv($aValue, 1000);
$aValue %= 1000;
- $c = self::romanCut($aValue, 100);
+ $c = \intdiv($aValue, 100);
$aValue %= 100;
- $t = self::romanCut($aValue, 10);
+ $t = \intdiv($aValue, 10);
$aValue %= 10;
$result = self::THOUSANDS[$m] . self::HUNDREDS[$c] . self::TENS[$t] . self::ONES[$aValue];
if ($style > 0) {
@@ -821,33 +818,18 @@ class Roman
*
* @return string Roman numeral, or a string containing an error
*/
- public static function funcRoman($aValue, $style = 0)
+ public static function evaluate($aValue, $style = 0)
{
- $aValue = Functions::flattenSingleValue($aValue);
- self::nullFalseTrueToNumber($aValue);
- $style = Functions::flattenSingleValue($style);
- if (is_bool($style)) {
- $style = $style ? 0 : 4;
- }
- if (!is_numeric($aValue) || !is_numeric($style)) {
- return Functions::VALUE();
+ try {
+ $aValue = Helpers::validateNumericNullBool($aValue);
+ if (is_bool($style)) {
+ $style = $style ? 0 : 4;
+ }
+ $style = Helpers::validateNumericNullSubstitution($style, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
return self::calculateRoman((int) $aValue, (int) $style);
}
-
- /**
- * Many functions accept null/false/true argument treated as 0/0/1.
- *
- * @param mixed $number
- */
- private static function nullFalseTrueToNumber(&$number): void
- {
- $number = Functions::flattenSingleValue($number);
- if ($number === null) {
- $number = 0;
- } elseif (is_bool($number)) {
- $number = (int) $number;
- }
- }
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Round.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Round.php
index 339f0e27..2ddde900 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Round.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Round.php
@@ -2,8 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
class Round
{
@@ -17,14 +17,163 @@ class Round
*
* @return float|string Rounded number
*/
- public static function builtinROUND($number, $precision)
+ public static function round($number, $precision)
{
- MathTrig::nullFalseTrueToNumber($number);
-
- if (!is_numeric($number) || !is_numeric($precision)) {
- return Functions::VALUE();
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $precision = Helpers::validateNumericNullBool($precision);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return round($number, $precision);
+ return round($number, (int) $precision);
+ }
+
+ /**
+ * ROUNDUP.
+ *
+ * Rounds a number up to a specified number of decimal places
+ *
+ * @param float $number Number to round
+ * @param int $digits Number of digits to which you want to round $number
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function up($number, $digits)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $digits = (int) Helpers::validateNumericNullSubstitution($digits, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($number == 0.0) {
+ return 0.0;
+ }
+
+ if ($number < 0.0) {
+ return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);
+ }
+
+ return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_DOWN);
+ }
+
+ /**
+ * ROUNDDOWN.
+ *
+ * Rounds a number down to a specified number of decimal places
+ *
+ * @param float $number Number to round
+ * @param int $digits Number of digits to which you want to round $number
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function down($number, $digits)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ $digits = (int) Helpers::validateNumericNullSubstitution($digits, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($number == 0.0) {
+ return 0.0;
+ }
+
+ if ($number < 0.0) {
+ return round($number + 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);
+ }
+
+ return round($number - 0.5 * 0.1 ** $digits, $digits, PHP_ROUND_HALF_UP);
+ }
+
+ /**
+ * MROUND.
+ *
+ * Rounds a number to the nearest multiple of a specified value
+ *
+ * @param mixed $number Expect float. Number to round.
+ * @param mixed $multiple Expect int. Multiple to which you want to round.
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function multiple($number, $multiple)
+ {
+ try {
+ $number = Helpers::validateNumericNullSubstitution($number, 0);
+ $multiple = Helpers::validateNumericNullSubstitution($multiple, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($number == 0 || $multiple == 0) {
+ return 0;
+ }
+ if ((Helpers::returnSign($number)) == (Helpers::returnSign($multiple))) {
+ $multiplier = 1 / $multiple;
+
+ return round($number * $multiplier) / $multiplier;
+ }
+
+ return Functions::NAN();
+ }
+
+ /**
+ * EVEN.
+ *
+ * Returns number rounded up to the nearest even integer.
+ * You can use this function for processing items that come in twos. For example,
+ * a packing crate accepts rows of one or two items. The crate is full when
+ * the number of items, rounded up to the nearest two, matches the crate's
+ * capacity.
+ *
+ * Excel Function:
+ * EVEN(number)
+ *
+ * @param float $number Number to round
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function even($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::getEven($number);
+ }
+
+ /**
+ * ODD.
+ *
+ * Returns number rounded up to the nearest odd integer.
+ *
+ * @param float $number Number to round
+ *
+ * @return float|string Rounded Number, or a string containing an error
+ */
+ public static function odd($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $significance = Helpers::returnSign($number);
+ if ($significance == 0) {
+ return 1;
+ }
+
+ $result = ceil($number / $significance) * $significance;
+ if ($result == Helpers::getEven($result)) {
+ $result += $significance;
+ }
+
+ return $result;
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/RoundDown.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/RoundDown.php
deleted file mode 100644
index ff1f9bcb..00000000
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/RoundDown.php
+++ /dev/null
@@ -1,39 +0,0 @@
-getMessage();
+ }
+
+ return $returnValue;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sign.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sign.php
new file mode 100644
index 00000000..a48cf0f9
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sign.php
@@ -0,0 +1,29 @@
+getMessage();
+ }
+
+ return Helpers::returnSign($number);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php
new file mode 100644
index 00000000..8ead578e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sqrt.php
@@ -0,0 +1,49 @@
+getMessage();
+ }
+
+ return Helpers::numberOrNan(sqrt($number));
+ }
+
+ /**
+ * SQRTPI.
+ *
+ * Returns the square root of (number * pi).
+ *
+ * @param float $number Number
+ *
+ * @return float|string Square Root of Number * Pi, or a string containing an error
+ */
+ public static function pi($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullSubstitution($number, 0);
+ Helpers::validateNotNegative($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return sqrt($number * M_PI);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php
new file mode 100644
index 00000000..2edb86f7
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Subtotal.php
@@ -0,0 +1,111 @@
+getWorksheet()->getRowDimension($row)->getVisible();
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ /**
+ * @param mixed $cellReference
+ * @param mixed $args
+ */
+ protected static function filterFormulaArgs($cellReference, $args): array
+ {
+ return array_filter(
+ $args,
+ function ($index) use ($cellReference) {
+ [, $row, $column] = explode('.', $index);
+ $retVal = true;
+ if ($cellReference->getWorksheet()->cellExists($column . $row)) {
+ //take this cell out if it contains the SUBTOTAL or AGGREGATE functions in a formula
+ $isFormula = $cellReference->getWorksheet()->getCell($column . $row)->isFormula();
+ $cellFormula = !preg_match('/^=.*\b(SUBTOTAL|AGGREGATE)\s*\(/i', $cellReference->getWorksheet()->getCell($column . $row)->getValue());
+
+ $retVal = !$isFormula || $cellFormula;
+ }
+
+ return $retVal;
+ },
+ ARRAY_FILTER_USE_KEY
+ );
+ }
+
+ /** @var callable[] */
+ private const CALL_FUNCTIONS = [
+ 1 => [Statistical\Averages::class, 'average'],
+ [Statistical\Counts::class, 'COUNT'], // 2
+ [Statistical\Counts::class, 'COUNTA'], // 3
+ [Statistical\Maximum::class, 'max'], // 4
+ [Statistical\Minimum::class, 'min'], // 5
+ [Operations::class, 'product'], // 6
+ [Statistical\StandardDeviations::class, 'STDEV'], // 7
+ [Statistical\StandardDeviations::class, 'STDEVP'], // 8
+ [Sum::class, 'sumIgnoringStrings'], // 9
+ [Statistical\Variances::class, 'VAR'], // 10
+ [Statistical\Variances::class, 'VARP'], // 11
+ ];
+
+ /**
+ * SUBTOTAL.
+ *
+ * Returns a subtotal in a list or database.
+ *
+ * @param mixed $functionType
+ * A number 1 to 11 that specifies which function to
+ * use in calculating subtotals within a range
+ * list
+ * Numbers 101 to 111 shadow the functions of 1 to 11
+ * but ignore any values in the range that are
+ * in hidden rows
+ * @param mixed[] $args A mixed data series of values
+ *
+ * @return float|string
+ */
+ public static function evaluate($functionType, ...$args)
+ {
+ $cellReference = array_pop($args);
+ $aArgs = Functions::flattenArrayIndexed($args);
+
+ try {
+ $subtotal = (int) Helpers::validateNumericNullBool($functionType);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ // Calculate
+ if ($subtotal > 100) {
+ $aArgs = self::filterHiddenArgs($cellReference, $aArgs);
+ $subtotal -= 100;
+ }
+
+ $aArgs = self::filterFormulaArgs($cellReference, $aArgs);
+ if (array_key_exists($subtotal, self::CALL_FUNCTIONS)) {
+ /** @var callable */
+ $call = self::CALL_FUNCTIONS[$subtotal];
+
+ return call_user_func_array($call, $aArgs);
+ }
+
+ return Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php
new file mode 100644
index 00000000..741734d9
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php
@@ -0,0 +1,115 @@
+ $arg) {
+ // Is it a numeric value?
+ if (is_numeric($arg) || empty($arg)) {
+ if (is_string($arg)) {
+ $arg = (int) $arg;
+ }
+ $returnValue += $arg;
+ } elseif (is_bool($arg)) {
+ $returnValue += (int) $arg;
+ } elseif (Functions::isError($arg)) {
+ return $arg;
+ // ignore non-numerics from cell, but fail as literals (except null)
+ } elseif ($arg !== null && !Functions::isCellValue($k)) {
+ return Functions::VALUE();
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * SUMPRODUCT.
+ *
+ * Excel Function:
+ * SUMPRODUCT(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function product(...$args)
+ {
+ $arrayList = $args;
+
+ $wrkArray = Functions::flattenArray(array_shift($arrayList));
+ $wrkCellCount = count($wrkArray);
+
+ for ($i = 0; $i < $wrkCellCount; ++$i) {
+ if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) {
+ $wrkArray[$i] = 0;
+ }
+ }
+
+ foreach ($arrayList as $matrixData) {
+ $array2 = Functions::flattenArray($matrixData);
+ $count = count($array2);
+ if ($wrkCellCount != $count) {
+ return Functions::VALUE();
+ }
+
+ foreach ($array2 as $i => $val) {
+ if ((!is_numeric($val)) || (is_string($val))) {
+ $val = 0;
+ }
+ $wrkArray[$i] *= $val;
+ }
+ }
+
+ return array_sum($wrkArray);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php
new file mode 100644
index 00000000..49fa6381
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/SumSquares.php
@@ -0,0 +1,142 @@
+getMessage();
+ }
+
+ return $returnValue;
+ }
+
+ private static function getCount(array $array1, array $array2): int
+ {
+ $count = count($array1);
+ if ($count !== count($array2)) {
+ throw new Exception(Functions::NA());
+ }
+
+ return $count;
+ }
+
+ /**
+ * These functions accept only numeric arguments, not even strings which are numeric.
+ *
+ * @param mixed $item
+ */
+ private static function numericNotString($item): bool
+ {
+ return is_numeric($item) && !is_string($item);
+ }
+
+ /**
+ * SUMX2MY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float|string
+ */
+ public static function sumXSquaredMinusYSquared($matrixData1, $matrixData2)
+ {
+ try {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = self::getCount($array1, $array2);
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
+ $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]);
+ }
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $result;
+ }
+
+ /**
+ * SUMX2PY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float|string
+ */
+ public static function sumXSquaredPlusYSquared($matrixData1, $matrixData2)
+ {
+ try {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = self::getCount($array1, $array2);
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
+ $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]);
+ }
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $result;
+ }
+
+ /**
+ * SUMXMY2.
+ *
+ * @param mixed[] $matrixData1 Matrix #1
+ * @param mixed[] $matrixData2 Matrix #2
+ *
+ * @return float|string
+ */
+ public static function sumXMinusYSquared($matrixData1, $matrixData2)
+ {
+ try {
+ $array1 = Functions::flattenArray($matrixData1);
+ $array2 = Functions::flattenArray($matrixData2);
+ $count = self::getCount($array1, $array2);
+
+ $result = 0;
+ for ($i = 0; $i < $count; ++$i) {
+ if (self::numericNotString($array1[$i]) && self::numericNotString($array2[$i])) {
+ $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]);
+ }
+ }
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return $result;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php
new file mode 100644
index 00000000..3038e6cc
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosecant.php
@@ -0,0 +1,49 @@
+getMessage();
+ }
+
+ return Helpers::verySmallDenominator(1.0, sin($angle));
+ }
+
+ /**
+ * CSCH.
+ *
+ * Returns the hyperbolic cosecant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic cosecant of the angle
+ */
+ public static function csch($angle)
+ {
+ try {
+ $angle = Helpers::validateNumericNullBool($angle);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::verySmallDenominator(1.0, sinh($angle));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php
new file mode 100644
index 00000000..6c69e126
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cosine.php
@@ -0,0 +1,89 @@
+getMessage();
+ }
+
+ return cos($number);
+ }
+
+ /**
+ * COSH.
+ *
+ * Returns the result of builtin function cosh after validating args.
+ *
+ * @param mixed $number Should be numeric
+ *
+ * @return float|string hyperbolic cosine
+ */
+ public static function cosh($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return cosh($number);
+ }
+
+ /**
+ * ACOS.
+ *
+ * Returns the arccosine of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The arccosine of the number
+ */
+ public static function acos($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(acos($number));
+ }
+
+ /**
+ * ACOSH.
+ *
+ * Returns the arc inverse hyperbolic cosine of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The inverse hyperbolic cosine of the number, or an error string
+ */
+ public static function acosh($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(acosh($number));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php
new file mode 100644
index 00000000..1b796f50
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Cotangent.php
@@ -0,0 +1,91 @@
+getMessage();
+ }
+
+ return Helpers::verySmallDenominator(cos($angle), sin($angle));
+ }
+
+ /**
+ * COTH.
+ *
+ * Returns the hyperbolic cotangent of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic cotangent of the angle
+ */
+ public static function coth($angle)
+ {
+ try {
+ $angle = Helpers::validateNumericNullBool($angle);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::verySmallDenominator(1.0, tanh($angle));
+ }
+
+ /**
+ * ACOT.
+ *
+ * Returns the arccotangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The arccotangent of the number
+ */
+ public static function acot($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return (M_PI / 2) - atan($number);
+ }
+
+ /**
+ * ACOTH.
+ *
+ * Returns the hyperbolic arccotangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The hyperbolic arccotangent of the number
+ */
+ public static function acoth($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $result = ($number === 1) ? NAN : (log(($number + 1) / ($number - 1)) / 2);
+
+ return Helpers::numberOrNan($result);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php
new file mode 100644
index 00000000..70299cb7
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Secant.php
@@ -0,0 +1,49 @@
+getMessage();
+ }
+
+ return Helpers::verySmallDenominator(1.0, cos($angle));
+ }
+
+ /**
+ * SECH.
+ *
+ * Returns the hyperbolic secant of an angle.
+ *
+ * @param float $angle Number
+ *
+ * @return float|string The hyperbolic secant of the angle
+ */
+ public static function sech($angle)
+ {
+ try {
+ $angle = Helpers::validateNumericNullBool($angle);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::verySmallDenominator(1.0, cosh($angle));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php
new file mode 100644
index 00000000..2c6a8a07
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Sine.php
@@ -0,0 +1,89 @@
+getMessage();
+ }
+
+ return sin($angle);
+ }
+
+ /**
+ * SINH.
+ *
+ * Returns the result of builtin function sinh after validating args.
+ *
+ * @param mixed $angle Should be numeric
+ *
+ * @return float|string hyperbolic sine
+ */
+ public static function sinh($angle)
+ {
+ try {
+ $angle = Helpers::validateNumericNullBool($angle);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return sinh($angle);
+ }
+
+ /**
+ * ASIN.
+ *
+ * Returns the arcsine of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The arcsine of the number
+ */
+ public static function asin($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(asin($number));
+ }
+
+ /**
+ * ASINH.
+ *
+ * Returns the inverse hyperbolic sine of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The inverse hyperbolic sine of the number
+ */
+ public static function asinh($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(asinh($number));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php
new file mode 100644
index 00000000..6cd235fb
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trig/Tangent.php
@@ -0,0 +1,127 @@
+getMessage();
+ }
+
+ return Helpers::verySmallDenominator(sin($angle), cos($angle));
+ }
+
+ /**
+ * TANH.
+ *
+ * Returns the result of builtin function sinh after validating args.
+ *
+ * @param mixed $angle Should be numeric
+ *
+ * @return float|string hyperbolic tangent
+ */
+ public static function tanh($angle)
+ {
+ try {
+ $angle = Helpers::validateNumericNullBool($angle);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return tanh($angle);
+ }
+
+ /**
+ * ATAN.
+ *
+ * Returns the arctangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The arctangent of the number
+ */
+ public static function atan($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(atan($number));
+ }
+
+ /**
+ * ATANH.
+ *
+ * Returns the inverse hyperbolic tangent of a number.
+ *
+ * @param float $number Number
+ *
+ * @return float|string The inverse hyperbolic tangent of the number
+ */
+ public static function atanh($number)
+ {
+ try {
+ $number = Helpers::validateNumericNullBool($number);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return Helpers::numberOrNan(atanh($number));
+ }
+
+ /**
+ * ATAN2.
+ *
+ * This function calculates the arc tangent of the two variables x and y. It is similar to
+ * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used
+ * to determine the quadrant of the result.
+ * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a
+ * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between
+ * -pi and pi, excluding -pi.
+ *
+ * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard
+ * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.
+ *
+ * Excel Function:
+ * ATAN2(xCoordinate,yCoordinate)
+ *
+ * @param mixed $xCoordinate should be float, the x-coordinate of the point
+ * @param mixed $yCoordinate should be float, the y-coordinate of the point
+ *
+ * @return float|string the inverse tangent of the specified x- and y-coordinates, or a string containing an error
+ */
+ public static function atan2($xCoordinate, $yCoordinate)
+ {
+ try {
+ $xCoordinate = Helpers::validateNumericNullBool($xCoordinate);
+ $yCoordinate = Helpers::validateNumericNullBool($yCoordinate);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($xCoordinate == 0) && ($yCoordinate == 0)) {
+ return Functions::DIV0();
+ }
+
+ return atan2($yCoordinate, $xCoordinate);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php
index 8cb14d2a..4b3670f6 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Trunc.php
@@ -2,8 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
-use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
class Trunc
{
@@ -17,21 +16,21 @@ class Trunc
*
* @return float|string Truncated value, or a string containing an error
*/
- public static function funcTrunc($value = 0, $digits = 0)
+ public static function evaluate($value = 0, $digits = 0)
{
- MathTrig::nullFalseTrueToNumber($value);
- $digits = Functions::flattenSingleValue($digits);
-
- // Validate parameters
- if ((!is_numeric($value)) || (!is_numeric($digits))) {
- return Functions::VALUE();
+ try {
+ $value = Helpers::validateNumericNullBool($value);
+ $digits = Helpers::validateNumericNullSubstitution($digits, null);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
+
$digits = floor($digits);
// Truncate
$adjust = 10 ** $digits;
- if (($digits > 0) && (rtrim((int) ((abs($value) - abs((int) $value)) * $adjust), '0') < $adjust / 10)) {
+ if (($digits > 0) && (rtrim((string) (int) ((abs($value) - abs((int) $value)) * $adjust), '0') < $adjust / 10)) {
return $value;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
index 0e15ecf4..d43a85f9 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical.php
@@ -4,528 +4,25 @@ namespace PhpOffice\PhpSpreadsheet\Calculation;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Averages;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional;
+use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Confidence;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Counts;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Maximum;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Minimum;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Permutations;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\StandardDeviations;
+use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Trends;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Variances;
-use PhpOffice\PhpSpreadsheet\Shared\Trend\Trend;
+/**
+ * @deprecated 1.18.0
+ */
class Statistical
{
const LOG_GAMMA_X_MAX_VALUE = 2.55e305;
- const XMININ = 2.23e-308;
const EPS = 2.22e-16;
const MAX_VALUE = 1.2e308;
- const MAX_ITERATIONS = 256;
const SQRT2PI = 2.5066282746310005024157652848110452530069867406099;
- private static function checkTrendArrays(&$array1, &$array2)
- {
- if (!is_array($array1)) {
- $array1 = [$array1];
- }
- if (!is_array($array2)) {
- $array2 = [$array2];
- }
-
- $array1 = Functions::flattenArray($array1);
- $array2 = Functions::flattenArray($array2);
- foreach ($array1 as $key => $value) {
- if ((is_bool($value)) || (is_string($value)) || ($value === null)) {
- unset($array1[$key], $array2[$key]);
- }
- }
- foreach ($array2 as $key => $value) {
- if ((is_bool($value)) || (is_string($value)) || ($value === null)) {
- unset($array1[$key], $array2[$key]);
- }
- }
- $array1 = array_merge($array1);
- $array2 = array_merge($array2);
-
- return true;
- }
-
- /**
- * Incomplete beta function.
- *
- * @author Jaco van Kooten
- * @author Paul Meagher
- *
- * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).
- *
- * @param mixed $x require 0<=x<=1
- * @param mixed $p require p>0
- * @param mixed $q require q>0
- *
- * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow
- */
- private static function incompleteBeta($x, $p, $q)
- {
- if ($x <= 0.0) {
- return 0.0;
- } elseif ($x >= 1.0) {
- return 1.0;
- } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
- return 0.0;
- }
- $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x));
- if ($x < ($p + 1.0) / ($p + $q + 2.0)) {
- return $beta_gam * self::betaFraction($x, $p, $q) / $p;
- }
-
- return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q);
- }
-
- // Function cache for logBeta function
- private static $logBetaCacheP = 0.0;
-
- private static $logBetaCacheQ = 0.0;
-
- private static $logBetaCacheResult = 0.0;
-
- /**
- * The natural logarithm of the beta function.
- *
- * @param mixed $p require p>0
- * @param mixed $q require q>0
- *
- * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
- *
- * @author Jaco van Kooten
- */
- private static function logBeta($p, $q)
- {
- if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) {
- self::$logBetaCacheP = $p;
- self::$logBetaCacheQ = $q;
- if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
- self::$logBetaCacheResult = 0.0;
- } else {
- self::$logBetaCacheResult = self::logGamma($p) + self::logGamma($q) - self::logGamma($p + $q);
- }
- }
-
- return self::$logBetaCacheResult;
- }
-
- /**
- * Evaluates of continued fraction part of incomplete beta function.
- * Based on an idea from Numerical Recipes (W.H. Press et al, 1992).
- *
- * @author Jaco van Kooten
- *
- * @param mixed $x
- * @param mixed $p
- * @param mixed $q
- *
- * @return float
- */
- private static function betaFraction($x, $p, $q)
- {
- $c = 1.0;
- $sum_pq = $p + $q;
- $p_plus = $p + 1.0;
- $p_minus = $p - 1.0;
- $h = 1.0 - $sum_pq * $x / $p_plus;
- if (abs($h) < self::XMININ) {
- $h = self::XMININ;
- }
- $h = 1.0 / $h;
- $frac = $h;
- $m = 1;
- $delta = 0.0;
- while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) {
- $m2 = 2 * $m;
- // even index for d
- $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2));
- $h = 1.0 + $d * $h;
- if (abs($h) < self::XMININ) {
- $h = self::XMININ;
- }
- $h = 1.0 / $h;
- $c = 1.0 + $d / $c;
- if (abs($c) < self::XMININ) {
- $c = self::XMININ;
- }
- $frac *= $h * $c;
- // odd index for d
- $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2));
- $h = 1.0 + $d * $h;
- if (abs($h) < self::XMININ) {
- $h = self::XMININ;
- }
- $h = 1.0 / $h;
- $c = 1.0 + $d / $c;
- if (abs($c) < self::XMININ) {
- $c = self::XMININ;
- }
- $delta = $h * $c;
- $frac *= $delta;
- ++$m;
- }
-
- return $frac;
- }
-
- /**
- * logGamma function.
- *
- * @version 1.1
- *
- * @author Jaco van Kooten
- *
- * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher.
- *
- * The natural logarithm of the gamma function.
- * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz
- * Applied Mathematics Division
- * Argonne National Laboratory
- * Argonne, IL 60439
- *
- * References:
- *
- * W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural
- * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.
- * K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.
- * Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.
- *
- *
- *
- * From the original documentation:
- *
- *
- * This routine calculates the LOG(GAMMA) function for a positive real argument X.
- * Computation is based on an algorithm outlined in references 1 and 2.
- * The program uses rational functions that theoretically approximate LOG(GAMMA)
- * to at least 18 significant decimal digits. The approximation for X > 12 is from
- * reference 3, while approximations for X < 12.0 are similar to those in reference
- * 1, but are unpublished. The accuracy achieved depends on the arithmetic system,
- * the compiler, the intrinsic functions, and proper selection of the
- * machine-dependent constants.
- *
- *
- * Error returns:
- * The program returns the value XINF for X .LE. 0.0 or when overflow would occur.
- * The computation is believed to be free of underflow and overflow.
- *
- *
- * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305
- */
-
- // Function cache for logGamma
- private static $logGammaCacheResult = 0.0;
-
- private static $logGammaCacheX = 0.0;
-
- private static function logGamma($x)
- {
- // Log Gamma related constants
- static $lg_d1 = -0.5772156649015328605195174;
- static $lg_d2 = 0.4227843350984671393993777;
- static $lg_d4 = 1.791759469228055000094023;
-
- static $lg_p1 = [
- 4.945235359296727046734888,
- 201.8112620856775083915565,
- 2290.838373831346393026739,
- 11319.67205903380828685045,
- 28557.24635671635335736389,
- 38484.96228443793359990269,
- 26377.48787624195437963534,
- 7225.813979700288197698961,
- ];
- static $lg_p2 = [
- 4.974607845568932035012064,
- 542.4138599891070494101986,
- 15506.93864978364947665077,
- 184793.2904445632425417223,
- 1088204.76946882876749847,
- 3338152.967987029735917223,
- 5106661.678927352456275255,
- 3074109.054850539556250927,
- ];
- static $lg_p4 = [
- 14745.02166059939948905062,
- 2426813.369486704502836312,
- 121475557.4045093227939592,
- 2663432449.630976949898078,
- 29403789566.34553899906876,
- 170266573776.5398868392998,
- 492612579337.743088758812,
- 560625185622.3951465078242,
- ];
- static $lg_q1 = [
- 67.48212550303777196073036,
- 1113.332393857199323513008,
- 7738.757056935398733233834,
- 27639.87074403340708898585,
- 54993.10206226157329794414,
- 61611.22180066002127833352,
- 36351.27591501940507276287,
- 8785.536302431013170870835,
- ];
- static $lg_q2 = [
- 183.0328399370592604055942,
- 7765.049321445005871323047,
- 133190.3827966074194402448,
- 1136705.821321969608938755,
- 5267964.117437946917577538,
- 13467014.54311101692290052,
- 17827365.30353274213975932,
- 9533095.591844353613395747,
- ];
- static $lg_q4 = [
- 2690.530175870899333379843,
- 639388.5654300092398984238,
- 41355999.30241388052042842,
- 1120872109.61614794137657,
- 14886137286.78813811542398,
- 101680358627.2438228077304,
- 341747634550.7377132798597,
- 446315818741.9713286462081,
- ];
- static $lg_c = [
- -0.001910444077728,
- 8.4171387781295e-4,
- -5.952379913043012e-4,
- 7.93650793500350248e-4,
- -0.002777777777777681622553,
- 0.08333333333333333331554247,
- 0.0057083835261,
- ];
-
- // Rough estimate of the fourth root of logGamma_xBig
- static $lg_frtbig = 2.25e76;
- static $pnt68 = 0.6796875;
-
- if ($x == self::$logGammaCacheX) {
- return self::$logGammaCacheResult;
- }
- $y = $x;
- if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) {
- if ($y <= self::EPS) {
- $res = -log($y);
- } elseif ($y <= 1.5) {
- // ---------------------
- // EPS .LT. X .LE. 1.5
- // ---------------------
- if ($y < $pnt68) {
- $corr = -log($y);
- $xm1 = $y;
- } else {
- $corr = 0.0;
- $xm1 = $y - 1.0;
- }
- if ($y <= 0.5 || $y >= $pnt68) {
- $xden = 1.0;
- $xnum = 0.0;
- for ($i = 0; $i < 8; ++$i) {
- $xnum = $xnum * $xm1 + $lg_p1[$i];
- $xden = $xden * $xm1 + $lg_q1[$i];
- }
- $res = $corr + $xm1 * ($lg_d1 + $xm1 * ($xnum / $xden));
- } else {
- $xm2 = $y - 1.0;
- $xden = 1.0;
- $xnum = 0.0;
- for ($i = 0; $i < 8; ++$i) {
- $xnum = $xnum * $xm2 + $lg_p2[$i];
- $xden = $xden * $xm2 + $lg_q2[$i];
- }
- $res = $corr + $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden));
- }
- } elseif ($y <= 4.0) {
- // ---------------------
- // 1.5 .LT. X .LE. 4.0
- // ---------------------
- $xm2 = $y - 2.0;
- $xden = 1.0;
- $xnum = 0.0;
- for ($i = 0; $i < 8; ++$i) {
- $xnum = $xnum * $xm2 + $lg_p2[$i];
- $xden = $xden * $xm2 + $lg_q2[$i];
- }
- $res = $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden));
- } elseif ($y <= 12.0) {
- // ----------------------
- // 4.0 .LT. X .LE. 12.0
- // ----------------------
- $xm4 = $y - 4.0;
- $xden = -1.0;
- $xnum = 0.0;
- for ($i = 0; $i < 8; ++$i) {
- $xnum = $xnum * $xm4 + $lg_p4[$i];
- $xden = $xden * $xm4 + $lg_q4[$i];
- }
- $res = $lg_d4 + $xm4 * ($xnum / $xden);
- } else {
- // ---------------------------------
- // Evaluate for argument .GE. 12.0
- // ---------------------------------
- $res = 0.0;
- if ($y <= $lg_frtbig) {
- $res = $lg_c[6];
- $ysq = $y * $y;
- for ($i = 0; $i < 6; ++$i) {
- $res = $res / $ysq + $lg_c[$i];
- }
- $res /= $y;
- $corr = log($y);
- $res = $res + log(self::SQRT2PI) - 0.5 * $corr;
- $res += $y * ($corr - 1.0);
- }
- }
- } else {
- // --------------------------
- // Return for bad arguments
- // --------------------------
- $res = self::MAX_VALUE;
- }
- // ------------------------------
- // Final adjustments and return
- // ------------------------------
- self::$logGammaCacheX = $x;
- self::$logGammaCacheResult = $res;
-
- return $res;
- }
-
- //
- // Private implementation of the incomplete Gamma function
- //
- private static function incompleteGamma($a, $x)
- {
- static $max = 32;
- $summer = 0;
- for ($n = 0; $n <= $max; ++$n) {
- $divisor = $a;
- for ($i = 1; $i <= $n; ++$i) {
- $divisor *= ($a + $i);
- }
- $summer += ($x ** $n / $divisor);
- }
-
- return $x ** $a * exp(0 - $x) * $summer;
- }
-
- //
- // Private implementation of the Gamma function
- //
- private static function gamma($data)
- {
- if ($data == 0.0) {
- return 0;
- }
-
- static $p0 = 1.000000000190015;
- static $p = [
- 1 => 76.18009172947146,
- 2 => -86.50532032941677,
- 3 => 24.01409824083091,
- 4 => -1.231739572450155,
- 5 => 1.208650973866179e-3,
- 6 => -5.395239384953e-6,
- ];
-
- $y = $x = $data;
- $tmp = $x + 5.5;
- $tmp -= ($x + 0.5) * log($tmp);
-
- $summer = $p0;
- for ($j = 1; $j <= 6; ++$j) {
- $summer += ($p[$j] / ++$y);
- }
-
- return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x));
- }
-
- /*
- * inverse_ncdf.php
- * -------------------
- * begin : Friday, January 16, 2004
- * copyright : (C) 2004 Michael Nickerson
- * email : nickersonm@yahoo.com
- *
- */
- private static function inverseNcdf($p)
- {
- // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to
- // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as
- // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html
- // I have not checked the accuracy of this implementation. Be aware that PHP
- // will truncate the coeficcients to 14 digits.
-
- // You have permission to use and distribute this function freely for
- // whatever purpose you want, but please show common courtesy and give credit
- // where credit is due.
-
- // Input paramater is $p - probability - where 0 < p < 1.
-
- // Coefficients in rational approximations
- static $a = [
- 1 => -3.969683028665376e+01,
- 2 => 2.209460984245205e+02,
- 3 => -2.759285104469687e+02,
- 4 => 1.383577518672690e+02,
- 5 => -3.066479806614716e+01,
- 6 => 2.506628277459239e+00,
- ];
-
- static $b = [
- 1 => -5.447609879822406e+01,
- 2 => 1.615858368580409e+02,
- 3 => -1.556989798598866e+02,
- 4 => 6.680131188771972e+01,
- 5 => -1.328068155288572e+01,
- ];
-
- static $c = [
- 1 => -7.784894002430293e-03,
- 2 => -3.223964580411365e-01,
- 3 => -2.400758277161838e+00,
- 4 => -2.549732539343734e+00,
- 5 => 4.374664141464968e+00,
- 6 => 2.938163982698783e+00,
- ];
-
- static $d = [
- 1 => 7.784695709041462e-03,
- 2 => 3.224671290700398e-01,
- 3 => 2.445134137142996e+00,
- 4 => 3.754408661907416e+00,
- ];
-
- // Define lower and upper region break-points.
- $p_low = 0.02425; //Use lower region approx. below this
- $p_high = 1 - $p_low; //Use upper region approx. above this
-
- if (0 < $p && $p < $p_low) {
- // Rational approximation for lower region.
- $q = sqrt(-2 * log($p));
-
- return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
- (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
- } elseif ($p_low <= $p && $p <= $p_high) {
- // Rational approximation for central region.
- $q = $p - 0.5;
- $r = $q * $q;
-
- return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q /
- ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1);
- } elseif ($p_high < $p && $p < 1) {
- // Rational approximation for upper region.
- $q = sqrt(-2 * log(1 - $p));
-
- return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
- (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
- }
- // If 0 < p < 1, return a null value
- return Functions::NULL();
- }
-
/**
* AVEDEV.
*
@@ -537,8 +34,8 @@ class Statistical
*
* @Deprecated 1.17.0
*
- * @see Statistical\Averages::AVEDEV()
- * Use the AVEDEV() method in the Statistical\Averages class instead
+ * @see Statistical\Averages::averageDeviations()
+ * Use the averageDeviations() method in the Statistical\Averages class instead
*
* @param mixed ...$args Data values
*
@@ -546,7 +43,7 @@ class Statistical
*/
public static function AVEDEV(...$args)
{
- return Averages::AVEDEV(...$args);
+ return Averages::averageDeviations(...$args);
}
/**
@@ -559,8 +56,8 @@ class Statistical
*
* @Deprecated 1.17.0
*
- * @see Statistical\Averages::AVERAGE()
- * Use the AVERAGE() method in the Statistical\Averages class instead
+ * @see Statistical\Averages::average()
+ * Use the average() method in the Statistical\Averages class instead
*
* @param mixed ...$args Data values
*
@@ -568,7 +65,7 @@ class Statistical
*/
public static function AVERAGE(...$args)
{
- return Averages::AVERAGE(...$args);
+ return Averages::average(...$args);
}
/**
@@ -581,8 +78,8 @@ class Statistical
*
* @Deprecated 1.17.0
*
- * @see Statistical\Averages::AVERAGEA()
- * Use the AVERAGEA() method in the Statistical\Averages class instead
+ * @see Statistical\Averages::averageA()
+ * Use the averageA() method in the Statistical\Averages class instead
*
* @param mixed ...$args Data values
*
@@ -590,7 +87,7 @@ class Statistical
*/
public static function AVERAGEA(...$args)
{
- return Averages::AVERAGEA(...$args);
+ return Averages::averageA(...$args);
}
/**
@@ -622,6 +119,11 @@ class Statistical
*
* Returns the beta distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Beta::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Beta class instead
+ *
* @param float $value Value at which you want to evaluate the distribution
* @param float $alpha Parameter to the distribution
* @param float $beta Parameter to the distribution
@@ -632,28 +134,7 @@ class Statistical
*/
public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1)
{
- $value = Functions::flattenSingleValue($value);
- $alpha = Functions::flattenSingleValue($alpha);
- $beta = Functions::flattenSingleValue($beta);
- $rMin = Functions::flattenSingleValue($rMin);
- $rMax = Functions::flattenSingleValue($rMax);
-
- if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) {
- if ($rMin > $rMax) {
- $tmp = $rMin;
- $rMin = $rMax;
- $rMax = $tmp;
- }
- if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) {
- return Functions::NAN();
- }
- $value -= $rMin;
- $value /= ($rMax - $rMin);
-
- return self::incompleteBeta($value, $alpha, $beta);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Beta::distribution($value, $alpha, $beta, $rMin, $rMax);
}
/**
@@ -661,6 +142,11 @@ class Statistical
*
* Returns the inverse of the Beta distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Beta::inverse()
+ * Use the inverse() method in the Statistical\Distributions\Beta class instead
+ *
* @param float $probability Probability at which you want to evaluate the distribution
* @param float $alpha Parameter to the distribution
* @param float $beta Parameter to the distribution
@@ -671,44 +157,7 @@ class Statistical
*/
public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1)
{
- $probability = Functions::flattenSingleValue($probability);
- $alpha = Functions::flattenSingleValue($alpha);
- $beta = Functions::flattenSingleValue($beta);
- $rMin = Functions::flattenSingleValue($rMin);
- $rMax = Functions::flattenSingleValue($rMax);
-
- if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) {
- if ($rMin > $rMax) {
- $tmp = $rMin;
- $rMin = $rMax;
- $rMax = $tmp;
- }
- if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0) || ($probability > 1)) {
- return Functions::NAN();
- }
- $a = 0;
- $b = 2;
-
- $i = 0;
- while ((($b - $a) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
- $guess = ($a + $b) / 2;
- $result = self::BETADIST($guess, $alpha, $beta);
- if (($result == $probability) || ($result == 0)) {
- $b = $a;
- } elseif ($result > $probability) {
- $b = $guess;
- } else {
- $a = $guess;
- }
- }
- if ($i == self::MAX_ITERATIONS) {
- return Functions::NA();
- }
-
- return round($rMin + $guess * ($rMax - $rMin), 12);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Beta::inverse($probability, $alpha, $beta, $rMin, $rMax);
}
/**
@@ -720,43 +169,21 @@ class Statistical
* experiment. For example, BINOMDIST can calculate the probability that two of the next three
* babies born are male.
*
- * @param float $value Number of successes in trials
- * @param float $trials Number of trials
- * @param float $probability Probability of success on each trial
- * @param bool $cumulative
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Binomial::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Binomial class instead
+ *
+ * @param mixed $value Number of successes in trials
+ * @param mixed $trials Number of trials
+ * @param mixed $probability Probability of success on each trial
+ * @param mixed $cumulative
*
* @return float|string
*/
public static function BINOMDIST($value, $trials, $probability, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $trials = Functions::flattenSingleValue($trials);
- $probability = Functions::flattenSingleValue($probability);
-
- if ((is_numeric($value)) && (is_numeric($trials)) && (is_numeric($probability))) {
- $value = floor($value);
- $trials = floor($trials);
- if (($value < 0) || ($value > $trials)) {
- return Functions::NAN();
- }
- if (($probability < 0) || ($probability > 1)) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- $summer = 0;
- for ($i = 0; $i <= $value; ++$i) {
- $summer += MathTrig::COMBIN($trials, $i) * $probability ** $i * (1 - $probability) ** ($trials - $i);
- }
-
- return $summer;
- }
-
- return MathTrig::COMBIN($trials, $value) * $probability ** $value * (1 - $probability) ** ($trials - $value);
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Binomial::distribution($value, $trials, $probability, $cumulative);
}
/**
@@ -764,6 +191,11 @@ class Statistical
*
* Returns the one-tailed probability of the chi-squared distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\ChiSquared::distributionRightTail()
+ * Use the distributionRightTail() method in the Statistical\Distributions\ChiSquared class instead
+ *
* @param float $value Value for the function
* @param float $degrees degrees of freedom
*
@@ -771,26 +203,7 @@ class Statistical
*/
public static function CHIDIST($value, $degrees)
{
- $value = Functions::flattenSingleValue($value);
- $degrees = Functions::flattenSingleValue($degrees);
-
- if ((is_numeric($value)) && (is_numeric($degrees))) {
- $degrees = floor($degrees);
- if ($degrees < 1) {
- return Functions::NAN();
- }
- if ($value < 0) {
- if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
- return 1;
- }
-
- return Functions::NAN();
- }
-
- return 1 - (self::incompleteGamma($degrees / 2, $value / 2) / self::gamma($degrees / 2));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\ChiSquared::distributionRightTail($value, $degrees);
}
/**
@@ -798,6 +211,11 @@ class Statistical
*
* Returns the one-tailed probability of the chi-squared distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\ChiSquared::inverseRightTail()
+ * Use the inverseRightTail() method in the Statistical\Distributions\ChiSquared class instead
+ *
* @param float $probability Probability for the function
* @param float $degrees degrees of freedom
*
@@ -805,52 +223,7 @@ class Statistical
*/
public static function CHIINV($probability, $degrees)
{
- $probability = Functions::flattenSingleValue($probability);
- $degrees = Functions::flattenSingleValue($degrees);
-
- if ((is_numeric($probability)) && (is_numeric($degrees))) {
- $degrees = floor($degrees);
-
- $xLo = 100;
- $xHi = 0;
-
- $x = $xNew = 1;
- $dx = 1;
- $i = 0;
-
- while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
- // Apply Newton-Raphson step
- $result = 1 - (self::incompleteGamma($degrees / 2, $x / 2) / self::gamma($degrees / 2));
- $error = $result - $probability;
- if ($error == 0.0) {
- $dx = 0;
- } elseif ($error < 0.0) {
- $xLo = $x;
- } else {
- $xHi = $x;
- }
- // Avoid division by zero
- if ($result != 0.0) {
- $dx = $error / $result;
- $xNew = $x - $dx;
- }
- // If the NR fails to converge (which for example may be the
- // case if the initial guess is too rough) we apply a bisection
- // step to determine a more narrow interval around the root.
- if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {
- $xNew = ($xLo + $xHi) / 2;
- $dx = $xNew - $x;
- }
- $x = $xNew;
- }
- if ($i == self::MAX_ITERATIONS) {
- return Functions::NA();
- }
-
- return round($x, 12);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\ChiSquared::inverseRightTail($probability, $degrees);
}
/**
@@ -858,6 +231,11 @@ class Statistical
*
* Returns the confidence interval for a population mean
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Confidence::CONFIDENCE()
+ * Use the CONFIDENCE() method in the Statistical\Confidence class instead
+ *
* @param float $alpha
* @param float $stdDev Standard Deviation
* @param float $size
@@ -866,23 +244,7 @@ class Statistical
*/
public static function CONFIDENCE($alpha, $stdDev, $size)
{
- $alpha = Functions::flattenSingleValue($alpha);
- $stdDev = Functions::flattenSingleValue($stdDev);
- $size = Functions::flattenSingleValue($size);
-
- if ((is_numeric($alpha)) && (is_numeric($stdDev)) && (is_numeric($size))) {
- $size = floor($size);
- if (($alpha <= 0) || ($alpha >= 1)) {
- return Functions::NAN();
- }
- if (($stdDev <= 0) || ($size < 1)) {
- return Functions::NAN();
- }
-
- return self::NORMSINV(1 - $alpha / 2) * $stdDev / sqrt($size);
- }
-
- return Functions::VALUE();
+ return Confidence::CONFIDENCE($alpha, $stdDev, $size);
}
/**
@@ -890,6 +252,11 @@ class Statistical
*
* Returns covariance, the average of the products of deviations for each data point pair.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::CORREL()
+ * Use the CORREL() method in the Statistical\Trends class instead
+ *
* @param mixed $yValues array of mixed Data Series Y
* @param null|mixed $xValues array of mixed Data Series X
*
@@ -897,24 +264,7 @@ class Statistical
*/
public static function CORREL($yValues, $xValues = null)
{
- if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) {
- return Functions::VALUE();
- }
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getCorrelation();
+ return Trends::CORREL($xValues, $yValues);
}
/**
@@ -1033,6 +383,11 @@ class Statistical
*
* Returns covariance, the average of the products of deviations for each data point pair.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::COVAR()
+ * Use the COVAR() method in the Statistical\Trends class instead
+ *
* @param mixed $yValues array of mixed Data Series Y
* @param mixed $xValues array of mixed Data Series X
*
@@ -1040,21 +395,7 @@ class Statistical
*/
public static function COVAR($yValues, $xValues)
{
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getCovariance();
+ return Trends::COVAR($yValues, $xValues);
}
/**
@@ -1065,123 +406,20 @@ class Statistical
*
* See https://support.microsoft.com/en-us/help/828117/ for details of the algorithm used
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Binomial::inverse()
+ * Use the inverse() method in the Statistical\Distributions\Binomial class instead
+ *
* @param float $trials number of Bernoulli trials
* @param float $probability probability of a success on each trial
* @param float $alpha criterion value
*
* @return int|string
- *
- * @TODO Warning. This implementation differs from the algorithm detailed on the MS
- * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess
- * This eliminates a potential endless loop error, but may have an adverse affect on the
- * accuracy of the function (although all my tests have so far returned correct results).
*/
public static function CRITBINOM($trials, $probability, $alpha)
{
- $trials = floor(Functions::flattenSingleValue($trials));
- $probability = Functions::flattenSingleValue($probability);
- $alpha = Functions::flattenSingleValue($alpha);
-
- if ((is_numeric($trials)) && (is_numeric($probability)) && (is_numeric($alpha))) {
- $trials = (int) $trials;
- if ($trials < 0) {
- return Functions::NAN();
- } elseif (($probability < 0.0) || ($probability > 1.0)) {
- return Functions::NAN();
- } elseif (($alpha < 0.0) || ($alpha > 1.0)) {
- return Functions::NAN();
- }
-
- if ($alpha <= 0.5) {
- $t = sqrt(log(1 / ($alpha * $alpha)));
- $trialsApprox = 0 - ($t + (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t));
- } else {
- $t = sqrt(log(1 / (1 - $alpha) ** 2));
- $trialsApprox = $t - (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t);
- }
-
- $Guess = floor($trials * $probability + $trialsApprox * sqrt($trials * $probability * (1 - $probability)));
- if ($Guess < 0) {
- $Guess = 0;
- } elseif ($Guess > $trials) {
- $Guess = $trials;
- }
-
- $TotalUnscaledProbability = $UnscaledPGuess = $UnscaledCumPGuess = 0.0;
- $EssentiallyZero = 10e-12;
-
- $m = floor($trials * $probability);
- ++$TotalUnscaledProbability;
- if ($m == $Guess) {
- ++$UnscaledPGuess;
- }
- if ($m <= $Guess) {
- ++$UnscaledCumPGuess;
- }
-
- $PreviousValue = 1;
- $Done = false;
- $k = $m + 1;
- while ((!$Done) && ($k <= $trials)) {
- $CurrentValue = $PreviousValue * ($trials - $k + 1) * $probability / ($k * (1 - $probability));
- $TotalUnscaledProbability += $CurrentValue;
- if ($k == $Guess) {
- $UnscaledPGuess += $CurrentValue;
- }
- if ($k <= $Guess) {
- $UnscaledCumPGuess += $CurrentValue;
- }
- if ($CurrentValue <= $EssentiallyZero) {
- $Done = true;
- }
- $PreviousValue = $CurrentValue;
- ++$k;
- }
-
- $PreviousValue = 1;
- $Done = false;
- $k = $m - 1;
- while ((!$Done) && ($k >= 0)) {
- $CurrentValue = $PreviousValue * $k + 1 * (1 - $probability) / (($trials - $k) * $probability);
- $TotalUnscaledProbability += $CurrentValue;
- if ($k == $Guess) {
- $UnscaledPGuess += $CurrentValue;
- }
- if ($k <= $Guess) {
- $UnscaledCumPGuess += $CurrentValue;
- }
- if ($CurrentValue <= $EssentiallyZero) {
- $Done = true;
- }
- $PreviousValue = $CurrentValue;
- --$k;
- }
-
- $PGuess = $UnscaledPGuess / $TotalUnscaledProbability;
- $CumPGuess = $UnscaledCumPGuess / $TotalUnscaledProbability;
-
- $CumPGuessMinus1 = $CumPGuess - 1;
-
- while (true) {
- if (($CumPGuessMinus1 < $alpha) && ($CumPGuess >= $alpha)) {
- return $Guess;
- } elseif (($CumPGuessMinus1 < $alpha) && ($CumPGuess < $alpha)) {
- $PGuessPlus1 = $PGuess * ($trials - $Guess) * $probability / $Guess / (1 - $probability);
- $CumPGuessMinus1 = $CumPGuess;
- $CumPGuess = $CumPGuess + $PGuessPlus1;
- $PGuess = $PGuessPlus1;
- ++$Guess;
- } elseif (($CumPGuessMinus1 >= $alpha) && ($CumPGuess >= $alpha)) {
- $PGuessMinus1 = $PGuess * $Guess * (1 - $probability) / ($trials - $Guess + 1) / $probability;
- $CumPGuess = $CumPGuessMinus1;
- $CumPGuessMinus1 = $CumPGuessMinus1 - $PGuess;
- $PGuess = $PGuessMinus1;
- --$Guess;
- }
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Binomial::inverse($trials, $probability, $alpha);
}
/**
@@ -1192,48 +430,18 @@ class Statistical
* Excel Function:
* DEVSQ(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Deviations::sumSquares()
+ * Use the sumSquares() method in the Statistical\Deviations class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string
*/
public static function DEVSQ(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
-
- // Return value
- $returnValue = null;
-
- $aMean = Averages::AVERAGE($aArgs);
- if ($aMean != Functions::DIV0()) {
- $aCount = -1;
- foreach ($aArgs as $k => $arg) {
- // Is it a numeric value?
- if (
- (is_bool($arg)) &&
- ((!Functions::isCellValue($k)) ||
- (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
- ) {
- $arg = (int) $arg;
- }
- if ((is_numeric($arg)) && (!is_string($arg))) {
- if ($returnValue === null) {
- $returnValue = ($arg - $aMean) ** 2;
- } else {
- $returnValue += ($arg - $aMean) ** 2;
- }
- ++$aCount;
- }
- }
-
- // Return
- if ($returnValue === null) {
- return Functions::NAN();
- }
-
- return $returnValue;
- }
-
- return Functions::NA();
+ return Statistical\Deviations::sumSquares(...$args);
}
/**
@@ -1243,6 +451,11 @@ class Statistical
* such as how long an automated bank teller takes to deliver cash. For example, you can
* use EXPONDIST to determine the probability that the process takes at most 1 minute.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Exponential::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Exponential class instead
+ *
* @param float $value Value of the function
* @param float $lambda The parameter value
* @param bool $cumulative
@@ -1251,34 +464,7 @@ class Statistical
*/
public static function EXPONDIST($value, $lambda, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $lambda = Functions::flattenSingleValue($lambda);
- $cumulative = Functions::flattenSingleValue($cumulative);
-
- if ((is_numeric($value)) && (is_numeric($lambda))) {
- if (($value < 0) || ($lambda < 0)) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- return 1 - exp(0 - $value * $lambda);
- }
-
- return $lambda * exp(0 - $value * $lambda);
- }
- }
-
- return Functions::VALUE();
- }
-
- private static function betaFunction($a, $b)
- {
- return (self::gamma($a) * self::gamma($b)) / self::gamma($a + $b);
- }
-
- private static function regularizedIncompleteBeta($value, $a, $b)
- {
- return self::incompleteBeta($value, $a, $b) / self::betaFunction($a, $b);
+ return Statistical\Distributions\Exponential::distribution($value, $lambda, $cumulative);
}
/**
@@ -1289,6 +475,11 @@ class Statistical
* For example, you can examine the test scores of men and women entering high school, and determine
* if the variability in the females is different from that found in the males.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\F::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Exponential class instead
+ *
* @param float $value Value of the function
* @param int $u The numerator degrees of freedom
* @param int $v The denominator degrees of freedom
@@ -1299,32 +490,7 @@ class Statistical
*/
public static function FDIST2($value, $u, $v, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $u = Functions::flattenSingleValue($u);
- $v = Functions::flattenSingleValue($v);
- $cumulative = Functions::flattenSingleValue($cumulative);
-
- if (is_numeric($value) && is_numeric($u) && is_numeric($v)) {
- if ($value < 0 || $u < 1 || $v < 1) {
- return Functions::NAN();
- }
-
- $cumulative = (bool) $cumulative;
- $u = (int) $u;
- $v = (int) $v;
-
- if ($cumulative) {
- $adjustedValue = ($u * $value) / ($u * $value + $v);
-
- return self::incompleteBeta($adjustedValue, $u / 2, $v / 2);
- }
-
- return (self::gamma(($v + $u) / 2) / (self::gamma($u / 2) * self::gamma($v / 2))) *
- (($u / $v) ** ($u / 2)) *
- (($value ** (($u - 2) / 2)) / ((1 + ($u / $v) * $value) ** (($u + $v) / 2)));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\F::distribution($value, $u, $v, $cumulative);
}
/**
@@ -1334,23 +500,18 @@ class Statistical
* is normally distributed rather than skewed. Use this function to perform hypothesis
* testing on the correlation coefficient.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Fisher::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Fisher class instead
+ *
* @param float $value
*
* @return float|string
*/
public static function FISHER($value)
{
- $value = Functions::flattenSingleValue($value);
-
- if (is_numeric($value)) {
- if (($value <= -1) || ($value >= 1)) {
- return Functions::NAN();
- }
-
- return 0.5 * log((1 + $value) / (1 - $value));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Fisher::distribution($value);
}
/**
@@ -1360,19 +521,18 @@ class Statistical
* analyzing correlations between ranges or arrays of data. If y = FISHER(x), then
* FISHERINV(y) = x.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Fisher::inverse()
+ * Use the inverse() method in the Statistical\Distributions\Fisher class instead
+ *
* @param float $value
*
* @return float|string
*/
public static function FISHERINV($value)
{
- $value = Functions::flattenSingleValue($value);
-
- if (is_numeric($value)) {
- return (exp(2 * $value) - 1) / (exp(2 * $value) + 1);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Fisher::inverse($value);
}
/**
@@ -1380,6 +540,11 @@ class Statistical
*
* Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::FORECAST()
+ * Use the FORECAST() method in the Statistical\Trends class instead
+ *
* @param float $xValue Value of X for which we want to find Y
* @param mixed $yValues array of mixed Data Series Y
* @param mixed $xValues of mixed Data Series X
@@ -1388,30 +553,18 @@ class Statistical
*/
public static function FORECAST($xValue, $yValues, $xValues)
{
- $xValue = Functions::flattenSingleValue($xValue);
- if (!is_numeric($xValue)) {
- return Functions::VALUE();
- } elseif (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getValueOfYForX($xValue);
+ return Trends::FORECAST($xValue, $yValues, $xValues);
}
/**
* GAMMA.
*
- * Return the gamma function value.
+ * Returns the gamma function value.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Gamma::gamma()
+ * Use the gamma() method in the Statistical\Distributions\Gamma class instead
*
* @param float $value
*
@@ -1419,14 +572,7 @@ class Statistical
*/
public static function GAMMAFunction($value)
{
- $value = Functions::flattenSingleValue($value);
- if (!is_numeric($value)) {
- return Functions::VALUE();
- } elseif ((((int) $value) == ((float) $value)) && $value <= 0.0) {
- return Functions::NAN();
- }
-
- return self::gamma($value);
+ return Statistical\Distributions\Gamma::gamma($value);
}
/**
@@ -1434,6 +580,11 @@ class Statistical
*
* Returns the gamma distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Gamma::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Gamma class instead
+ *
* @param float $value Value at which you want to evaluate the distribution
* @param float $a Parameter to the distribution
* @param float $b Parameter to the distribution
@@ -1443,24 +594,7 @@ class Statistical
*/
public static function GAMMADIST($value, $a, $b, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $a = Functions::flattenSingleValue($a);
- $b = Functions::flattenSingleValue($b);
-
- if ((is_numeric($value)) && (is_numeric($a)) && (is_numeric($b))) {
- if (($value < 0) || ($a <= 0) || ($b <= 0)) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- return self::incompleteGamma($a, $value / $b) / self::gamma($a);
- }
-
- return (1 / ($b ** $a * self::gamma($a))) * $value ** ($a - 1) * exp(0 - ($value / $b));
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Gamma::distribution($value, $a, $b, $cumulative);
}
/**
@@ -1468,6 +602,11 @@ class Statistical
*
* Returns the inverse of the Gamma distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Gamma::inverse()
+ * Use the inverse() method in the Statistical\Distributions\Gamma class instead
+ *
* @param float $probability Probability at which you want to evaluate the distribution
* @param float $alpha Parameter to the distribution
* @param float $beta Parameter to the distribution
@@ -1476,53 +615,7 @@ class Statistical
*/
public static function GAMMAINV($probability, $alpha, $beta)
{
- $probability = Functions::flattenSingleValue($probability);
- $alpha = Functions::flattenSingleValue($alpha);
- $beta = Functions::flattenSingleValue($beta);
-
- if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta))) {
- if (($alpha <= 0) || ($beta <= 0) || ($probability < 0) || ($probability > 1)) {
- return Functions::NAN();
- }
-
- $xLo = 0;
- $xHi = $alpha * $beta * 5;
-
- $x = $xNew = 1;
- $dx = 1024;
- $i = 0;
-
- while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
- // Apply Newton-Raphson step
- $error = self::GAMMADIST($x, $alpha, $beta, true) - $probability;
- if ($error < 0.0) {
- $xLo = $x;
- } else {
- $xHi = $x;
- }
- $pdf = self::GAMMADIST($x, $alpha, $beta, false);
- // Avoid division by zero
- if ($pdf != 0.0) {
- $dx = $error / $pdf;
- $xNew = $x - $dx;
- }
- // If the NR fails to converge (which for example may be the
- // case if the initial guess is too rough) we apply a bisection
- // step to determine a more narrow interval around the root.
- if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) {
- $xNew = ($xLo + $xHi) / 2;
- $dx = $xNew - $x;
- }
- $x = $xNew;
- }
- if ($i == self::MAX_ITERATIONS) {
- return Functions::NA();
- }
-
- return $x;
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Gamma::inverse($probability, $alpha, $beta);
}
/**
@@ -1530,23 +623,18 @@ class Statistical
*
* Returns the natural logarithm of the gamma function.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Gamma::ln()
+ * Use the ln() method in the Statistical\Distributions\Gamma class instead
+ *
* @param float $value
*
* @return float|string
*/
public static function GAMMALN($value)
{
- $value = Functions::flattenSingleValue($value);
-
- if (is_numeric($value)) {
- if ($value <= 0) {
- return Functions::NAN();
- }
-
- return log(self::gamma($value));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Gamma::ln($value);
}
/**
@@ -1555,18 +643,18 @@ class Statistical
* Calculates the probability that a member of a standard normal population will fall between
* the mean and z standard deviations from the mean.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StandardNormal::gauss()
+ * Use the gauss() method in the Statistical\Distributions\StandardNormal class instead
+ *
* @param float $value
*
* @return float|string The result, or a string containing an error
*/
public static function GAUSS($value)
{
- $value = Functions::flattenSingleValue($value);
- if (!is_numeric($value)) {
- return Functions::VALUE();
- }
-
- return self::NORMDIST($value, 0, 1, true) - 0.5;
+ return Statistical\Distributions\StandardNormal::gauss($value);
}
/**
@@ -1579,23 +667,18 @@ class Statistical
* Excel Function:
* GEOMEAN(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Averages\Mean::geometric()
+ * Use the geometric() method in the Statistical\Averages\Mean class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string
*/
public static function GEOMEAN(...$args)
{
- $aArgs = Functions::flattenArray($args);
-
- $aMean = MathTrig::PRODUCT($aArgs);
- if (is_numeric($aMean) && ($aMean > 0)) {
- $aCount = Counts::COUNT($aArgs);
- if (Minimum::MIN($aArgs) > 0) {
- return $aMean ** (1 / $aCount);
- }
- }
-
- return Functions::NAN();
+ return Statistical\Averages\Mean::geometric(...$args);
}
/**
@@ -1603,31 +686,21 @@ class Statistical
*
* Returns values along a predicted exponential Trend
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::GROWTH()
+ * Use the GROWTH() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param mixed[] $xValues Data Series X
* @param mixed[] $newValues Values of X for which we want to find Y
* @param bool $const a logical value specifying whether to force the intersect to equal 0
*
- * @return array of float
+ * @return float[]
*/
public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true)
{
- $yValues = Functions::flattenArray($yValues);
- $xValues = Functions::flattenArray($xValues);
- $newValues = Functions::flattenArray($newValues);
- $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
-
- $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
- if (empty($newValues)) {
- $newValues = $bestFitExponential->getXValues();
- }
-
- $returnArray = [];
- foreach ($newValues as $xValue) {
- $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue);
- }
-
- return $returnArray;
+ return Trends::GROWTH($yValues, $xValues, $newValues, $const);
}
/**
@@ -1639,38 +712,18 @@ class Statistical
* Excel Function:
* HARMEAN(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Averages\Mean::harmonic()
+ * Use the harmonic() method in the Statistical\Averages\Mean class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string
*/
public static function HARMEAN(...$args)
{
- // Return value
- $returnValue = 0;
-
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
- if (Minimum::MIN($aArgs) < 0) {
- return Functions::NAN();
- }
- $aCount = 0;
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- if ($arg <= 0) {
- return Functions::NAN();
- }
- $returnValue += (1 / $arg);
- ++$aCount;
- }
- }
-
- // Return
- if ($aCount > 0) {
- return 1 / ($returnValue / $aCount);
- }
-
- return Functions::NA();
+ return Statistical\Averages\Mean::harmonic(...$args);
}
/**
@@ -1679,42 +732,26 @@ class Statistical
* Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of
* sample successes, given the sample size, population successes, and population size.
*
- * @param float $sampleSuccesses Number of successes in the sample
- * @param float $sampleNumber Size of the sample
- * @param float $populationSuccesses Number of successes in the population
- * @param float $populationNumber Population size
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\HyperGeometric::distribution()
+ * Use the distribution() method in the Statistical\Distributions\HyperGeometric class instead
+ *
+ * @param mixed $sampleSuccesses Number of successes in the sample
+ * @param mixed $sampleNumber Size of the sample
+ * @param mixed $populationSuccesses Number of successes in the population
+ * @param mixed $populationNumber Population size
*
* @return float|string
*/
public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber)
{
- $sampleSuccesses = Functions::flattenSingleValue($sampleSuccesses);
- $sampleNumber = Functions::flattenSingleValue($sampleNumber);
- $populationSuccesses = Functions::flattenSingleValue($populationSuccesses);
- $populationNumber = Functions::flattenSingleValue($populationNumber);
-
- if ((is_numeric($sampleSuccesses)) && (is_numeric($sampleNumber)) && (is_numeric($populationSuccesses)) && (is_numeric($populationNumber))) {
- $sampleSuccesses = floor($sampleSuccesses);
- $sampleNumber = floor($sampleNumber);
- $populationSuccesses = floor($populationSuccesses);
- $populationNumber = floor($populationNumber);
-
- if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) {
- return Functions::NAN();
- }
- if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) {
- return Functions::NAN();
- }
- if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) {
- return Functions::NAN();
- }
-
- return MathTrig::COMBIN($populationSuccesses, $sampleSuccesses) *
- MathTrig::COMBIN($populationNumber - $populationSuccesses, $sampleNumber - $sampleSuccesses) /
- MathTrig::COMBIN($populationNumber, $sampleNumber);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\HyperGeometric::distribution(
+ $sampleSuccesses,
+ $sampleNumber,
+ $populationSuccesses,
+ $populationNumber
+ );
}
/**
@@ -1722,6 +759,11 @@ class Statistical
*
* Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::INTERCEPT()
+ * Use the INTERCEPT() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param mixed[] $xValues Data Series X
*
@@ -1729,21 +771,7 @@ class Statistical
*/
public static function INTERCEPT($yValues, $xValues)
{
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getIntersect();
+ return Trends::INTERCEPT($yValues, $xValues);
}
/**
@@ -1754,40 +782,18 @@ class Statistical
* kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a
* relatively flat distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Deviations::kurtosis()
+ * Use the kurtosis() method in the Statistical\Deviations class instead
+ *
* @param array ...$args Data Series
*
* @return float|string
*/
public static function KURT(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
- $mean = Averages::AVERAGE($aArgs);
- $stdDev = StandardDeviations::STDEV($aArgs);
-
- if ($stdDev > 0) {
- $count = $summer = 0;
- // Loop through arguments
- foreach ($aArgs as $k => $arg) {
- if (
- (is_bool($arg)) &&
- (!Functions::isMatrixValue($k))
- ) {
- } else {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $summer += (($arg - $mean) / $stdDev) ** 4;
- ++$count;
- }
- }
- }
-
- // Return
- if ($count > 3) {
- return $summer * ($count * ($count + 1) / (($count - 1) * ($count - 2) * ($count - 3))) - (3 * ($count - 1) ** 2 / (($count - 2) * ($count - 3)));
- }
- }
-
- return Functions::DIV0();
+ return Statistical\Deviations::kurtosis(...$args);
}
/**
@@ -1799,37 +805,18 @@ class Statistical
* Excel Function:
* LARGE(value1[,value2[, ...]],entry)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Size::large()
+ * Use the large() method in the Statistical\Size class instead
+ *
* @param mixed $args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function LARGE(...$args)
{
- $aArgs = Functions::flattenArray($args);
- $entry = array_pop($aArgs);
-
- if ((is_numeric($entry)) && (!is_string($entry))) {
- $entry = (int) floor($entry);
-
- // Calculate
- $mArgs = [];
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
- $count = Counts::COUNT($mArgs);
- --$entry;
- if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
- return Functions::NAN();
- }
- rsort($mArgs);
-
- return $mArgs[$entry];
- }
-
- return Functions::VALUE();
+ return Statistical\Size::large(...$args);
}
/**
@@ -1838,6 +825,11 @@ class Statistical
* Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data,
* and then returns an array that describes the line.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::LINEST()
+ * Use the LINEST() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param null|mixed[] $xValues Data Series X
* @param bool $const a logical value specifying whether to force the intersect to equal 0
@@ -1847,48 +839,7 @@ class Statistical
*/
public static function LINEST($yValues, $xValues = null, $const = true, $stats = false)
{
- $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
- $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
- if ($xValues === null) {
- $xValues = range(1, count(Functions::flattenArray($yValues)));
- }
-
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return 0;
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
- if ($stats) {
- return [
- [
- $bestFitLinear->getSlope(),
- $bestFitLinear->getSlopeSE(),
- $bestFitLinear->getGoodnessOfFit(),
- $bestFitLinear->getF(),
- $bestFitLinear->getSSRegression(),
- ],
- [
- $bestFitLinear->getIntersect(),
- $bestFitLinear->getIntersectSE(),
- $bestFitLinear->getStdevOfResiduals(),
- $bestFitLinear->getDFResiduals(),
- $bestFitLinear->getSSResiduals(),
- ],
- ];
- }
-
- return [
- $bestFitLinear->getSlope(),
- $bestFitLinear->getIntersect(),
- ];
+ return Trends::LINEST($yValues, $xValues, $const, $stats);
}
/**
@@ -1897,6 +848,11 @@ class Statistical
* Calculates an exponential curve that best fits the X and Y data series,
* and then returns an array that describes the line.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::LOGEST()
+ * Use the LOGEST() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param null|mixed[] $xValues Data Series X
* @param bool $const a logical value specifying whether to force the intersect to equal 0
@@ -1906,54 +862,7 @@ class Statistical
*/
public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false)
{
- $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
- $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
- if ($xValues === null) {
- $xValues = range(1, count(Functions::flattenArray($yValues)));
- }
-
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- foreach ($yValues as $value) {
- if ($value <= 0.0) {
- return Functions::NAN();
- }
- }
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return 1;
- }
-
- $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
- if ($stats) {
- return [
- [
- $bestFitExponential->getSlope(),
- $bestFitExponential->getSlopeSE(),
- $bestFitExponential->getGoodnessOfFit(),
- $bestFitExponential->getF(),
- $bestFitExponential->getSSRegression(),
- ],
- [
- $bestFitExponential->getIntersect(),
- $bestFitExponential->getIntersectSE(),
- $bestFitExponential->getStdevOfResiduals(),
- $bestFitExponential->getDFResiduals(),
- $bestFitExponential->getSSResiduals(),
- ],
- ];
- }
-
- return [
- $bestFitExponential->getSlope(),
- $bestFitExponential->getIntersect(),
- ];
+ return Trends::LOGEST($yValues, $xValues, $const, $stats);
}
/**
@@ -1961,6 +870,11 @@ class Statistical
*
* Returns the inverse of the normal cumulative distribution
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\LogNormal::inverse()
+ * Use the inverse() method in the Statistical\Distributions\LogNormal class instead
+ *
* @param float $probability
* @param float $mean
* @param float $stdDev
@@ -1973,19 +887,7 @@ class Statistical
*/
public static function LOGINV($probability, $mean, $stdDev)
{
- $probability = Functions::flattenSingleValue($probability);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
-
- if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if (($probability < 0) || ($probability > 1) || ($stdDev <= 0)) {
- return Functions::NAN();
- }
-
- return exp($mean + $stdDev * self::NORMSINV($probability));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\LogNormal::inverse($probability, $mean, $stdDev);
}
/**
@@ -1994,6 +896,11 @@ class Statistical
* Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed
* with parameters mean and standard_dev.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\LogNormal::cumulative()
+ * Use the cumulative() method in the Statistical\Distributions\LogNormal class instead
+ *
* @param float $value
* @param float $mean
* @param float $stdDev
@@ -2002,19 +909,7 @@ class Statistical
*/
public static function LOGNORMDIST($value, $mean, $stdDev)
{
- $value = Functions::flattenSingleValue($value);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
-
- if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if (($value <= 0) || ($stdDev <= 0)) {
- return Functions::NAN();
- }
-
- return self::NORMSDIST((log($value) - $mean) / $stdDev);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\LogNormal::cumulative($value, $mean, $stdDev);
}
/**
@@ -2023,6 +918,11 @@ class Statistical
* Returns the lognormal distribution of x, where ln(x) is normally distributed
* with parameters mean and standard_dev.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\LogNormal::distribution()
+ * Use the distribution() method in the Statistical\Distributions\LogNormal class instead
+ *
* @param float $value
* @param float $mean
* @param float $stdDev
@@ -2032,25 +932,7 @@ class Statistical
*/
public static function LOGNORMDIST2($value, $mean, $stdDev, $cumulative = false)
{
- $value = Functions::flattenSingleValue($value);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
- $cumulative = (bool) Functions::flattenSingleValue($cumulative);
-
- if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if (($value <= 0) || ($stdDev <= 0)) {
- return Functions::NAN();
- }
-
- if ($cumulative === true) {
- return self::NORMSDIST2((log($value) - $mean) / $stdDev, true);
- }
-
- return (1 / (sqrt(2 * M_PI) * $stdDev * $value)) *
- exp(0 - ((log($value) - $mean) ** 2 / (2 * $stdDev ** 2)));
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\LogNormal::distribution($value, $mean, $stdDev, $cumulative);
}
/**
@@ -2060,20 +942,20 @@ class Statistical
* with negative numbers considered smaller than positive numbers.
*
* Excel Function:
- * MAX(value1[,value2[, ...]])
+ * max(value1[,value2[, ...]])
*
* @Deprecated 1.17.0
*
- * @see Statistical\Maximum::MAX()
- * Use the MAX() method in the Statistical\Maximum class instead
- *
* @param mixed ...$args Data values
*
* @return float
+ *
+ *@see Statistical\Maximum::max()
+ * Use the MAX() method in the Statistical\Maximum class instead
*/
public static function MAX(...$args)
{
- return Maximum::MAX(...$args);
+ return Maximum::max(...$args);
}
/**
@@ -2082,20 +964,20 @@ class Statistical
* Returns the greatest value in a list of arguments, including numbers, text, and logical values
*
* Excel Function:
- * MAXA(value1[,value2[, ...]])
+ * maxA(value1[,value2[, ...]])
*
* @Deprecated 1.17.0
*
- * @see Statistical\Maximum::MAXA()
- * Use the MAXA() method in the Statistical\Maximum class instead
- *
* @param mixed ...$args Data values
*
* @return float
+ *
+ *@see Statistical\Maximum::maxA()
+ * Use the MAXA() method in the Statistical\Maximum class instead
*/
public static function MAXA(...$args)
{
- return Maximum::MAXA(...$args);
+ return Maximum::maxA(...$args);
}
/**
@@ -2128,37 +1010,18 @@ class Statistical
* Excel Function:
* MEDIAN(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Averages::median()
+ * Use the median() method in the Statistical\Averages class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function MEDIAN(...$args)
{
- $returnValue = Functions::NAN();
-
- $mArgs = [];
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
-
- $mValueCount = count($mArgs);
- if ($mValueCount > 0) {
- sort($mArgs, SORT_NUMERIC);
- $mValueCount = $mValueCount / 2;
- if ($mValueCount == floor($mValueCount)) {
- $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2;
- } else {
- $mValueCount = floor($mValueCount);
- $returnValue = $mArgs[$mValueCount];
- }
- }
-
- return $returnValue;
+ return Statistical\Averages::median(...$args);
}
/**
@@ -2172,16 +1035,16 @@ class Statistical
*
* @Deprecated 1.17.0
*
- * @see Statistical\Minimum::MIN()
- * Use the MIN() method in the Statistical\Minimum class instead
- *
* @param mixed ...$args Data values
*
* @return float
+ *
+ *@see Statistical\Minimum::min()
+ * Use the min() method in the Statistical\Minimum class instead
*/
public static function MIN(...$args)
{
- return Minimum::MIN(...$args);
+ return Minimum::min(...$args);
}
/**
@@ -2194,16 +1057,16 @@ class Statistical
*
* @Deprecated 1.17.0
*
- * @see Statistical\Minimum::MINA()
- * Use the MINA() method in the Statistical\Minimum class instead
- *
* @param mixed ...$args Data values
*
* @return float
+ *
+ *@see Statistical\Minimum::minA()
+ * Use the minA() method in the Statistical\Minimum class instead
*/
public static function MINA(...$args)
{
- return Minimum::MINA(...$args);
+ return Minimum::minA(...$args);
}
/**
@@ -2228,55 +1091,6 @@ class Statistical
return Conditional::MINIFS(...$args);
}
- //
- // Special variant of array_count_values that isn't limited to strings and integers,
- // but can work with floating point numbers as values
- //
- private static function modeCalc($data)
- {
- $frequencyArray = [];
- $index = 0;
- $maxfreq = 0;
- $maxfreqkey = '';
- $maxfreqdatum = '';
- foreach ($data as $datum) {
- $found = false;
- ++$index;
- foreach ($frequencyArray as $key => $value) {
- if ((string) $value['value'] == (string) $datum) {
- ++$frequencyArray[$key]['frequency'];
- $freq = $frequencyArray[$key]['frequency'];
- if ($freq > $maxfreq) {
- $maxfreq = $freq;
- $maxfreqkey = $key;
- $maxfreqdatum = $datum;
- } elseif ($freq == $maxfreq) {
- if ($frequencyArray[$key]['index'] < $frequencyArray[$maxfreqkey]['index']) {
- $maxfreqkey = $key;
- $maxfreqdatum = $datum;
- }
- }
- $found = true;
-
- break;
- }
- }
- if (!$found) {
- $frequencyArray[] = [
- 'value' => $datum,
- 'frequency' => 1,
- 'index' => $index,
- ];
- }
- }
-
- if ($maxfreq <= 1) {
- return Functions::NA();
- }
-
- return $maxfreqdatum;
- }
-
/**
* MODE.
*
@@ -2285,30 +1099,18 @@ class Statistical
* Excel Function:
* MODE(value1[,value2[, ...]])
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Averages::mode()
+ * Use the mode() method in the Statistical\Averages class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function MODE(...$args)
{
- $returnValue = Functions::NA();
-
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
-
- $mArgs = [];
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
-
- if (!empty($mArgs)) {
- return self::modeCalc($mArgs);
- }
-
- return $returnValue;
+ return Statistical\Averages::mode(...$args);
}
/**
@@ -2320,34 +1122,20 @@ class Statistical
* distribution, except that the number of successes is fixed, and the number of trials is
* variable. Like the binomial, trials are assumed to be independent.
*
- * @param float $failures Number of Failures
- * @param float $successes Threshold number of Successes
- * @param float $probability Probability of success on each trial
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Binomial::negative()
+ * Use the negative() method in the Statistical\Distributions\Binomial class instead
+ *
+ * @param mixed $failures Number of Failures
+ * @param mixed $successes Threshold number of Successes
+ * @param mixed $probability Probability of success on each trial
*
* @return float|string The result, or a string containing an error
*/
public static function NEGBINOMDIST($failures, $successes, $probability)
{
- $failures = floor(Functions::flattenSingleValue($failures));
- $successes = floor(Functions::flattenSingleValue($successes));
- $probability = Functions::flattenSingleValue($probability);
-
- if ((is_numeric($failures)) && (is_numeric($successes)) && (is_numeric($probability))) {
- if (($failures < 0) || ($successes < 1)) {
- return Functions::NAN();
- } elseif (($probability < 0) || ($probability > 1)) {
- return Functions::NAN();
- }
- if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
- if (($failures + $successes - 1) <= 0) {
- return Functions::NAN();
- }
- }
-
- return (MathTrig::COMBIN($failures + $successes - 1, $successes - 1)) * ($probability ** $successes) * ((1 - $probability) ** $failures);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Binomial::negative($failures, $successes, $probability);
}
/**
@@ -2357,33 +1145,21 @@ class Statistical
* function has a very wide range of applications in statistics, including hypothesis
* testing.
*
- * @param float $value
- * @param float $mean Mean Value
- * @param float $stdDev Standard Deviation
- * @param bool $cumulative
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Normal::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Normal class instead
+ *
+ * @param mixed $value
+ * @param mixed $mean Mean Value
+ * @param mixed $stdDev Standard Deviation
+ * @param mixed $cumulative
*
* @return float|string The result, or a string containing an error
*/
public static function NORMDIST($value, $mean, $stdDev, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
-
- if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if ($stdDev < 0) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- return 0.5 * (1 + Engineering\Erf::erfValue(($value - $mean) / ($stdDev * sqrt(2))));
- }
-
- return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (($value - $mean) ** 2 / (2 * ($stdDev * $stdDev))));
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Normal::distribution($value, $mean, $stdDev, $cumulative);
}
/**
@@ -2391,30 +1167,20 @@ class Statistical
*
* Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
*
- * @param float $probability
- * @param float $mean Mean Value
- * @param float $stdDev Standard Deviation
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Normal::inverse()
+ * Use the inverse() method in the Statistical\Distributions\Normal class instead
+ *
+ * @param mixed $probability
+ * @param mixed $mean Mean Value
+ * @param mixed $stdDev Standard Deviation
*
* @return float|string The result, or a string containing an error
*/
public static function NORMINV($probability, $mean, $stdDev)
{
- $probability = Functions::flattenSingleValue($probability);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
-
- if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if (($probability < 0) || ($probability > 1)) {
- return Functions::NAN();
- }
- if ($stdDev < 0) {
- return Functions::NAN();
- }
-
- return (self::inverseNcdf($probability) * $stdDev) + $mean;
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Normal::inverse($probability, $mean, $stdDev);
}
/**
@@ -2424,18 +1190,18 @@ class Statistical
* a mean of 0 (zero) and a standard deviation of one. Use this function in place of a
* table of standard normal curve areas.
*
- * @param float $value
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StandardNormal::cumulative()
+ * Use the cumulative() method in the Statistical\Distributions\StandardNormal class instead
+ *
+ * @param mixed $value
*
* @return float|string The result, or a string containing an error
*/
public static function NORMSDIST($value)
{
- $value = Functions::flattenSingleValue($value);
- if (!is_numeric($value)) {
- return Functions::VALUE();
- }
-
- return self::NORMDIST($value, 0, 1, true);
+ return Statistical\Distributions\StandardNormal::cumulative($value);
}
/**
@@ -2445,20 +1211,19 @@ class Statistical
* a mean of 0 (zero) and a standard deviation of one. Use this function in place of a
* table of standard normal curve areas.
*
- * @param float $value
- * @param bool $cumulative
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StandardNormal::distribution()
+ * Use the distribution() method in the Statistical\Distributions\StandardNormal class instead
+ *
+ * @param mixed $value
+ * @param mixed $cumulative
*
* @return float|string The result, or a string containing an error
*/
public static function NORMSDIST2($value, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- if (!is_numeric($value)) {
- return Functions::VALUE();
- }
- $cumulative = (bool) Functions::flattenSingleValue($cumulative);
-
- return self::NORMDIST($value, 0, 1, $cumulative);
+ return Statistical\Distributions\StandardNormal::distribution($value, $cumulative);
}
/**
@@ -2466,13 +1231,18 @@ class Statistical
*
* Returns the inverse of the standard normal cumulative distribution
*
- * @param float $value
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StandardNormal::inverse()
+ * Use the inverse() method in the Statistical\Distributions\StandardNormal class instead
+ *
+ * @param mixed $value
*
* @return float|string The result, or a string containing an error
*/
public static function NORMSINV($value)
{
- return self::NORMINV($value, 0, 1);
+ return Statistical\Distributions\StandardNormal::inverse($value);
}
/**
@@ -2483,45 +1253,18 @@ class Statistical
* Excel Function:
* PERCENTILE(value1[,value2[, ...]],entry)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Percentiles::PERCENTILE()
+ * Use the PERCENTILE() method in the Statistical\Percentiles class instead
+ *
* @param mixed $args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function PERCENTILE(...$args)
{
- $aArgs = Functions::flattenArray($args);
-
- // Calculate
- $entry = array_pop($aArgs);
-
- if ((is_numeric($entry)) && (!is_string($entry))) {
- if (($entry < 0) || ($entry > 1)) {
- return Functions::NAN();
- }
- $mArgs = [];
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
- $mValueCount = count($mArgs);
- if ($mValueCount > 0) {
- sort($mArgs);
- $count = Counts::COUNT($mArgs);
- $index = $entry * ($count - 1);
- $iBase = floor($index);
- if ($index == $iBase) {
- return $mArgs[$index];
- }
- $iNext = $iBase + 1;
- $iProportion = $index - $iBase;
-
- return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion);
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Percentiles::PERCENTILE(...$args);
}
/**
@@ -2532,46 +1275,20 @@ class Statistical
* rather than floored (as MS Excel), so value 3 for a value set of 1, 2, 3, 4 will return
* 0.667 rather than 0.666
*
- * @param float[] $valueSet An array of, or a reference to, a list of numbers
- * @param int $value the number whose rank you want to find
- * @param int $significance the number of significant digits for the returned percentage value
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Percentiles::PERCENTRANK()
+ * Use the PERCENTRANK() method in the Statistical\Percentiles class instead
+ *
+ * @param mixed $valueSet An array of, or a reference to, a list of numbers
+ * @param mixed $value the number whose rank you want to find
+ * @param mixed $significance the number of significant digits for the returned percentage value
*
* @return float|string (string if result is an error)
*/
public static function PERCENTRANK($valueSet, $value, $significance = 3)
{
- $valueSet = Functions::flattenArray($valueSet);
- $value = Functions::flattenSingleValue($value);
- $significance = ($significance === null) ? 3 : (int) Functions::flattenSingleValue($significance);
-
- foreach ($valueSet as $key => $valueEntry) {
- if (!is_numeric($valueEntry)) {
- unset($valueSet[$key]);
- }
- }
- sort($valueSet, SORT_NUMERIC);
- $valueCount = count($valueSet);
- if ($valueCount == 0) {
- return Functions::NAN();
- }
-
- $valueAdjustor = $valueCount - 1;
- if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) {
- return Functions::NA();
- }
-
- $pos = array_search($value, $valueSet);
- if ($pos === false) {
- $pos = 0;
- $testValue = $valueSet[0];
- while ($testValue < $value) {
- $testValue = $valueSet[++$pos];
- }
- --$pos;
- $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos]));
- }
-
- return round($pos / $valueAdjustor, $significance);
+ return Statistical\Percentiles::PERCENTRANK($valueSet, $value, $significance);
}
/**
@@ -2591,7 +1308,7 @@ class Statistical
* @param int $numObjs Number of different objects
* @param int $numInSet Number of objects in each permutation
*
- * @return int|string Number of permutations, or a string containing an error
+ * @return float|int|string Number of permutations, or a string containing an error
*/
public static function PERMUT($numObjs, $numInSet)
{
@@ -2605,37 +1322,20 @@ class Statistical
* is predicting the number of events over a specific time, such as the number of
* cars arriving at a toll plaza in 1 minute.
*
- * @param float $value
- * @param float $mean Mean Value
- * @param bool $cumulative
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Poisson::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Poisson class instead
+ *
+ * @param mixed $value
+ * @param mixed $mean Mean Value
+ * @param mixed $cumulative
*
* @return float|string The result, or a string containing an error
*/
public static function POISSON($value, $mean, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $mean = Functions::flattenSingleValue($mean);
-
- if ((is_numeric($value)) && (is_numeric($mean))) {
- if (($value < 0) || ($mean <= 0)) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- $summer = 0;
- $floor = floor($value);
- for ($i = 0; $i <= $floor; ++$i) {
- $summer += $mean ** $i / MathTrig::FACT($i);
- }
-
- return exp(0 - $mean) * $summer;
- }
-
- return (exp(0 - $mean) * $mean ** $value) / MathTrig::FACT($value);
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Poisson::distribution($value, $mean, $cumulative);
}
/**
@@ -2646,27 +1346,18 @@ class Statistical
* Excel Function:
* QUARTILE(value1[,value2[, ...]],entry)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Percentiles::QUARTILE()
+ * Use the QUARTILE() method in the Statistical\Percentiles class instead
+ *
* @param mixed $args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function QUARTILE(...$args)
{
- $aArgs = Functions::flattenArray($args);
- $entry = array_pop($aArgs);
-
- // Calculate
- if ((is_numeric($entry)) && (!is_string($entry))) {
- $entry = floor($entry);
- $entry /= 4;
- if (($entry < 0) || ($entry > 1)) {
- return Functions::NAN();
- }
-
- return self::PERCENTILE($aArgs, $entry);
- }
-
- return Functions::VALUE();
+ return Statistical\Percentiles::QUARTILE(...$args);
}
/**
@@ -2674,36 +1365,20 @@ class Statistical
*
* Returns the rank of a number in a list of numbers.
*
- * @param int $value the number whose rank you want to find
- * @param float[] $valueSet An array of, or a reference to, a list of numbers
- * @param int $order Order to sort the values in the value set
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Percentiles::RANK()
+ * Use the RANK() method in the Statistical\Percentiles class instead
+ *
+ * @param mixed $value the number whose rank you want to find
+ * @param mixed $valueSet An array of, or a reference to, a list of numbers
+ * @param mixed $order Order to sort the values in the value set
*
* @return float|string The result, or a string containing an error
*/
public static function RANK($value, $valueSet, $order = 0)
{
- $value = Functions::flattenSingleValue($value);
- $valueSet = Functions::flattenArray($valueSet);
- $order = ($order === null) ? 0 : (int) Functions::flattenSingleValue($order);
-
- foreach ($valueSet as $key => $valueEntry) {
- if (!is_numeric($valueEntry)) {
- unset($valueSet[$key]);
- }
- }
-
- if ($order == 0) {
- sort($valueSet, SORT_NUMERIC);
- } else {
- rsort($valueSet, SORT_NUMERIC);
- }
-
- $pos = array_search($value, $valueSet);
- if ($pos === false) {
- return Functions::NA();
- }
-
- return ++$pos;
+ return Statistical\Percentiles::RANK($value, $valueSet, $order);
}
/**
@@ -2711,6 +1386,11 @@ class Statistical
*
* Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::RSQ()
+ * Use the RSQ() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param mixed[] $xValues Data Series X
*
@@ -2718,21 +1398,7 @@ class Statistical
*/
public static function RSQ($yValues, $xValues)
{
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getGoodnessOfFit();
+ return Trends::RSQ($yValues, $xValues);
}
/**
@@ -2743,40 +1409,18 @@ class Statistical
* asymmetric tail extending toward more positive values. Negative skewness indicates a
* distribution with an asymmetric tail extending toward more negative values.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Deviations::skew()
+ * Use the skew() method in the Statistical\Deviations class instead
+ *
* @param array ...$args Data Series
*
* @return float|string The result, or a string containing an error
*/
public static function SKEW(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
- $mean = Averages::AVERAGE($aArgs);
- $stdDev = StandardDeviations::STDEV($aArgs);
-
- if ($stdDev === 0.0 || is_string($stdDev)) {
- return Functions::DIV0();
- }
-
- $count = $summer = 0;
- // Loop through arguments
- foreach ($aArgs as $k => $arg) {
- if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
- } elseif (!is_numeric($arg)) {
- return Functions::VALUE();
- } else {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $summer += (($arg - $mean) / $stdDev) ** 3;
- ++$count;
- }
- }
- }
-
- if ($count > 2) {
- return $summer * ($count / (($count - 1) * ($count - 2)));
- }
-
- return Functions::DIV0();
+ return Statistical\Deviations::skew(...$args);
}
/**
@@ -2784,6 +1428,11 @@ class Statistical
*
* Returns the slope of the linear regression line through data points in known_y's and known_x's.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::SLOPE()
+ * Use the SLOPE() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param mixed[] $xValues Data Series X
*
@@ -2791,21 +1440,7 @@ class Statistical
*/
public static function SLOPE($yValues, $xValues)
{
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getSlope();
+ return Trends::SLOPE($yValues, $xValues);
}
/**
@@ -2817,38 +1452,18 @@ class Statistical
* Excel Function:
* SMALL(value1[,value2[, ...]],entry)
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Size::small()
+ * Use the small() method in the Statistical\Size class instead
+ *
* @param mixed $args Data values
*
* @return float|string The result, or a string containing an error
*/
public static function SMALL(...$args)
{
- $aArgs = Functions::flattenArray($args);
-
- // Calculate
- $entry = array_pop($aArgs);
-
- if ((is_numeric($entry)) && (!is_string($entry))) {
- $entry = (int) floor($entry);
-
- $mArgs = [];
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
- $count = Counts::COUNT($mArgs);
- --$entry;
- if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
- return Functions::NAN();
- }
- sort($mArgs);
-
- return $mArgs[$entry];
- }
-
- return Functions::VALUE();
+ return Statistical\Size::small(...$args);
}
/**
@@ -2856,6 +1471,11 @@ class Statistical
*
* Returns a normalized value from a distribution characterized by mean and standard_dev.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Standardize::execute()
+ * Use the execute() method in the Statistical\Standardize class instead
+ *
* @param float $value Value to normalize
* @param float $mean Mean Value
* @param float $stdDev Standard Deviation
@@ -2864,19 +1484,7 @@ class Statistical
*/
public static function STANDARDIZE($value, $mean, $stdDev)
{
- $value = Functions::flattenSingleValue($value);
- $mean = Functions::flattenSingleValue($mean);
- $stdDev = Functions::flattenSingleValue($stdDev);
-
- if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) {
- if ($stdDev <= 0) {
- return Functions::NAN();
- }
-
- return ($value - $mean) / $stdDev;
- }
-
- return Functions::VALUE();
+ return Statistical\Standardize::execute($value, $mean, $stdDev);
}
/**
@@ -2971,6 +1579,11 @@ class Statistical
/**
* STEYX.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::STEYX()
+ * Use the STEYX() method in the Statistical\Trends class instead
+ *
* Returns the standard error of the predicted y-value for each x in the regression.
*
* @param mixed[] $yValues Data Series Y
@@ -2980,21 +1593,7 @@ class Statistical
*/
public static function STEYX($yValues, $xValues)
{
- if (!self::checkTrendArrays($yValues, $xValues)) {
- return Functions::VALUE();
- }
- $yValueCount = count($yValues);
- $xValueCount = count($xValues);
-
- if (($yValueCount == 0) || ($yValueCount != $xValueCount)) {
- return Functions::NA();
- } elseif ($yValueCount == 1) {
- return Functions::DIV0();
- }
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
-
- return $bestFitLinear->getStdevOfResiduals();
+ return Trends::STEYX($yValues, $xValues);
}
/**
@@ -3002,6 +1601,11 @@ class Statistical
*
* Returns the probability of Student's T distribution.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StudentT::distribution()
+ * Use the distribution() method in the Statistical\Distributions\StudentT class instead
+ *
* @param float $value Value for the function
* @param float $degrees degrees of freedom
* @param float $tails number of tails (1 or 2)
@@ -3010,61 +1614,18 @@ class Statistical
*/
public static function TDIST($value, $degrees, $tails)
{
- $value = Functions::flattenSingleValue($value);
- $degrees = floor(Functions::flattenSingleValue($degrees));
- $tails = floor(Functions::flattenSingleValue($tails));
-
- if ((is_numeric($value)) && (is_numeric($degrees)) && (is_numeric($tails))) {
- if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) {
- return Functions::NAN();
- }
- // tdist, which finds the probability that corresponds to a given value
- // of t with k degrees of freedom. This algorithm is translated from a
- // pascal function on p81 of "Statistical Computing in Pascal" by D
- // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd:
- // London). The above Pascal algorithm is itself a translation of the
- // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer
- // Laboratory as reported in (among other places) "Applied Statistics
- // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis
- // Horwood Ltd.; W. Sussex, England).
- $tterm = $degrees;
- $ttheta = atan2($value, sqrt($tterm));
- $tc = cos($ttheta);
- $ts = sin($ttheta);
-
- if (($degrees % 2) == 1) {
- $ti = 3;
- $tterm = $tc;
- } else {
- $ti = 2;
- $tterm = 1;
- }
-
- $tsum = $tterm;
- while ($ti < $degrees) {
- $tterm *= $tc * $tc * ($ti - 1) / $ti;
- $tsum += $tterm;
- $ti += 2;
- }
- $tsum *= $ts;
- if (($degrees % 2) == 1) {
- $tsum = Functions::M_2DIVPI * ($tsum + $ttheta);
- }
- $tValue = 0.5 * (1 + $tsum);
- if ($tails == 1) {
- return 1 - abs($tValue);
- }
-
- return 1 - abs((1 - $tValue) - $tValue);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\StudentT::distribution($value, $degrees, $tails);
}
/**
* TINV.
*
- * Returns the one-tailed probability of the chi-squared distribution.
+ * Returns the one-tailed probability of the Student-T distribution.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StudentT::inverse()
+ * Use the inverse() method in the Statistical\Distributions\StudentT class instead
*
* @param float $probability Probability for the function
* @param float $degrees degrees of freedom
@@ -3073,50 +1634,7 @@ class Statistical
*/
public static function TINV($probability, $degrees)
{
- $probability = Functions::flattenSingleValue($probability);
- $degrees = floor(Functions::flattenSingleValue($degrees));
-
- if ((is_numeric($probability)) && (is_numeric($degrees))) {
- $xLo = 100;
- $xHi = 0;
-
- $x = $xNew = 1;
- $dx = 1;
- $i = 0;
-
- while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
- // Apply Newton-Raphson step
- $result = self::TDIST($x, $degrees, 2);
- $error = $result - $probability;
- if ($error == 0.0) {
- $dx = 0;
- } elseif ($error < 0.0) {
- $xLo = $x;
- } else {
- $xHi = $x;
- }
- // Avoid division by zero
- if ($result != 0.0) {
- $dx = $error / $result;
- $xNew = $x - $dx;
- }
- // If the NR fails to converge (which for example may be the
- // case if the initial guess is too rough) we apply a bisection
- // step to determine a more narrow interval around the root.
- if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {
- $xNew = ($xLo + $xHi) / 2;
- $dx = $xNew - $x;
- }
- $x = $xNew;
- }
- if ($i == self::MAX_ITERATIONS) {
- return Functions::NA();
- }
-
- return round($x, 12);
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\StudentT::inverse($probability, $degrees);
}
/**
@@ -3124,31 +1642,21 @@ class Statistical
*
* Returns values along a linear Trend
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Trends::TREND()
+ * Use the TREND() method in the Statistical\Trends class instead
+ *
* @param mixed[] $yValues Data Series Y
* @param mixed[] $xValues Data Series X
* @param mixed[] $newValues Values of X for which we want to find Y
* @param bool $const a logical value specifying whether to force the intersect to equal 0
*
- * @return array of float
+ * @return float[]
*/
public static function TREND($yValues, $xValues = [], $newValues = [], $const = true)
{
- $yValues = Functions::flattenArray($yValues);
- $xValues = Functions::flattenArray($xValues);
- $newValues = Functions::flattenArray($newValues);
- $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
-
- $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
- if (empty($newValues)) {
- $newValues = $bestFitLinear->getXValues();
- }
-
- $returnArray = [];
- foreach ($newValues as $xValue) {
- $returnArray[0][] = $bestFitLinear->getValueOfYForX($xValue);
- }
-
- return $returnArray;
+ return Trends::TREND($yValues, $xValues, $newValues, $const);
}
/**
@@ -3161,42 +1669,18 @@ class Statistical
* Excel Function:
* TRIMEAN(value1[,value2[, ...]], $discard)
*
+ * @Deprecated 1.18.0
+ *
+ *@see Statistical\Averages\Mean::trim()
+ * Use the trim() method in the Statistical\Averages\Mean class instead
+ *
* @param mixed $args Data values
*
* @return float|string
*/
public static function TRIMMEAN(...$args)
{
- $aArgs = Functions::flattenArray($args);
-
- // Calculate
- $percent = array_pop($aArgs);
-
- if ((is_numeric($percent)) && (!is_string($percent))) {
- if (($percent < 0) || ($percent > 1)) {
- return Functions::NAN();
- }
-
- $mArgs = [];
- foreach ($aArgs as $arg) {
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $mArgs[] = $arg;
- }
- }
-
- $discard = floor(Counts::COUNT($mArgs) * $percent / 2);
- sort($mArgs);
-
- for ($i = 0; $i < $discard; ++$i) {
- array_pop($mArgs);
- array_shift($mArgs);
- }
-
- return Averages::AVERAGE($mArgs);
- }
-
- return Functions::VALUE();
+ return Statistical\Averages\Mean::trim(...$args);
}
/**
@@ -3209,12 +1693,12 @@ class Statistical
*
* @Deprecated 1.17.0
*
+ *@see Statistical\Variances::VAR()
+ * Use the VAR() method in the Statistical\Variances class instead
+ *
* @param mixed ...$args Data values
*
* @return float|string (string if result is an error)
- *
- *@see Statistical\Variances::VAR()
- * Use the VAR() method in the Statistical\Variances class instead
*/
public static function VARFunc(...$args)
{
@@ -3293,6 +1777,11 @@ class Statistical
* Returns the Weibull distribution. Use this distribution in reliability
* analysis, such as calculating a device's mean time to failure.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\Weibull::distribution()
+ * Use the distribution() method in the Statistical\Distributions\Weibull class instead
+ *
* @param float $value
* @param float $alpha Alpha Parameter
* @param float $beta Beta Parameter
@@ -3302,31 +1791,21 @@ class Statistical
*/
public static function WEIBULL($value, $alpha, $beta, $cumulative)
{
- $value = Functions::flattenSingleValue($value);
- $alpha = Functions::flattenSingleValue($alpha);
- $beta = Functions::flattenSingleValue($beta);
-
- if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta))) {
- if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) {
- return Functions::NAN();
- }
- if ((is_numeric($cumulative)) || (is_bool($cumulative))) {
- if ($cumulative) {
- return 1 - exp(0 - ($value / $beta) ** $alpha);
- }
-
- return ($alpha / $beta ** $alpha) * $value ** ($alpha - 1) * exp(0 - ($value / $beta) ** $alpha);
- }
- }
-
- return Functions::VALUE();
+ return Statistical\Distributions\Weibull::distribution($value, $alpha, $beta, $cumulative);
}
/**
* ZTEST.
*
- * Returns the Weibull distribution. Use this distribution in reliability
- * analysis, such as calculating a device's mean time to failure.
+ * Returns the one-tailed P-value of a z-test.
+ *
+ * For a given hypothesized population mean, x, Z.TEST returns the probability that the sample mean would be
+ * greater than the average of observations in the data set (array) — that is, the observed sample mean.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Statistical\Distributions\StandardNormal::zTest()
+ * Use the zTest() method in the Statistical\Distributions\StandardNormal class instead
*
* @param float $dataSet
* @param float $m0 Alpha Parameter
@@ -3336,15 +1815,6 @@ class Statistical
*/
public static function ZTEST($dataSet, $m0, $sigma = null)
{
- $dataSet = Functions::flattenArrayIndexed($dataSet);
- $m0 = Functions::flattenSingleValue($m0);
- $sigma = Functions::flattenSingleValue($sigma);
-
- if ($sigma === null) {
- $sigma = StandardDeviations::STDEV($dataSet);
- }
- $n = count($dataSet);
-
- return 1 - self::NORMSDIST((Averages::AVERAGE($dataSet) - $m0) / ($sigma / sqrt($n)));
+ return Statistical\Distributions\StandardNormal::zTest($dataSet, $m0, $sigma);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages.php
index 14c9fef2..1a627e99 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages.php
@@ -19,14 +19,14 @@ class Averages extends AggregateBase
*
* @return float|string (string if result is an error)
*/
- public static function AVEDEV(...$args)
+ public static function averageDeviations(...$args)
{
$aArgs = Functions::flattenArrayIndexed($args);
// Return value
$returnValue = 0;
- $aMean = self::AVERAGE(...$args);
+ $aMean = self::average(...$args);
if ($aMean === Functions::DIV0()) {
return Functions::NAN();
} elseif ($aMean === Functions::VALUE()) {
@@ -68,7 +68,7 @@ class Averages extends AggregateBase
*
* @return float|string (string if result is an error)
*/
- public static function AVERAGE(...$args)
+ public static function average(...$args)
{
$returnValue = $aCount = 0;
@@ -107,7 +107,7 @@ class Averages extends AggregateBase
*
* @return float|string (string if result is an error)
*/
- public static function AVERAGEA(...$args)
+ public static function averageA(...$args)
{
$returnValue = null;
@@ -134,4 +134,126 @@ class Averages extends AggregateBase
return Functions::DIV0();
}
+
+ /**
+ * MEDIAN.
+ *
+ * Returns the median of the given numbers. The median is the number in the middle of a set of numbers.
+ *
+ * Excel Function:
+ * MEDIAN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function median(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ $returnValue = Functions::NAN();
+
+ $aArgs = self::filterArguments($aArgs);
+ $valueCount = count($aArgs);
+ if ($valueCount > 0) {
+ sort($aArgs, SORT_NUMERIC);
+ $valueCount = $valueCount / 2;
+ if ($valueCount == floor($valueCount)) {
+ $returnValue = ($aArgs[$valueCount--] + $aArgs[$valueCount]) / 2;
+ } else {
+ $valueCount = floor($valueCount);
+ $returnValue = $aArgs[$valueCount];
+ }
+ }
+
+ return $returnValue;
+ }
+
+ /**
+ * MODE.
+ *
+ * Returns the most frequently occurring, or repetitive, value in an array or range of data
+ *
+ * Excel Function:
+ * MODE(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function mode(...$args)
+ {
+ $returnValue = Functions::NA();
+
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ $aArgs = self::filterArguments($aArgs);
+
+ if (!empty($aArgs)) {
+ return self::modeCalc($aArgs);
+ }
+
+ return $returnValue;
+ }
+
+ protected static function filterArguments($args)
+ {
+ return array_filter(
+ $args,
+ function ($value) {
+ // Is it a numeric value?
+ return (is_numeric($value)) && (!is_string($value));
+ }
+ );
+ }
+
+ //
+ // Special variant of array_count_values that isn't limited to strings and integers,
+ // but can work with floating point numbers as values
+ //
+ private static function modeCalc($data)
+ {
+ $frequencyArray = [];
+ $index = 0;
+ $maxfreq = 0;
+ $maxfreqkey = '';
+ $maxfreqdatum = '';
+ foreach ($data as $datum) {
+ $found = false;
+ ++$index;
+ foreach ($frequencyArray as $key => $value) {
+ if ((string) $value['value'] == (string) $datum) {
+ ++$frequencyArray[$key]['frequency'];
+ $freq = $frequencyArray[$key]['frequency'];
+ if ($freq > $maxfreq) {
+ $maxfreq = $freq;
+ $maxfreqkey = $key;
+ $maxfreqdatum = $datum;
+ } elseif ($freq == $maxfreq) {
+ if ($frequencyArray[$key]['index'] < $frequencyArray[$maxfreqkey]['index']) {
+ $maxfreqkey = $key;
+ $maxfreqdatum = $datum;
+ }
+ }
+ $found = true;
+
+ break;
+ }
+ }
+
+ if ($found === false) {
+ $frequencyArray[] = [
+ 'value' => $datum,
+ 'frequency' => 1,
+ 'index' => $index,
+ ];
+ }
+ }
+
+ if ($maxfreq <= 1) {
+ return Functions::NA();
+ }
+
+ return $maxfreqdatum;
+ }
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php
new file mode 100644
index 00000000..d4d0c7ee
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Averages/Mean.php
@@ -0,0 +1,131 @@
+ 0)) {
+ $aCount = Counts::COUNT($aArgs);
+ if (Minimum::min($aArgs) > 0) {
+ return $aMean ** (1 / $aCount);
+ }
+ }
+
+ return Functions::NAN();
+ }
+
+ /**
+ * HARMEAN.
+ *
+ * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the
+ * arithmetic mean of reciprocals.
+ *
+ * Excel Function:
+ * HARMEAN(value1[,value2[, ...]])
+ *
+ * @param mixed ...$args Data values
+ *
+ * @return float|string
+ */
+ public static function harmonic(...$args)
+ {
+ // Loop through arguments
+ $aArgs = Functions::flattenArray($args);
+ if (Minimum::min($aArgs) < 0) {
+ return Functions::NAN();
+ }
+
+ $returnValue = 0;
+ $aCount = 0;
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ if ($arg <= 0) {
+ return Functions::NAN();
+ }
+ $returnValue += (1 / $arg);
+ ++$aCount;
+ }
+ }
+
+ // Return
+ if ($aCount > 0) {
+ return 1 / ($returnValue / $aCount);
+ }
+
+ return Functions::NA();
+ }
+
+ /**
+ * TRIMMEAN.
+ *
+ * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean
+ * taken by excluding a percentage of data points from the top and bottom tails
+ * of a data set.
+ *
+ * Excel Function:
+ * TRIMEAN(value1[,value2[, ...]], $discard)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string
+ */
+ public static function trim(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ // Calculate
+ $percent = array_pop($aArgs);
+
+ if ((is_numeric($percent)) && (!is_string($percent))) {
+ if (($percent < 0) || ($percent > 1)) {
+ return Functions::NAN();
+ }
+
+ $mArgs = [];
+ foreach ($aArgs as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+
+ $discard = floor(Counts::COUNT($mArgs) * $percent / 2);
+ sort($mArgs);
+
+ for ($i = 0; $i < $discard; ++$i) {
+ array_pop($mArgs);
+ array_shift($mArgs);
+ }
+
+ return Averages::average($mArgs);
+ }
+
+ return Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Conditional.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
index 7ed1e714..51e6b004 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Conditional.php
@@ -178,7 +178,7 @@ class Conditional
* @param mixed $sumRange
* @param mixed $condition
*
- * @return float
+ * @return float|string
*/
public static function SUMIF($range, $condition, $sumRange = [])
{
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Confidence.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Confidence.php
new file mode 100644
index 00000000..c59c3a9e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Confidence.php
@@ -0,0 +1,41 @@
+getMessage();
+ }
+
+ if (($alpha <= 0) || ($alpha >= 1) || ($stdDev <= 0) || ($size < 1)) {
+ return Functions::NAN();
+ }
+
+ return Distributions\StandardNormal::inverse(1 - $alpha / 2) * $stdDev / sqrt($size);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Deviations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Deviations.php
new file mode 100644
index 00000000..1b64fe2c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Deviations.php
@@ -0,0 +1,141 @@
+ $arg) {
+ // Is it a numeric value?
+ if (
+ (is_bool($arg)) &&
+ ((!Functions::isCellValue($k)) ||
+ (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
+ ) {
+ $arg = (int) $arg;
+ }
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $returnValue += ($arg - $aMean) ** 2;
+ ++$aCount;
+ }
+ }
+
+ return $aCount === 0 ? Functions::VALUE() : $returnValue;
+ }
+
+ /**
+ * KURT.
+ *
+ * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness
+ * or flatness of a distribution compared with the normal distribution. Positive
+ * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a
+ * relatively flat distribution.
+ *
+ * @param array ...$args Data Series
+ *
+ * @return float|string
+ */
+ public static function kurtosis(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $mean = Averages::average($aArgs);
+ if (!is_numeric($mean)) {
+ return Functions::DIV0();
+ }
+ $stdDev = StandardDeviations::STDEV($aArgs);
+
+ if ($stdDev > 0) {
+ $count = $summer = 0;
+
+ foreach ($aArgs as $k => $arg) {
+ if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summer += (($arg - $mean) / $stdDev) ** 4;
+ ++$count;
+ }
+ }
+ }
+
+ if ($count > 3) {
+ return $summer * ($count * ($count + 1) /
+ (($count - 1) * ($count - 2) * ($count - 3))) - (3 * ($count - 1) ** 2 /
+ (($count - 2) * ($count - 3)));
+ }
+ }
+
+ return Functions::DIV0();
+ }
+
+ /**
+ * SKEW.
+ *
+ * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry
+ * of a distribution around its mean. Positive skewness indicates a distribution with an
+ * asymmetric tail extending toward more positive values. Negative skewness indicates a
+ * distribution with an asymmetric tail extending toward more negative values.
+ *
+ * @param array ...$args Data Series
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function skew(...$args)
+ {
+ $aArgs = Functions::flattenArrayIndexed($args);
+ $mean = Averages::average($aArgs);
+ if (!is_numeric($mean)) {
+ return Functions::DIV0();
+ }
+ $stdDev = StandardDeviations::STDEV($aArgs);
+ if ($stdDev === 0.0 || is_string($stdDev)) {
+ return Functions::DIV0();
+ }
+
+ $count = $summer = 0;
+ // Loop through arguments
+ foreach ($aArgs as $k => $arg) {
+ if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
+ } elseif (!is_numeric($arg)) {
+ return Functions::VALUE();
+ } else {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $summer += (($arg - $mean) / $stdDev) ** 3;
+ ++$count;
+ }
+ }
+ }
+
+ if ($count > 2) {
+ return $summer * ($count / (($count - 1) * ($count - 2)));
+ }
+
+ return Functions::DIV0();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
new file mode 100644
index 00000000..63e6eb4d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Beta.php
@@ -0,0 +1,260 @@
+getMessage();
+ }
+
+ if ($rMin > $rMax) {
+ $tmp = $rMin;
+ $rMin = $rMax;
+ $rMax = $tmp;
+ }
+ if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) {
+ return Functions::NAN();
+ }
+
+ $value -= $rMin;
+ $value /= ($rMax - $rMin);
+
+ return self::incompleteBeta($value, $alpha, $beta);
+ }
+
+ /**
+ * BETAINV.
+ *
+ * Returns the inverse of the Beta distribution.
+ *
+ * @param mixed $probability Float probability at which you want to evaluate the distribution
+ * @param mixed $alpha Parameter to the distribution as a float
+ * @param mixed $beta Parameter to the distribution as a float
+ * @param mixed $rMin Minimum value as a float
+ * @param mixed $rMax Maximum value as a float
+ *
+ * @return float|string
+ */
+ public static function inverse($probability, $alpha, $beta, $rMin = 0.0, $rMax = 1.0)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+ $rMin = ($rMin === null) ? 0.0 : Functions::flattenSingleValue($rMin);
+ $rMax = ($rMax === null) ? 1.0 : Functions::flattenSingleValue($rMax);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $alpha = DistributionValidations::validateFloat($alpha);
+ $beta = DistributionValidations::validateFloat($beta);
+ $rMax = DistributionValidations::validateFloat($rMax);
+ $rMin = DistributionValidations::validateFloat($rMin);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($rMin > $rMax) {
+ $tmp = $rMin;
+ $rMin = $rMax;
+ $rMax = $tmp;
+ }
+ if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0.0)) {
+ return Functions::NAN();
+ }
+
+ return self::calculateInverse($probability, $alpha, $beta, $rMin, $rMax);
+ }
+
+ /**
+ * @return float|string
+ */
+ private static function calculateInverse(float $probability, float $alpha, float $beta, float $rMin, float $rMax)
+ {
+ $a = 0;
+ $b = 2;
+
+ $i = 0;
+ while ((($b - $a) > Functions::PRECISION) && (++$i <= self::MAX_ITERATIONS)) {
+ $guess = ($a + $b) / 2;
+ $result = self::distribution($guess, $alpha, $beta);
+ if (($result === $probability) || ($result === 0.0)) {
+ $b = $a;
+ } elseif ($result > $probability) {
+ $b = $guess;
+ } else {
+ $a = $guess;
+ }
+ }
+
+ if ($i === self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return round($rMin + $guess * ($rMax - $rMin), 12);
+ }
+
+ /**
+ * Incomplete beta function.
+ *
+ * @author Jaco van Kooten
+ * @author Paul Meagher
+ *
+ * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992).
+ *
+ * @param float $x require 0<=x<=1
+ * @param float $p require p>0
+ * @param float $q require q>0
+ *
+ * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow
+ */
+ public static function incompleteBeta(float $x, float $p, float $q): float
+ {
+ if ($x <= 0.0) {
+ return 0.0;
+ } elseif ($x >= 1.0) {
+ return 1.0;
+ } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
+ return 0.0;
+ }
+
+ $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x));
+ if ($x < ($p + 1.0) / ($p + $q + 2.0)) {
+ return $beta_gam * self::betaFraction($x, $p, $q) / $p;
+ }
+
+ return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q);
+ }
+
+ // Function cache for logBeta function
+ private static $logBetaCacheP = 0.0;
+
+ private static $logBetaCacheQ = 0.0;
+
+ private static $logBetaCacheResult = 0.0;
+
+ /**
+ * The natural logarithm of the beta function.
+ *
+ * @param float $p require p>0
+ * @param float $q require q>0
+ *
+ * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
+ *
+ * @author Jaco van Kooten
+ */
+ private static function logBeta(float $p, float $q): float
+ {
+ if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) {
+ self::$logBetaCacheP = $p;
+ self::$logBetaCacheQ = $q;
+ if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > self::LOG_GAMMA_X_MAX_VALUE)) {
+ self::$logBetaCacheResult = 0.0;
+ } else {
+ self::$logBetaCacheResult = Gamma::logGamma($p) + Gamma::logGamma($q) - Gamma::logGamma($p + $q);
+ }
+ }
+
+ return self::$logBetaCacheResult;
+ }
+
+ /**
+ * Evaluates of continued fraction part of incomplete beta function.
+ * Based on an idea from Numerical Recipes (W.H. Press et al, 1992).
+ *
+ * @author Jaco van Kooten
+ */
+ private static function betaFraction(float $x, float $p, float $q): float
+ {
+ $c = 1.0;
+ $sum_pq = $p + $q;
+ $p_plus = $p + 1.0;
+ $p_minus = $p - 1.0;
+ $h = 1.0 - $sum_pq * $x / $p_plus;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $frac = $h;
+ $m = 1;
+ $delta = 0.0;
+ while ($m <= self::MAX_ITERATIONS && abs($delta - 1.0) > Functions::PRECISION) {
+ $m2 = 2 * $m;
+ // even index for d
+ $d = $m * ($q - $m) * $x / (($p_minus + $m2) * ($p + $m2));
+ $h = 1.0 + $d * $h;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $c = 1.0 + $d / $c;
+ if (abs($c) < self::XMININ) {
+ $c = self::XMININ;
+ }
+ $frac *= $h * $c;
+ // odd index for d
+ $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2));
+ $h = 1.0 + $d * $h;
+ if (abs($h) < self::XMININ) {
+ $h = self::XMININ;
+ }
+ $h = 1.0 / $h;
+ $c = 1.0 + $d / $c;
+ if (abs($c) < self::XMININ) {
+ $c = self::XMININ;
+ }
+ $delta = $h * $c;
+ $frac *= $delta;
+ ++$m;
+ }
+
+ return $frac;
+ }
+
+ private static function betaValue(float $a, float $b): float
+ {
+ return (Gamma::gammaValue($a) * Gamma::gammaValue($b)) /
+ Gamma::gammaValue($a + $b);
+ }
+
+ private static function regularizedIncompleteBeta(float $value, float $a, float $b): float
+ {
+ return self::incompleteBeta($value, $a, $b) / self::betaValue($a, $b);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php
new file mode 100644
index 00000000..9631236a
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php
@@ -0,0 +1,202 @@
+getMessage();
+ }
+
+ if (($value < 0) || ($value > $trials)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative) {
+ return self::calculateCumulativeBinomial($value, $trials, $probability);
+ }
+
+ return Combinations::withoutRepetition($trials, $value) * $probability ** $value
+ * (1 - $probability) ** ($trials - $value);
+ }
+
+ /**
+ * BINOM.DIST.RANGE.
+ *
+ * Returns returns the Binomial Distribution probability for the number of successes from a specified number
+ * of trials falling into a specified range.
+ *
+ * @param mixed $trials Integer number of trials
+ * @param mixed $probability Probability of success on each trial as a float
+ * @param mixed $successes The integer number of successes in trials
+ * @param mixed $limit Upper limit for successes in trials as null, or an integer
+ * If null, then this will indicate the same as the number of Successes
+ *
+ * @return float|string
+ */
+ public static function range($trials, $probability, $successes, $limit = null)
+ {
+ $trials = Functions::flattenSingleValue($trials);
+ $probability = Functions::flattenSingleValue($probability);
+ $successes = Functions::flattenSingleValue($successes);
+ $limit = ($limit === null) ? $successes : Functions::flattenSingleValue($limit);
+
+ try {
+ $trials = DistributionValidations::validateInt($trials);
+ $probability = DistributionValidations::validateProbability($probability);
+ $successes = DistributionValidations::validateInt($successes);
+ $limit = DistributionValidations::validateInt($limit);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($successes < 0) || ($successes > $trials)) {
+ return Functions::NAN();
+ }
+ if (($limit < 0) || ($limit > $trials) || $limit < $successes) {
+ return Functions::NAN();
+ }
+
+ $summer = 0;
+ for ($i = $successes; $i <= $limit; ++$i) {
+ $summer += Combinations::withoutRepetition($trials, $i) * $probability ** $i
+ * (1 - $probability) ** ($trials - $i);
+ }
+
+ return $summer;
+ }
+
+ /**
+ * NEGBINOMDIST.
+ *
+ * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that
+ * there will be number_f failures before the number_s-th success, when the constant
+ * probability of a success is probability_s. This function is similar to the binomial
+ * distribution, except that the number of successes is fixed, and the number of trials is
+ * variable. Like the binomial, trials are assumed to be independent.
+ *
+ * @param mixed $failures Number of Failures as an integer
+ * @param mixed $successes Threshold number of Successes as an integer
+ * @param mixed $probability Probability of success on each trial as a float
+ *
+ * @return float|string The result, or a string containing an error
+ *
+ * TODO Add support for the cumulative flag not present for NEGBINOMDIST, but introduced for NEGBINOM.DIST
+ * The cumulative default should be false to reflect the behaviour of NEGBINOMDIST
+ */
+ public static function negative($failures, $successes, $probability)
+ {
+ $failures = Functions::flattenSingleValue($failures);
+ $successes = Functions::flattenSingleValue($successes);
+ $probability = Functions::flattenSingleValue($probability);
+
+ try {
+ $failures = DistributionValidations::validateInt($failures);
+ $successes = DistributionValidations::validateInt($successes);
+ $probability = DistributionValidations::validateProbability($probability);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($failures < 0) || ($successes < 1)) {
+ return Functions::NAN();
+ }
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ if (($failures + $successes - 1) <= 0) {
+ return Functions::NAN();
+ }
+ }
+
+ return (Combinations::withoutRepetition($failures + $successes - 1, $successes - 1))
+ * ($probability ** $successes) * ((1 - $probability) ** $failures);
+ }
+
+ /**
+ * CRITBINOM.
+ *
+ * Returns the smallest value for which the cumulative binomial distribution is greater
+ * than or equal to a criterion value
+ *
+ * @param mixed $trials number of Bernoulli trials as an integer
+ * @param mixed $probability probability of a success on each trial as a float
+ * @param mixed $alpha criterion value as a float
+ *
+ * @return int|string
+ */
+ public static function inverse($trials, $probability, $alpha)
+ {
+ $trials = Functions::flattenSingleValue($trials);
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+
+ try {
+ $trials = DistributionValidations::validateInt($trials);
+ $probability = DistributionValidations::validateProbability($probability);
+ $alpha = DistributionValidations::validateFloat($alpha);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($trials < 0) {
+ return Functions::NAN();
+ } elseif (($alpha < 0.0) || ($alpha > 1.0)) {
+ return Functions::NAN();
+ }
+
+ $successes = 0;
+ while ($successes <= $trials) {
+ $result = self::calculateCumulativeBinomial($successes, $trials, $probability);
+ if ($result >= $alpha) {
+ break;
+ }
+ ++$successes;
+ }
+
+ return $successes;
+ }
+
+ /**
+ * @return float|int
+ */
+ private static function calculateCumulativeBinomial(int $value, int $trials, float $probability)
+ {
+ $summer = 0;
+ for ($i = 0; $i <= $value; ++$i) {
+ $summer += Combinations::withoutRepetition($trials, $i) * $probability ** $i
+ * (1 - $probability) ** ($trials - $i);
+ }
+
+ return $summer;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
new file mode 100644
index 00000000..5165d639
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/ChiSquared.php
@@ -0,0 +1,311 @@
+getMessage();
+ }
+
+ if ($degrees < 1) {
+ return Functions::NAN();
+ }
+ if ($value < 0) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ return 1;
+ }
+
+ return Functions::NAN();
+ }
+
+ return 1 - (Gamma::incompleteGamma($degrees / 2, $value / 2) / Gamma::gammaValue($degrees / 2));
+ }
+
+ /**
+ * CHIDIST.
+ *
+ * Returns the one-tailed probability of the chi-squared distribution.
+ *
+ * @param mixed $value Float value for which we want the probability
+ * @param mixed $degrees Integer degrees of freedom
+ * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)
+ *
+ * @return float|string
+ */
+ public static function distributionLeftTail($value, $degrees, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $degrees = Functions::flattenSingleValue($degrees);
+ $cumulative = Functions::flattenSingleValue($cumulative);
+
+ try {
+ $value = DistributionValidations::validateFloat($value);
+ $degrees = DistributionValidations::validateInt($degrees);
+ $cumulative = DistributionValidations::validateBool($cumulative);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($degrees < 1) {
+ return Functions::NAN();
+ }
+ if ($value < 0) {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_GNUMERIC) {
+ return 1;
+ }
+
+ return Functions::NAN();
+ }
+
+ if ($cumulative === true) {
+ return 1 - self::distributionRightTail($value, $degrees);
+ }
+
+ return (($value ** (($degrees / 2) - 1) * exp(-$value / 2))) /
+ ((2 ** ($degrees / 2)) * Gamma::gammaValue($degrees / 2));
+ }
+
+ /**
+ * CHIINV.
+ *
+ * Returns the inverse of the right-tailed probability of the chi-squared distribution.
+ *
+ * @param mixed $probability Float probability at which you want to evaluate the distribution
+ * @param mixed $degrees Integer degrees of freedom
+ *
+ * @return float|string
+ */
+ public static function inverseRightTail($probability, $degrees)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $degrees = Functions::flattenSingleValue($degrees);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $degrees = DistributionValidations::validateInt($degrees);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($degrees < 1) {
+ return Functions::NAN();
+ }
+
+ $callback = function ($value) use ($degrees) {
+ return 1 - (Gamma::incompleteGamma($degrees / 2, $value / 2)
+ / Gamma::gammaValue($degrees / 2));
+ };
+
+ $newtonRaphson = new NewtonRaphson($callback);
+
+ return $newtonRaphson->execute($probability);
+ }
+
+ /**
+ * CHIINV.
+ *
+ * Returns the inverse of the left-tailed probability of the chi-squared distribution.
+ *
+ * @param mixed $probability Float probability at which you want to evaluate the distribution
+ * @param mixed $degrees Integer degrees of freedom
+ *
+ * @return float|string
+ */
+ public static function inverseLeftTail($probability, $degrees)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $degrees = Functions::flattenSingleValue($degrees);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $degrees = DistributionValidations::validateInt($degrees);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($degrees < 1) {
+ return Functions::NAN();
+ }
+
+ return self::inverseLeftTailCalculation($probability, $degrees);
+ }
+
+ /**
+ * CHITEST.
+ *
+ * Uses the chi-square test to calculate the probability that the differences between two supplied data sets
+ * (of observed and expected frequencies), are likely to be simply due to sampling error,
+ * or if they are likely to be real.
+ *
+ * @param mixed $actual an array of observed frequencies
+ * @param mixed $expected an array of expected frequencies
+ *
+ * @return float|string
+ */
+ public static function test($actual, $expected)
+ {
+ $rows = count($actual);
+ $actual = Functions::flattenArray($actual);
+ $expected = Functions::flattenArray($expected);
+ $columns = count($actual) / $rows;
+
+ $countActuals = count($actual);
+ $countExpected = count($expected);
+ if ($countActuals !== $countExpected || $countActuals === 1) {
+ return Functions::NAN();
+ }
+
+ $result = 0.0;
+ for ($i = 0; $i < $countActuals; ++$i) {
+ if ($expected[$i] == 0.0) {
+ return Functions::DIV0();
+ } elseif ($expected[$i] < 0.0) {
+ return Functions::NAN();
+ }
+ $result += (($actual[$i] - $expected[$i]) ** 2) / $expected[$i];
+ }
+
+ $degrees = self::degrees($rows, $columns);
+
+ $result = self::distributionRightTail($result, $degrees);
+
+ return $result;
+ }
+
+ protected static function degrees(int $rows, int $columns): int
+ {
+ if ($rows === 1) {
+ return $columns - 1;
+ } elseif ($columns === 1) {
+ return $rows - 1;
+ }
+
+ return ($columns - 1) * ($rows - 1);
+ }
+
+ private static function inverseLeftTailCalculation(float $probability, int $degrees): float
+ {
+ // bracket the root
+ $min = 0;
+ $sd = sqrt(2.0 * $degrees);
+ $max = 2 * $sd;
+ $s = -1;
+
+ while ($s * self::pchisq($max, $degrees) > $probability * $s) {
+ $min = $max;
+ $max += 2 * $sd;
+ }
+
+ // Find root using bisection
+ $chi2 = 0.5 * ($min + $max);
+
+ while (($max - $min) > self::EPS * $chi2) {
+ if ($s * self::pchisq($chi2, $degrees) > $probability * $s) {
+ $min = $chi2;
+ } else {
+ $max = $chi2;
+ }
+ $chi2 = 0.5 * ($min + $max);
+ }
+
+ return $chi2;
+ }
+
+ private static function pchisq($chi2, $degrees)
+ {
+ return self::gammp($degrees, 0.5 * $chi2);
+ }
+
+ private static function gammp($n, $x)
+ {
+ if ($x < 0.5 * $n + 1) {
+ return self::gser($n, $x);
+ }
+
+ return 1 - self::gcf($n, $x);
+ }
+
+ // Return the incomplete gamma function P(n/2,x) evaluated by
+ // series representation. Algorithm from numerical recipe.
+ // Assume that n is a positive integer and x>0, won't check arguments.
+ // Relative error controlled by the eps parameter
+ private static function gser($n, $x)
+ {
+ $gln = Gamma::ln($n / 2);
+ $a = 0.5 * $n;
+ $ap = $a;
+ $sum = 1.0 / $a;
+ $del = $sum;
+ for ($i = 1; $i < 101; ++$i) {
+ ++$ap;
+ $del = $del * $x / $ap;
+ $sum += $del;
+ if ($del < $sum * self::EPS) {
+ break;
+ }
+ }
+
+ return $sum * exp(-$x + $a * log($x) - $gln);
+ }
+
+ // Return the incomplete gamma function Q(n/2,x) evaluated by
+ // its continued fraction representation. Algorithm from numerical recipe.
+ // Assume that n is a postive integer and x>0, won't check arguments.
+ // Relative error controlled by the eps parameter
+ private static function gcf($n, $x)
+ {
+ $gln = Gamma::ln($n / 2);
+ $a = 0.5 * $n;
+ $b = $x + 1 - $a;
+ $fpmin = 1.e-300;
+ $c = 1 / $fpmin;
+ $d = 1 / $b;
+ $h = $d;
+ for ($i = 1; $i < 101; ++$i) {
+ $an = -$i * ($i - $a);
+ $b += 2;
+ $d = $an * $d + $b;
+ if (abs($d) < $fpmin) {
+ $d = $fpmin;
+ }
+ $c = $b + $an / $c;
+ if (abs($c) < $fpmin) {
+ $c = $fpmin;
+ }
+ $d = 1 / $d;
+ $del = $d * $c;
+ $h = $h * $del;
+ if (abs($del - 1) < self::EPS) {
+ break;
+ }
+ }
+
+ return $h * exp(-$x + $a * log($x) - $gln);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/DistributionValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/DistributionValidations.php
new file mode 100644
index 00000000..57ef00af
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/DistributionValidations.php
@@ -0,0 +1,24 @@
+ 1.0) {
+ throw new Exception(Functions::NAN());
+ }
+
+ return $probability;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php
new file mode 100644
index 00000000..b3fd9460
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Exponential.php
@@ -0,0 +1,47 @@
+getMessage();
+ }
+
+ if (($value < 0) || ($lambda < 0)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative === true) {
+ return 1 - exp(0 - $value * $lambda);
+ }
+
+ return $lambda * exp(0 - $value * $lambda);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php
new file mode 100644
index 00000000..54b1950d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/F.php
@@ -0,0 +1,56 @@
+getMessage();
+ }
+
+ if ($value < 0 || $u < 1 || $v < 1) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative) {
+ $adjustedValue = ($u * $value) / ($u * $value + $v);
+
+ return Beta::incompleteBeta($adjustedValue, $u / 2, $v / 2);
+ }
+
+ return (Gamma::gammaValue(($v + $u) / 2) /
+ (Gamma::gammaValue($u / 2) * Gamma::gammaValue($v / 2))) *
+ (($u / $v) ** ($u / 2)) *
+ (($value ** (($u - 2) / 2)) / ((1 + ($u / $v) * $value) ** (($u + $v) / 2)));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php
new file mode 100644
index 00000000..923bf02d
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php
@@ -0,0 +1,61 @@
+getMessage();
+ }
+
+ if (($value <= -1) || ($value >= 1)) {
+ return Functions::NAN();
+ }
+
+ return 0.5 * log((1 + $value) / (1 - $value));
+ }
+
+ /**
+ * FISHERINV.
+ *
+ * Returns the inverse of the Fisher transformation. Use this transformation when
+ * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then
+ * FISHERINV(y) = x.
+ *
+ * @param mixed $probability Float probability at which you want to evaluate the distribution
+ *
+ * @return float|string
+ */
+ public static function inverse($probability)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+
+ try {
+ DistributionValidations::validateFloat($probability);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ return (exp(2 * $probability) - 1) / (exp(2 * $probability) + 1);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php
new file mode 100644
index 00000000..2c6ed670
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Gamma.php
@@ -0,0 +1,127 @@
+getMessage();
+ }
+
+ if ((((int) $value) == ((float) $value)) && $value <= 0.0) {
+ return Functions::NAN();
+ }
+
+ return self::gammaValue($value);
+ }
+
+ /**
+ * GAMMADIST.
+ *
+ * Returns the gamma distribution.
+ *
+ * @param mixed $value Float Value at which you want to evaluate the distribution
+ * @param mixed $a Parameter to the distribution as a float
+ * @param mixed $b Parameter to the distribution as a float
+ * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)
+ *
+ * @return float|string
+ */
+ public static function distribution($value, $a, $b, $cumulative)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $a = Functions::flattenSingleValue($a);
+ $b = Functions::flattenSingleValue($b);
+
+ try {
+ $value = DistributionValidations::validateFloat($value);
+ $a = DistributionValidations::validateFloat($a);
+ $b = DistributionValidations::validateFloat($b);
+ $cumulative = DistributionValidations::validateBool($cumulative);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($value < 0) || ($a <= 0) || ($b <= 0)) {
+ return Functions::NAN();
+ }
+
+ return self::calculateDistribution($value, $a, $b, $cumulative);
+ }
+
+ /**
+ * GAMMAINV.
+ *
+ * Returns the inverse of the Gamma distribution.
+ *
+ * @param mixed $probability Float probability at which you want to evaluate the distribution
+ * @param mixed $alpha Parameter to the distribution as a float
+ * @param mixed $beta Parameter to the distribution as a float
+ *
+ * @return float|string
+ */
+ public static function inverse($probability, $alpha, $beta)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $alpha = Functions::flattenSingleValue($alpha);
+ $beta = Functions::flattenSingleValue($beta);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $alpha = DistributionValidations::validateFloat($alpha);
+ $beta = DistributionValidations::validateFloat($beta);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($alpha <= 0.0) || ($beta <= 0.0)) {
+ return Functions::NAN();
+ }
+
+ return self::calculateInverse($probability, $alpha, $beta);
+ }
+
+ /**
+ * GAMMALN.
+ *
+ * Returns the natural logarithm of the gamma function.
+ *
+ * @param mixed $value Float Value at which you want to evaluate the distribution
+ *
+ * @return float|string
+ */
+ public static function ln($value)
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ try {
+ $value = DistributionValidations::validateFloat($value);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($value <= 0) {
+ return Functions::NAN();
+ }
+
+ return log(self::gammaValue($value));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
new file mode 100644
index 00000000..89170f7c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/GammaBase.php
@@ -0,0 +1,381 @@
+ Functions::PRECISION) && (++$i <= self::MAX_ITERATIONS)) {
+ // Apply Newton-Raphson step
+ $result = self::calculateDistribution($x, $alpha, $beta, true);
+ $error = $result - $probability;
+
+ if ($error == 0.0) {
+ $dx = 0;
+ } elseif ($error < 0.0) {
+ $xLo = $x;
+ } else {
+ $xHi = $x;
+ }
+
+ $pdf = self::calculateDistribution($x, $alpha, $beta, false);
+ // Avoid division by zero
+ if ($pdf !== 0.0) {
+ $dx = $error / $pdf;
+ $xNew = $x - $dx;
+ }
+
+ // If the NR fails to converge (which for example may be the
+ // case if the initial guess is too rough) we apply a bisection
+ // step to determine a more narrow interval around the root.
+ if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) {
+ $xNew = ($xLo + $xHi) / 2;
+ $dx = $xNew - $x;
+ }
+ $x = $xNew;
+ }
+
+ if ($i === self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return $x;
+ }
+
+ //
+ // Implementation of the incomplete Gamma function
+ //
+ public static function incompleteGamma(float $a, float $x): float
+ {
+ static $max = 32;
+ $summer = 0;
+ for ($n = 0; $n <= $max; ++$n) {
+ $divisor = $a;
+ for ($i = 1; $i <= $n; ++$i) {
+ $divisor *= ($a + $i);
+ }
+ $summer += ($x ** $n / $divisor);
+ }
+
+ return $x ** $a * exp(0 - $x) * $summer;
+ }
+
+ //
+ // Implementation of the Gamma function
+ //
+ public static function gammaValue(float $value): float
+ {
+ if ($value == 0.0) {
+ return 0;
+ }
+
+ static $p0 = 1.000000000190015;
+ static $p = [
+ 1 => 76.18009172947146,
+ 2 => -86.50532032941677,
+ 3 => 24.01409824083091,
+ 4 => -1.231739572450155,
+ 5 => 1.208650973866179e-3,
+ 6 => -5.395239384953e-6,
+ ];
+
+ $y = $x = $value;
+ $tmp = $x + 5.5;
+ $tmp -= ($x + 0.5) * log($tmp);
+
+ $summer = $p0;
+ for ($j = 1; $j <= 6; ++$j) {
+ $summer += ($p[$j] / ++$y);
+ }
+
+ return exp(0 - $tmp + log(self::SQRT2PI * $summer / $x));
+ }
+
+ /**
+ * logGamma function.
+ *
+ * @version 1.1
+ *
+ * @author Jaco van Kooten
+ *
+ * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher.
+ *
+ * The natural logarithm of the gamma function.
+ * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz
+ * Applied Mathematics Division
+ * Argonne National Laboratory
+ * Argonne, IL 60439
+ *
+ * References:
+ *
+ * W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural
+ * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.
+ * K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.
+ * Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.
+ *
+ *
+ *
+ * From the original documentation:
+ *
+ *
+ * This routine calculates the LOG(GAMMA) function for a positive real argument X.
+ * Computation is based on an algorithm outlined in references 1 and 2.
+ * The program uses rational functions that theoretically approximate LOG(GAMMA)
+ * to at least 18 significant decimal digits. The approximation for X > 12 is from
+ * reference 3, while approximations for X < 12.0 are similar to those in reference
+ * 1, but are unpublished. The accuracy achieved depends on the arithmetic system,
+ * the compiler, the intrinsic functions, and proper selection of the
+ * machine-dependent constants.
+ *
+ *
+ * Error returns:
+ * The program returns the value XINF for X .LE. 0.0 or when overflow would occur.
+ * The computation is believed to be free of underflow and overflow.
+ *
+ *
+ * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305
+ */
+
+ // Log Gamma related constants
+ private const LG_D1 = -0.5772156649015328605195174;
+
+ private const LG_D2 = 0.4227843350984671393993777;
+
+ private const LG_D4 = 1.791759469228055000094023;
+
+ private const LG_P1 = [
+ 4.945235359296727046734888,
+ 201.8112620856775083915565,
+ 2290.838373831346393026739,
+ 11319.67205903380828685045,
+ 28557.24635671635335736389,
+ 38484.96228443793359990269,
+ 26377.48787624195437963534,
+ 7225.813979700288197698961,
+ ];
+
+ private const LG_P2 = [
+ 4.974607845568932035012064,
+ 542.4138599891070494101986,
+ 15506.93864978364947665077,
+ 184793.2904445632425417223,
+ 1088204.76946882876749847,
+ 3338152.967987029735917223,
+ 5106661.678927352456275255,
+ 3074109.054850539556250927,
+ ];
+
+ private const LG_P4 = [
+ 14745.02166059939948905062,
+ 2426813.369486704502836312,
+ 121475557.4045093227939592,
+ 2663432449.630976949898078,
+ 29403789566.34553899906876,
+ 170266573776.5398868392998,
+ 492612579337.743088758812,
+ 560625185622.3951465078242,
+ ];
+
+ private const LG_Q1 = [
+ 67.48212550303777196073036,
+ 1113.332393857199323513008,
+ 7738.757056935398733233834,
+ 27639.87074403340708898585,
+ 54993.10206226157329794414,
+ 61611.22180066002127833352,
+ 36351.27591501940507276287,
+ 8785.536302431013170870835,
+ ];
+
+ private const LG_Q2 = [
+ 183.0328399370592604055942,
+ 7765.049321445005871323047,
+ 133190.3827966074194402448,
+ 1136705.821321969608938755,
+ 5267964.117437946917577538,
+ 13467014.54311101692290052,
+ 17827365.30353274213975932,
+ 9533095.591844353613395747,
+ ];
+
+ private const LG_Q4 = [
+ 2690.530175870899333379843,
+ 639388.5654300092398984238,
+ 41355999.30241388052042842,
+ 1120872109.61614794137657,
+ 14886137286.78813811542398,
+ 101680358627.2438228077304,
+ 341747634550.7377132798597,
+ 446315818741.9713286462081,
+ ];
+
+ private const LG_C = [
+ -0.001910444077728,
+ 8.4171387781295e-4,
+ -5.952379913043012e-4,
+ 7.93650793500350248e-4,
+ -0.002777777777777681622553,
+ 0.08333333333333333331554247,
+ 0.0057083835261,
+ ];
+
+ // Rough estimate of the fourth root of logGamma_xBig
+ private const LG_FRTBIG = 2.25e76;
+
+ private const PNT68 = 0.6796875;
+
+ // Function cache for logGamma
+ private static $logGammaCacheResult = 0.0;
+
+ private static $logGammaCacheX = 0.0;
+
+ public static function logGamma(float $x): float
+ {
+ if ($x == self::$logGammaCacheX) {
+ return self::$logGammaCacheResult;
+ }
+
+ $y = $x;
+ if ($y > 0.0 && $y <= self::LOG_GAMMA_X_MAX_VALUE) {
+ if ($y <= self::EPS) {
+ $res = -log($y);
+ } elseif ($y <= 1.5) {
+ $res = self::logGamma1($y);
+ } elseif ($y <= 4.0) {
+ $res = self::logGamma2($y);
+ } elseif ($y <= 12.0) {
+ $res = self::logGamma3($y);
+ } else {
+ $res = self::logGamma4($y);
+ }
+ } else {
+ // --------------------------
+ // Return for bad arguments
+ // --------------------------
+ $res = self::MAX_VALUE;
+ }
+
+ // ------------------------------
+ // Final adjustments and return
+ // ------------------------------
+ self::$logGammaCacheX = $x;
+ self::$logGammaCacheResult = $res;
+
+ return $res;
+ }
+
+ private static function logGamma1(float $y)
+ {
+ // ---------------------
+ // EPS .LT. X .LE. 1.5
+ // ---------------------
+ if ($y < self::PNT68) {
+ $corr = -log($y);
+ $xm1 = $y;
+ } else {
+ $corr = 0.0;
+ $xm1 = $y - 1.0;
+ }
+
+ $xden = 1.0;
+ $xnum = 0.0;
+ if ($y <= 0.5 || $y >= self::PNT68) {
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm1 + self::LG_P1[$i];
+ $xden = $xden * $xm1 + self::LG_Q1[$i];
+ }
+
+ return $corr + $xm1 * (self::LG_D1 + $xm1 * ($xnum / $xden));
+ }
+
+ $xm2 = $y - 1.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm2 + self::LG_P2[$i];
+ $xden = $xden * $xm2 + self::LG_Q2[$i];
+ }
+
+ return $corr + $xm2 * (self::LG_D2 + $xm2 * ($xnum / $xden));
+ }
+
+ private static function logGamma2(float $y)
+ {
+ // ---------------------
+ // 1.5 .LT. X .LE. 4.0
+ // ---------------------
+ $xm2 = $y - 2.0;
+ $xden = 1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm2 + self::LG_P2[$i];
+ $xden = $xden * $xm2 + self::LG_Q2[$i];
+ }
+
+ return $xm2 * (self::LG_D2 + $xm2 * ($xnum / $xden));
+ }
+
+ protected static function logGamma3(float $y)
+ {
+ // ----------------------
+ // 4.0 .LT. X .LE. 12.0
+ // ----------------------
+ $xm4 = $y - 4.0;
+ $xden = -1.0;
+ $xnum = 0.0;
+ for ($i = 0; $i < 8; ++$i) {
+ $xnum = $xnum * $xm4 + self::LG_P4[$i];
+ $xden = $xden * $xm4 + self::LG_Q4[$i];
+ }
+
+ return self::LG_D4 + $xm4 * ($xnum / $xden);
+ }
+
+ protected static function logGamma4(float $y)
+ {
+ // ---------------------------------
+ // Evaluate for argument .GE. 12.0
+ // ---------------------------------
+ $res = 0.0;
+ if ($y <= self::LG_FRTBIG) {
+ $res = self::LG_C[6];
+ $ysq = $y * $y;
+ for ($i = 0; $i < 6; ++$i) {
+ $res = $res / $ysq + self::LG_C[$i];
+ }
+ $res /= $y;
+ $corr = log($y);
+ $res = $res + log(self::SQRT2PI) - 0.5 * $corr;
+ $res += $y * ($corr - 1.0);
+ }
+
+ return $res;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php
new file mode 100644
index 00000000..fe30c087
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/HyperGeometric.php
@@ -0,0 +1,59 @@
+getMessage();
+ }
+
+ if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) {
+ return Functions::NAN();
+ }
+ if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) {
+ return Functions::NAN();
+ }
+ if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) {
+ return Functions::NAN();
+ }
+
+ $successesPopulationAndSample = (float) Combinations::withoutRepetition($populationSuccesses, $sampleSuccesses);
+ $numbersPopulationAndSample = (float) Combinations::withoutRepetition($populationNumber, $sampleNumber);
+ $adjustedPopulationAndSample = (float) Combinations::withoutRepetition(
+ $populationNumber - $populationSuccesses,
+ $sampleNumber - $sampleSuccesses
+ );
+
+ return $successesPopulationAndSample * $adjustedPopulationAndSample / $numbersPopulationAndSample;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php
new file mode 100644
index 00000000..e1523773
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/LogNormal.php
@@ -0,0 +1,119 @@
+getMessage();
+ }
+
+ if (($value <= 0) || ($stdDev <= 0)) {
+ return Functions::NAN();
+ }
+
+ return StandardNormal::cumulative((log($value) - $mean) / $stdDev);
+ }
+
+ /**
+ * LOGNORM.DIST.
+ *
+ * Returns the lognormal distribution of x, where ln(x) is normally distributed
+ * with parameters mean and standard_dev.
+ *
+ * @param mixed $value Float value for which we want the probability
+ * @param mixed $mean Mean value as a float
+ * @param mixed $stdDev Standard Deviation as a float
+ * @param mixed $cumulative Boolean value indicating if we want the cdf (true) or the pdf (false)
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function distribution($value, $mean, $stdDev, $cumulative = false)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+ $cumulative = Functions::flattenSingleValue($cumulative);
+
+ try {
+ $value = DistributionValidations::validateFloat($value);
+ $mean = DistributionValidations::validateFloat($mean);
+ $stdDev = DistributionValidations::validateFloat($stdDev);
+ $cumulative = DistributionValidations::validateBool($cumulative);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if (($value <= 0) || ($stdDev <= 0)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative === true) {
+ return StandardNormal::distribution((log($value) - $mean) / $stdDev, true);
+ }
+
+ return (1 / (sqrt(2 * M_PI) * $stdDev * $value)) *
+ exp(0 - ((log($value) - $mean) ** 2 / (2 * $stdDev ** 2)));
+ }
+
+ /**
+ * LOGINV.
+ *
+ * Returns the inverse of the lognormal cumulative distribution
+ *
+ * @param mixed $probability Float probability for which we want the value
+ * @param mixed $mean Mean Value as a float
+ * @param mixed $stdDev Standard Deviation as a float
+ *
+ * @return float|string The result, or a string containing an error
+ *
+ * @TODO Try implementing P J Acklam's refinement algorithm for greater
+ * accuracy if I can get my head round the mathematics
+ * (as described at) http://home.online.no/~pjacklam/notes/invnorm/
+ */
+ public static function inverse($probability, $mean, $stdDev)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $mean = DistributionValidations::validateFloat($mean);
+ $stdDev = DistributionValidations::validateFloat($stdDev);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($stdDev <= 0) {
+ return Functions::NAN();
+ }
+
+ return exp($mean + $stdDev * StandardNormal::inverse($probability));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php
new file mode 100644
index 00000000..26211672
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/NewtonRaphson.php
@@ -0,0 +1,62 @@
+callback = $callback;
+ }
+
+ public function execute(float $probability)
+ {
+ $xLo = 100;
+ $xHi = 0;
+
+ $dx = 1;
+ $x = $xNew = 1;
+ $i = 0;
+
+ while ((abs($dx) > Functions::PRECISION) && ($i++ < self::MAX_ITERATIONS)) {
+ // Apply Newton-Raphson step
+ $result = call_user_func($this->callback, $x);
+ $error = $result - $probability;
+
+ if ($error == 0.0) {
+ $dx = 0;
+ } elseif ($error < 0.0) {
+ $xLo = $x;
+ } else {
+ $xHi = $x;
+ }
+
+ // Avoid division by zero
+ if ($result != 0.0) {
+ $dx = $error / $result;
+ $xNew = $x - $dx;
+ }
+
+ // If the NR fails to converge (which for example may be the
+ // case if the initial guess is too rough) we apply a bisection
+ // step to determine a more narrow interval around the root.
+ if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) {
+ $xNew = ($xLo + $xHi) / 2;
+ $dx = $xNew - $x;
+ }
+ $x = $xNew;
+ }
+
+ if ($i == self::MAX_ITERATIONS) {
+ return Functions::NA();
+ }
+
+ return $x;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php
new file mode 100644
index 00000000..4d158b8c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Normal.php
@@ -0,0 +1,166 @@
+getMessage();
+ }
+
+ if ($stdDev < 0) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative) {
+ return 0.5 * (1 + Engineering\Erf::erfValue(($value - $mean) / ($stdDev * sqrt(2))));
+ }
+
+ return (1 / (self::SQRT2PI * $stdDev)) * exp(0 - (($value - $mean) ** 2 / (2 * ($stdDev * $stdDev))));
+ }
+
+ /**
+ * NORMINV.
+ *
+ * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
+ *
+ * @param mixed $probability Float probability for which we want the value
+ * @param mixed $mean Mean Value as a float
+ * @param mixed $stdDev Standard Deviation as a float
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function inverse($probability, $mean, $stdDev)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $mean = Functions::flattenSingleValue($mean);
+ $stdDev = Functions::flattenSingleValue($stdDev);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $mean = DistributionValidations::validateFloat($mean);
+ $stdDev = DistributionValidations::validateFloat($stdDev);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($stdDev < 0) {
+ return Functions::NAN();
+ }
+
+ return (self::inverseNcdf($probability) * $stdDev) + $mean;
+ }
+
+ /*
+ * inverse_ncdf.php
+ * -------------------
+ * begin : Friday, January 16, 2004
+ * copyright : (C) 2004 Michael Nickerson
+ * email : nickersonm@yahoo.com
+ *
+ */
+ private static function inverseNcdf($p)
+ {
+ // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to
+ // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as
+ // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html
+ // I have not checked the accuracy of this implementation. Be aware that PHP
+ // will truncate the coeficcients to 14 digits.
+
+ // You have permission to use and distribute this function freely for
+ // whatever purpose you want, but please show common courtesy and give credit
+ // where credit is due.
+
+ // Input paramater is $p - probability - where 0 < p < 1.
+
+ // Coefficients in rational approximations
+ static $a = [
+ 1 => -3.969683028665376e+01,
+ 2 => 2.209460984245205e+02,
+ 3 => -2.759285104469687e+02,
+ 4 => 1.383577518672690e+02,
+ 5 => -3.066479806614716e+01,
+ 6 => 2.506628277459239e+00,
+ ];
+
+ static $b = [
+ 1 => -5.447609879822406e+01,
+ 2 => 1.615858368580409e+02,
+ 3 => -1.556989798598866e+02,
+ 4 => 6.680131188771972e+01,
+ 5 => -1.328068155288572e+01,
+ ];
+
+ static $c = [
+ 1 => -7.784894002430293e-03,
+ 2 => -3.223964580411365e-01,
+ 3 => -2.400758277161838e+00,
+ 4 => -2.549732539343734e+00,
+ 5 => 4.374664141464968e+00,
+ 6 => 2.938163982698783e+00,
+ ];
+
+ static $d = [
+ 1 => 7.784695709041462e-03,
+ 2 => 3.224671290700398e-01,
+ 3 => 2.445134137142996e+00,
+ 4 => 3.754408661907416e+00,
+ ];
+
+ // Define lower and upper region break-points.
+ $p_low = 0.02425; //Use lower region approx. below this
+ $p_high = 1 - $p_low; //Use upper region approx. above this
+
+ if (0 < $p && $p < $p_low) {
+ // Rational approximation for lower region.
+ $q = sqrt(-2 * log($p));
+
+ return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
+ (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
+ } elseif ($p_high < $p && $p < 1) {
+ // Rational approximation for upper region.
+ $q = sqrt(-2 * log(1 - $p));
+
+ return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) /
+ (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1);
+ }
+
+ // Rational approximation for central region.
+ $q = $p - 0.5;
+ $r = $q * $q;
+
+ return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q /
+ ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php
new file mode 100644
index 00000000..e7252e02
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php
@@ -0,0 +1,53 @@
+getMessage();
+ }
+
+ if (($value < 0) || ($mean < 0)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative) {
+ $summer = 0;
+ $floor = floor($value);
+ for ($i = 0; $i <= $floor; ++$i) {
+ $summer += $mean ** $i / MathTrig\Factorial::fact($i);
+ }
+
+ return exp(0 - $mean) * $summer;
+ }
+
+ return (exp(0 - $mean) * $mean ** $value) / MathTrig\Factorial::fact($value);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php
new file mode 100644
index 00000000..d10f02a5
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/StandardNormal.php
@@ -0,0 +1,110 @@
+getMessage();
+ }
+
+ if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) {
+ return Functions::NAN();
+ }
+
+ return self::calculateDistribution($value, $degrees, $tails);
+ }
+
+ /**
+ * TINV.
+ *
+ * Returns the one-tailed probability of the chi-squared distribution.
+ *
+ * @param mixed $probability Float probability for the function
+ * @param mixed $degrees Integer value for degrees of freedom
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function inverse($probability, $degrees)
+ {
+ $probability = Functions::flattenSingleValue($probability);
+ $degrees = Functions::flattenSingleValue($degrees);
+
+ try {
+ $probability = DistributionValidations::validateProbability($probability);
+ $degrees = DistributionValidations::validateInt($degrees);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ if ($degrees <= 0) {
+ return Functions::NAN();
+ }
+
+ $callback = function ($value) use ($degrees) {
+ return self::distribution($value, $degrees, 2);
+ };
+
+ $newtonRaphson = new NewtonRaphson($callback);
+
+ return $newtonRaphson->execute($probability);
+ }
+
+ /**
+ * @return float
+ */
+ private static function calculateDistribution(float $value, int $degrees, int $tails)
+ {
+ // tdist, which finds the probability that corresponds to a given value
+ // of t with k degrees of freedom. This algorithm is translated from a
+ // pascal function on p81 of "Statistical Computing in Pascal" by D
+ // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd:
+ // London). The above Pascal algorithm is itself a translation of the
+ // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer
+ // Laboratory as reported in (among other places) "Applied Statistics
+ // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis
+ // Horwood Ltd.; W. Sussex, England).
+ $tterm = $degrees;
+ $ttheta = atan2($value, sqrt($tterm));
+ $tc = cos($ttheta);
+ $ts = sin($ttheta);
+
+ if (($degrees % 2) === 1) {
+ $ti = 3;
+ $tterm = $tc;
+ } else {
+ $ti = 2;
+ $tterm = 1;
+ }
+
+ $tsum = $tterm;
+ while ($ti < $degrees) {
+ $tterm *= $tc * $tc * ($ti - 1) / $ti;
+ $tsum += $tterm;
+ $ti += 2;
+ }
+
+ $tsum *= $ts;
+ if (($degrees % 2) == 1) {
+ $tsum = Functions::M_2DIVPI * ($tsum + $ttheta);
+ }
+
+ $tValue = 0.5 * (1 + $tsum);
+ if ($tails == 1) {
+ return 1 - abs($tValue);
+ }
+
+ return 1 - abs((1 - $tValue) - $tValue);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php
new file mode 100644
index 00000000..ecec8a85
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Weibull.php
@@ -0,0 +1,49 @@
+getMessage();
+ }
+
+ if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) {
+ return Functions::NAN();
+ }
+
+ if ($cumulative) {
+ return 1 - exp(0 - ($value / $beta) ** $alpha);
+ }
+
+ return ($alpha / $beta ** $alpha) * $value ** ($alpha - 1) * exp(0 - ($value / $beta) ** $alpha);
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Maximum.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Maximum.php
index 6d361e03..3f8436ff 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Maximum.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Maximum.php
@@ -19,7 +19,7 @@ class Maximum extends MaxMinBase
*
* @return float
*/
- public static function MAX(...$args)
+ public static function max(...$args)
{
$returnValue = null;
@@ -53,7 +53,7 @@ class Maximum extends MaxMinBase
*
* @return float
*/
- public static function MAXA(...$args)
+ public static function maxA(...$args)
{
$returnValue = null;
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Minimum.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Minimum.php
index bd46882e..596aad78 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Minimum.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Minimum.php
@@ -19,7 +19,7 @@ class Minimum extends MaxMinBase
*
* @return float
*/
- public static function MIN(...$args)
+ public static function min(...$args)
{
$returnValue = null;
@@ -53,7 +53,7 @@ class Minimum extends MaxMinBase
*
* @return float
*/
- public static function MINA(...$args)
+ public static function minA(...$args)
{
$returnValue = null;
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php
new file mode 100644
index 00000000..16cb06e8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Percentiles.php
@@ -0,0 +1,205 @@
+getMessage();
+ }
+
+ if (($entry < 0) || ($entry > 1)) {
+ return Functions::NAN();
+ }
+
+ $mArgs = self::percentileFilterValues($aArgs);
+ $mValueCount = count($mArgs);
+ if ($mValueCount > 0) {
+ sort($mArgs);
+ $count = Counts::COUNT($mArgs);
+ $index = $entry * ($count - 1);
+ $iBase = floor($index);
+ if ($index == $iBase) {
+ return $mArgs[$index];
+ }
+ $iNext = $iBase + 1;
+ $iProportion = $index - $iBase;
+
+ return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion);
+ }
+
+ return Functions::NAN();
+ }
+
+ /**
+ * PERCENTRANK.
+ *
+ * Returns the rank of a value in a data set as a percentage of the data set.
+ * Note that the returned rank is simply rounded to the appropriate significant digits,
+ * rather than floored (as MS Excel), so value 3 for a value set of 1, 2, 3, 4 will return
+ * 0.667 rather than 0.666
+ *
+ * @param mixed $valueSet An array of (float) values, or a reference to, a list of numbers
+ * @param mixed $value The number whose rank you want to find
+ * @param mixed $significance The (integer) number of significant digits for the returned percentage value
+ *
+ * @return float|string (string if result is an error)
+ */
+ public static function PERCENTRANK($valueSet, $value, $significance = 3)
+ {
+ $valueSet = Functions::flattenArray($valueSet);
+ $value = Functions::flattenSingleValue($value);
+ $significance = ($significance === null) ? 3 : Functions::flattenSingleValue($significance);
+
+ try {
+ $value = StatisticalValidations::validateFloat($value);
+ $significance = StatisticalValidations::validateInt($significance);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $valueSet = self::rankFilterValues($valueSet);
+ $valueCount = count($valueSet);
+ if ($valueCount == 0) {
+ return Functions::NA();
+ }
+ sort($valueSet, SORT_NUMERIC);
+
+ $valueAdjustor = $valueCount - 1;
+ if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) {
+ return Functions::NA();
+ }
+
+ $pos = array_search($value, $valueSet);
+ if ($pos === false) {
+ $pos = 0;
+ $testValue = $valueSet[0];
+ while ($testValue < $value) {
+ $testValue = $valueSet[++$pos];
+ }
+ --$pos;
+ $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos]));
+ }
+
+ return round($pos / $valueAdjustor, $significance);
+ }
+
+ /**
+ * QUARTILE.
+ *
+ * Returns the quartile of a data set.
+ *
+ * Excel Function:
+ * QUARTILE(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function QUARTILE(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+ $entry = array_pop($aArgs);
+
+ try {
+ $entry = StatisticalValidations::validateFloat($entry);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $entry = floor($entry);
+ $entry /= 4;
+ if (($entry < 0) || ($entry > 1)) {
+ return Functions::NAN();
+ }
+
+ return self::PERCENTILE($aArgs, $entry);
+ }
+
+ /**
+ * RANK.
+ *
+ * Returns the rank of a number in a list of numbers.
+ *
+ * @param mixed $value The number whose rank you want to find
+ * @param mixed $valueSet An array of float values, or a reference to, a list of numbers
+ * @param mixed $order Order to sort the values in the value set
+ *
+ * @return float|string The result, or a string containing an error (0 = Descending, 1 = Ascending)
+ */
+ public static function RANK($value, $valueSet, $order = self::RANK_SORT_DESCENDING)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $valueSet = Functions::flattenArray($valueSet);
+ $order = ($order === null) ? self::RANK_SORT_DESCENDING : Functions::flattenSingleValue($order);
+
+ try {
+ $value = StatisticalValidations::validateFloat($value);
+ $order = StatisticalValidations::validateInt($order);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $valueSet = self::rankFilterValues($valueSet);
+ if ($order === self::RANK_SORT_DESCENDING) {
+ rsort($valueSet, SORT_NUMERIC);
+ } else {
+ sort($valueSet, SORT_NUMERIC);
+ }
+
+ $pos = array_search($value, $valueSet);
+ if ($pos === false) {
+ return Functions::NA();
+ }
+
+ return ++$pos;
+ }
+
+ protected static function percentileFilterValues(array $dataSet)
+ {
+ return array_filter(
+ $dataSet,
+ function ($value): bool {
+ return is_numeric($value) && !is_string($value);
+ }
+ );
+ }
+
+ protected static function rankFilterValues(array $dataSet)
+ {
+ return array_filter(
+ $dataSet,
+ function ($value): bool {
+ return is_numeric($value);
+ }
+ );
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Permutations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Permutations.php
index 84c10719..272a8a53 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Permutations.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Permutations.php
@@ -2,8 +2,10 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
+use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
+use PhpOffice\PhpSpreadsheet\Shared\IntOrFloat;
class Permutations
{
@@ -16,26 +18,29 @@ class Permutations
* combinations, for which the internal order is not significant. Use this function
* for lottery-style probability calculations.
*
- * @param int $numObjs Number of different objects
- * @param int $numInSet Number of objects in each permutation
+ * @param mixed $numObjs Integer number of different objects
+ * @param mixed $numInSet Integer number of objects in each permutation
*
- * @return int|string Number of permutations, or a string containing an error
+ * @return float|int|string Number of permutations, or a string containing an error
*/
public static function PERMUT($numObjs, $numInSet)
{
$numObjs = Functions::flattenSingleValue($numObjs);
$numInSet = Functions::flattenSingleValue($numInSet);
- if ((is_numeric($numObjs)) && (is_numeric($numInSet))) {
- $numInSet = floor($numInSet);
- if ($numObjs < $numInSet) {
- return Functions::NAN();
- }
-
- return round(MathTrig::FACT($numObjs) / MathTrig::FACT($numObjs - $numInSet));
+ try {
+ $numObjs = StatisticalValidations::validateInt($numObjs);
+ $numInSet = StatisticalValidations::validateInt($numInSet);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if ($numObjs < $numInSet) {
+ return Functions::NAN();
+ }
+ $result = round(MathTrig\Factorial::fact($numObjs) / MathTrig\Factorial::fact($numObjs - $numInSet));
+
+ return IntOrFloat::evaluate($result);
}
/**
@@ -44,26 +49,29 @@ class Permutations
* Returns the number of permutations for a given number of objects (with repetitions)
* that can be selected from the total objects.
*
- * @param int $numObjs Number of different objects
- * @param int $numInSet Number of objects in each permutation
+ * @param mixed $numObjs Integer number of different objects
+ * @param mixed $numInSet Integer number of objects in each permutation
*
- * @return int|string Number of permutations, or a string containing an error
+ * @return float|int|string Number of permutations, or a string containing an error
*/
public static function PERMUTATIONA($numObjs, $numInSet)
{
$numObjs = Functions::flattenSingleValue($numObjs);
$numInSet = Functions::flattenSingleValue($numInSet);
- if ((is_numeric($numObjs)) && (is_numeric($numInSet))) {
- $numObjs = floor($numObjs);
- $numInSet = floor($numInSet);
- if ($numObjs < 0 || $numInSet < 0) {
- return Functions::NAN();
- }
-
- return $numObjs ** $numInSet;
+ try {
+ $numObjs = StatisticalValidations::validateInt($numObjs);
+ $numInSet = StatisticalValidations::validateInt($numInSet);
+ } catch (Exception $e) {
+ return $e->getMessage();
}
- return Functions::VALUE();
+ if ($numObjs < 0 || $numInSet < 0) {
+ return Functions::NAN();
+ }
+
+ $result = $numObjs ** $numInSet;
+
+ return IntOrFloat::evaluate($result);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Size.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Size.php
new file mode 100644
index 00000000..de4b6d6c
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Size.php
@@ -0,0 +1,96 @@
+= $count) || ($count == 0)) {
+ return Functions::NAN();
+ }
+ rsort($mArgs);
+
+ return $mArgs[$entry];
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SMALL.
+ *
+ * Returns the nth smallest value in a data set. You can use this function to
+ * select a value based on its relative standing.
+ *
+ * Excel Function:
+ * SMALL(value1[,value2[, ...]],entry)
+ *
+ * @param mixed $args Data values
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function small(...$args)
+ {
+ $aArgs = Functions::flattenArray($args);
+
+ $entry = array_pop($aArgs);
+
+ if ((is_numeric($entry)) && (!is_string($entry))) {
+ $entry = (int) floor($entry);
+
+ $mArgs = self::filter($aArgs);
+ $count = Counts::COUNT($mArgs);
+ --$entry;
+ if (($entry < 0) || ($entry >= $count) || ($count == 0)) {
+ return Functions::NAN();
+ }
+ sort($mArgs);
+
+ return $mArgs[$entry];
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * @param mixed[] $args Data values
+ */
+ protected static function filter(array $args): array
+ {
+ $mArgs = [];
+
+ foreach ($args as $arg) {
+ // Is it a numeric value?
+ if ((is_numeric($arg)) && (!is_string($arg))) {
+ $mArgs[] = $arg;
+ }
+ }
+
+ return $mArgs;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StandardDeviations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StandardDeviations.php
index 28a25a75..af271205 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StandardDeviations.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StandardDeviations.php
@@ -2,9 +2,7 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
-use PhpOffice\PhpSpreadsheet\Calculation\Functions;
-
-class StandardDeviations extends VarianceBase
+class StandardDeviations
{
/**
* STDEV.
@@ -21,34 +19,12 @@ class StandardDeviations extends VarianceBase
*/
public static function STDEV(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
-
- $aMean = Averages::AVERAGE($aArgs);
-
- if (!is_string($aMean)) {
- $returnValue = 0.0;
- $aCount = -1;
-
- foreach ($aArgs as $k => $arg) {
- if (
- (is_bool($arg)) &&
- ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
- ) {
- $arg = (int) $arg;
- }
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $returnValue += ($arg - $aMean) ** 2;
- ++$aCount;
- }
- }
-
- if ($aCount > 0) {
- return sqrt($returnValue / $aCount);
- }
+ $result = Variances::VAR(...$args);
+ if (!is_numeric($result)) {
+ return $result;
}
- return Functions::DIV0();
+ return sqrt((float) $result);
}
/**
@@ -65,32 +41,12 @@ class StandardDeviations extends VarianceBase
*/
public static function STDEVA(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
-
- $aMean = Averages::AVERAGEA($aArgs);
-
- if (!is_string($aMean)) {
- $returnValue = 0.0;
- $aCount = -1;
-
- foreach ($aArgs as $k => $arg) {
- if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
- } else {
- // Is it a numeric value?
- if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
- $arg = self::datatypeAdjustmentAllowStrings($arg);
- $returnValue += ($arg - $aMean) ** 2;
- ++$aCount;
- }
- }
- }
-
- if ($aCount > 0) {
- return sqrt($returnValue / $aCount);
- }
+ $result = Variances::VARA(...$args);
+ if (!is_numeric($result)) {
+ return $result;
}
- return Functions::DIV0();
+ return sqrt((float) $result);
}
/**
@@ -107,34 +63,12 @@ class StandardDeviations extends VarianceBase
*/
public static function STDEVP(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
-
- $aMean = Averages::AVERAGE($aArgs);
-
- if (!is_string($aMean)) {
- $returnValue = 0.0;
- $aCount = 0;
-
- foreach ($aArgs as $k => $arg) {
- if (
- (is_bool($arg)) &&
- ((!Functions::isCellValue($k)) || (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE))
- ) {
- $arg = (int) $arg;
- }
- // Is it a numeric value?
- if ((is_numeric($arg)) && (!is_string($arg))) {
- $returnValue += ($arg - $aMean) ** 2;
- ++$aCount;
- }
- }
-
- if ($aCount > 0) {
- return sqrt($returnValue / $aCount);
- }
+ $result = Variances::VARP(...$args);
+ if (!is_numeric($result)) {
+ return $result;
}
- return Functions::DIV0();
+ return sqrt((float) $result);
}
/**
@@ -151,31 +85,11 @@ class StandardDeviations extends VarianceBase
*/
public static function STDEVPA(...$args)
{
- $aArgs = Functions::flattenArrayIndexed($args);
-
- $aMean = Averages::AVERAGEA($aArgs);
-
- if (!is_string($aMean)) {
- $returnValue = 0.0;
- $aCount = 0;
-
- foreach ($aArgs as $k => $arg) {
- if ((is_bool($arg)) && (!Functions::isMatrixValue($k))) {
- } else {
- // Is it a numeric value?
- if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) {
- $arg = self::datatypeAdjustmentAllowStrings($arg);
- $returnValue += ($arg - $aMean) ** 2;
- ++$aCount;
- }
- }
- }
-
- if ($aCount > 0) {
- return sqrt($returnValue / $aCount);
- }
+ $result = Variances::VARPA(...$args);
+ if (!is_numeric($result)) {
+ return $result;
}
- return Functions::DIV0();
+ return sqrt((float) $result);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Standardize.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Standardize.php
new file mode 100644
index 00000000..2f3c58e7
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Standardize.php
@@ -0,0 +1,41 @@
+getMessage();
+ }
+
+ if ($stdDev <= 0) {
+ return Functions::NAN();
+ }
+
+ return ($value - $mean) / $stdDev;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StatisticalValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StatisticalValidations.php
new file mode 100644
index 00000000..5b315da4
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/StatisticalValidations.php
@@ -0,0 +1,45 @@
+ $value) {
+ if ((is_bool($value)) || (is_string($value)) || ($value === null)) {
+ unset($array1[$key], $array2[$key]);
+ }
+ }
+ }
+
+ private static function checkTrendArrays(&$array1, &$array2): void
+ {
+ if (!is_array($array1)) {
+ $array1 = [$array1];
+ }
+ if (!is_array($array2)) {
+ $array2 = [$array2];
+ }
+
+ $array1 = Functions::flattenArray($array1);
+ $array2 = Functions::flattenArray($array2);
+
+ self::filterTrendValues($array1, $array2);
+ self::filterTrendValues($array2, $array1);
+
+ // Reset the array indexes
+ $array1 = array_merge($array1);
+ $array2 = array_merge($array2);
+ }
+
+ protected static function validateTrendArrays(array $yValues, array $xValues): void
+ {
+ $yValueCount = count($yValues);
+ $xValueCount = count($xValues);
+
+ if (($yValueCount === 0) || ($yValueCount !== $xValueCount)) {
+ throw new Exception(Functions::NA());
+ } elseif ($yValueCount === 1) {
+ throw new Exception(Functions::DIV0());
+ }
+ }
+
+ /**
+ * CORREL.
+ *
+ * Returns covariance, the average of the products of deviations for each data point pair.
+ *
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param null|mixed $xValues array of mixed Data Series X
+ *
+ * @return float|string
+ */
+ public static function CORREL($yValues, $xValues = null)
+ {
+ if (($xValues === null) || (!is_array($yValues)) || (!is_array($xValues))) {
+ return Functions::VALUE();
+ }
+
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getCorrelation();
+ }
+
+ /**
+ * COVAR.
+ *
+ * Returns covariance, the average of the products of deviations for each data point pair.
+ *
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param mixed $xValues array of mixed Data Series X
+ *
+ * @return float|string
+ */
+ public static function COVAR($yValues, $xValues)
+ {
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getCovariance();
+ }
+
+ /**
+ * FORECAST.
+ *
+ * Calculates, or predicts, a future value by using existing values.
+ * The predicted value is a y-value for a given x-value.
+ *
+ * @param mixed $xValue Float value of X for which we want to find Y
+ * @param mixed $yValues array of mixed Data Series Y
+ * @param mixed $xValues of mixed Data Series X
+ *
+ * @return bool|float|string
+ */
+ public static function FORECAST($xValue, $yValues, $xValues)
+ {
+ $xValue = Functions::flattenSingleValue($xValue);
+
+ try {
+ $xValue = StatisticalValidations::validateFloat($xValue);
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getValueOfYForX($xValue);
+ }
+
+ /**
+ * GROWTH.
+ *
+ * Returns values along a predicted exponential Trend
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ * @param mixed[] $newValues Values of X for which we want to find Y
+ * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not
+ *
+ * @return float[]
+ */
+ public static function GROWTH($yValues, $xValues = [], $newValues = [], $const = true)
+ {
+ $yValues = Functions::flattenArray($yValues);
+ $xValues = Functions::flattenArray($xValues);
+ $newValues = Functions::flattenArray($newValues);
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+
+ $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
+ if (empty($newValues)) {
+ $newValues = $bestFitExponential->getXValues();
+ }
+
+ $returnArray = [];
+ foreach ($newValues as $xValue) {
+ $returnArray[0][] = [$bestFitExponential->getValueOfYForX($xValue)];
+ }
+
+ return $returnArray;
+ }
+
+ /**
+ * INTERCEPT.
+ *
+ * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string
+ */
+ public static function INTERCEPT($yValues, $xValues)
+ {
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getIntersect();
+ }
+
+ /**
+ * LINEST.
+ *
+ * Calculates the statistics for a line by using the "least squares" method to calculate a straight line
+ * that best fits your data, and then returns an array that describes the line.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param null|mixed[] $xValues Data Series X
+ * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not
+ * @param mixed $stats A logical (boolean) value specifying whether to return additional regression statistics
+ *
+ * @return array|int|string The result, or a string containing an error
+ */
+ public static function LINEST($yValues, $xValues = null, $const = true, $stats = false)
+ {
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+ $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
+ if ($xValues === null) {
+ $xValues = $yValues;
+ }
+
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
+
+ if ($stats === true) {
+ return [
+ [
+ $bestFitLinear->getSlope(),
+ $bestFitLinear->getIntersect(),
+ ],
+ [
+ $bestFitLinear->getSlopeSE(),
+ ($const === false) ? Functions::NA() : $bestFitLinear->getIntersectSE(),
+ ],
+ [
+ $bestFitLinear->getGoodnessOfFit(),
+ $bestFitLinear->getStdevOfResiduals(),
+ ],
+ [
+ $bestFitLinear->getF(),
+ $bestFitLinear->getDFResiduals(),
+ ],
+ [
+ $bestFitLinear->getSSRegression(),
+ $bestFitLinear->getSSResiduals(),
+ ],
+ ];
+ }
+
+ return [
+ $bestFitLinear->getSlope(),
+ $bestFitLinear->getIntersect(),
+ ];
+ }
+
+ /**
+ * LOGEST.
+ *
+ * Calculates an exponential curve that best fits the X and Y data series,
+ * and then returns an array that describes the line.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param null|mixed[] $xValues Data Series X
+ * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not
+ * @param mixed $stats A logical (boolean) value specifying whether to return additional regression statistics
+ *
+ * @return array|int|string The result, or a string containing an error
+ */
+ public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false)
+ {
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+ $stats = ($stats === null) ? false : (bool) Functions::flattenSingleValue($stats);
+ if ($xValues === null) {
+ $xValues = $yValues;
+ }
+
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ foreach ($yValues as $value) {
+ if ($value < 0.0) {
+ return Functions::NAN();
+ }
+ }
+
+ $bestFitExponential = Trend::calculate(Trend::TREND_EXPONENTIAL, $yValues, $xValues, $const);
+
+ if ($stats === true) {
+ return [
+ [
+ $bestFitExponential->getSlope(),
+ $bestFitExponential->getIntersect(),
+ ],
+ [
+ $bestFitExponential->getSlopeSE(),
+ ($const === false) ? Functions::NA() : $bestFitExponential->getIntersectSE(),
+ ],
+ [
+ $bestFitExponential->getGoodnessOfFit(),
+ $bestFitExponential->getStdevOfResiduals(),
+ ],
+ [
+ $bestFitExponential->getF(),
+ $bestFitExponential->getDFResiduals(),
+ ],
+ [
+ $bestFitExponential->getSSRegression(),
+ $bestFitExponential->getSSResiduals(),
+ ],
+ ];
+ }
+
+ return [
+ $bestFitExponential->getSlope(),
+ $bestFitExponential->getIntersect(),
+ ];
+ }
+
+ /**
+ * RSQ.
+ *
+ * Returns the square of the Pearson product moment correlation coefficient through data points
+ * in known_y's and known_x's.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function RSQ($yValues, $xValues)
+ {
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getGoodnessOfFit();
+ }
+
+ /**
+ * SLOPE.
+ *
+ * Returns the slope of the linear regression line through data points in known_y's and known_x's.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string The result, or a string containing an error
+ */
+ public static function SLOPE($yValues, $xValues)
+ {
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getSlope();
+ }
+
+ /**
+ * STEYX.
+ *
+ * Returns the standard error of the predicted y-value for each x in the regression.
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ *
+ * @return float|string
+ */
+ public static function STEYX($yValues, $xValues)
+ {
+ try {
+ self::checkTrendArrays($yValues, $xValues);
+ self::validateTrendArrays($yValues, $xValues);
+ } catch (Exception $e) {
+ return $e->getMessage();
+ }
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues);
+
+ return $bestFitLinear->getStdevOfResiduals();
+ }
+
+ /**
+ * TREND.
+ *
+ * Returns values along a linear Trend
+ *
+ * @param mixed[] $yValues Data Series Y
+ * @param mixed[] $xValues Data Series X
+ * @param mixed[] $newValues Values of X for which we want to find Y
+ * @param mixed $const A logical (boolean) value specifying whether to force the intersect to equal 0 or not
+ *
+ * @return float[]
+ */
+ public static function TREND($yValues, $xValues = [], $newValues = [], $const = true)
+ {
+ $yValues = Functions::flattenArray($yValues);
+ $xValues = Functions::flattenArray($xValues);
+ $newValues = Functions::flattenArray($newValues);
+ $const = ($const === null) ? true : (bool) Functions::flattenSingleValue($const);
+
+ $bestFitLinear = Trend::calculate(Trend::TREND_LINEAR, $yValues, $xValues, $const);
+ if (empty($newValues)) {
+ $newValues = $bestFitLinear->getXValues();
+ }
+
+ $returnArray = [];
+ foreach ($newValues as $xValue) {
+ $returnArray[0][] = [$bestFitLinear->getValueOfYForX($xValue)];
+ }
+
+ return $returnArray;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
index 9762ec84..e5334671 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/VarianceBase.php
@@ -2,6 +2,8 @@
namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;
+use PhpOffice\PhpSpreadsheet\Calculation\Functions;
+
abstract class VarianceBase
{
protected static function datatypeAdjustmentAllowStrings($value)
@@ -17,7 +19,7 @@ abstract class VarianceBase
protected static function datatypeAdjustmentBooleans($value)
{
- if (is_bool($value)) {
+ if (is_bool($value) && (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE)) {
return (int) $value;
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Variances.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Variances.php
index 78b08da9..ac9c3320 100644
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Variances.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Variances.php
@@ -29,6 +29,7 @@ class Variances extends VarianceBase
$aCount = 0;
foreach ($aArgs as $arg) {
$arg = self::datatypeAdjustmentBooleans($arg);
+
// Is it a numeric value?
if ((is_numeric($arg)) && (!is_string($arg))) {
$summerA += ($arg * $arg);
@@ -117,6 +118,7 @@ class Variances extends VarianceBase
$aCount = 0;
foreach ($aArgs as $arg) {
$arg = self::datatypeAdjustmentBooleans($arg);
+
// Is it a numeric value?
if ((is_numeric($arg)) && (!is_string($arg))) {
$summerA += ($arg * $arg);
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php
index cea15fdc..0bde3b7f 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData.php
@@ -3,141 +3,88 @@
namespace PhpOffice\PhpSpreadsheet\Calculation;
use DateTimeInterface;
-use PhpOffice\PhpSpreadsheet\Shared\Date;
-use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
-use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
+/**
+ * @deprecated 1.18.0
+ */
class TextData
{
- private static $invalidChars;
-
- private static function unicodeToOrd($character)
- {
- return unpack('V', iconv('UTF-8', 'UCS-4LE', $character))[1];
- }
-
/**
* CHARACTER.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the character() method in the TextData\CharacterConvert class instead
+ *
* @param string $character Value
*
* @return string
*/
public static function CHARACTER($character)
{
- $character = Functions::flattenSingleValue($character);
-
- if (!is_numeric($character)) {
- return Functions::VALUE();
- }
- $character = (int) $character;
- if ($character < 1 || $character > 255) {
- return Functions::VALUE();
- }
-
- return iconv('UCS-4LE', 'UTF-8', pack('V', $character));
+ return TextData\CharacterConvert::character($character);
}
/**
* TRIMNONPRINTABLE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the nonPrintable() method in the TextData\Trim class instead
+ *
* @param mixed $stringValue Value to check
*
* @return string
*/
public static function TRIMNONPRINTABLE($stringValue = '')
{
- $stringValue = Functions::flattenSingleValue($stringValue);
-
- if (is_bool($stringValue)) {
- return ($stringValue) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- if (self::$invalidChars === null) {
- self::$invalidChars = range(chr(0), chr(31));
- }
-
- if (is_string($stringValue) || is_numeric($stringValue)) {
- return str_replace(self::$invalidChars, '', trim($stringValue, "\x00..\x1F"));
- }
-
- return null;
+ return TextData\Trim::nonPrintable($stringValue);
}
/**
* TRIMSPACES.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the spaces() method in the TextData\Trim class instead
+ *
* @param mixed $stringValue Value to check
*
* @return string
*/
public static function TRIMSPACES($stringValue = '')
{
- $stringValue = Functions::flattenSingleValue($stringValue);
- if (is_bool($stringValue)) {
- return ($stringValue) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- if (is_string($stringValue) || is_numeric($stringValue)) {
- return trim(preg_replace('/ +/', ' ', trim($stringValue, ' ')), ' ');
- }
-
- return null;
- }
-
- private static function convertBooleanValue($value)
- {
- if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
- return (int) $value;
- }
-
- return ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ return TextData\Trim::spaces($stringValue);
}
/**
* ASCIICODE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the code() method in the TextData\CharacterConvert class instead
+ *
* @param string $characters Value
*
* @return int|string A string if arguments are invalid
*/
public static function ASCIICODE($characters)
{
- if (($characters === null) || ($characters === '')) {
- return Functions::VALUE();
- }
- $characters = Functions::flattenSingleValue($characters);
- if (is_bool($characters)) {
- $characters = self::convertBooleanValue($characters);
- }
-
- $character = $characters;
- if (mb_strlen($characters, 'UTF-8') > 1) {
- $character = mb_substr($characters, 0, 1, 'UTF-8');
- }
-
- return self::unicodeToOrd($character);
+ return TextData\CharacterConvert::code($characters);
}
/**
* CONCATENATE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the CONCATENATE() method in the TextData\Concatenate class instead
+ *
* @return string
*/
public static function CONCATENATE(...$args)
{
- $returnValue = '';
-
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
- foreach ($aArgs as $arg) {
- if (is_bool($arg)) {
- $arg = self::convertBooleanValue($arg);
- }
- $returnValue .= $arg;
- }
-
- return $returnValue;
+ return TextData\Concatenate::CONCATENATE(...$args);
}
/**
@@ -146,6 +93,10 @@ class TextData
* This function converts a number to text using currency format, with the decimals rounded to the specified place.
* The format used is $#,##0.00_);($#,##0.00)..
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the DOLLAR() method in the TextData\Format class instead
+ *
* @param float $value The value to format
* @param int $decimals The number of digits to display to the right of the decimal point.
* If decimals is negative, number is rounded to the left of the decimal point.
@@ -155,33 +106,16 @@ class TextData
*/
public static function DOLLAR($value = 0, $decimals = 2)
{
- $value = Functions::flattenSingleValue($value);
- $decimals = $decimals === null ? 0 : Functions::flattenSingleValue($decimals);
-
- // Validate parameters
- if (!is_numeric($value) || !is_numeric($decimals)) {
- return Functions::VALUE();
- }
- $decimals = (int) $decimals;
-
- $mask = '$#,##0';
- if ($decimals > 0) {
- $mask .= '.' . str_repeat('0', $decimals);
- } else {
- $round = 10 ** abs($decimals);
- if ($value < 0) {
- $round = 0 - $round;
- }
- $value = MathTrig\Mround::funcMround($value, $round);
- }
- $mask = "$mask;($mask)";
-
- return NumberFormat::toFormattedString($value, $mask);
+ return TextData\Format::DOLLAR($value, $decimals);
}
/**
* SEARCHSENSITIVE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the sensitive() method in the TextData\Search class instead
+ *
* @param string $needle The string to look for
* @param string $haystack The string in which to look
* @param int $offset Offset within $haystack
@@ -190,33 +124,16 @@ class TextData
*/
public static function SEARCHSENSITIVE($needle, $haystack, $offset = 1)
{
- $needle = Functions::flattenSingleValue($needle);
- $haystack = Functions::flattenSingleValue($haystack);
- $offset = Functions::flattenSingleValue($offset);
-
- if (!is_bool($needle)) {
- if (is_bool($haystack)) {
- $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) {
- if (StringHelper::countCharacters($needle) === 0) {
- return $offset;
- }
-
- $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');
- if ($pos !== false) {
- return ++$pos;
- }
- }
- }
-
- return Functions::VALUE();
+ return TextData\Search::sensitive($needle, $haystack, $offset);
}
/**
* SEARCHINSENSITIVE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the insensitive() method in the TextData\Search class instead
+ *
* @param string $needle The string to look for
* @param string $haystack The string in which to look
* @param int $offset Offset within $haystack
@@ -225,33 +142,16 @@ class TextData
*/
public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1)
{
- $needle = Functions::flattenSingleValue($needle);
- $haystack = Functions::flattenSingleValue($haystack);
- $offset = Functions::flattenSingleValue($offset);
-
- if (!is_bool($needle)) {
- if (is_bool($haystack)) {
- $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) {
- if (StringHelper::countCharacters($needle) === 0) {
- return $offset;
- }
-
- $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8');
- if ($pos !== false) {
- return ++$pos;
- }
- }
- }
-
- return Functions::VALUE();
+ return TextData\Search::insensitive($needle, $haystack, $offset);
}
/**
* FIXEDFORMAT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the FIXEDFORMAT() method in the TextData\Format class instead
+ *
* @param mixed $value Value to check
* @param int $decimals
* @param bool $no_commas
@@ -260,35 +160,16 @@ class TextData
*/
public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false)
{
- $value = Functions::flattenSingleValue($value);
- $decimals = Functions::flattenSingleValue($decimals);
- $no_commas = Functions::flattenSingleValue($no_commas);
-
- // Validate parameters
- if (!is_numeric($value) || !is_numeric($decimals)) {
- return Functions::VALUE();
- }
- $decimals = (int) floor($decimals);
-
- $valueResult = round($value, $decimals);
- if ($decimals < 0) {
- $decimals = 0;
- }
- if (!$no_commas) {
- $valueResult = number_format(
- $valueResult,
- $decimals,
- StringHelper::getDecimalSeparator(),
- StringHelper::getThousandsSeparator()
- );
- }
-
- return (string) $valueResult;
+ return TextData\Format::FIXEDFORMAT($value, $decimals, $no_commas);
}
/**
* LEFT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the left() method in the TextData\Extract class instead
+ *
* @param string $value Value
* @param int $chars Number of characters
*
@@ -296,23 +177,16 @@ class TextData
*/
public static function LEFT($value = '', $chars = 1)
{
- $value = Functions::flattenSingleValue($value);
- $chars = Functions::flattenSingleValue($chars);
-
- if ($chars < 0) {
- return Functions::VALUE();
- }
-
- if (is_bool($value)) {
- $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return mb_substr($value, 0, $chars, 'UTF-8');
+ return TextData\Extract::left($value, $chars);
}
/**
* MID.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the mid() method in the TextData\Extract class instead
+ *
* @param string $value Value
* @param int $start Start character
* @param int $chars Number of characters
@@ -321,28 +195,16 @@ class TextData
*/
public static function MID($value = '', $start = 1, $chars = null)
{
- $value = Functions::flattenSingleValue($value);
- $start = Functions::flattenSingleValue($start);
- $chars = Functions::flattenSingleValue($chars);
-
- if (($start < 1) || ($chars < 0)) {
- return Functions::VALUE();
- }
-
- if (is_bool($value)) {
- $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- if (empty($chars)) {
- return '';
- }
-
- return mb_substr($value, --$start, $chars, 'UTF-8');
+ return TextData\Extract::mid($value, $start, $chars);
}
/**
* RIGHT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the right() method in the TextData\Extract class instead
+ *
* @param string $value Value
* @param int $chars Number of characters
*
@@ -350,36 +212,23 @@ class TextData
*/
public static function RIGHT($value = '', $chars = 1)
{
- $value = Functions::flattenSingleValue($value);
- $chars = Functions::flattenSingleValue($chars);
-
- if ($chars < 0) {
- return Functions::VALUE();
- }
-
- if (is_bool($value)) {
- $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8');
+ return TextData\Extract::right($value, $chars);
}
/**
* STRINGLENGTH.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the length() method in the TextData\Text class instead
+ *
* @param string $value Value
*
* @return int
*/
public static function STRINGLENGTH($value = '')
{
- $value = Functions::flattenSingleValue($value);
-
- if (is_bool($value)) {
- $value = ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return mb_strlen($value, 'UTF-8');
+ return TextData\Text::length($value);
}
/**
@@ -387,19 +236,17 @@ class TextData
*
* Converts a string value to upper case.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the lower() method in the TextData\CaseConvert class instead
+ *
* @param string $mixedCaseString
*
* @return string
*/
public static function LOWERCASE($mixedCaseString)
{
- $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
-
- if (is_bool($mixedCaseString)) {
- $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return StringHelper::strToLower($mixedCaseString);
+ return TextData\CaseConvert::lower($mixedCaseString);
}
/**
@@ -407,19 +254,17 @@ class TextData
*
* Converts a string value to upper case.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the upper() method in the TextData\CaseConvert class instead
+ *
* @param string $mixedCaseString
*
* @return string
*/
public static function UPPERCASE($mixedCaseString)
{
- $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
-
- if (is_bool($mixedCaseString)) {
- $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return StringHelper::strToUpper($mixedCaseString);
+ return TextData\CaseConvert::upper($mixedCaseString);
}
/**
@@ -427,24 +272,26 @@ class TextData
*
* Converts a string value to upper case.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the proper() method in the TextData\CaseConvert class instead
+ *
* @param string $mixedCaseString
*
* @return string
*/
public static function PROPERCASE($mixedCaseString)
{
- $mixedCaseString = Functions::flattenSingleValue($mixedCaseString);
-
- if (is_bool($mixedCaseString)) {
- $mixedCaseString = ($mixedCaseString) ? Calculation::getTRUE() : Calculation::getFALSE();
- }
-
- return StringHelper::strToTitle($mixedCaseString);
+ return TextData\CaseConvert::proper($mixedCaseString);
}
/**
* REPLACE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the replace() method in the TextData\Replace class instead
+ *
* @param string $oldText String to modify
* @param int $start Start character
* @param int $chars Number of characters
@@ -454,20 +301,16 @@ class TextData
*/
public static function REPLACE($oldText, $start, $chars, $newText)
{
- $oldText = Functions::flattenSingleValue($oldText);
- $start = Functions::flattenSingleValue($start);
- $chars = Functions::flattenSingleValue($chars);
- $newText = Functions::flattenSingleValue($newText);
-
- $left = self::LEFT($oldText, $start - 1);
- $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText) - ($start + $chars) + 1);
-
- return $left . $newText . $right;
+ return TextData\Replace::replace($oldText, $start, $chars, $newText);
}
/**
* SUBSTITUTE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the substitute() method in the TextData\Replace class instead
+ *
* @param string $text Value
* @param string $fromText From Value
* @param string $toText To Value
@@ -477,52 +320,32 @@ class TextData
*/
public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0)
{
- $text = Functions::flattenSingleValue($text);
- $fromText = Functions::flattenSingleValue($fromText);
- $toText = Functions::flattenSingleValue($toText);
- $instance = floor(Functions::flattenSingleValue($instance));
-
- if ($instance == 0) {
- return str_replace($fromText, $toText, $text);
- }
-
- $pos = -1;
- while ($instance > 0) {
- $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8');
- if ($pos === false) {
- break;
- }
- --$instance;
- }
-
- if ($pos !== false) {
- return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText);
- }
-
- return $text;
+ return TextData\Replace::substitute($text, $fromText, $toText, $instance);
}
/**
* RETURNSTRING.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the test() method in the TextData\Text class instead
+ *
* @param mixed $testValue Value to check
*
* @return null|string
*/
public static function RETURNSTRING($testValue = '')
{
- $testValue = Functions::flattenSingleValue($testValue);
-
- if (is_string($testValue)) {
- return $testValue;
- }
-
- return null;
+ return TextData\Text::test($testValue);
}
/**
* TEXTFORMAT.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the TEXTFORMAT() method in the TextData\Format class instead
+ *
* @param mixed $value Value to check
* @param string $format Format mask to use
*
@@ -530,65 +353,32 @@ class TextData
*/
public static function TEXTFORMAT($value, $format)
{
- $value = Functions::flattenSingleValue($value);
- $format = Functions::flattenSingleValue($format);
-
- if ((is_string($value)) && (!is_numeric($value)) && Date::isDateTimeFormatCode($format)) {
- $value = DateTime::DATEVALUE($value);
- }
-
- return (string) NumberFormat::toFormattedString($value, $format);
+ return TextData\Format::TEXTFORMAT($value, $format);
}
/**
* VALUE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the VALUE() method in the TextData\Format class instead
+ *
* @param mixed $value Value to check
*
* @return DateTimeInterface|float|int|string A string if arguments are invalid
*/
public static function VALUE($value = '')
{
- $value = Functions::flattenSingleValue($value);
-
- if (!is_numeric($value)) {
- $numberValue = str_replace(
- StringHelper::getThousandsSeparator(),
- '',
- trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode())
- );
- if (is_numeric($numberValue)) {
- return (float) $numberValue;
- }
-
- $dateSetting = Functions::getReturnDateType();
- Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
-
- if (strpos($value, ':') !== false) {
- $timeValue = DateTime::TIMEVALUE($value);
- if ($timeValue !== Functions::VALUE()) {
- Functions::setReturnDateType($dateSetting);
-
- return $timeValue;
- }
- }
- $dateValue = DateTime::DATEVALUE($value);
- if ($dateValue !== Functions::VALUE()) {
- Functions::setReturnDateType($dateSetting);
-
- return $dateValue;
- }
- Functions::setReturnDateType($dateSetting);
-
- return Functions::VALUE();
- }
-
- return (float) $value;
+ return TextData\Format::VALUE($value);
}
/**
* NUMBERVALUE.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the NUMBERVALUE() method in the TextData\Format class instead
+ *
* @param mixed $value Value to check
* @param string $decimalSeparator decimal separator, defaults to locale defined value
* @param string $groupSeparator group/thosands separator, defaults to locale defined value
@@ -597,39 +387,7 @@ class TextData
*/
public static function NUMBERVALUE($value = '', $decimalSeparator = null, $groupSeparator = null)
{
- $value = Functions::flattenSingleValue($value);
- $decimalSeparator = Functions::flattenSingleValue($decimalSeparator);
- $groupSeparator = Functions::flattenSingleValue($groupSeparator);
-
- if (!is_numeric($value)) {
- $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator;
- $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator;
-
- $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE);
- if ($decimalPositions > 1) {
- return Functions::VALUE();
- }
- $decimalOffset = array_pop($matches[0])[1];
- if (strpos($value, $groupSeparator, $decimalOffset) !== false) {
- return Functions::VALUE();
- }
-
- $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value);
-
- // Handle the special case of trailing % signs
- $percentageString = rtrim($value, '%');
- if (!is_numeric($percentageString)) {
- return Functions::VALUE();
- }
-
- $percentageAdjustment = strlen($value) - strlen($percentageString);
- if ($percentageAdjustment) {
- $value = (float) $percentageString;
- $value /= 10 ** ($percentageAdjustment * 2);
- }
- }
-
- return (float) $value;
+ return TextData\Format::NUMBERVALUE($value, $decimalSeparator, $groupSeparator);
}
/**
@@ -637,22 +395,27 @@ class TextData
* EXACT is case-sensitive but ignores formatting differences.
* Use EXACT to test text being entered into a document.
*
- * @param $value1
- * @param $value2
+ * @Deprecated 1.18.0
+ *
+ * @see Use the exact() method in the TextData\Text class instead
+ *
+ * @param mixed $value1
+ * @param mixed $value2
*
* @return bool
*/
public static function EXACT($value1, $value2)
{
- $value1 = Functions::flattenSingleValue($value1);
- $value2 = Functions::flattenSingleValue($value2);
-
- return (string) $value2 === (string) $value1;
+ return TextData\Text::exact($value1, $value2);
}
/**
* TEXTJOIN.
*
+ * @Deprecated 1.18.0
+ *
+ * @see Use the TEXTJOIN() method in the TextData\Concatenate class instead
+ *
* @param mixed $delimiter
* @param mixed $ignoreEmpty
* @param mixed $args
@@ -661,23 +424,17 @@ class TextData
*/
public static function TEXTJOIN($delimiter, $ignoreEmpty, ...$args)
{
- // Loop through arguments
- $aArgs = Functions::flattenArray($args);
- foreach ($aArgs as $key => &$arg) {
- if ($ignoreEmpty && trim($arg) == '') {
- unset($aArgs[$key]);
- } elseif (is_bool($arg)) {
- $arg = self::convertBooleanValue($arg);
- }
- }
-
- return implode($delimiter, $aArgs);
+ return TextData\Concatenate::TEXTJOIN($delimiter, $ignoreEmpty, ...$args);
}
/**
* REPT.
*
- * Returns the result of builtin function round after validating args.
+ * Returns the result of builtin function repeat after validating args.
+ *
+ * @Deprecated 1.18.0
+ *
+ * @see Use the builtinREPT() method in the TextData\Concatenate class instead
*
* @param string $str Should be numeric
* @param mixed $number Should be int
@@ -686,12 +443,6 @@ class TextData
*/
public static function builtinREPT($str, $number)
{
- $number = Functions::flattenSingleValue($number);
-
- if (!is_numeric($number) || $number < 0) {
- return Functions::VALUE();
- }
-
- return str_repeat($str, $number);
+ return TextData\Concatenate::builtinREPT($str, $number);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php
new file mode 100644
index 00000000..36b5efbd
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/CaseConvert.php
@@ -0,0 +1,64 @@
+ 255) {
+ return Functions::VALUE();
+ }
+
+ return iconv('UCS-4LE', 'UTF-8', pack('V', $character));
+ }
+
+ /**
+ * ASCIICODE.
+ *
+ * @param mixed $characters String character to convert to its ASCII value
+ *
+ * @return int|string A string if arguments are invalid
+ */
+ public static function code($characters)
+ {
+ if (($characters === null) || ($characters === '')) {
+ return Functions::VALUE();
+ }
+ $characters = Functions::flattenSingleValue($characters);
+ if (is_bool($characters)) {
+ $characters = self::convertBooleanValue($characters);
+ }
+
+ $character = $characters;
+ if (mb_strlen($characters, 'UTF-8') > 1) {
+ $character = mb_substr($characters, 0, 1, 'UTF-8');
+ }
+
+ return self::unicodeToOrd($character);
+ }
+
+ private static function unicodeToOrd($character)
+ {
+ return unpack('V', iconv('UTF-8', 'UCS-4LE', $character))[1];
+ }
+
+ private static function convertBooleanValue($value)
+ {
+ if (Functions::getCompatibilityMode() == Functions::COMPATIBILITY_OPENOFFICE) {
+ return (int) $value;
+ }
+
+ return ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Concatenate.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
new file mode 100644
index 00000000..5780bb6e
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Concatenate.php
@@ -0,0 +1,82 @@
+ &$arg) {
+ if ($ignoreEmpty === true && is_string($arg) && trim($arg) === '') {
+ unset($aArgs[$key]);
+ } elseif (is_bool($arg)) {
+ $arg = self::convertBooleanValue($arg);
+ }
+ }
+
+ return implode($delimiter, $aArgs);
+ }
+
+ /**
+ * REPT.
+ *
+ * Returns the result of builtin function round after validating args.
+ *
+ * @param mixed $stringValue The value to repeat
+ * @param mixed $repeatCount The number of times the string value should be repeated
+ */
+ public static function builtinREPT($stringValue, $repeatCount): string
+ {
+ $repeatCount = Functions::flattenSingleValue($repeatCount);
+
+ if (!is_numeric($repeatCount) || $repeatCount < 0) {
+ return Functions::VALUE();
+ }
+
+ if (is_bool($stringValue)) {
+ $stringValue = self::convertBooleanValue($stringValue);
+ }
+
+ return str_repeat($stringValue, (int) $repeatCount);
+ }
+
+ private static function convertBooleanValue($value)
+ {
+ if (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_OPENOFFICE) {
+ return (int) $value;
+ }
+
+ return ($value) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php
new file mode 100644
index 00000000..2f994858
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php
@@ -0,0 +1,77 @@
+ 0) {
+ $mask .= '.' . str_repeat('0', $decimals);
+ } else {
+ $round = 10 ** abs($decimals);
+ if ($value < 0) {
+ $round = 0 - $round;
+ }
+ $value = MathTrig\Round::multiple($value, $round);
+ }
+ $mask = "{$mask};-{$mask}";
+
+ return NumberFormat::toFormattedString($value, $mask);
+ }
+
+ /**
+ * FIXEDFORMAT.
+ *
+ * @param mixed $value The value to format
+ * @param mixed $decimals Integer value for the number of decimal places that should be formatted
+ * @param mixed $noCommas Boolean value indicating whether the value should have thousands separators or not
+ */
+ public static function FIXEDFORMAT($value, $decimals = 2, $noCommas = false): string
+ {
+ $value = Functions::flattenSingleValue($value);
+ $decimals = $decimals === null ? 2 : Functions::flattenSingleValue($decimals);
+ $noCommas = Functions::flattenSingleValue($noCommas);
+
+ // Validate parameters
+ if (!is_numeric($value) || !is_numeric($decimals)) {
+ return Functions::VALUE();
+ }
+ $decimals = (float) $decimals;
+ $value = (float) $value;
+ $decimals = (int) floor($decimals);
+
+ $valueResult = round($value, $decimals);
+ if ($decimals < 0) {
+ $decimals = 0;
+ }
+ if ($noCommas === false) {
+ $valueResult = number_format(
+ $valueResult,
+ $decimals,
+ StringHelper::getDecimalSeparator(),
+ StringHelper::getThousandsSeparator()
+ );
+ }
+
+ return (string) $valueResult;
+ }
+
+ /**
+ * TEXTFORMAT.
+ *
+ * @param mixed $value The value to format
+ * @param mixed $format A string with the Format mask that should be used
+ */
+ public static function TEXTFORMAT($value, $format): string
+ {
+ $value = Functions::flattenSingleValue($value);
+ $format = Functions::flattenSingleValue($format);
+
+ if ((is_string($value)) && (!is_numeric($value)) && Date::isDateTimeFormatCode($format)) {
+ $value = DateTimeExcel\DateValue::fromString($value);
+ }
+
+ return (string) NumberFormat::toFormattedString($value, $format);
+ }
+
+ /**
+ * VALUE.
+ *
+ * @param mixed $value Value to check
+ *
+ * @return DateTimeInterface|float|int|string A string if arguments are invalid
+ */
+ public static function VALUE($value = '')
+ {
+ $value = Functions::flattenSingleValue($value);
+
+ if (!is_numeric($value)) {
+ $numberValue = str_replace(
+ StringHelper::getThousandsSeparator(),
+ '',
+ trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode())
+ );
+ if (is_numeric($numberValue)) {
+ return (float) $numberValue;
+ }
+
+ $dateSetting = Functions::getReturnDateType();
+ Functions::setReturnDateType(Functions::RETURNDATE_EXCEL);
+
+ if (strpos($value, ':') !== false) {
+ $timeValue = DateTimeExcel\TimeValue::fromString($value);
+ if ($timeValue !== Functions::VALUE()) {
+ Functions::setReturnDateType($dateSetting);
+
+ return $timeValue;
+ }
+ }
+ $dateValue = DateTimeExcel\DateValue::fromString($value);
+ if ($dateValue !== Functions::VALUE()) {
+ Functions::setReturnDateType($dateSetting);
+
+ return $dateValue;
+ }
+ Functions::setReturnDateType($dateSetting);
+
+ return Functions::VALUE();
+ }
+
+ return (float) $value;
+ }
+
+ /**
+ * NUMBERVALUE.
+ *
+ * @param mixed $value The value to format
+ * @param mixed $decimalSeparator A string with the decimal separator to use, defaults to locale defined value
+ * @param mixed $groupSeparator A string with the group/thousands separator to use, defaults to locale defined value
+ *
+ * @return float|string
+ */
+ public static function NUMBERVALUE($value = '', $decimalSeparator = null, $groupSeparator = null)
+ {
+ $value = Functions::flattenSingleValue($value);
+ $decimalSeparator = Functions::flattenSingleValue($decimalSeparator);
+ $groupSeparator = Functions::flattenSingleValue($groupSeparator);
+
+ if (!is_numeric($value)) {
+ $decimalSeparator = empty($decimalSeparator) ? StringHelper::getDecimalSeparator() : $decimalSeparator;
+ $groupSeparator = empty($groupSeparator) ? StringHelper::getThousandsSeparator() : $groupSeparator;
+
+ $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE);
+ if ($decimalPositions > 1) {
+ return Functions::VALUE();
+ }
+ $decimalOffset = array_pop($matches[0])[1];
+ if (strpos($value, $groupSeparator, $decimalOffset) !== false) {
+ return Functions::VALUE();
+ }
+
+ $value = str_replace([$groupSeparator, $decimalSeparator], ['', '.'], $value);
+
+ // Handle the special case of trailing % signs
+ $percentageString = rtrim($value, '%');
+ if (!is_numeric($percentageString)) {
+ return Functions::VALUE();
+ }
+
+ $percentageAdjustment = strlen($value) - strlen($percentageString);
+ if ($percentageAdjustment) {
+ $value = (float) $percentageString;
+ $value /= 10 ** ($percentageAdjustment * 2);
+ }
+ }
+
+ return (float) $value;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Replace.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Replace.php
new file mode 100644
index 00000000..7ca710ef
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Replace.php
@@ -0,0 +1,64 @@
+ 0) {
+ $pos = mb_strpos($text, $fromText, $pos + 1, 'UTF-8');
+ if ($pos === false) {
+ break;
+ }
+ --$instance;
+ }
+
+ if ($pos !== false) {
+ return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText);
+ }
+
+ return $text;
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Search.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Search.php
new file mode 100644
index 00000000..2da688d8
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Search.php
@@ -0,0 +1,80 @@
+ 0) && (StringHelper::countCharacters($haystack) > $offset)) {
+ if (StringHelper::countCharacters($needle) === 0) {
+ return $offset;
+ }
+
+ $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8');
+ if ($pos !== false) {
+ return ++$pos;
+ }
+ }
+ }
+
+ return Functions::VALUE();
+ }
+
+ /**
+ * SEARCHINSENSITIVE.
+ *
+ * @param mixed $needle The string to look for
+ * @param mixed $haystack The string in which to look
+ * @param mixed $offset Integer offset within $haystack to start searching from
+ *
+ * @return int|string
+ */
+ public static function insensitive($needle, $haystack, $offset = 1)
+ {
+ $needle = Functions::flattenSingleValue($needle);
+ $haystack = Functions::flattenSingleValue($haystack);
+ $offset = Functions::flattenSingleValue($offset);
+
+ if (!is_bool($needle)) {
+ if (is_bool($haystack)) {
+ $haystack = ($haystack) ? Calculation::getTRUE() : Calculation::getFALSE();
+ }
+
+ if (($offset > 0) && (StringHelper::countCharacters($haystack) > $offset)) {
+ if (StringHelper::countCharacters($needle) === 0) {
+ return $offset;
+ }
+
+ $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8');
+ if ($pos !== false) {
+ return ++$pos;
+ }
+ }
+ }
+
+ return Functions::VALUE();
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php
new file mode 100644
index 00000000..6e408891
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php
@@ -0,0 +1,59 @@
+ 2048) {
- return Functions::VALUE(); // Invalid URL length
- }
-
- if (!preg_match('/^http[s]?:\/\//', $url)) {
- return Functions::VALUE(); // Invalid protocol
- }
-
- // Get results from the the webservice
- $client = Settings::getHttpClient();
- $requestFactory = Settings::getRequestFactory();
- $request = $requestFactory->createRequest('GET', $url);
-
- try {
- $response = $client->sendRequest($request);
- } catch (ClientExceptionInterface $e) {
- return Functions::VALUE(); // cURL error
- }
-
- if ($response->getStatusCode() != 200) {
- return Functions::VALUE(); // cURL error
- }
-
- $output = $response->getBody()->getContents();
- if (strlen($output) > 32767) {
- return Functions::VALUE(); // Output not a string or too long
- }
-
- return $output;
+ return Web\Service::webService($url);
}
}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web/Service.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web/Service.php
new file mode 100644
index 00000000..05e04bf9
--- /dev/null
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Web/Service.php
@@ -0,0 +1,75 @@
+ 2048) {
+ return Functions::VALUE(); // Invalid URL length
+ }
+
+ if (!preg_match('/^http[s]?:\/\//', $url)) {
+ return Functions::VALUE(); // Invalid protocol
+ }
+
+ // Get results from the the webservice
+ $client = Settings::getHttpClient();
+ $requestFactory = Settings::getRequestFactory();
+ $request = $requestFactory->createRequest('GET', $url);
+
+ try {
+ $response = $client->sendRequest($request);
+ } catch (ClientExceptionInterface $e) {
+ return Functions::VALUE(); // cURL error
+ }
+
+ if ($response->getStatusCode() != 200) {
+ return Functions::VALUE(); // cURL error
+ }
+
+ $output = $response->getBody()->getContents();
+ if (strlen($output) > 32767) {
+ return Functions::VALUE(); // Output not a string or too long
+ }
+
+ return $output;
+ }
+
+ /**
+ * URLENCODE.
+ *
+ * Returns data from a web service on the Internet or Intranet.
+ *
+ * Excel Function:
+ * urlEncode(text)
+ *
+ * @param mixed $text
+ *
+ * @return string the url encoded output
+ */
+ public static function urlEncode($text)
+ {
+ if (!is_string($text)) {
+ return Functions::VALUE();
+ }
+
+ return str_replace('+', '%20', urlencode($text));
+ }
+}
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt
index 96c28a97..270715cd 100755
--- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt
+++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/functionlist.txt
@@ -53,6 +53,7 @@ CODE
COLUMN
COLUMNS
COMBIN
+COMBINA
COMPLEX
CONCAT
CONCATENATE
@@ -249,6 +250,7 @@ MODE
MONTH
MROUND
MULTINOMIAL
+MUNIT
N
NA
NEGBINOMDIST
diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/Translations.xlsx b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/locale/Translations.xlsx
new file mode 100644
index 0000000000000000000000000000000000000000..518176ab9fb862b37b8d1e7340dfa8341b5abfd3
GIT binary patch
literal 109827
zcmeEtgDJ4kf5YpWs-5}Ck0#ZYYba!``BA|eDhte%DbbP<@dCz&z
z`Qk4)AJ^r8%y92od+oLF0aZl=L;?^p2o(eZQG>MTv_lTyKp=KB5C|WH3U46g?DWpk
z>79wDw~M8_5r>zf!;5@Gc&1zsJn;Je|M5RK1B0ncP6b@gB2IMng`-wmQGA1la1)%_~m^O;9oyo#pAqGqH5M6t?DaiW+3z&mX$Fc8OILhBZqotl+$KJ1p+cqJ5J7DFhyvz{OrodLO9Ze
zYWVq{Q{I6XBTK@mp(eTr{~e`f91=*&@>i!-{u7Ai4QBZ3;S1GYT)UzbVYH##Y>fj3
zZyqqsewb7bNB_?0Ty(*<2Jzj#Hg!IXom)D1p6|J}r=|6}&COsW7FyBPRIyqAZK4gw
zK0#CA^LulS(*e`ujrRiei9$UuUQY}?1fEIwrHe-#Ks9jR3gO8urUY4V20lBYAs&%>
zl<-qZDcTR<7c;)7(=x+c!W=1#JsNh3jO|*I
zQ|OAX3RGTky=y?WbU&$k!pUXGugLCwzW6l)LQtK_(=|rwp3$7@5XXy+9@;vDE^_q~
z?UJ7EYSq)3!p--Jt24T>t1&K)0wb6aE7HlQ-1hm0duJDq1$6tt$P+|^h@7kiX8_($
zPY58@|Hcuv(J#y>0FKxIC;$WC2opC;2X{^m*yI1_hX28Y@Lxi&gs3SFa1n&BAw5Zb
zyUXy1{!qCRgX)W4CbrJecBJrmIl-{$?y7id58WO0Hhpt*Q+UU!jm&}5n0qkQkow$#
z14&4^*h85*ry_EpiXgF%ba&W{+LL6fyt7kR)C?z+v+jB$X6#w6u#GDF_BlCWoXFc(e+cX~zSZ*UsA~%67(d3e)PFM#lCVV=Jf}`X
za?&7Dldws^u$31pK5Er@8>L@9B_2Z+K_I6aHH8ayvlN0VXCXMzV|ZDCUtwX
z)IdK7FN+vuk-h#dLsU`v-5W|!&~w7$8&)Zs#KI`4%_dt@DPh7P8YpC<2<=QhTYwKL
zk5bF?pm_C03PT&Rtu$K+Kdev=vC%DOEGZ+T_154jR^0HaCKsaLAY7!8-Y39p({~*y
zhBVVxTo6ffOYo+z5p+8FG(xiBb?~6ev-~NRSkDwWS_6*66SXFH&&nXtY)GwLeZfs?
zr&t@2MkJk&49_TxwA{+y((2q|=4Ms>lzX(8>$`q|`1vvQt^9
z^|2u|TY98=>A3=HtZ?1dYjYwo83Ub%(My@sBh<>~52In)3
zl27fM^HRpf;$(C4%Az2@X+gF+t^46(ntMLhUyUDHwBn#;1pUsRjCL?m8!TX?6MpF|
z)Ew0l&qny^ZrU;~wquB~p*i1(Gr$uQbB*d;NdH1$fSmw+OvxxWiO0rd#WUA55ZKPU{H|rMC_rrN3M(L06zr?K%w|Ly?D?
zTf-haS%(){fw6H2Xkn0(soje}B92F3iv6GS4G(R0lL~ld5a>!W5Gowdk^hXi|Js-T
zG49|1DGa>!fA&Xb(&(E3u4gh=^7o-zBCdG3FEmTY!=~AjacVP%rDCbh(&Zkr)!?xb
z723;m$C~_hcE`T^oZAXrV#66&(~m=vU)CK>CBS<4Y
zu-?@yRGDw2ByH18?u_~=h8o-sSHR^;$=0RGK|)xD*>tLKqJ>4HGL?ebBjUw<{&q?I
ztd_mz)e|Ad#?#TiO0uwGqrfj}hx
zCVY1rOUrleoPR%Y!gnn4Lt(0s^CA~P#0le(m~=N|lrkz}qV@%X<0P-vk!ZE@
zujEp2=0b6A@xv8`Ft=I3XGpc(ALcr$o}FuG@RzM_woGe=w__C~W^;1b6?oa(GZr63
z1NCFAz9mL$GqZbrF@I-@XJp*z-!Sj`hfd%lGYV?T$DgugKF8iX3$+l1w7JRi?{3~%0Ke!Pd}VQ8iUW#`NGk(zIJ-*4YhL4@QEw4ulRr2WxRhE1Z*U2CTJ2KVS
z3`U#D!}kvsUyzK5U1)rtPYf<#T+^Qlh~g@Zd+u|7Vvw8kruQ{-Sx39fw72(QI%{Y7
zHJm6TG=H5^dx|=>g?H|l{dISU-8fF_nl!v+YKuu1xk2q6#d2KrH@d;R9(@_JQ+y+~
z$>*IV4Q_~|=8c2rTX-nnI&?{#1BVyhWDmyWAE0R0N^{R6(aM=*@$IPi{POi0MX^$5
z-9DtU6Wk_|h=}Az^pBpS(k-smQybj12zs7TdjDyqFPfyPO}(>ooJwHCP!s9IG9=JC
z<)=mSi~^sSY>-_E|HlY#tc*>8B#bbjSg};T&o;R4gA_1{*P`?+^Nkn>!~Rix%)C
zb@wO~J;|1Ms+EY_@ZXH^w6jl(taVukS(jR`N4P}X;(ebQz)C{9Kq@V>N2KorA$JN{
zR^O2uQnou|Q>)A%)1;H!{`3-(7|Q@RO+q7WhqWb*dYY3O`)Lv52E|R6`Npk}-@fik
zO1Ov=-@-(c#n@v9z2~+!bC@H&01rOTSIpL+*S_wyxnY0gHUjkkv9AW*JnlXHXpT9UbcT1Y%Rn2&rTrFP|
zc3cc{2V%QIhvyEy;DOV5c1rIok5Fw>`nxeIzpwK?vM5<-CZ!`iPI%4QKZA?Ho-8aK
zVhcj?cfK!n{A@9v6}lc2p2}ljIJF!Rltal%?<>$P%KV7
z%2l>_OnkDfZHwY-!EQgpOtt8$@->-rISu<5O6{1Xt9X$6TWLVlf8`|=Z_mHGt1@H3
zX-WQ>Od$OP%15v(KEe`+Ua#YA)%2N_Ao4c-pWd^#R*wN0^`>3Y{5WI;a?;E!lGW
z#f9alZU8a={EiVUSp6HaFM$a*k~r&Z_ct7;M+zpMFYG=Q-(AQIK2x`IkLYjy7Mh!=
zc=o%ug+8{3Zk`_(`@?I*En|fcgknkceQKtc)WeGFA#Lc+koj45L-k~?PDKgyy^@qh
zj{5jfBXyGLjgY2f#4iF6L}CY-pabf6i)aV;s6&>YCSFIqac$!BI_PLo
z>kJgZ6Sf8N7gO5EB>t9+mFKhslBsAvlJG`ZF4hH>Z^AJHbXW
z6e3G5;|d`urB-V`7d>gCo5E5>_h&|n#-T&g6V;rRIYj0dHoQATp8O=}MDs3s{@^&J
zkYGqTyl`5|X)NsJ@AMV%gvn=PhONL)ny#oP^n>7x!D4w4?rCq^;p$D<>HCn#NloAV
zs8S*{zUvq2d6!3pe8z^K!C17>yN|rF(;=b#ZM}&qC(|^G_#xt0I@u(c%1o);nMnZo6$_OF2Y0cJ;(1hUT^|Zh>
zV2%%n^mazU6>QD-aALA=i5f9!M#^6
z5Q0yZxN4fYO-WwCeb>X_l1xL`?nNN^(hT>}Z2>;wvEY^ws;K6iySW&iz!TTILV;7~UJ?xQ;Kgv=KVw5ImwTSLk1tn>Jh&0Ffn*@J
zh)&Q?qOR`sPVzZrS6Yb+dZr!GYoRH&YmYav*Ld!IoTC`m(Py}6nS#ISi~V%lHqOW1
zPmXLP9PDL1_wk=mQ7Z!o)CA8j^IxQ9}#e~l$7Zv#;ZFMR%)a~EMI!YsrS0=
zH4)_7yU8YsN;>O
zpQ9UISW?4LCflsTjQg1*v$gV^S^wT5apkwjNPVP=#>7HEmotDe1v4jAePlI{=PL3k27bk=Z&a(qVA6mfBJZ
zKbXg?3n$m3Ex|%45yn5k5cjrCn9`gWjHoTwkf3XnjTGuLn5gUjYwQ5aAv~3~s_5Lu
zLUAL`3ZC6O`K%E#WR;@po*mv?+xo0)3+Z)IEM{cTX(ymhwcajbCD5}ho@XKSE+%1t+qxJ%kExG&
zsji`T2-y0+NVuLolk1pa5Gca}>Hj6+c>cSDt4uL+{`@Zq_hJo&iv(WHCZ(u~-~DHq=At1U$N?nIcMWYRLjMu<5|CFJ2+WN61@doHrRHap$M&6pl_iKAXO<&3R{
zAMN(+#tDzQBC&DArjIo>m)3p)INYLo
z&9l-e8SPJFq7Ez^yX8UnuS_L14qmKp^(~3PBpey%r(%)4PDlY)x?qUNR(TV0vZo%Q
z>qJ8*+_niShHpAcTKdr$n}nGEbJ>9Pq+#CfD2Blf4@L}3sttBMjwmYc)s7{TUAye9
z311dg#afRLBCpG5Ues>Y+wCnq+YW1)gQ@i+(dTl|bp(e^_<~}>2J9R=!C6EJ*&z-@
z5y%|XftKVlH7CBn{`rinWQG{=S*$9;M>qvC@=_G?_Ud1T>@U
zNJ@b}FnOYXhxg>D*Aazh#_vqbA+FT&Ofuz!>P|#w&IxWy@7k_@N@s_cKc#(&_)AwU
zPjhjHr0D5`Z}DW9LDW3;^Q8TAz4x7F%ILF^Jd65LBN(Q=C0g72=m>!mp_EtN3@y);
zk8DZ8jC0Z7Yo-SK)acTlXdambwA<$vueC2I*r|km%0RY|JC`IEqV7i*z=O9gr&jI4
z{)NAEZiFX0B|(5nIvmQEfl{y`^L`!WS`YHuTh;JK=+Dz->fvgu->y^GC>D{ln|x>M
zRPv*tKfhrdeYhr`;W#$sdQ5BRJ&jzrBu9)8^jB_gJuyX9f)f!Q44Cua6n*BfE7)O(a+Z>G57VJCFQkt=jUR)5Of~pV
zphMC`tjATXmgVzc6vgY{qc_7C4KLsHh7!t~UJ(!XYzf}x-(&sfl2e&=6n7vCaWpB~
zKuO$8q
zuX-MHOagA^Zc73mE(Wfi?uVWpro^6Zjc!(Q0v^V59v>?n4>-5fpU&q_%1<6I&I2EA
zYXa{b&*K9hk4gf&UOs8?i#^<@JzcLsIeQ-ON7tY&zt%EN0Y@UvmaY#xe|QE?
zt_9ARJl#d^--$h4;jBH~?5O-2!jZ%Zq)&yqjaAZ2akM*OSHaosyJ2I2QjW~A9ciZ7
z^kZx>RE=iNQ{Ut6XM`I$QRS6ins|arnb^{XP*bu>))7@_8qa&jU34-tWZ+ug|c8+o`Aqhnb_(r8LdoomX@QUAdzN4Q@@?eY3gWEoRMKUKe0SfOD@
zi+xbW;_)|->fXu@gQR-3krT{P*NTk%NYhetB*FBfAtjf}-I@Q6*m(G!q
ztaV^Wh|+i$5L^&VrRbL*Zgk>q8eM1Q{&H>8J6Z0Y5PlNuKl!~~W8QpNL-Uirse%^)
zs8!aM1Ad;>#spDrdwsVZiddDi(#c&(&(kxsuIkE97Gcv^1`H}7tw%dSIh%#~b5Gp!
zU0;U}7#q#u(APRax0BUwq0`f%pf-eQk9aCke5(FLO1
zMU%%4)ER$!ii^j+6EW$0miyTE9}~iCRZh@yM>fNkfOfi?EXk?8=t#wC?cku$gS9
z1AdDpMj~*jmyOSr6^)&{(3GD6Zv#$G?kJ_<`Y_E<{uV%Qhsqr&XqxEv1Quw{a@+~4
zt-OW0RnPvUm+#pe#ZfW4O}#>~lTq68pA?e85-$^OYIF#K=*KPsHq5uMnaXCI_W!X_
z(e$n`wS6)BNQ1?|IyY4`vHjzORF$Z5ey%~_V6`-~2y4qJd1Nsqkg@!8rR?~O&@H0X
zKzC<|egHT5Tg@K^RC8{DEyFP}H^=88?6ro-B?9V38|OD3;AF8B1oiI528ofO0fWNj
zz!hA=Iomq+z^Ug6XC-H-noCz3dLheKioVar=4bnd#^rCA?qZn*rV`xnAHF94pgERT
zCYs!-r%Lk-ypn=i#$LzV-C5lHNwf7VFkXlur6~lPku1I~h2tnqlPR_CtzC8~ShqJ(
zUx6!13&%>j6dz`8Uh{fUemZoGnp{kLEc;CBCgA``VwwPl7x9W)!Ms7>j8WA7sOsXg
zllZU6dChR8PLQd#-XY6hYwV}-P22nS-UIRUpOEr!N-RB3+GZy-^3&YRQ>2U@ANw*;z{rP=Z(aNkAc=T!&r8?M-{GZ5^e^GwX
z%r9Q1Iyu=%Uw&Eii$WEz^=?AE45dZs`3IJJqyR((DFV-esPg+CZpe0fF}%bIgOk-)
zvUM$wF2+&&tS!aNB~4;%SJn#|Kv)ld!;;Ja!ip_YHrLMC`aTuherwfnb3nicnz=?2
zKxFR}UICEkc8<-ow{&!B&V@53zm^E2)gC>+B~BkGL3TawiQ#FoMa_9Hq-os8Qyjc{Y@%-1Wb!8=`Vlp`e0;g*d*K0q
z1r+Xop-k!kC=qep8dFhIyvOl4gfH!i%FIN&ulxRf)Ns|wgl6;74;XTg_Nu2PRgIW%
zXMDQyOYakaN|$~pVv1g@G-8d0ib-nVwZulKd~(Qw)4v66Lu~hA&sJ}1Zxu98!o>te
zY>s|s-Zcn|5Cdl$Y2zQbtqNVsl9l$f3Z8!v$Z+sIzgdXa3Txb%Z4n0*DYq0idqk5Z
zoZ)^)X6B?_quD}HIQ(Ger)C%L7*6{-;cRa!v3~K&tQDv2B&~Zf&hbX`ASAg*a4r4J
zKTiG&J$bY!_JCF
z78xw*l)iFMxt`ZmGky7c?~|ZO!{LMVph?NJhpz}~;XMv<$x~xr-qV!3VQc}D!K45f
zubtE@VFkGcCY|kgGk0+<??}ocNt9e>Kgt
zJF8OwjMwg+qf~|72U5Pd3Ipu5S=LHUUs5Xy(!Cjb3iWAFvK^d%5h2sw42rw-%<9QW
z5X87k35&_Z=+!fg>sT>$N}(L%9Q6eupjqO6@krt{wM)oKv~+jAqc6Ww77$Rd6hu7%
zdgagCZ95NyjU~HS)>F|klbOUs{RgjHfXwKdZbz6^)hlv5B{Yv7Ct-{UzbT@sb@V$P
z$j{m>t!2LZ%gf}EIe^VP34rYE&R}r@+G8sYXqJ<_HZ`7s!~)O!_NZZ=xe8%;z<)O5
zj#w=@*#aGtT@^J1RefZf0=Q+7t#JN{)He%f8eFglAec;4DU=_W@4r%M^qfj-ZeipB
ztg@R_~6O&-I!f~PY_-sG`$0x00w5crb5V<
zZ__Un#Hy}V*kL*PbNoj0%7D>q&WY6DpvomX^(4X9`KLBcxeNCDXtJP5-Cmz_EFep1
zz0b7ngzjPLDc%`Q!6LX86X~w%kW>h$LyM?NnFBEN+Y32qF9ZX4zc-kFTLd2!abBGJ
zu2r}dXhv9^9=|i71ZP}Ta^Ae=%d91|(o0l(rI>CBH{&HH&n%P?7fEX3C)E=j_YyYmx@)6*4^q
zth3$SwJK_nniq1p{kE0=4nx)61$EsEcKV#Apunx!Mr|jcGdJn^H0;kOxt&fLv)(#7
zHxqJ^HThI|Mw5MD@uv>}Mi!hCFRs>|{?E7ovyOmx}oW-&+t=AP^dF5Dd{@F{l4meiU#2_Jg8|L`y(S4bW)ud$M43
z#+?;FebqFy>6@H2WbA6)&;r-ZcF;uozwTSQBP37n2N0<>)kGYf5=X>a(4V=0WbK;9
z4pEb*?Zz(wQrrmuu$oux6xLlnLwE^vn5GH&8zDXpIY1&;G
z@1OT?vXRrN^oPFB$;U3+jZco+v)w-F5L5Z9Nh6Y&
z&2@+=P8wDP4nC$b96I0Jk5*Q5`gNPdYU+-dk6gvQB%~vct>MUow)}4HyiF=Qtsi2&
zt#$!eeDtM8_t*Gj&W}c)&ZbgfZ2ZY*GoZRv%zO%rKQ?-IAHzJRtXX)k#m{AV6*!R0
zdGQkXJd{j)#l00tN4<4^gs<`bX73Ns-4@it>-25+k>HN;2_+4Wx?L#
zb58d!NVEjZIfj@@;d5>mQtd1bqrJ_3@J$vY%CyCYk5r$~@yViBBMYsaM(w53>#a{l
zl0|$4irKENtUYb2Thlu8kPXvo1EQ+qosC0Nc^kOxUX;J<0i!3E$es(c~<0b+1iqbH;U+J%FgD@|UWLRMbYY
zyA{U%$xvB|0|VsuVLWOZ7%Q-LTe|vJyWuqbq&frtiB5NcOlOpS)v-bD%)W~t&u#qW
z|+uH?E>2SD9fRg?R;`U=yi1v?~13vV;eShJx
zSP1FZeiuOD$U5#_-J8#vep0)YxXCE}{yhkYkPj>a5<|eLvr>+L@{}+|NxsiZ)lh0HGfoIxjF>(^;im{rLQPEdxzy`#@8aXf(YKW-IFGHXd0FAFq`_tf{m=y>r4I!3K)9tEsn=0dFKuk@3IzKDZZ|qv6^1+|5+>sD5EI;
zr(RDR93Wb{#-(RO5!QYZ4xkYKoi;xktj33MfhlJ%^PxP15HvkW|2OdiuVXHSZ+?vf
z;J=1k0kio{RhL-D7x$(|+%ZjI*W&G}4vf5WOJmWXng`vs>@l3qhDY4=_oQP1%1h>!I@_I-9eOqCge#yU#90nLxFq#SX
zYtrjoe-M_rcmhqj$;I)=8*!xPUT#-{zc2N+;ZPR#p{M<1*w4~^^DS8auHzdLRqHoW1I3R$2_
zXXjGBCfmbi0#6Y$;mrxtrCWr&qEB}ZY5VwHD#N%b!Db_4x;^PP{Bide
zOJjVGHkwtIX#`>en9IPFPWkibVGxA(NcI^2e|I3DU*Uf{zc5eeF~3J9dY+V)=fD(ZkD=%;?DGIyM~ZB?I}2TeITN-{8a^`D3}9O&~?~1po!|yoT_Ki{31DSv5&>7gA%p77`S0F+W2!lSh@*GRv-HC
zBo40Vj$v`_Lg1P#C$>bOuksP0QA_FI1Xz+|cNEosrX0t870|aaO4ZWgCpv3PDI1|L
zV48%ewN0C$G&Clbya>$b!g9PonHA0)Y*X+}`chwd*7
zLa}=_!#&mHatpO;Wa!GzRv!VKjs!!a_QP93Aba_m@0k{I4;<4CR<}oV>1ke*5zVE4$SV+S(W1iD4>Na5hM?l*2saCaQt6Y7pC~0*(ifnV4rhX`T^|ov*E!XOqAV*rcC0hY*8!%LWD?%5;YZ!ozY>Q{V3$=iIs1#y72t7e>NIZ``v)mrFmsDInic^sGQSEVJz|3DKAa
zY0lgl*8vi}{6y>pOXdo2Th>*6k_N|;c`a2(oOgl9WIJPz9W@z=wnLa?9X%q|1Ke>|
zh}J03-vippa-u~V0&M)ebNd6?BQ|`C8r{$9^?L&{7%~wuVYuv(115;pn!mWF;7bpb
zqp%OG^&uHc{KeXQ8Q5bdsC2~0;tZdLs&e4
zW^9w_^NNr91r}S1G=T3Vw*7mWe_OYs5%5$GO9_8W61Y&T@}XAvOV89~Uh`W{2*Kpt2%0D=S2R<&Co0g=QJs->Kmi&{K3~_3K
z4NpKyT3*B+hzfwY=+Y64ascom7o(^mjr$$g04d1j12;x3<1oiFVUE}PzXJ&8d4&uw
zpPxK{l>@|=bm__=3-Gil8ISM9!9~V3kk(b|zUTPgnfo$>^?YE>v-|S`Nxc?dQb9Zc$b4kxQ-gZpU=<`-dff^-!fo4ZOJl
z`skzPsS&Ksx$gwbP&wFUJ^_#-3sf=y;FMRBDW#`>Hpz>4{H!+KOqZ{t0*q@d7C^t?ea9uSomtV$XNlhf
zC@T+^0WzzHO|_fnd+5ZIx(k%GbjHx+S`Qxi4W53wig
ztekZ2MP7tx`|Gf&ZG6wAPz%p7sa5$KfcDj6Fv~#q8opW+tSg`Yy|+Jp(3q$ihX9;7
z&af6Vx!+^-2Npn)ck%3&BFBudh-Vqh1Z|VPSPO#!-peLDtsAU)P*HJbadfFmMsHkc
z|2XG7AYkOVuGS*T1gN9#&w%%g);`Q2wHUDFvSAG;srIN%bh0s3JG{IP6yFHAs!SFw<)M1%
zz+>hJ2Ql_fB2){18vNJ!Vw^D<8L5r|`-FHVzPi>n6)^YlyL`AoGAlkJe*o}oZIT08
zoJw4J+FYGV0MK8>GdyJKMLMfhAmA_+Q$YAmzNeqFr>SJ;rSEEYl+oO-zg03bhBSiXA&tlTDWh21k(wLrr&kshqJe66L^scDXA
zo^ERo1^k`?{052&t~TzKR93DK6cg6@=67V4l~=V21I@+0;*>Li$3f8-o&5eC8)rc4
zUy62!jZPWXa=y|Z-L*;S?rj4~3at+!;Csu_3J2sr+CKjxida}AskDEM>JIkiK%ow&
z`7o~sP3dLnm^c*MNY;jCj%zMoS;sgWwk-K>4Ph}2&-i@4OG5lUa|YNw`@Y5Rx+J
zl1jtP*ya1)^lkP`VUzWt`BY{RR!?VJdOL3K@7p2%!?XIbpUW<;j#&_@UQQ$g^Mk-u
z#$L+FomwY`zfbJZsZI}Hno)ot`d!8^rlzBE7Yl?C{wbsGfHdo4K&+ASBrM|^Z($kt
zY|5rHEuML#*Eq=HFX$Dn(?Zs_&ZS0h1VPw0ir9fS3SAF@Yxs99<6#~kd3_I*)Qk)w
z_kfE^=^4t|SNOA*VGQQbC?WuS^k)G0DC)^o@hX<|Rr0fAp!7Nw@xB!bb6@`LX{GUk
zWb&=jfiAG-ns)y^)7(Rm^*{aW$ORP8M7cF^FQaV+@qY|2J;ef!oGcgCSHa@~20?^2
zPPc+()|cp9TfQS->$)*sJ{aWiD$<&t&9w401HITE3cT-v0DS9Cuk3BshjIYNs$H-R
z2*2s}c}%``U1SB{zPQZC)HCwNB2N3Z94Or<_onW**3k8G&G!h}puH=fF7e{Bze&*V
zY78&^8e0dj-#E?Hr&<7QRmWCp8dG@Vh?)b#ET_G`BaL7^j$}mm2>t{1L
z&5cotJEc>UAc78Iy-&q&5N9Z7NK01<0qGj0JAfFI$;P?e2}nOGst!2%y7nX)fTe%&
z>l`R*YsW{77>ZP2Hjar)AuodH>e}OFG=Il53+MNjnElJoV++7f>dmpCe;paA`+(02
zo7_^ZfSxya14C6y9e^s>T&biqtQ7iQi#H)OHTf5+6~|_{GhU2cK%JV}{?=)-+*cQH
z64m?Pfn%Msp4E0Po-2s4XCei_$R6ha48N`KKRmEM3`RSzKx`aq{7W^H<>b23d`@!5
zA6S-+=V45vNho?PYz6aBEh~5*rgt-do672MJ!cBztPhPYMAuk=5_za#L`%1a(%+S%
z+?8WDunG}Pw0x<`V{WVO4o_fOaieMoIcTh0?h9$o_`329D1Hsy$;&7~P~rSaUw(1%
z=Uq`91g7(UiVrNnu#T<$*8kT;vkN6)VsD0>EuRQ~$B|*a-fMX9w)e-Ea({@7=F;^I
z)xmTAbw1$Fc~+hGBDfs&TwY?-eT^NaFb}UOIMKKfd`7?5o|kf$$JkvQ`JSQDGsYJm7I%(@1GA>A4SG<;X$l*8(|8VQTCIjw?YA!Sp?5aJ}=|X(Y
zjW#dBIY`zLMrUeM<)R`9|K=VZjifWLUoLh?(_%l+mNrd};X$_2GexoI<-ur=C+mac
zW>wk}xaV!a&6wbxfVqdD3~G!?2ciUsDgFE&hY19}V%tcLaC4WSVU``wa`2Lux*o
z0+HZ?yMahJ!Z$x(BSD-Cr=Qw!BVv_3V*~aAhtba`3fDeBtKIfIts?kDjRq#5^tR_t
zxEOLD6?(WC_U0aHt@ZdGx;H=Ao>0H*5w)dNpfwfCeh~@oi?UbfO@sukkVsX!{+5T2
zm__&Gpj(%=!E-63GZh$8k1cyDiZ!PEbU|LXs>SgzhFSl$#F@nVK!X(8bBZufS1{>3
zSZH$fEqkl);tryyO=OyMgM!a{ADhhb%nw1(Jhtb3;o2Zy(V9HC=QxFWwl$6JLDD|_
zGwGx=4euUtWl6tWBAJ-D#gyZOiI8cp9gZ@5obCxvT99?|r@*2&2&is9IvF8Ba2VE!
z3ca{VK`R2jsap7_ieEqRPkqInA1_V|qAkJ}L>CMN_u^`hMu@bib2%cO6Lzti$C4|l
zb2VzWexXKUJflXEQxK{BY%@Rq&fxt`W<}E83OKm=5vtskpNRy
zFi#Ub!hkexd*<2oFoghG&t^#ql9%P92Qyeu9a2kWmoPwQW>a<_88cjVDFyOgV-d0L_Vt-7j&*;#rdYhQrR|E@K
z;4R$LLwU{vr&&|v`{I~Oj`LArsLRH^V5m+uQ=XHb+WUZ3-8
z#dCNe)(S>PKB@d;fj0X}37vs)Y|g0&=oNJ?L5EmjO?56(*W(y@SWET29lQ}&N00bg
z%*SRzp!6m)k^u?$yB49e5bHOYId*hNN%%XS>gdQZ?3t-7u>T~%F_YAOd0Y04;J)_P
zNKdkf+=AHCT+P$%&>H{K_0C$rq@wKj;8XGs6|tu+u}9B`(HgO*GtY;r>z3^fs_ww?
z{hqX~$YFK=s~xKDmP;z_;kiq~^@^iFwvh2D$D|=DkJE2=>y`?`0z4=(<2r-wsvQ+O
ztf6~1G~ZXiA|_!nCFFIrRR{(cDB62)1u?hTE+S@O;VOq_J_B|OQQRgcGx*2?tj}jF
zpm1~dfiHZ>Zwq@!Oe(R4un#MJ_i8~lZIncpJmFpH%(@CCpmWEhVS
zAB*01K3)kfgFeLVbZmAsW(K#ZVbm96&P8;XvS7h3T|8vA=PT@J2+is5W*IjA8mqjy
zlOTk+gg`>@lMyp>3)c|oZ$i>0TdCM?;9-H?FjNEon97Jt_au+fut~VG2=Jyqw-!&c
z+U2jRwqSB=k&*bU;F{`l*D)&WD-Y8B3HZ!&6gP1Gbia3E!F+b7`!I|OZv?l*sW1BV
zK7RRngJ{wzpWRkK0^EV7u!uxe^d~Q)5#WREf=1xj#?QHhM)`iSRoTQ`T93#_fc2y3
z+oQXJY+{GxvG{PcaSVP1!3Et#z|s-Sl4xgY@_VzYHJm!t9`dqgD5LhTAExS@rYYpp
z5Y7d5?h~TbYh8tH3@?Lp8~{$lfjYBtX_csRS?ELw~&z1QqQ~2(k`{$@%jF
zPHHzRhkzC?G!bu1C^cx<`Hz+g4AX;npA}nuNH|E*dVX8AUc17vQX~>#rOi?;d%zgM
z?^ipuQcgFj$LO=q&xysT2n|@51DEl&eMGUPhh5QRoTr^k|B4}>3}O3OpTa--L0o94AYA$!-FZ3W=X0@iN~tlC3}{JP<{~|GuNw^g
z*6Qgn^E^eHQ^J0_)tN8>&-{wvhH&X|;2V6Wd(GjzgVIO10G~<>3vUtd8beTzPXb42zy)R&(yEbPqyE5z+iLWp{k9B^L9A-AE4us|d
z!}t_3Q%gC$*&^^OUVp?s@HwF>_BXU3Re97cK?mF^j$PgaA|a`kOx9n@uUaxMY6nh<#c+2O-3JLq*!k%L%#-
zub-=tH{FT5$g}pPf)c;OBu^+8eEVtr|*)S;fv!0cF_udFy5N0?s(0BLl)E
zXj3KDz90TF9cbAt>+u->bXib1QFugPfk4FUN`CW9!)fuFRA5zEeSaLKUt6Tv$V1$lJPQ&XWkaZ+$TRfld3lL6qPHZ-<}
zki_PTtdvPk)7Y96g`OxXmWL2~!sh{d#9T+j*dkmvYLDfKLHK##UNi-GBEG#KDG5ZG
z)thT=_&DOEpekVA*gQ|-NZ{92QyX~CD0_|SLz
z+S167t_)oxuCUb`WK?F7%tn{@4S*KAo{po#oHwtx6H9Y>Sd=aGT=r|zrTbrOy?H#8
zZTL1m_Q7BfVU%6=H6%ibVo-KM3^NL2iLxcxnv^8V*rmw6k8Ih;I<}t3F8h+Qi-`2Q
zrsw&7-tYTS|kTRH0G(-%n*578VW;NdUDYFU8qB?L3_tx)r**y`1
z46m&v{vQ{ELRL9wBdB=d^W#7nQ-Eu!wUtlx&Uf2q`O{`SZwFZo>QR1xlHTBkT=^*W=zzH98EUHUo6E
zCUW2)@sYMvP{K8E#$#SBC4#ToR-foVU#AE{i}Z>t-vc7I0h_MPz}0i)VrUJ*e)S*Hwq)0!W?n}vze0C41xq6v?w{t?gc&Y^|J{+#(a
z;8%)G6J%@?Fx8(5oPmC^XYv(v@6}$3T
z>JguHo__&xz4+uXYt~@o9bmB<%yD5lkIcQ6mUzBJ%+dL35b)O5MZMq9k?@}ZM8grk)G-|!^1
z9>l`-GFcd_pA=Rz`%ynYOD*qFH6k+N3
z0r-oXf?yrvR^Z@mP8l_xVFNd!@Yp33~_*9&1-vXKsy4HslE
zlWE^cOnFZRvPZ(g^iioli1(C1)V+O1jK1v>!?i0&&o3eBiw3
zVPVCyptjo>*PLBPCQ=es^=F2#Jz**63jbl8w959$%8vW(%BAV;I_c9*wG|SfgZzRC
zy6?&FC^QQFDOlk{pDb6JC)V=~vQ=ED0g*_~fpXi2!?9#hb1bXBhv)unJ8GTpVE
z^t1CUgRgue>UxHyn=O4&+r58O+KH#bHX@}(mz%{8lx#``!o`Cy^!XO{6q(J6qZo$x
zuut#g`$2lwdl-PRY3Ip&w+Us;3)F9U^|JhdE<>0CxDA83DM~)J7#(-`HiCkw3_U19;<;NTFg^-ITeW1G>ixh%z-XG5vQL;
zv%l-UdS^_pIYdcAIU$%`)9e?G#M-a8-~#y@X+Ua`rm>mfrvP>x_LdA9D}ewsNL&~C
z=EZ*e>6)lp>V7F@=_^6Z&{E_=%R%p}{PSRXvkS)ai<3G(=kVwAZc~+R_wQ()q918v
ztM?TW5gFC}Uu3P#Xj*-rVyYVRtUg{jx^{T#6u`hXbzy+FVeT*L2iT&l_D7qD2*;FFz_mOG{!;SUysP
z6=C~5FF|$p_%A#baxB09JI==j%1P(mEvzhWg%Fr(#3PyLD5pMuz+LuLoVWLYodSgIDcNIk<;93!IbV;n1mwj=MHH?o>oUwL3(b
zh`%Gjb*nC4fN{bTOYOY_8Hw|6m{wE35Iy3S{89vr(-9r9>$p~LEv2tGr2Oz+$`$Il
zm#_#OWoLPAGL#mx=wIxqOG$Xe{Ii5x}5gbKwPh?%r10wP~;pGE+u+v9LpW1V_{Su<`655
z7=3(WE2uB7zPBx|_t~eS_x!OftHuTyo}&YE~CH#_r9Q42rD}*c>F?X
za3OYl>?Cwc{)UG#d!fH~7Ui5t>PTE@x$5~T8c<|h5mWY@D
z@58sg*v>v&Kr4e$v}DO)OKUF@;exgyj~sGCxabk+P>$#
zhDG!z_VzIvTVd;tm#OA5q?52=<>THd1+=KDCH-4t=%rI<{~f_o`T8F>59M=(W8PVU
z3`rBO6JZhGl@8Cp;G!iu_br|6G7#=d?o}0pMq#gWlN|_}CWL2~ge%{Xxnlqxt&j6<
zEvw>xM^Q>ry$e@%lfm#~M{JibJtGQA=52+P2lya%HQ^e|{r%3m9arPTq&z0lO`Ws6
zuF(>g`!Ra5&@`2#hic*AI@N2`s8}X(s=3Zx2+F6_+mQxbv1A37XIWvFk~rVLbd3+X
z*-&RN8%lOkU}vQSpK)LA2=M&pDNx|~|Ivgu9rDvRR|DNCnp4wzDPSn>hVN~{r2GU@#iNqFJU1%$~`sd
z{w||aX}sY5(j-R+LWQ9vx93YJg%x^@)nbsy@Ew}xxWi$
z(hJUMt!l~;0Vd;WMLFj*FeP=?wCSssRl|D`zYpLs^rw6VD;jM*(tG|&!+ST6G8Up>
zn!-g8?{KgY{we>n{8KmOqu^ccq_+&M(VdXm!Vv>&h+H94OGi?ro1H=}W%&gc%#atv
z;|FhWP6fuah3$A+>J^oM6*d*dwk4@M5r?oNmQBcRdq1&vaqlDCKHv~qPwf(JDFXq=
zaBH&GcuUEALle?0=oC}W7FM+Oeo>2NR(JI8NLGJG%IO>|eL$+Ch4ji=SHtKWV(~(s
z_{VC;K9{Z0H}O_3ZS0gU?Ql0=eCB%F`|-z7i8RH=V_l3B=YEsY`2GGNf$0Kl&)AP?
zw8*!|H_gXkYuPx_{GOQ6H9~o
zeLXCQmQMSIha8}K9=ycYM_!Bn1P>{4eXVH2+;WB+5{2#ia2ryp0FlW}C*{5{gh-Vz
zsaoS^fn_@=F6|V7ZS&ApOfS1jG)rBrF|_ow-LB8(ce^Tq+O-KMJ5Y9D3F}Yj_56oV
zLh{Zp;Pl>LEG;lr6`V6h)P)kIxHL$j_zxEBfD4HyNgh9I1y3l2fhdUZCcudQ+Cx-5
zTX={2q;qUAUiZ2iKktSRG)g=v^C5o&_!R|g5nzz73`FOir5|j-iw1rGWRXtW`9DJ;
zv6ro|?^QE+;TzprR%oZ&0MB&mm)XvNIGyl`9-z`<5chx4`m7(#oP-d=s7plmz^X==
z7runM2*83UL(-5#@%JP$iYQOK;(H6ihIcL>Fx&BjGHRmAAE$@uo$L8WkB@tsPe%V7
zeSG|4lW&T*6d)e9?7{t3dMa@$q1=+(0&_L@3=iD%TSkMz
z(kJE5sMw3-o!*ip_`J62h~U5SusF
zl;sD2366vCw(?#}fDD*hT5^SSt=3vP)YXW-K6>gXR+DPpC%{v}XOVc}g(
zK~!@S*-hlfswC$^pi$fki>ILATT4H|0e0M>`kH@$m1M@VExWTL`l9u>Gp;IqbP;dd
zAWi3E`$)Yu@rI-64GpH_37YE<@k}Ydj~oc{nO)b+D~4|iO2sfm2w6R@9?_~z;L>w*
zGg4`qMobzAKW{A2^j~&qvdJ94)W-m~eCl*!HcsHa9qN@T`B?lMK^@b!sTzCtPa^t7
zI^*Mu$v)PvP4M+nu1&*#ED#ct%?3U5~vQ#PJ6f#_D_q?hXqG&Ce$L%26D^1{b
z5L}RI{+;X)V(oS)fr@zGF&D2ftyJUg95FnytYkMKD^o<wtwmYAzNQMN#p!f*CO(;yP?J`z6yl9qOIMb^u+{p%YUHM3TfG(lU0g=K-q7O$aj01e
zs!~ednkBK)s^yg}zs%0Waja}MYh&&<@U8XqFzt-D|4X~?akgP)wIUcNu`6ELEB_od
zNX%YZZjhQ6L=V9HI|8h|CtwYNX+yI#w_~GI+#+soo0Y1jMBE0p-*%;}8^@bFEBP@y
zorbDO(8+UzEu_PIJdpXZk>FL|f#=-NQi6gT&cO^37RBfZqPHMjSci=G(Ur@9)L-ra
z@eX53$qJic`||twH=VfclzSnl3S?qXW?Omp@(&A?6*|X&9ju(*)rw}Ya#C!#oGO7!
zJY0z@#shnysMv~OHok}iF
ze+L6A*)_xv<{7X-MU9lvSa}7P@+HNU`9L|x(>EkQ)abjfN*!hA-S2|~94&3i{w`wtj0;*R_-jLf+?du!`G0QRDN
za!wrNBZ-ECZZTVXW5mRI^{J#6s4}B0M--BzoBSd>YrlC7;a+0J>uK0|HEYdA^7ImQ
z{@2Ne?(W^zE*tms4im`SLmq%4Q;Nub*Ek
z%6LRw_&B3yEGyu#F}ylQIz^2Z6>xURR)(v(N?P^%AG89O%mdy*9$3;v=GYSMVwAs)
zqWW_9L9Si%;^=wUmIN|nD|;I93QiN)ZB+}4t*<>ZRSdq8g3uyVSeZc
zz{^(oh+cR@x3dS#ZNMHoh#)$r|7eT0u-@I|9WNO!hEyY~M
z<)rZ&|Ji4$LN1#;BP9wDQ2b>8tD+^`(3!qhKr0wcSfzz?n!1yyDF8GX{iFjhm7Bss
zbSx}M+sS#}<0unffyzncPADl-%V9a~K4_9(
zFE)`+rS2sF%MyQli%U65#;04ZnA0wTkNm!wC7C%*Cn+0$0bHxg#>JT_nXLrdl=={4
z$@Vnods2E%F37+%P`H)l$cCbjXuA976;`0_u?u87qDl_%5Y8
zl9H8$qV_)$bX=Fd8}6Ac|J6M|q~6pEoXl9S@Eq@wWM7>O0Vo2Tsg
zmkVERZC7Wy-(i^MBh9|%i*Au5$VYL!v7CDUAoBY41CH^8P5ZAL<2Q?@bvms>V>LtU
z@70cFRv8GiKajLJPeo38?mwNCu-VlW;2PGX*H}@D+mf_v7EXm@9TxK#sCzwAko^Ky
zJT}VWhnI-oKm$HK1a6B9bsbcWVq)tI5
z?5oDznH^otR9E!F5n-zjolk8mk_;`F@BeW;EghxRG;NLu>wRtKU9lZ^H~8nuE1yih
z#>}0SsE?B5?6<_ZwVjbGqQkJ>Igm_o@*dEW^WWBfoA^+#3Xl;l!#mOx$6xK!{hMYh
zB~|{uAxbspD2sG^H}t#_nD{1pM9m2A!!sLChgH^piHuXD9x@-kr6fA{V@zlxhEpFN
zCjd#p%|nS!^sE9js>6)Akcv#P`cr!Y5g;?)I28{XK+<+h6U4AG*3vsJB!{u$x^(MS
zua&IKhaaQmY=PhEqWs>a^Ki6($rk}FT
z{GeeQpC>X^{5U6^ZZvP&rtZ&zrhTA~(d5a6ltQVCjv<$F`f4=4V7i9}xE;=LQ}vD~^jEfouGj-!K``e4Yixg#53{SN
zx^vT_C#g4U*M?Z0BAe3sbnf(PGO+pZIUI;fHtn709d#M7L>9fs<9#g)_d{#hVzhYU
z&G<_dZ1D%LC>>)BQ);OlW0_X*RQK@rbRTU|w+lL5TcoT|f92jYn{+f7=+Woz>gF~r
z2KW4u
zbWm2HFUZWoI<43s(_w5X=|>L=yjJiwIxAFPm4Ou2Xl#+<+&28^{x5SlYZlt?z;;yn(!P=bgFt`XLcFS19<$^7$1*`K)rL0B&2=D0O|tP2({~$b
z+6I3jjl3MJ43i0_A*9^CrMB|-)!3f9VRJT}M_Rmz)B&9rxf0PwO7X~c5QYzj0D^TM
zCx)WrjYdq-RLRIltPv%k3)-nmazJd5ld_;aa!CTeM$UF1CX-MmLb
zAC_%QS#drkz~8B78+&l?do|yG*#BfEq~=OT1YVcy6=Y$p>h(3M2iNea%x}EyDQRWT
z@FZNtZ|hz{5Er6`k4C-5HJI{GtIDq~
zQdRu;9mmegudE<=tF4?zUViRBL+lNx$zxmK7vC`uX)Vv!Pp!=fbJ&&ZkiX@KnzE&$N`k|NDGo3{ySfT!~HgJ0j4wXgVNL
zr7E;RiGq_Fky;lTn@+=n2{#1Q(t{5!m;viH#eskY_=U57*qlW6ZPnjkq>fV4@mC%S
zu+gZvGcP@r_&K=|Zl@!QV39s`RaLa@)ZFk_%gPUi@(!kI57V`tWb6Qz
z&Q8+-27C7A;MENk=K0D+PhEbGdFNTrR_)uc
z*#Rawyj;AD(N;AZ4(t-uX3-)xyT9cl&*-U81L}ZgN#(
zSJPIZoV98u5#v-Ede1s{n#;xaQ@@*x?u5W;XI|k;uhX)33*j^9fl;;1=PzN2!%v>&
z)AkNliTgY&m)h@1$CoxpUMy)P_@6S>wY945vRGMT;t-CiH}Umbv=ab}$sQN$?yOd)
z_;h+!q*=({GMPTUEhw5C_LzsW1@LSeAL^GsM94
z!8$-FmP>H}nxkP#4;_fQqp#lp2xrfE#fg`k09
zxrv|1;Ojvu+#E)qCRp%>DP~6nAU_-Bg7f*HjN)`Y4ta!(t>KURZ~sJV70VcKj-LSh+v=3$H&BBt3Hm?XxoC$tgLkuq>npPqcON*A-TkE;)j5qV_yin8mUCzDOArc#`)W
z#2U9+!seV(e#E0yeR5b}$d|{dtLK-`C+dI9BqtKfrV(=z;d3U|js(?s0{}4@glZ^G
z1gWufng_0OcJiF5ycH7l?0jc}s4g|kM&=SmuAw(4$&_Y~S@!UG7^<#~AWH+YQMfe3
zELTkWF(b8|^UvB%49V^+Us6B<1g5z(Qu8TQ-0*kpS~tKGCk-7ga$;0Po?1B*NVH88
zIa|H((Wb%fAR8Zxe@{IxK{Y?+(t3+({w`A_NW?K(FV?p2rL45e=fr|2rUY#_@9e@@
z+$zHML{NgDI4PR|ZC@Qz_w38Wc3knOYKe-At+WCw25_uf3<54>abN5ed%d0wGD=cA3qbhM4od9j)D?l{}&hU9n&c3{MII
zC4l>lYX+BjJ*EVxqg=DLxp4}0(O&06j*RvbK3F9B{E(=%1Q%by
zaxO~KWiLaRt$u$TD(-FL!r~Scx8j(8|uMaoC-az0bCvs>NZ*R
zvP*3X@|jCA9}B$n^deoIc`B~`-W!W+G#*cuCDe#IDR$W&l>jGz%oMF9SmRkloj8pP
zj~0yrEEBNGh$G97;ksaLDilR-X>bTao2
z<-C(duh{sHDa6XKm;_g8?ATiJdA-oFpu~%5aPHXJw8+7go*`X=LD6
zp5ec?cP^gdUctnxkqh^mz%>XH+IF=}k)rt!@Xer0kcwBviM>=6-MQzfL#)t~KMb^j
zu&upfNLFt(1b;P+thN2X{VX9WN1GFVxFt7yWyjOaJ+<-!6);=Vm)iV^OZ-E13GT@+
z+R_v%MHTpEFbGjeWJhFs^}GlGOh2Tix6Nt(Y7W`MK#1cZz9%q%zgk3g6$;sAY!1*0
z>dQrRIFm}WLaeYKR4*a;H@ZWtO0Aur8=ULQ?S0dI{|eg2!Vgl>ZDd_b)jogDaP7?Xt(q
z6x;Hd9;c{8ei}pOaSS+w1l%K^f6U;+i%39MRFP`r_r(*Te~UkF!)9;{K^+ez&4*?u
z@4^C&FExGLv5c6WV0b!@4`iyhvX*3N9Ly6R!vAv=G)gu7CvjM2!MUpU(d2v0PW#8t
z1Eagr6hFjr_S#Dzxc}G&Z;2re_wv4Wwnabl;O&i%iTl>~TbQdS5%N*Nx6}Jtrvs2b
zOigtw(Ll{tl1l}q|A0Q*8l5L)?|2?*;@87NjjI%i+s%4$Cl>$v2lqc2BV7LoA{0F2
zvtr$K@ArS|mX@);NjkdTE%uO3E=xx_M}-&}JjY2jZ*yzMQ`P~I8J9N6Rt$bv#gBuD
zDZhmvshNPJYfXxlwv9YGI)(XGf279|?(TiuJ2vs#p(eJbbz*#C9ZE{$;*7}}V>(^p
zZdw|JFHD(ssdQxYuN16pI1x
zKQ6?koo9?xoHTn9o6d%9$~zZ`gq
zZ>VcN66_fq+jXBl6C1^Rc5*$ap@t3VJk1Y~
za2z49kt`LDYCq#Ht?;4!Ogu*Y+(t6i)Sp{uUHR!IV){|5SOSHaNkUkH0{yV4ptiKPt(t~Y;D9VJia>XZVU6(F|RfV
z{i5si2Ivmmmn^me67?IVS}D8{65a0k{FdK1dzBmC0PFhq1f*t2zI(k}t41jNi|(ic
z&@k-G(hhGYsE2vvA^^(Q6fJBJ~+kKWsCXOGpXhg_uGejT~eL;^XL8W{#F@GaZ;k*cTjwZ^@Xf;tgtW
zxAMuGtsdGm_5a*NL5(->sXNK@aV(t{Jluy=O9>Z(kA7wfGJS^QD&v=Qs
zxVh7Pe|c~l5HvA=@!>sSt#0mThjbsgDKKA@c{okdA>G%VnRau_vlaN!ie3pi%V(%#
zXp6SgTy>IkyRZ54^~PyDQ$V);CV`3AasJhcl1$2@-=%;;@U1@W=~;cCXCt1zt875Xd
zoQlaXMbfsKnEMy1wM4?gkQmSt!VlUKz*o7c{m^hJo#dR?2+-eRaaY@GfterFO3ubk
zGg7PEqHr+AuX{s)pdS1WWQ#FI5@JNR`2>!A;)^Nx@fnon@8-AE6dGaliNaZ*xO^gU
z41oxVuO$*Ei7S-*zgQYGCL^YGNBpyq{b8eUpaK8nX7dGuwIw{kJ2wmSEC0)o3+Km^luk-cv^`gp-`0FmB3}ipZ#wR``vdyGB}dF-
z5g^tj#Or^3G^a}4sFIhRd6LntNeT=mUrBa_LPsWdu5bU4Bl&-WTvT4VpO&JX_vatC
zm!_OZFr3>zlQ%ER7BV%8{F!v2@mKpv*D#nPekY{m=!zS~ru>3C+aKZY2cf_(r*RDa
zMXnlm=FWkQth>{MWD@$kC4psdLj0#+$V}&%kg@<*>wLqMVnd_4vUw2IF}p$-GxvmZy$WOWE3k>#~@I^;yYdgtawdy`;mBhyT0I_XsPD
zeD^HC;2Gtljxxx{iHQZvv0Zh(UCwM00zH#}zC=ut48{M_H7Is}hoi)G9bP4lry
z{ON1#`$fhk4Cxm13IE%|zyj1F?Gj$u?%TwU7-6!rWG5zG`TYW{tM9qfsoE$h!|*)^7L|l&^Bh`JO#Nm>Gz}aL#)7fum4V<=tkfLb2tNO*K*YapT5o-J%?PPWdEjk=fRwz6x4
zLu|z*w1Cz2;g_C)!(?&4q-*ej4;P@EyEz_QpN%QJvP){DhwBr8wOdk?%>f|+LZTM1
z4G`_T{hV!2lwVEWrSU>Y)Vk+G8$K2ZZk$z|ciuMfe!}!w*{mI0<%*EV2i95rHf-Ym
z926#>Pq-LqIIA)6{igtH+OH=GE?-MNH}1ga8aH4a8!uaRa}4sWqxzJ(W%A
zi?9nPV^hbe`ehN6rF8XmL8`J_Sd3;$8kWlQ_+{Ve&yG=>I$zDBO03vKg)r6xlxxLr
zkMIgr>FSm5LYq5%xDF=PfFenSk0~`&WO1ShW-7RW0L_=TeAMoSm31$_K!T#IsYd_<
z(cE`{AP(P{q5yH-ran=z(ZFJV4F{yU?#64-mTqO3<&7)9nieT3xDx4%mHW?8N4>Bw
zAcMqY*DP|v^|6a$)Q^Gd+Obq`6-`KkYX_69MX*cV&B3a;jVg)^kG4467Xu!%1?_C40ZI
z{t@Hv>=)J@hq{}yv<3n8`XQbR7VU_=u24DMTYLGr2L>r;2ve7?uE&rNVX
zaZqC3d{KSOimFjol&PaV?TffX_XYQSOEPInqgd;wv)7M!*3;YC3Z-El=B&X&FIqgV
z(KeWOmhs72eJxS=TH-?;+plU$Z6BNA-FE8$-(+ZAO5c)U!+&hSJy(-pZd2P(GM?oCnm^
zfjSrjR|LcL^1$Nz55u0I03sYI69FQ$c$v3)HGHOTbM9PHO1U0coc@QRO%SoOz<`T&
zpZ6j$*~}!_YErfVKo}PRP#}Iy5tb%YQ}79f^OWhHDRpR84-lVZ*tdT?kt5nu7aOtm
zjc98WAP5n#!Ca=OO_Qpbpz*^GmucWTrg)~zIfXc1nOp3i@w3jjao26n#|R_OLWRcT
z?E-8qm{)FEZ^Tf3^!*gLQ`;MCsUD!}{Q1jLN~)Oe)BI%12-x)^SyPOb1i`1&jbczj
zNHob@2cSX^^c@*QF@mB|RS7B#J?0$+$xH8bV&%)khVP0>-f@7(_m}mG$b2@9a;sL4jH
zVg`{aRF$P~`8NLBgZq=nrTXS&KlK2qdOe*gy9+@A!OT{t$HhNt(fHy!5Zn`BVH_S<
zM~_b2Qr&I0i5jEtoVb;7CQa(}H90j4>%OQK0GqOuPWWN;lb(4?$Q?WxJ0+s*DPEiJ
zA8_nb1gKU^ftukBiQE@2%f<#?rTo0zfqjdOABk)HG%`@9@V$ftC1H$XzqF>$Xl_U0_k)4i{hd~nAo4kyAq5Tg+`dyD#2
z<)mc;@yn$F-gTKwU!OZE8QwD%^jKhau(W;ecAMQF5&bvgvAO2aqqN-uaL<4ERTL|%
zQ7~;c8xoY+>^%FhFUF=lx93t@tL5)nlhY^ya@n}Wa;mr@uxF%7=@E>wY^pW=P#Em+
zlTrB-Vh?O=j|2!G4MbU6MwX$)xqB%|l)6a3GU!DbR?$tYia7F9#P3}QN@-EQ^fHA+
zoxK~jUfNqOJ$MT6DCFMFT&c?Nxx!Rg)v;vN`)IkTT2TQjGqK%@h*`k}35c+hJ6Pt`3
zSfjmsaHs|giQ)E&`ekyYKnwB6pS8S{1|>Jo4k}qw&UPxzS(^C-KWPJud<(FdmJC3|
zuhBLMN~+ZnLCaG5REsQusX4YWd}ac67&6aa6Rao7nqd<$a~e&tCI8c1-lh=SEh8c5
zHJ(He37-u#tiB>Wj0fxV@fr=PE?o7DB76iP-LamrLeb{hjGyq0ja`$jS{Id6D{Czu
z_f%~Soy+*0xO7oY>XE&7tE#+}R3(938dgMM$$2*!ThI7dE}eFYu`==-&cNjvJ79rf
zUgnnrr&ypWJVLZluKjHu0-&q0$yQ*jG)3}zBr&@5vX{0Fyi@`rGpwG`Icv#-@b;x@
z?pBtsHOtXc6t3x^6k0dUxbj&eV
z%4N;A@chg-rBU^beNfm5s%!eG)-9sWcT45hC$lkk%p=^C7$j-JAs#PcXup=VR%n^N
zVB>}eL!L>sWeUqq+4NO%Zj~QDcuP?A@dJGJH;HP_$#>FRJ$6kTYRTc1_-miMt-yDH
z8VW;>j;QaEwd|E%4&1t~k2uIXx%s@8?!)4vRat+bODOJHZ-|%7aVMqf$1~O4UHbkz
zizU)0c+1f99;xHAmThKx9ae)8=wUt=fY?`>CT^q^RH^=pX2bH{^_@n_b|#K{wQngw
zmqnOP)$(`^SroG`g9BTGsF+cM(?N*BkJ22hwbeS*FMlGoHr8s6Swm|+iHwyX*{edW-W!Kyuz!T|&2l_(Cf{$6?o
zl=_?)j1w{MJwmyr>P*ARyY+`@;GnI2A{dlIz3cK%MJ{nBB~VmYd#ehE)Kb7<&0GAS
zsE{~io?d7h2|98}#i@H=L{#C)e#4--?Mj~3RF=IxraglBx+$j%$RxkIjt)Qp;qWN-dO6$Sob*A
z962K3s-Dd4d#(mgktSnkpWq2d#rx_@^P>Dl_8YR&5+5|ir6+ZCnor)B#5cjx)}Le{
zx{C2dW7KuGLMza@dV?RWzIAgU1%qPku10Va_Qm$M(kO!Fgv%ta~b**hqlX|GPK^=O{&$SxQ9FP3GJ-nX~J6?@bPrx
z#J9qP@10cRiVbIXEkO=yNr?Ln#BxXN6nqWZvsh_BUn&iDYjnhR_2gkU(PNQIIvz6D
zIEA(ZJ=Iy3vm8&ou%5e?@O~=T=xlOSDk+xx%JhP>H~LU~b320+YtG%!)xX%istijb
z#kT$pfHy!pV!em!1>l@uIG1lfv_a$Qv-NXdnooKkAD2CDumGDEBTx@izo|{xzRc0R
z>7(lXyi?8A?j`j7-#!nl%aQF6q|MR5)@KStjodysVAeP(ttX(C#8P;X9T3aIFThzk
z>9h-yClHolREw3aM
zs_pu}gd6$}Sjv3WA05d_$WOrz9P)2XT+FuZqi6)1HX5r3#71dD%8FqhmX)5>3#JV+
zgxbe4S$i@7APlWp>vMW!zca}d;+|nV5F;=)!o75Z8FW*eHRXiOV4pT;wgf83`mTn5
zyE99=yUCTTX{LOR
zThl(sp><0@dqF+&ZLGbj9G0{W6DWJAzy&r%MCeq>P_)!rI03K{24Dr5y7|bppv6-C
zx%d~ZEq7bCKtChhljlJG1F~MT(iRX808oW`OmKZH1$)~{3EP;0U0OREwO87l_tg~s
zakpi^4r?FI#ToGnvzX@Wn(E6ISKNN)(*A>g=D829`b>&f-f;M%6!SVSI9p-&o#K6G6_}
zU`~y93DXDbbc&xn+GK(xuK4zISV5)&8o*8r0n0O5as;N+irTYD>6;YyuIWNXA_9}!w5058$^z0eW-c$Ak&FEz
zH?;mXI%!b%W-zqP2ip1waFUxtV^HMQlOkpZuJQ1>2JI{Wx_U)4xTR|sb6$X4QI!-j
zcRF~-;o#L%VgUD_%qpKrysc{KdKuR*2w$8zx`LXI%3@|SNfW-moh_wBpg7vRRQMrB
z@Xm`y3opJ#W#@C1-qA2oCtYVw+`QJ385pHuM=`e4ObV
zMjPT6p}v{xnu{7m0zXpSh>XO%I{`v=JdR))4EjJM~CpjBL%ys&Q
zfCeWPj$R)w&P}KOPft*>89o%CZx}&n=L5-kB1?edtNq_`Mgp+WJY!MzGR!<^+2^GP
zkL1HRC@%1Mn_gJHI`0(}&{|$6PJhk~>SMY?2b#Ez#(7|AX#_CbpD^-pb>iGP4z==U
z<**+5oO|Sp4~?O1%ejkJptycR65C_0={oTgJyB-ljI0X}vHXC~sRt+zJ};?(4Lqc}
zC715eqgV%>OlGIx1S-dnG^0FlvBVLhXBPqgEOomWCXwco0ya@hB+IknFbjtFRzStr
zbOT2>FCmnY__DfZppKW)5y)DCkNI`?q3tR0ROD)`odbX37cHkAa4{GQaIP=dyA#^#
zXLsiTLeDFh?uV@(?3KQA7axkbbpbDZ7=F88Ex~lYid5@S<$rIVaoP5E^YBO~?D?jF
z?iJ~%m*&b#xC0i@)utY(gITd
zb~cmK1*hPAiVM2;kUQC2kwwq1r=KH%)*Ha&;vVoTtH^lvJ&rNc<2g6#3k}(=e%?{zm#3Q$Nrs}a7~~q4LktbU5jlmFcG7-A!I1&@Uq!m
z0zp=7#g)9x2wlYi6`H&{w_|v&Kg8=;{26h%FJ~>SXL;%~4RLVdLxDL1*tzSIZDmo%
zMuk%RLdcVSr~n7gN>xB>tf9_Ob!Z0AM7gp*iYl0Lq47q1B*Ti=IH;4Lz-p{kDVY_YI?51M>x-OtmKwdAZoue8V7S3I&g{zo*(GjCm&2kEVi
z_>6^@Td;93f&wUhb>_;M-oGh6EO*)=1tLhx$HH{C!G=!`u^-PZ&A%nSu|%871h$N>
z)gDXH&J5JHmQCDawW9F9)3szzAJYG_*NKLIY_0a+sqcb)MAeO*!u&>R8#QaByz1lE
z3iYRluN~FAyMJoEQs&Q6^U1Hw$0tMI!Jl8d@mQF0tK`sZ|8OS%@xl0s(Cvhyqmws<
zdpyYVxmNBkChrN3ww?Oko$M&u%XU9EnM9a)G8#_Wp%%?e23t{ryG~V(>`3Cpoe8#{
ziXDqFUj3U4;41IN{!?J*76tih`YO(;q`?5kTo<>xm0?h8sqR%i_p!s^f^+Q)$Kb^?
zM&-pgBo|#d*s?_6kqH=%Ck_06M16HYQ{DgnNI?cnkw$407^4J4kq}YoM>>WyK1hdz
zBJBhLk(`tbNW;j9bO?-4lv1Qa3{nLY<@dh$e7?Uwyl%T2=bn4dd7pQ@UavFaR&Y9b
z*!zOR$yO3KPMaT_HJ$vK&BClr^vHgSOP$jv=5(!qenwj4wYU=2iLx&rw?+1NynP-f`-zHP}%w~Xb
zqg21;2ajfR&Dz65?}UBbYXu1BKPC43IGq&XP3wl?;GfT)JS^ZIpquU&wL0u6ZY~{B
z4p>+A&jMI_?Xk*Ledo6u9MMCb!L*sccdf0$aD0A(&$)Bdqb9K6gUnd6-$6JT%LoaH
z+SH%IDShNVRzja=!PSSuwS25xr3o$GW9Nhb;FZfOc52Z9jH_2S$&+j1r_}s1D}q8L
z8S%qs+7M;MA3tMn@jLzHQ&xgk!B>8Mf)t_S*RjofM{VA=`8WMex&}J`8Q8c2pN90k
z#x6wLZ&PR}!sqgcy`U1$R_S
z_J??lEz@k>7EHc17E$(ecTrCy3Q0k&_Zrjt16xC;{Ur{v`J!0|B&W=s9L*G(y&P4h
zAiE|WMunmT6}x^0id;V#1L6(Lmcz^~U5d2CHx|VJom>>7jdPO|`-mhvSZ|~3lS;B$
z|JZF!w^XIKl1_`WMn~9REU8AlbNJJGQM;~#mD
zh2>?HAX#llJYmWpAG9pGm|k)!(W;#W*l^o@H#+-@
z9^dPSQE^x58-6XC9ZZp$x4Y)?H5D=vi!vX?7&s<9`q_nOvrZGK4n*?KQnf7f&wpl%
z?8~97@5d+x;)rJi+?Vm`{!y#_Ig+*ixJ^ov8|b1t3?;3-)L~`6PhoCd==b=M`-NNe
z^f;NNEpU4xNAmrC+qbFw3aLyp0vu?=Lw%|Gcd9hm6|H9|hgl@YNMqXZ~(3}h`
zhFr@#k*s3i>|W6Z7lNs!eA~~`nW3#-%btA83LyCFXSmG5N=>vON$N;zH@ZXa>raJ7
z)B+Ed6+QOCUgX4`K5u+H6Z%GR;al+&U^Hki1+|s
z8qW+~8v%PG5(3Q=covB&7!wPOgrNtLaKTv{TvS|&VV;!=qFkyA13B%95+hs5vN8nS
zjOgxks5=dPkT_CVt%&Y;z{Y)DeZ7$H`p00s`+E-G_%@x4`yYJfOK{fxN(spI7T<`R
z&QT+VQ4mYZaT@6$cd4cBJvCxJLo>X|GFtlEA2kW)u;I2(1E$EFRScAzRBJ~_1iM)$
zu!J4cW;^p
z$tVd@%k1=q)3v?aA*b9s>YCnK{w)3Jo$9ma>Dx>LBsh8Y!24PsWU&43vngj03ZP1h
zx1)-kg?p*^
zUF0dXLy@o;R%3v)+SPNE;arX2iAMg|)*J&3pugpwVUOJF3;giw&;gBA*|=q=0Lyzc
z7+|qAJ_TPZFQlNY+{!2RMf}b%(!FRn%Q^Jm&`Agh35}$C_KK``VS%=G3`3eu=O#
zs$&bkYRIZdv7|_C6X+bS=RFMF4COFG^jJ;or@MiTiDKr-jzRZ)u%*f4jrg
zk|hC}3S|c}54A((5^0MuCQ#8P^dehq?g|k*PUEmP+3AG9h8G*npw%A&f5Nx!83rD-
zl>o7RY@z7n{j)Q7&@o>#lC9as?uuHdW9jkY=YV~ba8>u;%PMxGA&UMh?!<=w4DtF}aj#2#Lkni@rv`BRe}%0rJvGi(4t#%OWO!Jg-B%{0H~&oPrRPwO7Bb$LHMj&X%LJt2U`k4n1|+k(C_59PTQ8S7H+=*xA13+lMFuO
zq$@LFwsJ0|M$v`t5PBu#Ip2-FCH@+?1o^sen;^Ae6AWnh4|(zOFmK=FbP#)pLeO#Z
zvKINVWQYjK`0YP}EN~~Z9>Mo)aBP!>@z>cm+4d2@$hPI!qS_YTkZ$c$Qn@{vD8u5k8!n%$`T^S;g`DC5UM
z89%-t`yA4*HU*zL;V66gw)Im7!D2ZDtHL;NizN~JokDE?_RF-xhtTnijXM$hK107#
zC5z3u0~~{eOw$$#h0W5
zIEFGykpR297V!sb^(}#R*5$z{gJl^{rkouVm5xS@d9cYTfjhXTjXXnxST+3Z{
zb!&QHatY%Xsaj3XapA5n!BT6m=RPQz6pQdkpqAtJG-Q4rMV+g$M89;S4|kJ)BO14f
zvcOjxQDq$Akc
zH{t@VVib;Yq8T81P$+CRr}rp1T2s@>5ejR?r=wdRw*9_a$-2^q&c>nOBi-KVksWe;
zD606+cv+6V0{_M$7=^`8)eeO{Hzz5^x<7iHMfqPZ0n#&W%X*w_;J9LS`1+*LjeiSN
zGjB(2IVh}agUXKTjYi6mX{FtG+hXojsasV&c0M`*6$>XFfBq)>jNY2uz9$<%?79?$aZKOU124A^Nv=NSj`V!0Y&Q~L7vI-hbPgZw{qe>%0YE{jj$<2*
z8>j|M=TA`5(V_DhP7LxZb|k^tY3lNA@9%lkDG8QJG|iAJu#+E^i`U%K!jN2~ih{G2
zdHY&V@#C1fV;UFQoRh>EidfBSLI96aCWZ-h5rG*t`+DG1??QRU{#$8L1#;CF7+`c*
zI5{ye!5sC~Re(XS^eS~0tFP$t0sS`=pk(^OLY!TxK%)jjx8KVUnO@GU~L4mAJ9v`b~bLrqJ0ft)@XA(Ixda3
zu@b#3IAFk6enjmV4O6W@N)saB0Dv|EKhXC3tH5?7K!4i0j-W?$I}jgT_NKj0zmBp3
zav6!|;4*$(ng+*(RVi-8M4Cf>C{t?*xdgE)dy5-&3|unBs(58H3#az!nYIk~-p4dt
zdr_2Vjmtl`{<8iS1CJqB0-brWG5x8*VX)V~o5z?-ksnMT*vkm$$pMB*bRvx|V@1xO
zj0n1@$;@EQwOif7qt0mBlO$+JCxFgkhOV@hk9k}Ap^yxYef6}?&HAqL=^iPdKfEM?
zt^NC4cyS5x>1{4;&avVQ@S~^5i43ZUzeXbC2pEY(ksDfEU?hG?FtiC-ua_%xaY+B$
z^F;|!2=IL(4iCq^Zp&MYw{ihR$n{#>!BNlj8w#+*1=qNIIm!}OoLvDd2i{5pR;bPm
zA9Nnb{|UinG^snpY!zX371=eu)_tw
zs>$;9=}vhKgp>$z8Lz|^%wQ;AAb@d-ph=EdcI~=?QR;LUtaT^A|(r4EuOhUTT;-1fCU2FE`IYZjUfSP$
zN)xx?1l9qCOT(-mN3rx%)dk#6teN5qe{iI9YV+RF+8D>=$t*-5X+duaAoG)*@&I|z
z^z4bUt$3dvuLq(^;&Dk+VAkNKK;|nFK3>p!+Kd1qw7$nQZNH{#OfX|;GNo(C#XKJJ
z`*`DLhQqhRU0S(5`@<6
zkv&Ru3`!=L@qehm<85MQ-^x5p3^QAW^x1#hfcO6#fN~V_>^O(Sex&zm=CeC^&01pl
zcqHm>Sh0^z?A!_clrEs2(7+nE70q(*W;GIk$1fTLBkEv0(ru}M|5Ths
zHPac?Tt23=tpVyC*)|(R2f!#TM@NBC+Sat^8Y4{mUMq*`73PbW3unaEyhsL1`guYB
z2x9y=Wa~-Z`w4xwC^UzGztuMX_y|Gk-0Sm}de2xn+h~9_BXETwPvrzx_U%Q#j|
z9P=+^&XYg=o%5#r-Q}nKyQX$Kt)iwKy0qQ6d=Cswx=#9nzrLS9Is71}<@dh{34RMS
zYSq_%Y?r=+gtqokn@pVL*X^Mr^et;NO~DU(I1(-s1h-DRblS8Z>z3f$G9{Lb)4xe>
zDXTiya(>#}N%Q_3P18c>yp}42@AC#MTORTIcFfp!(g*F54n%3vH#=1IWgMWj`#$UN
z_{{2XqU7by8?S*wR}FKeD(x!@;~t71_6;>3dv0k@-=?(tr0GtbN&VAodHS}6s`=Zu
zxFB;{-t}zf7(AM;ln^_M;u=wkGz4(Q%X8tN%OZYYgDIxt9IxL@$UkEWYC;fmk@YgD
zd=?+6zqmTz6Jf26Ra;B`%q*a2jdMl@prl^}3<{T6ZVVvdaYM4=w~kX)aC?&HsE~-N
zk4UL{>jr$3R8~xuH1Ru8-Mta-IgfIvDCrL#KZYsNHXCdct6wk|0ph1$UT=8a#y>G)~TpEmx(_3EHx&Q}yTbt7%;w
zek{4z(2T_N3VwiaExr|3?@m&tQ0%udsN&Q^M@|Rg43WHq*XJQMF$xx
z5f)uXO;0AsHBF{t+d<<|-|{A`kfjmcnjJ=uA3@P$Tk&!uB4W9qM`!00w);@>mJ7<;
zgTVTnv~$*A@_>-Uo|(6MFy3x-jY#tME_7=k3&wfnjuY;mBd8
zphRUq;*|{Sb^^;0zJ
zR~YK6*{Qt_l~R?Bx;e9Qd{g{M+hAA}IgvH?+V*GZ5U+UswMXV($`#}-UP+QfYh%uM
z&1SrkOklQDMK{cpNCi95eS`9Sru0V-f97i)9hrl(;g{BWOScv18X+M&5M`T`Kvt)Q
zMCz3Fe!=1ux8W|T@*o#yP7aXT?B|q&1ks04TTs8*=gGbgR2$SSR4S_{>YPcUN-rbJ
zPkK9t5xNP*M+o+QQ=}`*grNw@T$LP1CdgLgRe=Z=w$jaNM5dS?@6Sx=3#VuuM6aOh
zu#7?sx|1WtNm2F{y*;5ETxK+-sdQP;kQMkoG@k5j;*#2S7R+_ecNA!FfhR$z!#fEr
z#F9lt9BPwsr^lN?hJo9An^TMh$>H}I>X;uUbja1a7@=Sl&99^f7vGOe3l6o<2_^|U
zi=T}y2?s#ht>DXL$UpaOFNm@rz51`QK#|iydspx@!@b*P0<3=pw~W413bW;DblXC+
z^E?!sX^547L*p4o{iXD_@;aB1wtiouph1OoSeYp4E3LZr^TmUI5Ce=lmA?|8`{wxn7YorDX9j{*>bW72`&fT=8vCPtrwr%Eq+6OEMmqD)}
zFfQR0hB(}ke_!LrcEfI3adeTgG4Y_o1F2v$D&XyP>zv`?C53WDBStZn9)bFAGXFP6
z_VC_jL)oRrQCUyYn8YAHrm71a7;?FAA=OdHD$EPTfn5msO1=7q=D-ewg=RhvNKYZq
zji(f2Wk-AKRQ#v`&2ee?U{qfMWyT%_1?Ge^$Z?W{g4{Fmib+$zVyDuLXH)>ziyID*
z;JNo%6m#x}`U&&5#llZl+^nM8?bZf*3^En!(%VfAXF1wcm
zdcuREIflgg4&`JY%aiEVg-+*I)@T5eum*3s=er5uc^$bgDqi;IiL&!+96Uy_tDN;E
z)3%&Cg>zJ<)g2k>{iadAA%FU8<a;KSFTwdlP66K2{EU-|2NY$lnS6Z1xwa=*MQfS&2xO34l
zr{n}UiV}or_d`Uqeuy64cyuT0f|$$7FKVB~qbQ%W*B0V=RaE4>SmySeThsvdB){4>
zlOswD*oT2>*lS2raqnN_J)}bDI%Hvo6Z|+a{FQU14&BbT`C|H#b#HOTz*@(6OT9Q9
zKQ`t{5=^v5IaJR*RuE9s#Wh%)9YE5D)pI&pxm}%ZR$~Y-v=#D0-Say9gurzC&(Fvw
z3;Fg4ShEGdn%mtph*PJf07Wt8%!SCVr
zYwyx~jX^{rueWZ`r?YUE`Z50{j4F;%_I0W2J2Yz8
z<)yq{c^D(6i`g~;<6CqX?2&g03GN6McbW~7;|rOLkx3p5rIUW^Oe1ZKpA|EWl`p>`SEFql1?o?)3s&E}?vo
z|4zQtW-USLhUsGD*=^K(N2aEpPaK
ze9FWBZ~#EQATXMnP)VejySRjCtDe`
zk2AdEWWCF8I%Hk)!Z2`f=TmVY&j9!9Q^|_k!a0FD)vvIHt2#0oJfL!M)%bXY@RkZ6
zX(qI*?KVZ}4U@6{qHm*#;g23C`F$9=HVIx|-ge%U1JN7hrfK@FlP^C1j^32WA|3o3
z)qTQW$?XAF1~X`-Qgz^6)%ou-y$Inws;mp46Cx=
zqDD43dt4ps(yy$!NVyL_FF@-T0njsX`VvH3{Sa{>VS5cbCNNYSlO<0avOqpHvkx&D
z%bpxWUYBNsgJ`+v9P)bMd^iG3xd8>gMH2OzeAq_#mP)=ZS^aunr?b9lOrq0GE?e_xlQVFhp3H}tH!~eVxvV)3RuMa5m
z`EU0}Pv>Y86-3+Zmwsj1X2Q?%jU3@gN)iL%2@EH29)u^B1YEuIsW%xA&(8D3O1GWG
zjpxNRCS!M@3fh-XalOE&_yE^HyVt9%mDFmgcBn25@*;jp#=D#L@}GQ5P;IB4;BM$c
zk)&)p7Z`kR5ukw?&H+IP@G6OLHD(~y1UCuES0Hg(si1Z=1`yD5Yxkl4a_6=rRF*Xf
zZd@F!rTAkoVzUNyfQJwSe87w346~f>n6@>Lg{%A|rw=%hq4~#*gg`T!cV`ej&4wl$
zp#wi_Q@JY)qpat*Jlx`|DLEhHRgP4C0%7}4gW5qp9PFGYIw!w4BevoT8q4T#{o`F{
zGGOV44|Wu$4EGzKWLzm$(CY>T+%)|qQm70!hO@}v=eY$Xi`}Os3FIq?!Qg1mxVZZm
zTGZVr`je&;`&|jp2c83$cjv&%&G$T%k4q^B5JmB=jc*KTHtXeQxfDmljIWkeR|~c&
zptFpLWv^-_vIe!o?XP|kTHDvQ@HY1|}TaI<8EM6nhDg(x6TeA99Te+
z*5^{phZM~?>f^7
zT3yG_VhX&p$N;2`lS&(tWZ-!DCHbYm8OYYRBwRj&C?(o3)5iUVj%&!+GPvn`1VWE8v;C%mb+VUWkBO43c6UsO
zpC$_i-7AeU|+{Ia|@R2YLcn}y93`5+PQbnOV-H-OZ3$L)_*B)jk>}GLES6rbv+i^XRo2a56=BxVucQ*`B8zLdr6f@
z#_%K$6z*o*U~koek{BxPiP>!vs=76%=}lMDsp}gWEK`!6CIsbG_9yP_A$=}7y9^xI1)wO0v|NeC-hAC31sNjSz-|1Jx+UGxDu!x>o*QNQBF7Y_7(+w|R;4q`OQh
zv9j0X=jcR8>?qPxhdwa-x}9^RAAfXbVt%?;R7AS}achPo`$4HONw<=0tMAWquQ^IQ
z_F9`iskUMBIcdeZkX35vyz#~EODf7se@-mOEp0SZGrtHHsyWRZG&`_0TS`$ZsC7ze>gS24-#ALk-znY=Ub*Qk?|>FAih)EUY&Em
z!A1uLmNeAO3H45`z?3qD8kKbQf;aRHM0C$f?Exi{J%Te
zL_&3jpEZ|ly9b{=x)b2EDk)dW(#;p$P1uP-A$ue-(%Nmz4t@htWKeTikX1gGEyC94
zRjH)`EjV*;{-v=4$!s%}4Cy>=zY)Or8_Qw=Uv|?>$4Jn^NmtB5!@_B#FB*V=3ol_d
zUDUqL|DOt#1>Ym%VFOGgFi#;8(@oz+!Sep?1qy;X)bb7r5mZCmSjcO|UD5P9qA_1`
z_9JSdv(gSxoVZK?Rpa0z`(CjxirZX##lGU+mngTFIB}o@MLiHYNNDji&7tHzE{6<$
zA8yn`g)QKe8fx$Jzgj$x-<4Y*WF1~pcoW<#Su>W(pY!VdN49UO@)jB^eak1*%Yu%%
zLM~-b251#>F`({H%H=k%cySb5Uop-viuW1oXO8BOBxnOVWb0j+kFLTeAQ`m!_+4{W
zpii|`#D|~7#^MhNAI=f&%z5fP%`97%`xZ_#m)_HNjc)x<5eWXUwduxPN#7}UT@US9
zx*!;Z4RkLOAlt*GosVUpy0q3)YWafkMZ#rj^&MaC3ZKm3o9Z`hn=@2ajrnX(lCRs}@NbW1#YVv$<^4b$