From 015c83ccf4062b1a4027b7d2590c3a71a5342fae Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 28 Jan 2018 15:26:42 +0900 Subject: [PATCH] Fix a few docblocks --- .../Calculation/Calculation.php | 18 +- .../Engine/CyclicReferenceStack.php | 2 + src/PhpSpreadsheet/Calculation/Financial.php | 302 ++++++------------ src/PhpSpreadsheet/Calculation/LookupRef.php | 1 - src/PhpSpreadsheet/Calculation/MathTrig.php | 1 - .../Calculation/Statistical.php | 21 +- src/PhpSpreadsheet/Cell/Cell.php | 2 + src/PhpSpreadsheet/Cell/DataType.php | 8 +- src/PhpSpreadsheet/Chart/Axis.php | 4 +- src/PhpSpreadsheet/Chart/Chart.php | 13 +- src/PhpSpreadsheet/Chart/GridLines.php | 3 +- src/PhpSpreadsheet/Chart/Layout.php | 1 - src/PhpSpreadsheet/Chart/Legend.php | 4 + src/PhpSpreadsheet/Chart/PlotArea.php | 7 +- src/PhpSpreadsheet/Chart/Properties.php | 4 + src/PhpSpreadsheet/Collection/Cells.php | 5 +- src/PhpSpreadsheet/Comment.php | 2 - src/PhpSpreadsheet/HashTable.php | 8 +- src/PhpSpreadsheet/Helper/Sample.php | 2 - src/PhpSpreadsheet/Reader/BaseReader.php | 6 +- src/PhpSpreadsheet/Reader/Csv.php | 6 +- src/PhpSpreadsheet/Reader/Gnumeric.php | 8 +- src/PhpSpreadsheet/Reader/Html.php | 4 +- src/PhpSpreadsheet/Reader/Slk.php | 6 +- src/PhpSpreadsheet/Reader/Xls.php | 11 +- src/PhpSpreadsheet/Reader/Xls/Escher.php | 4 +- src/PhpSpreadsheet/Reader/Xlsx/Chart.php | 4 + src/PhpSpreadsheet/Reader/Xml.php | 4 + src/PhpSpreadsheet/RichText/RichText.php | 4 - src/PhpSpreadsheet/RichText/Run.php | 3 - .../Shared/Escher/DggContainer.php | 9 +- .../DggContainer/BstoreContainer/BSE.php | 3 +- .../DggContainer/BstoreContainer/BSE/Blip.php | 3 +- .../Shared/JAMA/CholeskyDecomposition.php | 3 +- .../Shared/JAMA/utils/Maths.php | 2 + src/PhpSpreadsheet/Shared/OLE.php | 6 +- src/PhpSpreadsheet/Shared/OLE/PPS/File.php | 10 - src/PhpSpreadsheet/Shared/OLE/PPS/Root.php | 2 + src/PhpSpreadsheet/Shared/XMLWriter.php | 2 +- src/PhpSpreadsheet/Spreadsheet.php | 12 +- src/PhpSpreadsheet/Style/Style.php | 2 + src/PhpSpreadsheet/Style/Supervisor.php | 5 +- src/PhpSpreadsheet/Worksheet/AutoFilter.php | 2 - .../Worksheet/AutoFilter/Column.php | 6 - src/PhpSpreadsheet/Worksheet/BaseDrawing.php | 2 - .../Worksheet/Drawing/Shadow.php | 3 - src/PhpSpreadsheet/Worksheet/HeaderFooter.php | 8 - src/PhpSpreadsheet/Worksheet/Row.php | 2 +- src/PhpSpreadsheet/Worksheet/Worksheet.php | 30 +- src/PhpSpreadsheet/Writer/Csv.php | 2 - src/PhpSpreadsheet/Writer/Html.php | 13 +- src/PhpSpreadsheet/Writer/Ods.php | 2 - src/PhpSpreadsheet/Writer/Ods/Mimetype.php | 2 - src/PhpSpreadsheet/Writer/Ods/Thumbnails.php | 2 - src/PhpSpreadsheet/Writer/Ods/WriterPart.php | 2 - src/PhpSpreadsheet/Writer/Pdf.php | 6 +- src/PhpSpreadsheet/Writer/Xls/Escher.php | 1 - src/PhpSpreadsheet/Writer/Xls/Font.php | 3 +- src/PhpSpreadsheet/Writer/Xls/Parser.php | 4 + src/PhpSpreadsheet/Writer/Xls/Workbook.php | 4 +- src/PhpSpreadsheet/Writer/Xls/Worksheet.php | 11 +- src/PhpSpreadsheet/Writer/Xls/Xf.php | 8 +- src/PhpSpreadsheet/Writer/Xlsx/Chart.php | 16 +- src/PhpSpreadsheet/Writer/Xlsx/Comments.php | 2 - src/PhpSpreadsheet/Writer/Xlsx/Drawing.php | 6 - .../Writer/Xlsx/StringTable.php | 6 - src/PhpSpreadsheet/Writer/Xlsx/Style.php | 2 - src/PhpSpreadsheet/Writer/Xlsx/Theme.php | 4 - src/PhpSpreadsheet/Writer/Xlsx/Workbook.php | 18 -- src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php | 36 --- src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php | 2 - 71 files changed, 250 insertions(+), 482 deletions(-) diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 3d44b4ed..9a95592a 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -2315,13 +2315,15 @@ class Calculation } /** + * @param string[] $from + * @param string[] $to + * @param string $formula * @param string $fromSeparator * @param string $toSeparator - * @param mixed $from - * @param mixed $to - * @param mixed $formula + * + * @return string */ - private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator) + private static function translateFormula(array $from, array $to, $formula, $fromSeparator, $toSeparator) { // Convert any Excel function names to the required language if (self::$localeLanguage !== 'en_us') { @@ -2573,8 +2575,6 @@ class Calculation * * @param string $formula Formula to parse * - * @throws Exception - * * @return array */ public function parseFormula($formula) @@ -2749,6 +2749,8 @@ class Calculation * 0 = no resize * 1 = shrink to fit * 2 = extend to fit + * + * @return array */ private static function checkMatrixOperands(&$operand1, &$operand2, $resize = 1) { @@ -4087,8 +4089,6 @@ class Calculation * @param Worksheet $pSheet Worksheet * @param bool $resetLog Flag indicating whether calculation log should be reset or not * - * @throws Exception - * * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. */ public function extractCellRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) @@ -4138,8 +4138,6 @@ class Calculation * @param Worksheet $pSheet Worksheet * @param bool $resetLog Flag indicating whether calculation log should be reset or not * - * @throws Exception - * * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. */ public function extractNamedRange(&$pRange = 'A1', Worksheet $pSheet = null, $resetLog = true) diff --git a/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php b/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php index 3ef0c20e..5a54d83a 100644 --- a/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php +++ b/src/PhpSpreadsheet/Calculation/Engine/CyclicReferenceStack.php @@ -45,6 +45,8 @@ class CyclicReferenceStack * Test to see if a specified entry exists on the stack. * * @param mixed $value The value to test + * + * @return bool */ public function onStack($value) { diff --git a/src/PhpSpreadsheet/Calculation/Financial.php b/src/PhpSpreadsheet/Calculation/Financial.php index 12904b3b..a6e4e982 100644 --- a/src/PhpSpreadsheet/Calculation/Financial.php +++ b/src/PhpSpreadsheet/Calculation/Financial.php @@ -15,7 +15,7 @@ class Financial * * Returns a boolean TRUE/FALSE indicating if this date is the last date of the month * - * @param DateTime $testDate The date for testing + * @param \DateTime $testDate The date for testing * * @return bool */ @@ -185,22 +185,17 @@ class Financial * * @category Financial Functions * - * @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. + * @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. + * @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 $issue - * @param mixed $settlement - * @param mixed $rate - * @param mixed $par - * @param mixed $basis * * @return float */ @@ -248,25 +243,18 @@ class Financial * * @category Financial Functions * - * @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 - * @param mixed salvage The salvage value at the end of the life of the asset - * @param float period The period - * @param float rate Rate of depreciation - * @param int basis The type of day count to use. + * @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 + * @param mixed $salvage The salvage value at the end of the life of the asset + * @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 - * @param mixed $cost - * @param mixed $purchased - * @param mixed $firstPeriod - * @param mixed $salvage - * @param mixed $period - * @param mixed $rate - * @param mixed $basis * * @return float */ @@ -333,25 +321,18 @@ class Financial * * @category Financial Functions * - * @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 - * @param mixed salvage The salvage value at the end of the life of the asset - * @param float period The period - * @param float rate Rate of depreciation - * @param int basis The type of day count to use. + * @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 + * @param mixed $salvage The salvage value at the end of the life of the asset + * @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 - * @param mixed $cost - * @param mixed $purchased - * @param mixed $firstPeriod - * @param mixed $salvage - * @param mixed $period - * @param mixed $rate - * @param mixed $basis * * @return float */ @@ -399,12 +380,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @param mixed $maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param int frequency the number of coupon payments per year. + * @param int $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -413,16 +394,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 $settlement - * @param mixed $maturity - * @param mixed $frequency - * @param mixed $basis * * @return float */ @@ -462,12 +439,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @param mixed $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -476,16 +453,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 int $frequency - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $basis * * @return float */ @@ -540,12 +513,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @param mixed $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -554,16 +527,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 $settlement - * @param mixed $maturity - * @param mixed $frequency - * @param mixed $basis * * @return float */ @@ -603,12 +572,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @param mixed $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -617,16 +586,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 $settlement - * @param mixed $maturity - * @param mixed $frequency - * @param mixed $basis * * @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 @@ -665,12 +630,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @param mixed $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -679,16 +644,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 $settlement - * @param mixed $maturity - * @param mixed $frequency - * @param mixed $basis * * @return int */ @@ -741,12 +702,12 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @param mixed $frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -755,16 +716,12 @@ class Financial * also available * 6 Bimonthly * 12 Monthly - * @param int basis The type of day count to use. + * @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 $settlement - * @param mixed $maturity - * @param mixed $frequency - * @param mixed $basis * * @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 @@ -903,20 +860,15 @@ class Financial * * @category Financial Functions * - * @param float cost Initial cost of the asset - * @param float salvage Value at the end of the depreciation. + * @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) - * @param int life Number of periods over which the asset is depreciated. + * @param int $life Number of periods over which the asset is depreciated. * (Sometimes called the useful life of the asset) - * @param int period The period for which you want to calculate the + * @param int $period The period for which you want to calculate the * depreciation. Period must use the same units as life. - * @param int month Number of months in the first year. If month is omitted, + * @param int $month Number of months in the first year. If month is omitted, * it defaults to 12. - * @param mixed $cost - * @param mixed $salvage - * @param mixed $life - * @param mixed $period - * @param mixed $month * * @return float */ @@ -977,21 +929,16 @@ class Financial * * @category Financial Functions * - * @param float cost Initial cost of the asset - * @param float salvage Value at the end of the depreciation. + * @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) - * @param int life Number of periods over which the asset is depreciated. + * @param int $life Number of periods over which the asset is depreciated. * (Sometimes called the useful life of the asset) - * @param int period The period for which you want to calculate the + * @param int $period The period for which you want to calculate the * depreciation. Period must use the same units as life. - * @param float factor The rate at which the balance declines. + * @param float $factor The rate at which the balance declines. * If factor is omitted, it is assumed to be 2 (the * double-declining balance method). - * @param mixed $cost - * @param mixed $salvage - * @param mixed $life - * @param mixed $period - * @param mixed $factor * * @return float */ @@ -1043,24 +990,19 @@ class Financial * * @category Financial Functions * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @param mixed $maturity The security's maturity date. * 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. + * @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. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $price - * @param mixed $redemption - * @param mixed $basis * * @return float */ @@ -1731,23 +1673,18 @@ class Financial * * Returns the price per $100 face value of a discounted security. * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @param mixed $maturity The security's maturity date. * 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. + * @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. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $discount - * @param mixed $redemption - * @param mixed $basis * * @return float */ @@ -1781,25 +1718,19 @@ class Financial * * Returns the price per $100 face value of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @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. + * @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 int rate The security's interest rate at date of issue - * @param int yield The security's annual yield - * @param int basis The type of day count to use. + * @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 + * @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 $settlement - * @param mixed $maturity - * @param mixed $issue - * @param mixed $rate - * @param mixed $yield - * @param mixed $basis * * @return float */ @@ -1895,27 +1826,21 @@ class Financial * * @category Financial Functions * - * @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 + * @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 * 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 float $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 float $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 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. - * @param float guess Your guess for what the rate will be. + * @param float $guess Your guess for what the rate will be. * If you omit guess, it is assumed to be 10 percent. - * @param mixed $nper - * @param mixed $pmt - * @param mixed $pv - * @param mixed $fv - * @param mixed $type - * @param mixed $guess * * @return float **/ @@ -1968,23 +1893,18 @@ class Financial * * Returns the price per $100 face value of a discounted security. * - * @param mixed settlement The security's settlement 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 mixed maturity The security's maturity date. + * @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. + * @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 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $investment - * @param mixed $discount - * @param mixed $basis * * @return float */ @@ -2078,14 +1998,11 @@ class Financial * * Returns the bond-equivalent yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @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. + * @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 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $discount + * @param int $discount The Treasury bill's discount rate * * @return float */ @@ -2120,14 +2037,11 @@ class Financial * * Returns the yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @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. + * @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 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $discount + * @param int $discount The Treasury bill's discount rate * * @return float */ @@ -2178,14 +2092,11 @@ class Financial * * Returns the yield for a Treasury bill. * - * @param mixed settlement The Treasury bill's settlement date. + * @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. + * @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 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $price + * @param int $price The Treasury bill's price per $100 face value * * @return float */ @@ -2331,23 +2242,18 @@ class Financial * * Returns the annual yield of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @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. + * @param mixed $maturity The security's maturity date. * 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. + * @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. * 0 or omitted US (NASD) 30/360 * 1 Actual/actual * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $price - * @param mixed $redemption - * @param mixed $basis * * @return float */ @@ -2386,25 +2292,19 @@ class Financial * * Returns the annual yield of a security that pays interest at maturity. * - * @param mixed settlement The security's settlement date. + * @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. + * @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 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. + * @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 - * @param mixed $settlement - * @param mixed $maturity - * @param mixed $issue - * @param mixed $rate - * @param mixed $price - * @param mixed $basis * * @return float */ diff --git a/src/PhpSpreadsheet/Calculation/LookupRef.php b/src/PhpSpreadsheet/Calculation/LookupRef.php index 029e7ea6..d8cdc242 100644 --- a/src/PhpSpreadsheet/Calculation/LookupRef.php +++ b/src/PhpSpreadsheet/Calculation/LookupRef.php @@ -204,7 +204,6 @@ class LookupRef * =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 - * @param null|mixed $cellAddress * * @return int The number of rows in cellAddress */ diff --git a/src/PhpSpreadsheet/Calculation/MathTrig.php b/src/PhpSpreadsheet/Calculation/MathTrig.php index 107a1a20..46e9f1aa 100644 --- a/src/PhpSpreadsheet/Calculation/MathTrig.php +++ b/src/PhpSpreadsheet/Calculation/MathTrig.php @@ -1175,7 +1175,6 @@ class MathTrig * * @param mixed $aArgs Data values * @param string $condition the criteria that defines which cells will be summed - * @param mixed $aArgs * @param mixed $sumArgs * * @return float diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index dbab767e..6f60bac8 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -974,10 +974,8 @@ class Statistical * * Returns covariance, the average of the products of deviations for each data point pair. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param mixed $yValues - * @param null|mixed $xValues + * @param mixed $yValues array of mixed Data Series Y + * @param null|mixed $xValues array of mixed Data Series X * * @return float */ @@ -1138,10 +1136,8 @@ class Statistical * * Returns covariance, the average of the products of deviations for each data point pair. * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param mixed $yValues - * @param mixed $xValues + * @param mixed $yValues array of mixed Data Series Y + * @param mixed $xValues array of mixed Data Series X * * @return float */ @@ -1427,12 +1423,9 @@ class Statistical * * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. * - * @param float Value of X for which we want to find Y - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param mixed $xValue - * @param mixed $yValues - * @param mixed $xValues + * @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 * * @return float */ diff --git a/src/PhpSpreadsheet/Cell/Cell.php b/src/PhpSpreadsheet/Cell/Cell.php index 62cf4cfa..f8af7a2f 100644 --- a/src/PhpSpreadsheet/Cell/Cell.php +++ b/src/PhpSpreadsheet/Cell/Cell.php @@ -667,6 +667,8 @@ class Cell * Set the formula attributes. * * @param mixed $pAttributes + * + * @return Cell */ public function setFormulaAttributes($pAttributes) { diff --git a/src/PhpSpreadsheet/Cell/DataType.php b/src/PhpSpreadsheet/Cell/DataType.php index 2d8b45be..ba035791 100644 --- a/src/PhpSpreadsheet/Cell/DataType.php +++ b/src/PhpSpreadsheet/Cell/DataType.php @@ -45,10 +45,9 @@ class DataType /** * Check a string that it satisfies Excel requirements. * - * @param mixed Value to sanitize to an Excel string - * @param null|mixed $pValue + * @param null|RichText|string $pValue Value to sanitize to an Excel string * - * @return mixed Sanitized value + * @return null|RichText|string Sanitized value */ public static function checkString($pValue) { @@ -69,8 +68,7 @@ class DataType /** * Check a value that it is a valid error code. * - * @param mixed Value to sanitize to an Excel error code - * @param null|mixed $pValue + * @param mixed $pValue Value to sanitize to an Excel error code * * @return string Sanitized value */ diff --git a/src/PhpSpreadsheet/Chart/Axis.php b/src/PhpSpreadsheet/Chart/Axis.php index 6b466304..52f70431 100644 --- a/src/PhpSpreadsheet/Chart/Axis.php +++ b/src/PhpSpreadsheet/Chart/Axis.php @@ -462,7 +462,9 @@ class Axis extends Properties /** * Get Shadow Property. * - * @param mixed $elements + * @param string|string[] $elements + * + * @return null|array|int|string */ public function getShadowProperty($elements) { diff --git a/src/PhpSpreadsheet/Chart/Chart.php b/src/PhpSpreadsheet/Chart/Chart.php index d5f9a6b9..3d09a041 100644 --- a/src/PhpSpreadsheet/Chart/Chart.php +++ b/src/PhpSpreadsheet/Chart/Chart.php @@ -144,8 +144,17 @@ class Chart * Create a new Chart. * * @param mixed $name + * @param null|Title $title + * @param null|Legend $legend + * @param null|PlotArea $plotArea * @param mixed $plotVisibleOnly * @param mixed $displayBlanksAs + * @param null|Title $xAxisLabel + * @param null|Title $yAxisLabel + * @param null|Axis $xAxis + * @param null|Axis $yAxis + * @param null|GridLines $majorGridlines + * @param null|GridLines $minorGridlines */ public function __construct($name, Title $title = null, Legend $legend = null, PlotArea $plotArea = null, $plotVisibleOnly = true, $displayBlanksAs = '0', Title $xAxisLabel = null, Title $yAxisLabel = null, Axis $xAxis = null, Axis $yAxis = null, GridLines $majorGridlines = null, GridLines $minorGridlines = null) { @@ -188,8 +197,6 @@ class Chart * * @param Worksheet $pValue * - * @throws Exception - * * @return Chart */ public function setWorksheet(Worksheet $pValue = null) @@ -349,6 +356,8 @@ class Chart public function setDisplayBlanksAs($displayBlanksAs) { $this->displayBlanksAs = $displayBlanksAs; + + return $this; } /** diff --git a/src/PhpSpreadsheet/Chart/GridLines.php b/src/PhpSpreadsheet/Chart/GridLines.php index eed05d48..50ca4a23 100644 --- a/src/PhpSpreadsheet/Chart/GridLines.php +++ b/src/PhpSpreadsheet/Chart/GridLines.php @@ -421,8 +421,7 @@ class GridLines extends Properties /** * Get Shadow Property. * - * @param string $elements - * @param array $elements + * @param string|string[] $elements * * @return string */ diff --git a/src/PhpSpreadsheet/Chart/Layout.php b/src/PhpSpreadsheet/Chart/Layout.php index ca322511..fb5a53a0 100644 --- a/src/PhpSpreadsheet/Chart/Layout.php +++ b/src/PhpSpreadsheet/Chart/Layout.php @@ -151,7 +151,6 @@ class Layout /** * Set Layout Target. * - * @param Layout Target $value * @param string $value * * @return Layout diff --git a/src/PhpSpreadsheet/Chart/Legend.php b/src/PhpSpreadsheet/Chart/Legend.php index 7a817dd1..d0776265 100644 --- a/src/PhpSpreadsheet/Chart/Legend.php +++ b/src/PhpSpreadsheet/Chart/Legend.php @@ -76,6 +76,8 @@ class Legend * Get legend position using an excel string value. * * @param string $position see self::POSITION_* + * + * @return bool */ public function setPosition($position) { @@ -102,6 +104,8 @@ class Legend * Set legend position using an Excel internal numeric value. * * @param int $positionXL see self::XL_LEGEND_POSITION_* + * + * @return bool */ public function setPositionXL($positionXL) { diff --git a/src/PhpSpreadsheet/Chart/PlotArea.php b/src/PhpSpreadsheet/Chart/PlotArea.php index 5646671e..b98c638d 100644 --- a/src/PhpSpreadsheet/Chart/PlotArea.php +++ b/src/PhpSpreadsheet/Chart/PlotArea.php @@ -16,7 +16,7 @@ class PlotArea /** * Plot Series. * - * @var array of DataSeries + * @var DataSeries[] */ private $plotSeries = []; @@ -24,7 +24,7 @@ class PlotArea * Create a new PlotArea. * * @param null|Layout $layout - * @param array $plotSeries + * @param DataSeries[] $plotSeries */ public function __construct(Layout $layout = null, array $plotSeries = []) { @@ -92,8 +92,7 @@ class PlotArea /** * Set Plot Series. * - * @param DataSeries[] - * @param mixed $plotSeries + * @param DataSeries[] $plotSeries * * @return PlotArea */ diff --git a/src/PhpSpreadsheet/Chart/Properties.php b/src/PhpSpreadsheet/Chart/Properties.php index 07b8cf52..98095f0d 100644 --- a/src/PhpSpreadsheet/Chart/Properties.php +++ b/src/PhpSpreadsheet/Chart/Properties.php @@ -112,6 +112,8 @@ abstract class Properties /** * @param float $width + * + * @return float */ protected function getExcelPointsWidth($width) { @@ -120,6 +122,8 @@ abstract class Properties /** * @param float $angle + * + * @return float */ protected function getExcelPointsAngle($angle) { diff --git a/src/PhpSpreadsheet/Collection/Cells.php b/src/PhpSpreadsheet/Collection/Cells.php index fc81a976..561f6a4d 100644 --- a/src/PhpSpreadsheet/Collection/Cells.php +++ b/src/PhpSpreadsheet/Collection/Cells.php @@ -61,6 +61,7 @@ class Cells * Initialise this new cell collection. * * @param Worksheet $parent The worksheet for this cell collection + * @param CacheInterface $cache */ public function __construct(Worksheet $parent, CacheInterface $cache) { @@ -117,8 +118,6 @@ class Cells * Delete a cell in cache identified by coordinate. * * @param string $pCoord Coordinate of the cell to delete - * - * @throws PhpSpreadsheetException */ public function delete($pCoord) { @@ -475,7 +474,7 @@ class Cells /** * Returns all known cache keys. * - * @return string + * @return string[] */ private function getAllCacheKeys() { diff --git a/src/PhpSpreadsheet/Comment.php b/src/PhpSpreadsheet/Comment.php index 772e9229..1b5ab1fd 100644 --- a/src/PhpSpreadsheet/Comment.php +++ b/src/PhpSpreadsheet/Comment.php @@ -71,8 +71,6 @@ class Comment implements IComparable /** * Create a new Comment. - * - * @throws Exception */ public function __construct() { diff --git a/src/PhpSpreadsheet/HashTable.php b/src/PhpSpreadsheet/HashTable.php index a9e01840..4e8f0a5c 100644 --- a/src/PhpSpreadsheet/HashTable.php +++ b/src/PhpSpreadsheet/HashTable.php @@ -7,14 +7,14 @@ class HashTable /** * HashTable elements. * - * @var mixed[] + * @var IComparable[] */ protected $items = []; /** * HashTable key map. * - * @var mixed[] + * @var string[] */ protected $keyMap = []; @@ -56,8 +56,6 @@ class HashTable * Add HashTable item. * * @param IComparable $pSource Item to add - * - * @throws Exception */ public function add(IComparable $pSource) { @@ -72,8 +70,6 @@ class HashTable * Remove HashTable item. * * @param IComparable $pSource Item to remove - * - * @throws Exception */ public function remove(IComparable $pSource) { diff --git a/src/PhpSpreadsheet/Helper/Sample.php b/src/PhpSpreadsheet/Helper/Sample.php index c637e119..54e0e298 100644 --- a/src/PhpSpreadsheet/Helper/Sample.php +++ b/src/PhpSpreadsheet/Helper/Sample.php @@ -200,8 +200,6 @@ class Sample * @param IWriter $writer * @param string $path * @param float $callStartTime - * - * @throws \ReflectionException */ public function logWrite(IWriter $writer, $path, $callStartTime) { diff --git a/src/PhpSpreadsheet/Reader/BaseReader.php b/src/PhpSpreadsheet/Reader/BaseReader.php index 6c2cfa49..0a092d36 100644 --- a/src/PhpSpreadsheet/Reader/BaseReader.php +++ b/src/PhpSpreadsheet/Reader/BaseReader.php @@ -210,8 +210,6 @@ abstract class BaseReader implements IReader * @param string $pFilename * * @throws Exception - * - * @return resource */ protected function openFile($pFilename) { @@ -230,6 +228,8 @@ abstract class BaseReader implements IReader * @param string $xml * * @throws Exception + * + * @return string */ public function securityScan($xml) { @@ -247,6 +247,8 @@ abstract class BaseReader implements IReader * @param string $filestream * * @throws Exception + * + * @return string */ public function securityScanFile($filestream) { diff --git a/src/PhpSpreadsheet/Reader/Csv.php b/src/PhpSpreadsheet/Reader/Csv.php index 2f13e368..c31a37f5 100644 --- a/src/PhpSpreadsheet/Reader/Csv.php +++ b/src/PhpSpreadsheet/Reader/Csv.php @@ -62,6 +62,8 @@ class Csv extends BaseReader * Set input encoding. * * @param string $pValue Input encoding, eg: 'UTF-8' + * + * @return Csv */ public function setInputEncoding($pValue) { @@ -433,6 +435,8 @@ class Csv extends BaseReader * Set Contiguous. * * @param bool $contiguous + * + * @return Csv */ public function setContiguous($contiguous) { @@ -459,8 +463,6 @@ class Csv extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) diff --git a/src/PhpSpreadsheet/Reader/Gnumeric.php b/src/PhpSpreadsheet/Reader/Gnumeric.php index 512d93e5..af2ed8e4 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -69,7 +69,7 @@ class Gnumeric extends BaseReader * * @param string $pFilename * - * @throws Exception + * @return array */ public function listWorksheetNames($pFilename) { @@ -98,7 +98,7 @@ class Gnumeric extends BaseReader * * @param string $pFilename * - * @throws Exception + * @return array */ public function listWorksheetInfo($pFilename) { @@ -144,12 +144,14 @@ class Gnumeric extends BaseReader /** * @param string $filename + * + * @return string */ private function gzfileGetContents($filename) { $file = @gzopen($filename, 'rb'); + $data = ''; if ($file !== false) { - $data = ''; while (!gzeof($file)) { $data .= gzread($file, 1024); } diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index 43d3e66c..a35515c2 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -197,6 +197,8 @@ class Html extends BaseReader * Set input encoding. * * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return Html */ public function setInputEncoding($pValue) { @@ -585,7 +587,7 @@ class Html extends BaseReader * * @param string $xml * - * @throws Exception + * @return string */ public function securityScan($xml) { diff --git a/src/PhpSpreadsheet/Reader/Slk.php b/src/PhpSpreadsheet/Reader/Slk.php index 979353da..03225d9b 100644 --- a/src/PhpSpreadsheet/Reader/Slk.php +++ b/src/PhpSpreadsheet/Reader/Slk.php @@ -51,8 +51,6 @@ class Slk extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -84,6 +82,8 @@ class Slk extends BaseReader * Set input encoding. * * @param string $pValue Input encoding, eg: 'ANSI' + * + * @return Slk */ public function setInputEncoding($pValue) { @@ -108,6 +108,8 @@ class Slk extends BaseReader * @param string $pFilename * * @throws Exception + * + * @return array */ public function listWorksheetInfo($pFilename) { diff --git a/src/PhpSpreadsheet/Reader/Xls.php b/src/PhpSpreadsheet/Reader/Xls.php index a3752737..7eb84b5b 100644 --- a/src/PhpSpreadsheet/Reader/Xls.php +++ b/src/PhpSpreadsheet/Reader/Xls.php @@ -420,8 +420,6 @@ class Xls extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -447,6 +445,8 @@ class Xls extends BaseReader * @param string $pFilename * * @throws Exception + * + * @return array */ public function listWorksheetNames($pFilename) { @@ -505,6 +505,8 @@ class Xls extends BaseReader * @param string $pFilename * * @throws Exception + * + * @return array */ public function listWorksheetInfo($pFilename) { @@ -1844,9 +1846,8 @@ class Xls extends BaseReader /** * Make an RC4 decryptor for the given block. * - * @param int Block for which to create decrypto + * @param int $block Block for which to create decrypto * @param string $valContext MD5 context state - * @param mixed $block * * @return Xls\RC4 */ @@ -7805,6 +7806,8 @@ class Xls extends BaseReader /** * @param int $rknum + * + * @return float */ private static function getIEEE754($rknum) { diff --git a/src/PhpSpreadsheet/Reader/Xls/Escher.php b/src/PhpSpreadsheet/Reader/Xls/Escher.php index 0e88936c..858d6bbb 100644 --- a/src/PhpSpreadsheet/Reader/Xls/Escher.php +++ b/src/PhpSpreadsheet/Reader/Xls/Escher.php @@ -57,7 +57,7 @@ class Escher /** * The object to be returned by the reader. Modified during load. * - * @var mixed + * @var BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer */ private $object; @@ -75,6 +75,8 @@ class Escher * Load Escher stream data. May be a partial Escher stream. * * @param string $data + * + * @return BSE|BstoreContainer|DgContainer|DggContainer|\PhpOffice\PhpSpreadsheet\Shared\Escher|SpContainer|SpgrContainer */ public function load($data) { diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Chart.php b/src/PhpSpreadsheet/Reader/Xlsx/Chart.php index a4f40460..641d6d1c 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Chart.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Chart.php @@ -20,6 +20,8 @@ class Chart * @param SimpleXMLElement $component * @param string $name * @param string $format + * + * @return null|bool|float|int|string */ private static function getAttribute(SimpleXMLElement $component, $name, $format) { @@ -51,6 +53,8 @@ class Chart /** * @param SimpleXMLElement $chartElements * @param string $chartName + * + * @return \PhpOffice\PhpSpreadsheet\Chart\Chart */ public static function readChart(SimpleXMLElement $chartElements, $chartName) { diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index 0a80a4ba..e4f866d9 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -126,6 +126,8 @@ class Xml extends BaseReader * @param string $pFilename * * @throws Exception + * + * @return array */ public function listWorksheetNames($pFilename) { @@ -155,6 +157,8 @@ class Xml extends BaseReader * @param string $pFilename * * @throws Exception + * + * @return array */ public function listWorksheetInfo($pFilename) { diff --git a/src/PhpSpreadsheet/RichText/RichText.php b/src/PhpSpreadsheet/RichText/RichText.php index 29e194e6..76a04d54 100644 --- a/src/PhpSpreadsheet/RichText/RichText.php +++ b/src/PhpSpreadsheet/RichText/RichText.php @@ -47,8 +47,6 @@ class RichText implements IComparable * * @param ITextElement $pText Rich text element * - * @throws Exception - * * @return RichText */ public function addText(ITextElement $pText) @@ -135,8 +133,6 @@ class RichText implements IComparable * * @param ITextElement[] $textElements Array of elements * - * @throws Exception - * * @return RichText */ public function setRichTextElements(array $textElements) diff --git a/src/PhpSpreadsheet/RichText/Run.php b/src/PhpSpreadsheet/RichText/Run.php index 20290ba1..cccf144f 100644 --- a/src/PhpSpreadsheet/RichText/Run.php +++ b/src/PhpSpreadsheet/RichText/Run.php @@ -2,7 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\RichText; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; use PhpOffice\PhpSpreadsheet\Style\Font; class Run extends TextElement implements ITextElement @@ -41,8 +40,6 @@ class Run extends TextElement implements ITextElement * * @param Font $pFont Font * - * @throws PhpSpreadsheetException - * * @return ITextElement */ public function setFont(Font $pFont = null) diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer.php index 1112f414..72ac66fd 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer.php @@ -59,8 +59,7 @@ class DggContainer /** * Set maximum shape index of all shapes in all drawings (plus one). * - * @param int - * @param mixed $value + * @param int $value */ public function setSpIdMax($value) { @@ -80,8 +79,7 @@ class DggContainer /** * Set total number of drawings saved. * - * @param int - * @param mixed $value + * @param int $value */ public function setCDgSaved($value) { @@ -101,8 +99,7 @@ class DggContainer /** * Set total number of shapes saved (including group shapes). * - * @param int - * @param mixed $value + * @param int $value */ public function setCSpSaved($value) { diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php index 64d99623..f83bdc7e 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE.php @@ -80,8 +80,7 @@ class BSE /** * Set the BLIP type. * - * @param int - * @param mixed $blipType + * @param int $blipType */ public function setBlipType($blipType) { diff --git a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php index 739c3268..88bc117a 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php +++ b/src/PhpSpreadsheet/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php @@ -31,8 +31,7 @@ class Blip /** * Set the raw image data. * - * @param string - * @param mixed $data + * @param string $data */ public function setData($data) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php index ec0b431d..2b241d55 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/CholeskyDecomposition.php @@ -47,8 +47,7 @@ class CholeskyDecomposition * * Class constructor - decomposes symmetric positive definite matrix * - * @param mixed Matrix square symmetric positive definite matrix - * @param null|mixed $A + * @param Matrix $A Matrix square symmetric positive definite matrix */ public function __construct(Matrix $A) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php b/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php index 5771edba..68c38649 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php +++ b/src/PhpSpreadsheet/Shared/JAMA/utils/Maths.php @@ -11,6 +11,8 @@ * * @param mixed $a * @param mixed $b + * + * @return float */ function hypo($a, $b) { diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index b99b8910..d78c0795 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -202,9 +202,9 @@ class OLE } /** - * @param int block id - * @param int byte offset from beginning of file - * @param mixed $blockId + * @param int $blockId byte offset from beginning of file + * + * @return int */ public function _getBlockOffset($blockId) { diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS/File.php b/src/PhpSpreadsheet/Shared/OLE/PPS/File.php index 240ed99a..68f50a5c 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS/File.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS/File.php @@ -63,14 +63,4 @@ class File extends PPS { $this->_data .= $data; } - - /** - * Returns a stream for reading this file using fread() etc. - * - * @return resource a read-only stream - */ - public function getStream() - { - $this->ole->getStream($this); - } } diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php index 14f56dca..578e08fa 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php @@ -308,6 +308,8 @@ class Root extends PPS * get small data (PPS's with data smaller than \PhpOffice\PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL). * * @param array &$raList Reference to array of PPS's + * + * @return string */ public function _makeSmallData(&$raList) { diff --git a/src/PhpSpreadsheet/Shared/XMLWriter.php b/src/PhpSpreadsheet/Shared/XMLWriter.php index ba5fdaa6..4f7a6a06 100644 --- a/src/PhpSpreadsheet/Shared/XMLWriter.php +++ b/src/PhpSpreadsheet/Shared/XMLWriter.php @@ -62,7 +62,7 @@ class XMLWriter extends \XMLWriter /** * Get written data. * - * @return $data + * @return string */ public function getData() { diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php index 348fe896..ad6be49d 100644 --- a/src/PhpSpreadsheet/Spreadsheet.php +++ b/src/PhpSpreadsheet/Spreadsheet.php @@ -258,17 +258,21 @@ class Spreadsheet /** * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function). * - * @param mixed $ThePath + * @param mixed $path + * + * @return string */ - private function getExtensionOnly($ThePath) + private function getExtensionOnly($path) { - return pathinfo($ThePath, PATHINFO_EXTENSION); + return pathinfo($path, PATHINFO_EXTENSION); } /** * retrieve Binaries Ribbon Objects. * - * @param mixed $what + * @param string $what + * + * @return null|array */ public function getRibbonBinObjects($what = 'all') { diff --git a/src/PhpSpreadsheet/Style/Style.php b/src/PhpSpreadsheet/Style/Style.php index aaca8dc7..96d84b67 100644 --- a/src/PhpSpreadsheet/Style/Style.php +++ b/src/PhpSpreadsheet/Style/Style.php @@ -568,6 +568,8 @@ class Style extends Supervisor * Set quote prefix. * * @param bool $pValue + * + * @return Style */ public function setQuotePrefix($pValue) { diff --git a/src/PhpSpreadsheet/Style/Supervisor.php b/src/PhpSpreadsheet/Style/Supervisor.php index 53be0851..2d1a2726 100644 --- a/src/PhpSpreadsheet/Style/Supervisor.php +++ b/src/PhpSpreadsheet/Style/Supervisor.php @@ -3,6 +3,7 @@ namespace PhpOffice\PhpSpreadsheet\Style; use PhpOffice\PhpSpreadsheet\IComparable; +use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; abstract class Supervisor implements IComparable @@ -17,7 +18,7 @@ abstract class Supervisor implements IComparable /** * Parent. Only used for supervisor. * - * @var Style + * @var Spreadsheet|Style */ protected $parent; @@ -44,7 +45,7 @@ abstract class Supervisor implements IComparable /** * Bind parent. Only used for supervisor. * - * @param Style $parent + * @param Spreadsheet|Style $parent * @param null|string $parentPropertyName * * @return Supervisor diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/src/PhpSpreadsheet/Worksheet/AutoFilter.php index cb0e2e29..fa8c1571 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -123,8 +123,6 @@ class AutoFilter /** * Get all AutoFilter Columns. * - * @throws PhpSpreadsheetException - * * @return AutoFilter\Column[] */ public function getColumns() diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php index 537e13f4..b5ab61e9 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php @@ -223,8 +223,6 @@ class Column * * @param string[] $attributes * - * @throws PhpSpreadsheetException - * * @return Column */ public function setAttributes(array $attributes) @@ -240,8 +238,6 @@ class Column * @param string $pName Attribute Name * @param string $pValue Attribute Value * - * @throws PhpSpreadsheetException - * * @return Column */ public function setAttribute($pName, $pValue) @@ -280,8 +276,6 @@ class Column /** * Get all AutoFilter Column Rules. * - * @throws PhpSpreadsheetException - * * @return Column\Rule[] */ public function getRules() diff --git a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php index 3e226377..858bce2f 100644 --- a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php +++ b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php @@ -462,8 +462,6 @@ class BaseDrawing implements IComparable * * @param Drawing\Shadow $pValue * - * @throws PhpSpreadsheetException - * * @return BaseDrawing */ public function setShadow(Drawing\Shadow $pValue = null) diff --git a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php index 44abbc60..a1e05d60 100644 --- a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php +++ b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php @@ -2,7 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Worksheet\Drawing; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; use PhpOffice\PhpSpreadsheet\IComparable; use PhpOffice\PhpSpreadsheet\Style\Color; @@ -221,8 +220,6 @@ class Shadow implements IComparable * * @param Color $pValue * - * @throws PhpSpreadsheetException - * * @return Shadow */ public function setColor(Color $pValue = null) diff --git a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php index c2606c5f..a78f4fcc 100644 --- a/src/PhpSpreadsheet/Worksheet/HeaderFooter.php +++ b/src/PhpSpreadsheet/Worksheet/HeaderFooter.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Worksheet; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - /** * * Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970:. @@ -405,8 +403,6 @@ class HeaderFooter * @param HeaderFooterDrawing $image * @param string $location * - * @throws PhpSpreadsheetException - * * @return HeaderFooter */ public function addImage(HeaderFooterDrawing $image, $location = self::IMAGE_HEADER_LEFT) @@ -421,8 +417,6 @@ class HeaderFooter * * @param string $location * - * @throws PhpSpreadsheetException - * * @return HeaderFooter */ public function removeImage($location = self::IMAGE_HEADER_LEFT) @@ -439,8 +433,6 @@ class HeaderFooter * * @param HeaderFooterDrawing[] $images * - * @throws PhpSpreadsheetException - * * @return HeaderFooter */ public function setImages(array $images) diff --git a/src/PhpSpreadsheet/Worksheet/Row.php b/src/PhpSpreadsheet/Worksheet/Row.php index 5c6ab57b..2a379d2c 100644 --- a/src/PhpSpreadsheet/Worksheet/Row.php +++ b/src/PhpSpreadsheet/Worksheet/Row.php @@ -21,7 +21,7 @@ class Row /** * Create a new row. * - * @param Worksheet $parent + * @param Worksheet $worksheet * @param int $rowIndex */ public function __construct(Worksheet $worksheet = null, $rowIndex = 1) diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 4b349322..1f131b2f 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -582,8 +582,6 @@ class Worksheet implements IComparable * * @param string $index Chart index position * - * @throws Exception - * * @return Chart|false */ public function getChartByIndex($index) @@ -605,8 +603,6 @@ class Worksheet implements IComparable /** * Return an array of the names of charts on this worksheet. * - * @throws Exception - * * @return string[] The names of charts */ public function getChartNames() @@ -624,8 +620,6 @@ class Worksheet implements IComparable * * @param string $chartName Chart name * - * @throws Exception - * * @return Chart|false */ public function getChartByName($chartName) @@ -1516,10 +1510,8 @@ class Worksheet implements IComparable * * @param int $columnIndex1 Numeric column coordinate of the cell * @param int $row1 Numeric row coordinate of the cell - * @param int $columnIndex2 Numeric column coordinate of the range cell - * @param int $row2 Numeric row coordinate of the range cell - * @param null|int $columnIndex2 - * @param null|int $row2 + * @param null|int $columnIndex2 Numeric column coordinate of the range cell + * @param null|int $row2 Numeric row coordinate of the range cell * * @return Style */ @@ -1794,8 +1786,9 @@ class Worksheet implements IComparable * Set merge cells array for the entire sheet. Use instead mergeCells() to merge * a single cell range. * - * @param array - * @param mixed $pValue + * @param array $pValue + * + * @return Worksheet */ public function setMergeCells(array $pValue) { @@ -1811,8 +1804,6 @@ class Worksheet implements IComparable * @param string $pPassword Password to unlock the protection * @param bool $pAlreadyHashed If the password has already been hashed, set this to true * - * @throws Exception - * * @return Worksheet */ public function protectCells($pRange, $pPassword, $pAlreadyHashed = false) @@ -1838,8 +1829,6 @@ class Worksheet implements IComparable * @param string $password Password to unlock the protection * @param bool $alreadyHashed If the password has already been hashed, set this to true * - * @throws Exception - * * @return Worksheet */ public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false) @@ -2311,8 +2300,7 @@ class Worksheet implements IComparable /** * Set comments array for the entire sheet. * - * @param array of Comment - * @param mixed $pValue + * @param Comment[] $pValue * * @return Worksheet */ @@ -2407,8 +2395,6 @@ class Worksheet implements IComparable * * @param string $pCoordinate Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' * - * @throws Exception - * * @return Worksheet */ public function setSelectedCells($pCoordinate) @@ -2751,6 +2737,8 @@ class Worksheet implements IComparable * Get hyperlink. * * @param string $pCellCoordinate Cell coordinate to get hyperlink for, eg: 'A1' + * + * @return Hyperlink */ public function getHyperlink($pCellCoordinate) { @@ -2810,6 +2798,8 @@ class Worksheet implements IComparable * Get data validation. * * @param string $pCellCoordinate Cell coordinate to get data validation for, eg: 'A1' + * + * @return DataValidation */ public function getDataValidation($pCellCoordinate) { diff --git a/src/PhpSpreadsheet/Writer/Csv.php b/src/PhpSpreadsheet/Writer/Csv.php index a9d3cf55..ae38ab73 100644 --- a/src/PhpSpreadsheet/Writer/Csv.php +++ b/src/PhpSpreadsheet/Writer/Csv.php @@ -309,8 +309,6 @@ class Csv extends BaseWriter * * @param resource $pFileHandle PHP filehandle * @param array $pValues Array containing values in a row - * - * @throws Exception */ private function writeLine($pFileHandle, array $pValues) { diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index c0e4503e..4de69ce3 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -623,8 +623,6 @@ class Html extends BaseWriter * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet * @param string $coordinates Cell coordinates * - * @throws WriterException - * * @return string */ private function writeImageInCell(Worksheet $pSheet, $coordinates) @@ -706,8 +704,6 @@ class Html extends BaseWriter * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet * @param string $coordinates Cell coordinates * - * @throws WriterException - * * @return string */ private function writeChartInCell(Worksheet $pSheet, $coordinates) @@ -1123,8 +1119,6 @@ class Html extends BaseWriter * * @param Worksheet $pSheet The worksheet for the table we are writing * - * @throws WriterException - * * @return string */ private function generateTableHeader($pSheet) @@ -1169,8 +1163,6 @@ class Html extends BaseWriter /** * Generate table footer. - * - * @throws WriterException */ private function generateTableFooter() { @@ -1435,12 +1427,11 @@ class Html extends BaseWriter /** * Takes array where of CSS properties / values and converts to CSS string. * - * @param array - * @param mixed $pValue + * @param array $pValue * * @return string */ - private function assembleCSS($pValue = []) + private function assembleCSS(array $pValue = []) { $pairs = []; foreach ($pValue as $property => $value) { diff --git a/src/PhpSpreadsheet/Writer/Ods.php b/src/PhpSpreadsheet/Writer/Ods.php index b0babbe1..83fc2931 100644 --- a/src/PhpSpreadsheet/Writer/Ods.php +++ b/src/PhpSpreadsheet/Writer/Ods.php @@ -167,8 +167,6 @@ class Ods extends BaseWriter * * @param Spreadsheet $spreadsheet PhpSpreadsheet object * - * @throws WriterException - * * @return self */ public function setSpreadsheet(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Ods/Mimetype.php b/src/PhpSpreadsheet/Writer/Ods/Mimetype.php index ac24dfdc..d0fed2b3 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Mimetype.php +++ b/src/PhpSpreadsheet/Writer/Ods/Mimetype.php @@ -11,8 +11,6 @@ class Mimetype extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function write(Spreadsheet $spreadsheet = null) diff --git a/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php b/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php index 76bfb13a..a29a14ad 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php +++ b/src/PhpSpreadsheet/Writer/Ods/Thumbnails.php @@ -11,8 +11,6 @@ class Thumbnails extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeThumbnail(Spreadsheet $spreadsheet = null) diff --git a/src/PhpSpreadsheet/Writer/Ods/WriterPart.php b/src/PhpSpreadsheet/Writer/Ods/WriterPart.php index 036d0a86..3e2f9684 100644 --- a/src/PhpSpreadsheet/Writer/Ods/WriterPart.php +++ b/src/PhpSpreadsheet/Writer/Ods/WriterPart.php @@ -16,8 +16,6 @@ abstract class WriterPart /** * Get Ods writer. * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Ods */ public function getParentWriter() diff --git a/src/PhpSpreadsheet/Writer/Pdf.php b/src/PhpSpreadsheet/Writer/Pdf.php index ac94ba37..b80083ae 100644 --- a/src/PhpSpreadsheet/Writer/Pdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf.php @@ -149,6 +149,8 @@ abstract class Pdf extends Html * 'arialunicid0-japanese'. * * @param string $fontName + * + * @return Pdf */ public function setFont($fontName) { @@ -241,6 +243,8 @@ abstract class Pdf extends Html * @param string $pFilename Name of the file to save as * * @throws WriterException + * + * @return resource */ protected function prepareForSave($pFilename) { @@ -268,8 +272,6 @@ abstract class Pdf extends Html * Save PhpSpreadsheet to PDF file, post-save. * * @param resource $fileHandle - * - * @throws WriterException */ protected function restoreStateAfterSave($fileHandle) { diff --git a/src/PhpSpreadsheet/Writer/Xls/Escher.php b/src/PhpSpreadsheet/Writer/Xls/Escher.php index ca811657..1dcef807 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Escher.php +++ b/src/PhpSpreadsheet/Writer/Xls/Escher.php @@ -40,7 +40,6 @@ class Escher /** * Constructor. * - * @param mixed * @param mixed $object */ public function __construct($object) diff --git a/src/PhpSpreadsheet/Writer/Xls/Font.php b/src/PhpSpreadsheet/Writer/Xls/Font.php index 45a029f6..df37dcb5 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Font.php +++ b/src/PhpSpreadsheet/Writer/Xls/Font.php @@ -134,8 +134,7 @@ class Font /** * Map underline. * - * @param string - * @param mixed $underline + * @param string $underline * * @return int */ diff --git a/src/PhpSpreadsheet/Writer/Xls/Parser.php b/src/PhpSpreadsheet/Writer/Xls/Parser.php index b7404a1b..0b451acb 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -535,6 +535,8 @@ class Parser * Convert a number token to ptgInt or ptgNum. * * @param mixed $num an integer or double for conversion to its ptg value + * + * @return string */ private function convertNumber($num) { @@ -597,6 +599,8 @@ class Parser * * @param string $range An Excel range in the A1:A2 * @param int $class + * + * @return string */ private function convertRange2d($range, $class = 0) { diff --git a/src/PhpSpreadsheet/Writer/Xls/Workbook.php b/src/PhpSpreadsheet/Writer/Xls/Workbook.php index 564f9512..d8c33cff 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Workbook.php +++ b/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -222,10 +222,8 @@ class Workbook extends BIFFwriter /** * Add a new XF writer. * - * @param Style - * @param bool Is it a style XF? * @param Style $style - * @param bool $isStyleXf + * @param bool $isStyleXf Is it a style XF? * * @return int Index to XF record */ diff --git a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php index 298f97ab..bfd85ac1 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -687,16 +687,11 @@ class Worksheet extends BIFFwriter * Write a string to the specified row and column (zero indexed). * This is the BIFF8 version (no 255 chars limit). * $format is optional. - * Returns 0 : normal termination - * -2 : row or column out of range - * -3 : long string truncated to 255 chars. * * @param int $row Zero indexed row * @param int $col Zero indexed column * @param string $str The string to write * @param mixed $xfIndex The XF format index for the cell - * - * @return int */ private function writeLabelSst($row, $col, $str, $xfIndex) { @@ -731,6 +726,8 @@ class Worksheet extends BIFFwriter * @param int $row Zero indexed row * @param int $col Zero indexed column * @param mixed $xfIndex The XF format index + * + * @return int */ public function writeBlank($row, $col, $xfIndex) { @@ -752,6 +749,8 @@ class Worksheet extends BIFFwriter * @param int $value * @param bool $isError Error or Boolean? * @param int $xfIndex + * + * @return int */ private function writeBoolErr($row, $col, $value, $isError, $xfIndex) { @@ -2659,8 +2658,6 @@ class Worksheet extends BIFFwriter /** * Store the DATAVALIDATIONS and DATAVALIDATION records. - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeDataValidity() { diff --git a/src/PhpSpreadsheet/Writer/Xls/Xf.php b/src/PhpSpreadsheet/Writer/Xls/Xf.php index ed54c3a6..238fb34c 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Xf.php +++ b/src/PhpSpreadsheet/Writer/Xls/Xf.php @@ -118,7 +118,7 @@ class Xf /** * Constructor. * - * @param Style The XF format + * @param Style $style The XF format */ public function __construct(Style $style) { @@ -507,8 +507,7 @@ class Xf /** * Map locked. * - * @param string - * @param mixed $locked + * @param string $locked * * @return int */ @@ -529,8 +528,7 @@ class Xf /** * Map hidden. * - * @param string - * @param mixed $hidden + * @param string $hidden * * @return int */ diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php index 7a1a0415..999ebabe 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -210,6 +210,8 @@ class Chart extends WriterPart * @param Title $yAxisLabel * @param Axis $xAxis * @param Axis $yAxis + * @param null|GridLines $majorGridlines + * @param null|GridLines $minorGridlines * * @throws WriterException */ @@ -341,8 +343,6 @@ class Chart extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param \PhpOffice\PhpSpreadsheet\Chart\Layout $chartLayout Chart layout - * - * @throws WriterException */ private function writeDataLabels(XMLWriter $objWriter, Layout $chartLayout = null) { @@ -1227,8 +1227,6 @@ class Chart extends WriterPart * * @param DataSeriesValues $plotSeriesLabel * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writePlotSeriesLabel($plotSeriesLabel, $objWriter) { @@ -1264,8 +1262,6 @@ class Chart extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $groupType Type of plot for dataseries * @param string $dataType Datatype of series values - * - * @throws WriterException */ private function writePlotSeriesValues($plotSeriesValues, XMLWriter $objWriter, $groupType, $dataType = 'str') { @@ -1356,8 +1352,6 @@ class Chart extends WriterPart * * @param DataSeriesValues $plotSeriesValues * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writeBubbles($plotSeriesValues, $objWriter) { @@ -1403,8 +1397,6 @@ class Chart extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Layout $layout - * - * @throws WriterException */ private function writeLayout(XMLWriter $objWriter, Layout $layout = null) { @@ -1472,8 +1464,6 @@ class Chart extends WriterPart * Write Alternate Content block. * * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writeAlternateContent($objWriter) { @@ -1502,8 +1492,6 @@ class Chart extends WriterPart * Write Printer Settings. * * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writePrintSettings($objWriter) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Comments.php b/src/PhpSpreadsheet/Writer/Xlsx/Comments.php index 4f4f8c80..8b08f31f 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Comments.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Comments.php @@ -171,8 +171,6 @@ class Comments extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $pCellReference Cell reference, eg: 'A1' * @param Comment $pComment Comment - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeVMLComment(XMLWriter $objWriter, $pCellReference, Comment $pComment) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php b/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php index db5d3cce..a8bd8c04 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php @@ -71,8 +71,6 @@ class Drawing extends WriterPart * @param XMLWriter $objWriter XML Writer * @param \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart * @param int $pRelationId - * - * @throws WriterException */ public function writeChart(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $pRelationId = -1) { @@ -423,8 +421,6 @@ class Drawing extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $pReference Reference * @param HeaderFooterDrawing $pImage Image - * - * @throws WriterException */ private function writeVMLHeaderFooterImage(XMLWriter $objWriter, $pReference, HeaderFooterDrawing $pImage) { @@ -465,8 +461,6 @@ class Drawing extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws WriterException - * * @return \PhpOffice\PhpSpreadsheet\Worksheet\Drawing[] All drawings in PhpSpreadsheet */ public function allDrawings(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php index 82eac26b..19604e44 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -18,8 +18,6 @@ class StringTable extends WriterPart * @param Worksheet $pSheet Worksheet * @param string[] $pExistingTable Existing table to eventually merge with * - * @throws WriterException - * * @return string[] String table for worksheet */ public function createStringTable(Worksheet $pSheet, $pExistingTable = null) @@ -116,8 +114,6 @@ class StringTable extends WriterPart * @param XMLWriter $objWriter XML Writer * @param RichText $pRichText Rich text * @param string $prefix Optional Namespace prefix - * - * @throws WriterException */ public function writeRichText(XMLWriter $objWriter, RichText $pRichText, $prefix = null) { @@ -201,8 +197,6 @@ class StringTable extends WriterPart * @param XMLWriter $objWriter XML Writer * @param RichText|string $pRichText text string or Rich text * @param string $prefix Optional Namespace prefix - * - * @throws WriterException */ public function writeRichTextForCharts(XMLWriter $objWriter, $pRichText = null, $prefix = null) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/src/PhpSpreadsheet/Writer/Xlsx/Style.php index d85086bb..16e800e0 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Style.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -445,8 +445,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeCellStyleDxf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Theme.php b/src/PhpSpreadsheet/Writer/Xlsx/Theme.php index 8bd8f131..f5f8dc07 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Theme.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -797,8 +797,6 @@ class Theme extends WriterPart * @param string $latinFont * @param array of string $fontSet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ private function writeFonts($objWriter, $latinFont, $fontSet) @@ -831,8 +829,6 @@ class Theme extends WriterPart * * @param XMLWriter $objWriter * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ private function writeColourScheme($objWriter) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php b/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php index e4752884..e9de179e 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -73,8 +73,6 @@ class Workbook extends WriterPart * Write file version. * * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writeFileVersion(XMLWriter $objWriter) { @@ -90,8 +88,6 @@ class Workbook extends WriterPart * Write WorkbookPr. * * @param XMLWriter $objWriter XML Writer - * - * @throws WriterException */ private function writeWorkbookPr(XMLWriter $objWriter) { @@ -111,8 +107,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Spreadsheet $spreadsheet - * - * @throws WriterException */ private function writeBookViews(XMLWriter $objWriter, Spreadsheet $spreadsheet) { @@ -142,8 +136,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Spreadsheet $spreadsheet - * - * @throws WriterException */ private function writeWorkbookProtection(XMLWriter $objWriter, Spreadsheet $spreadsheet) { @@ -170,8 +162,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param bool $recalcRequired Indicate whether formulas should be recalculated before writing - * - * @throws WriterException */ private function writeCalcPr(XMLWriter $objWriter, $recalcRequired = true) { @@ -301,8 +291,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param NamedRange $pNamedRange - * - * @throws WriterException */ private function writeDefinedNameForNamedRange(XMLWriter $objWriter, NamedRange $pNamedRange) { @@ -335,8 +323,6 @@ class Workbook extends WriterPart * @param XMLWriter $objWriter XML Writer * @param Worksheet $pSheet * @param int $pSheetId - * - * @throws WriterException */ private function writeDefinedNameForAutofilter(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) { @@ -372,8 +358,6 @@ class Workbook extends WriterPart * @param XMLWriter $objWriter XML Writer * @param Worksheet $pSheet * @param int $pSheetId - * - * @throws WriterException */ private function writeDefinedNameForPrintTitles(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) { @@ -416,8 +400,6 @@ class Workbook extends WriterPart * @param XMLWriter $objWriter XML Writer * @param Worksheet $pSheet * @param int $pSheetId - * - * @throws WriterException */ private function writeDefinedNameForPrintArea(XMLWriter $objWriter, Worksheet $pSheet, $pSheetId = 0) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php index 3d706879..ad8584ab 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -125,8 +125,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeSheetPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -173,8 +171,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeDimension(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -300,8 +296,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeSheetFormatPr(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -353,8 +347,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeCols(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -419,8 +411,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeSheetProtection(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -533,8 +523,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeDataValidations(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -601,8 +589,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeHyperlinks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -643,8 +629,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeProtectedRanges(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -673,8 +657,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeMergeCells(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -699,8 +681,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writePrintOptions(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -726,8 +706,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writePageMargins(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -747,8 +725,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeAutoFilter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -841,8 +817,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writePageSetup(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -877,8 +851,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeHeaderFooter(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -903,8 +875,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeBreaks(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -1169,8 +1139,6 @@ class Worksheet extends WriterPart * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet * @param bool $includeCharts Flag indicating if we should include drawing details for charts - * - * @throws WriterException */ private function writeDrawings(XMLWriter $objWriter = null, PhpspreadsheetWorksheet $pSheet = null, $includeCharts = false) { @@ -1189,8 +1157,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeLegacyDrawing(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -1207,8 +1173,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeLegacyDrawingHF(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php b/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php index cd5b7816..7119512c 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/WriterPart.php @@ -16,8 +16,6 @@ abstract class WriterPart /** * Get parent Xlsx object. * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Xlsx */ public function getParentWriter()