@@ -101,7 +101,7 @@ |
||
101 | 101 | /** |
102 | 102 | * Set Row Height |
103 | 103 | * |
104 | - * @param float $pValue |
|
104 | + * @param integer $pValue |
|
105 | 105 | * @return RowDimension |
106 | 106 | */ |
107 | 107 | public function setRowHeight($pValue = -1) |
@@ -266,7 +266,7 @@ |
||
266 | 266 | public function _readPpsWks($blockId) |
267 | 267 | { |
268 | 268 | $fh = $this->getStream($blockId); |
269 | - for ($pos = 0;; $pos += 128) { |
|
269 | + for ($pos = 0; ; $pos += 128) { |
|
270 | 270 | fseek($fh, $pos, SEEK_SET); |
271 | 271 | $nameUtf16 = fread($fh, 64); |
272 | 272 | $nameLength = self::_readInt2($fh); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | /** |
102 | 102 | * Set Row Height |
103 | 103 | * |
104 | - * @param float $pValue |
|
104 | + * @param integer $pValue |
|
105 | 105 | * @return RowDimension |
106 | 106 | */ |
107 | 107 | public function setRowHeight($pValue = -1) |
@@ -101,7 +101,7 @@ |
||
101 | 101 | /** |
102 | 102 | * Set Row Height |
103 | 103 | * |
104 | - * @param float $pValue |
|
104 | + * @param integer $pValue |
|
105 | 105 | * @return RowDimension |
106 | 106 | */ |
107 | 107 | public function setRowHeight($pValue = -1) |
@@ -2076,7 +2076,6 @@ discard block |
||
2076 | 2076 | /** |
2077 | 2077 | * Unset an instance of this class |
2078 | 2078 | * |
2079 | - * @param Spreadsheet $spreadsheet Injected spreadsheet identifying the instance to unset |
|
2080 | 2079 | */ |
2081 | 2080 | public function __destruct() |
2082 | 2081 | { |
@@ -2328,6 +2327,10 @@ discard block |
||
2328 | 2327 | return false; |
2329 | 2328 | } |
2330 | 2329 | |
2330 | + /** |
|
2331 | + * @param string $fromSeparator |
|
2332 | + * @param string $toSeparator |
|
2333 | + */ |
|
2331 | 2334 | public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces) |
2332 | 2335 | { |
2333 | 2336 | $strlen = mb_strlen($formula); |
@@ -2658,6 +2661,9 @@ discard block |
||
2658 | 2661 | return $result; |
2659 | 2662 | } |
2660 | 2663 | |
2664 | + /** |
|
2665 | + * @param string $cellReference |
|
2666 | + */ |
|
2661 | 2667 | public function getValueFromCache($cellReference, &$cellValue) |
2662 | 2668 | { |
2663 | 2669 | // Is calculation cacheing enabled? |
@@ -2797,7 +2803,7 @@ discard block |
||
2797 | 2803 | * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0 |
2798 | 2804 | * |
2799 | 2805 | * @param mixed &$matrix matrix operand |
2800 | - * @return int[] An array comprising the number of rows, and number of columns |
|
2806 | + * @return integer[] An array comprising the number of rows, and number of columns |
|
2801 | 2807 | */ |
2802 | 2808 | private static function getMatrixDimensions(&$matrix) |
2803 | 2809 | { |
@@ -2981,6 +2987,9 @@ discard block |
||
2981 | 2987 | } |
2982 | 2988 | } |
2983 | 2989 | |
2990 | + /** |
|
2991 | + * @param string $formula |
|
2992 | + */ |
|
2984 | 2993 | private function convertMatrixReferences($formula) |
2985 | 2994 | { |
2986 | 2995 | static $matrixReplaceFrom = ['{', ';', '}']; |
@@ -3069,6 +3078,10 @@ discard block |
||
3069 | 3078 | ]; |
3070 | 3079 | |
3071 | 3080 | // Convert infix to postfix notation |
3081 | + |
|
3082 | + /** |
|
3083 | + * @param string $formula |
|
3084 | + */ |
|
3072 | 3085 | private function _parseFormula($formula, Cell $pCell = null) |
3073 | 3086 | { |
3074 | 3087 | if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { |
@@ -3891,6 +3904,9 @@ discard block |
||
3891 | 3904 | return true; |
3892 | 3905 | } |
3893 | 3906 | |
3907 | + /** |
|
3908 | + * @param string|null $cellID |
|
3909 | + */ |
|
3894 | 3910 | private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, &$stack, $recursingArrays = false) |
3895 | 3911 | { |
3896 | 3912 | // If we're dealing with matrix operations, we want a matrix result |
@@ -4029,6 +4045,7 @@ discard block |
||
4029 | 4045 | |
4030 | 4046 | /** |
4031 | 4047 | * @param string $matrixFunction |
4048 | + * @param string|null $cellID |
|
4032 | 4049 | */ |
4033 | 4050 | private function executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, &$stack) |
4034 | 4051 | { |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | * DATEVALUE(dateValue) |
461 | 461 | * |
462 | 462 | * @category Date/Time Functions |
463 | - * @param string $dateValue Text that represents a date in a Microsoft Excel date format. |
|
463 | + * @param integer $dateValue Text that represents a date in a Microsoft Excel date format. |
|
464 | 464 | * For example, "1/30/2008" or "30-Jan-2008" are text strings within |
465 | 465 | * quotation marks that represent dates. Using the default date |
466 | 466 | * system in Excel for Windows, date_text must represent a date from |
@@ -644,9 +644,9 @@ discard block |
||
644 | 644 | /** |
645 | 645 | * DATEDIF |
646 | 646 | * |
647 | - * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object |
|
647 | + * @param integer $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object |
|
648 | 648 | * or a standard date string |
649 | - * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object |
|
649 | + * @param integer $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object |
|
650 | 650 | * or a standard date string |
651 | 651 | * @param string $unit |
652 | 652 | * @return int Interval between the dates |
@@ -757,9 +757,9 @@ discard block |
||
757 | 757 | * DAYS360(startDate,endDate[,method]) |
758 | 758 | * |
759 | 759 | * @category Date/Time Functions |
760 | - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), |
|
760 | + * @param integer $startDate Excel date serial value (float), PHP date timestamp (integer), |
|
761 | 761 | * PHP DateTime object, or a standard date string |
762 | - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), |
|
762 | + * @param integer $endDate Excel date serial value (float), PHP date timestamp (integer), |
|
763 | 763 | * PHP DateTime object, or a standard date string |
764 | 764 | * @param bool $method US or European Method |
765 | 765 | * FALSE or omitted: U.S. (NASD) method. If the starting date is |
@@ -816,9 +816,9 @@ discard block |
||
816 | 816 | * YEARFRAC(startDate,endDate[,method]) |
817 | 817 | * |
818 | 818 | * @category Date/Time Functions |
819 | - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), |
|
819 | + * @param integer $startDate Excel date serial value (float), PHP date timestamp (integer), |
|
820 | 820 | * PHP DateTime object, or a standard date string |
821 | - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), |
|
821 | + * @param integer $endDate Excel date serial value (float), PHP date timestamp (integer), |
|
822 | 822 | * PHP DateTime object, or a standard date string |
823 | 823 | * @param int $method Method used for the calculation |
824 | 824 | * 0 or omitted US (NASD) 30/360 |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | * Excel Function: |
1103 | 1103 | * DAY(dateValue) |
1104 | 1104 | * |
1105 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1105 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1106 | 1106 | * PHP DateTime object, or a standard date string |
1107 | 1107 | * @return int Day of the month |
1108 | 1108 | */ |
@@ -1211,7 +1211,7 @@ discard block |
||
1211 | 1211 | * Excel Function: |
1212 | 1212 | * WEEKNUM(dateValue[,style]) |
1213 | 1213 | * |
1214 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1214 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1215 | 1215 | * PHP DateTime object, or a standard date string |
1216 | 1216 | * @param int $method Week begins on Sunday or Monday |
1217 | 1217 | * 1 or omitted Week begins on Sunday. |
@@ -1259,7 +1259,7 @@ discard block |
||
1259 | 1259 | * Excel Function: |
1260 | 1260 | * MONTH(dateValue) |
1261 | 1261 | * |
1262 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1262 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1263 | 1263 | * PHP DateTime object, or a standard date string |
1264 | 1264 | * @return int Month of the year |
1265 | 1265 | */ |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | * Excel Function: |
1292 | 1292 | * YEAR(dateValue) |
1293 | 1293 | * |
1294 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1294 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1295 | 1295 | * PHP DateTime object, or a standard date string |
1296 | 1296 | * @return int Year |
1297 | 1297 | */ |
@@ -1322,7 +1322,7 @@ discard block |
||
1322 | 1322 | * Excel Function: |
1323 | 1323 | * HOUR(timeValue) |
1324 | 1324 | * |
1325 | - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1325 | + * @param integer $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1326 | 1326 | * PHP DateTime object, or a standard time string |
1327 | 1327 | * @return int Hour |
1328 | 1328 | */ |
@@ -1362,7 +1362,7 @@ discard block |
||
1362 | 1362 | * Excel Function: |
1363 | 1363 | * MINUTE(timeValue) |
1364 | 1364 | * |
1365 | - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1365 | + * @param integer $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1366 | 1366 | * PHP DateTime object, or a standard time string |
1367 | 1367 | * @return int Minute |
1368 | 1368 | */ |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | * Excel Function: |
1403 | 1403 | * SECOND(timeValue) |
1404 | 1404 | * |
1405 | - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1405 | + * @param integer $timeValue Excel date serial value (float), PHP date timestamp (integer), |
|
1406 | 1406 | * PHP DateTime object, or a standard time string |
1407 | 1407 | * @return int Second |
1408 | 1408 | */ |
@@ -1444,7 +1444,7 @@ discard block |
||
1444 | 1444 | * Excel Function: |
1445 | 1445 | * EDATE(dateValue,adjustmentMonths) |
1446 | 1446 | * |
1447 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1447 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1448 | 1448 | * PHP DateTime object, or a standard date string |
1449 | 1449 | * @param int $adjustmentMonths The number of months before or after start_date. |
1450 | 1450 | * A positive value for months yields a future date; |
@@ -1489,7 +1489,7 @@ discard block |
||
1489 | 1489 | * Excel Function: |
1490 | 1490 | * EOMONTH(dateValue,adjustmentMonths) |
1491 | 1491 | * |
1492 | - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1492 | + * @param integer $dateValue Excel date serial value (float), PHP date timestamp (integer), |
|
1493 | 1493 | * PHP DateTime object, or a standard date string |
1494 | 1494 | * @param int $adjustmentMonths The number of months before or after start_date. |
1495 | 1495 | * A positive value for months yields a future date; |
@@ -58,6 +58,10 @@ discard block |
||
58 | 58 | return $testDate->format('d') == 1; |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param integer $frequency |
|
63 | + * @param boolean $next |
|
64 | + */ |
|
61 | 65 | private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next) |
62 | 66 | { |
63 | 67 | $months = 12 / $frequency; |
@@ -79,6 +83,9 @@ discard block |
||
79 | 83 | return \PhpSpreadsheet\Shared\Date::PHPToExcel($result); |
80 | 84 | } |
81 | 85 | |
86 | + /** |
|
87 | + * @param integer $frequency |
|
88 | + */ |
|
82 | 89 | private static function isValidFrequency($frequency) |
83 | 90 | { |
84 | 91 | if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) { |
@@ -155,7 +162,7 @@ discard block |
||
155 | 162 | * The security settlement date is the date after the issue date |
156 | 163 | * when the security is traded to the buyer. |
157 | 164 | * @param float $rate The security's annual coupon rate. |
158 | - * @param float $par The security's par value. |
|
165 | + * @param integer $par The security's par value. |
|
159 | 166 | * If you omit par, ACCRINT uses $1,000. |
160 | 167 | * @param int $frequency the number of coupon payments per year. |
161 | 168 | * Valid frequency values are: |
@@ -421,6 +428,7 @@ discard block |
||
421 | 428 | * 2 Actual/360 |
422 | 429 | * 3 Actual/365 |
423 | 430 | * 4 European 30/360 |
431 | + * @param integer $frequency |
|
424 | 432 | * @return float |
425 | 433 | */ |
426 | 434 | public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0) |
@@ -553,6 +561,7 @@ discard block |
||
553 | 561 | * 2 Actual/360 |
554 | 562 | * 3 Actual/365 |
555 | 563 | * 4 European 30/360 |
564 | + * @param integer $frequency |
|
556 | 565 | * @return float |
557 | 566 | */ |
558 | 567 | public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0) |
@@ -666,6 +675,7 @@ discard block |
||
666 | 675 | * 2 Actual/360 |
667 | 676 | * 3 Actual/365 |
668 | 677 | * 4 European 30/360 |
678 | + * @param integer $frequency |
|
669 | 679 | * @return int |
670 | 680 | */ |
671 | 681 | public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0) |
@@ -1119,7 +1129,7 @@ discard block |
||
1119 | 1129 | * EFFECT(nominal_rate,npery) |
1120 | 1130 | * |
1121 | 1131 | * @category Financial Functions |
1122 | - * @param float $nominal_rate Nominal interest rate |
|
1132 | + * @param integer $nominal_rate Nominal interest rate |
|
1123 | 1133 | * @param int $npery Number of compounding payments per year |
1124 | 1134 | * @return float |
1125 | 1135 | */ |
@@ -1145,12 +1155,12 @@ discard block |
||
1145 | 1155 | * FV(rate,nper,pmt[,pv[,type]]) |
1146 | 1156 | * |
1147 | 1157 | * @category Financial Functions |
1148 | - * @param float $rate The interest rate per period |
|
1158 | + * @param integer $rate The interest rate per period |
|
1149 | 1159 | * @param int $nper Total number of payment periods in an annuity |
1150 | - * @param float $pmt The payment made each period: it cannot change over the |
|
1160 | + * @param integer $pmt The payment made each period: it cannot change over the |
|
1151 | 1161 | * life of the annuity. Typically, pmt contains principal |
1152 | 1162 | * and interest but no other fees or taxes. |
1153 | - * @param float $pv Present Value, or the lump-sum amount that a series of |
|
1163 | + * @param integer $pv Present Value, or the lump-sum amount that a series of |
|
1154 | 1164 | * future payments is worth right now. |
1155 | 1165 | * @param int $type A number 0 or 1 and indicates when payments are due: |
1156 | 1166 | * 0 or omitted At the end of the period. |
@@ -1265,7 +1275,7 @@ discard block |
||
1265 | 1275 | * @param int $per Period for which we want to find the interest |
1266 | 1276 | * @param int $nper Number of periods |
1267 | 1277 | * @param float $pv Present Value |
1268 | - * @param float $fv Future Value |
|
1278 | + * @param integer $fv Future Value |
|
1269 | 1279 | * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period |
1270 | 1280 | * @return float |
1271 | 1281 | */ |
@@ -1457,7 +1467,7 @@ discard block |
||
1457 | 1467 | * |
1458 | 1468 | * Returns the nominal interest rate given the effective rate and the number of compounding payments per year. |
1459 | 1469 | * |
1460 | - * @param float $effect_rate Effective interest rate |
|
1470 | + * @param integer $effect_rate Effective interest rate |
|
1461 | 1471 | * @param int $npery Number of compounding payments per year |
1462 | 1472 | * @return float |
1463 | 1473 | */ |
@@ -1480,10 +1490,10 @@ discard block |
||
1480 | 1490 | * |
1481 | 1491 | * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate. |
1482 | 1492 | * |
1483 | - * @param float $rate Interest rate per period |
|
1493 | + * @param integer $rate Interest rate per period |
|
1484 | 1494 | * @param int $pmt Periodic payment (annuity) |
1485 | - * @param float $pv Present Value |
|
1486 | - * @param float $fv Future Value |
|
1495 | + * @param integer $pv Present Value |
|
1496 | + * @param integer $fv Future Value |
|
1487 | 1497 | * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period |
1488 | 1498 | * @return float |
1489 | 1499 | */ |
@@ -1548,10 +1558,10 @@ discard block |
||
1548 | 1558 | * |
1549 | 1559 | * Returns the constant payment (annuity) for a cash flow with a constant interest rate. |
1550 | 1560 | * |
1551 | - * @param float $rate Interest rate per period |
|
1561 | + * @param integer $rate Interest rate per period |
|
1552 | 1562 | * @param int $nper Number of periods |
1553 | - * @param float $pv Present Value |
|
1554 | - * @param float $fv Future Value |
|
1563 | + * @param integer $pv Present Value |
|
1564 | + * @param integer $fv Future Value |
|
1555 | 1565 | * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period |
1556 | 1566 | * @return float |
1557 | 1567 | */ |
@@ -1585,7 +1595,7 @@ discard block |
||
1585 | 1595 | * @param int $per Period for which we want to find the interest |
1586 | 1596 | * @param int $nper Number of periods |
1587 | 1597 | * @param float $pv Present Value |
1588 | - * @param float $fv Future Value |
|
1598 | + * @param integer $fv Future Value |
|
1589 | 1599 | * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period |
1590 | 1600 | * @return float |
1591 | 1601 | */ |
@@ -1767,10 +1777,10 @@ discard block |
||
1767 | 1777 | * |
1768 | 1778 | * Returns the Present Value of a cash flow with constant payments and interest rate (annuities). |
1769 | 1779 | * |
1770 | - * @param float $rate Interest rate per period |
|
1780 | + * @param integer $rate Interest rate per period |
|
1771 | 1781 | * @param int $nper Number of periods |
1772 | - * @param float $pmt Periodic payment (annuity) |
|
1773 | - * @param float $fv Future Value |
|
1782 | + * @param integer $pmt Periodic payment (annuity) |
|
1783 | + * @param integer $fv Future Value |
|
1774 | 1784 | * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period |
1775 | 1785 | * @return float |
1776 | 1786 | */ |
@@ -114,7 +114,7 @@ |
||
114 | 114 | * |
115 | 115 | * @param int $pId Token id |
116 | 116 | * @throws Exception |
117 | - * @return string |
|
117 | + * @return FormulaToken |
|
118 | 118 | */ |
119 | 119 | public function getToken($pId = 0) |
120 | 120 | { |
@@ -75,7 +75,6 @@ discard block |
||
75 | 75 | * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value |
76 | 76 | * |
77 | 77 | * @category Logical Functions |
78 | - * @param mixed $arg,... Data values |
|
79 | 78 | * @return string|bool The logical AND of the arguments. |
80 | 79 | */ |
81 | 80 | public static function logicalAnd() |
@@ -130,7 +129,6 @@ discard block |
||
130 | 129 | * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value |
131 | 130 | * |
132 | 131 | * @category Logical Functions |
133 | - * @param mixed $arg,... Data values |
|
134 | 132 | * @return string|bool The logical OR of the arguments. |
135 | 133 | */ |
136 | 134 | public static function logicalOr() |
@@ -230,8 +228,8 @@ discard block |
||
230 | 228 | * ReturnIfFalse can be another formula. |
231 | 229 | * |
232 | 230 | * @category Logical Functions |
233 | - * @param mixed $condition Condition to evaluate |
|
234 | - * @param mixed $returnIfTrue Value to return when condition is true |
|
231 | + * @param boolean $condition Condition to evaluate |
|
232 | + * @param integer $returnIfTrue Value to return when condition is true |
|
235 | 233 | * @param mixed $returnIfFalse Optional value to return when condition is false |
236 | 234 | * @return mixed The value of returnIfTrue or returnIfFalse determined by condition |
237 | 235 | */ |