Completed
Pull Request — develop (#189)
by Manuel
35:39
created
docs/Examples/Reader/exampleReader08.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@
 block discarded – undo
31 31
 $inputFileName = './sampleData/example1.xls';
32 32
 $sheetnames = ['Data Sheet #1', 'Data Sheet #3'];
33 33
 
34
-echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
34
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
35 35
 $reader = IOFactory::createReader($inputFileType);
36
-echo 'Loading Sheet',((count($sheetnames) == 1) ? '' : 's'),' "',implode('" and "', $sheetnames),'" only<br />';
36
+echo 'Loading Sheet', ((count($sheetnames) == 1) ? '' : 's'), ' "', implode('" and "', $sheetnames), '" only<br />';
37 37
 $reader->setLoadSheetsOnly($sheetnames);
38 38
 $spreadsheet = $reader->load($inputFileName);
39 39
 
40 40
 echo '<hr />';
41 41
 
42
-echo $spreadsheet->getSheetCount(),' worksheet',(($spreadsheet->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
42
+echo $spreadsheet->getSheetCount(), ' worksheet', (($spreadsheet->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
43 43
 $loadedSheetNames = $spreadsheet->getSheetNames();
44 44
 foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
45
-    echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
45
+    echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
46 46
 }
47 47
 
48 48
 ?>
Please login to merge, or discard this patch.
docs/Examples/Reader/exampleReader18.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 //	$inputFileType = 'Gnumeric';
31 31
 $inputFileName = './sampleData/example1.xls';
32 32
 
33
-echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />';
33
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />';
34 34
 
35 35
 $reader = IOFactory::createReader($inputFileType);
36 36
 $worksheetNames = $reader->listWorksheetNames($inputFileName);
Please login to merge, or discard this patch.
docs/Examples/Reader/exampleReader05.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 //	$inputFileType = 'Gnumeric';
31 31
 $inputFileName = './sampleData/example1.xls';
32 32
 
33
-echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
33
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
34 34
 $reader = IOFactory::createReader($inputFileType);
35 35
 echo 'Turning Formatting off for Load<br />';
36 36
 $reader->setReadDataOnly(true);
Please login to merge, or discard this patch.
docs/Examples/Reader/exampleReader06.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 //	$inputFileType = 'Gnumeric';
31 31
 $inputFileName = './sampleData/example1.xls';
32 32
 
33
-echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
33
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
34 34
 $reader = IOFactory::createReader($inputFileType);
35 35
 echo 'Loading all WorkSheets<br />';
36 36
 $reader->setLoadAllSheets();
Please login to merge, or discard this patch.
docs/Examples/Reader/exampleReader10.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@
 block discarded – undo
60 60
 
61 61
 $filterSubset = new MyReadFilter(9, 15, range('G', 'K'));
62 62
 
63
-echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
63
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
64 64
 $reader = IOFactory::createReader($inputFileType);
65
-echo 'Loading Sheet "',$sheetname,'" only<br />';
65
+echo 'Loading Sheet "', $sheetname, '" only<br />';
66 66
 $reader->setLoadSheetsOnly($sheetname);
67 67
 echo 'Loading Sheet using configurable filter<br />';
68 68
 $reader->setReadFilter($filterSubset);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Financial.php 1 patch
Doc Comments   +48 added lines, -41 removed lines patch added patch discarded remove patch
@@ -62,6 +62,10 @@  discard block
 block discarded – undo
62 62
         return $testDate->format('d') == 1;
63 63
     }
64 64
 
65
+    /**
66
+     * @param integer $frequency
67
+     * @param boolean $next
68
+     */
65 69
     private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next)
66 70
     {
67 71
         $months = 12 / $frequency;
@@ -83,6 +87,9 @@  discard block
 block discarded – undo
83 87
         return Date::PHPToExcel($result);
84 88
     }
85 89
 
90
+    /**
91
+     * @param integer $frequency
92
+     */
86 93
     private static function isValidFrequency($frequency)
87 94
     {
88 95
         if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) {
@@ -161,7 +168,7 @@  discard block
 block discarded – undo
161 168
      *                                    The security settlement date is the date after the issue date
162 169
      *                                    when the security is traded to the buyer.
163 170
      * @param float $rate the security's annual coupon rate
164
-     * @param float $par The security's par value.
171
+     * @param integer $par The security's par value.
165 172
      *                                    If you omit par, ACCRINT uses $1,000.
166 173
      * @param int $frequency the number of coupon payments per year.
167 174
      *                                    Valid frequency values are:
@@ -234,8 +241,8 @@  discard block
 block discarded – undo
234 241
      * @param mixed $issue
235 242
      * @param mixed $settlement
236 243
      * @param mixed $rate
237
-     * @param mixed $par
238
-     * @param mixed $basis
244
+     * @param integer $par
245
+     * @param integer $basis
239 246
      *
240 247
      * @return float
241 248
      */
@@ -301,7 +308,7 @@  discard block
 block discarded – undo
301 308
      * @param mixed $salvage
302 309
      * @param mixed $period
303 310
      * @param mixed $rate
304
-     * @param mixed $basis
311
+     * @param integer $basis
305 312
      *
306 313
      * @return float
307 314
      */
@@ -386,7 +393,7 @@  discard block
 block discarded – undo
386 393
      * @param mixed $salvage
387 394
      * @param mixed $period
388 395
      * @param mixed $rate
389
-     * @param mixed $basis
396
+     * @param integer $basis
390 397
      *
391 398
      * @return float
392 399
      */
@@ -456,8 +463,8 @@  discard block
 block discarded – undo
456 463
      *                                        4                European 30/360
457 464
      * @param mixed $settlement
458 465
      * @param mixed $maturity
459
-     * @param mixed $frequency
460
-     * @param mixed $basis
466
+     * @param integer $frequency
467
+     * @param integer $basis
461 468
      *
462 469
      * @return float
463 470
      */
@@ -520,7 +527,7 @@  discard block
 block discarded – undo
520 527
      * @param int $frequency
521 528
      * @param mixed $settlement
522 529
      * @param mixed $maturity
523
-     * @param mixed $basis
530
+     * @param integer $basis
524 531
      *
525 532
      * @return float
526 533
      */
@@ -599,8 +606,8 @@  discard block
 block discarded – undo
599 606
      *                                        4                European 30/360
600 607
      * @param mixed $settlement
601 608
      * @param mixed $maturity
602
-     * @param mixed $frequency
603
-     * @param mixed $basis
609
+     * @param integer $frequency
610
+     * @param integer $basis
604 611
      *
605 612
      * @return float
606 613
      */
@@ -663,7 +670,7 @@  discard block
 block discarded – undo
663 670
      * @param mixed $settlement
664 671
      * @param mixed $maturity
665 672
      * @param mixed $frequency
666
-     * @param mixed $basis
673
+     * @param integer $basis
667 674
      *
668 675
      * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
669 676
      *                        depending on the value of the ReturnDateType flag
@@ -724,8 +731,8 @@  discard block
 block discarded – undo
724 731
      *                                        4                European 30/360
725 732
      * @param mixed $settlement
726 733
      * @param mixed $maturity
727
-     * @param mixed $frequency
728
-     * @param mixed $basis
734
+     * @param integer $frequency
735
+     * @param integer $basis
729 736
      *
730 737
      * @return int
731 738
      */
@@ -801,7 +808,7 @@  discard block
 block discarded – undo
801 808
      * @param mixed $settlement
802 809
      * @param mixed $maturity
803 810
      * @param mixed $frequency
804
-     * @param mixed $basis
811
+     * @param integer $basis
805 812
      *
806 813
      * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
807 814
      *                        depending on the value of the ReturnDateType flag
@@ -953,7 +960,7 @@  discard block
 block discarded – undo
953 960
      * @param mixed $salvage
954 961
      * @param mixed $life
955 962
      * @param mixed $period
956
-     * @param mixed $month
963
+     * @param integer $month
957 964
      *
958 965
      * @return float
959 966
      */
@@ -1028,7 +1035,7 @@  discard block
 block discarded – undo
1028 1035
      * @param mixed $salvage
1029 1036
      * @param mixed $life
1030 1037
      * @param mixed $period
1031
-     * @param mixed $factor
1038
+     * @param double $factor
1032 1039
      *
1033 1040
      * @return float
1034 1041
      */
@@ -1097,7 +1104,7 @@  discard block
 block discarded – undo
1097 1104
      * @param mixed $maturity
1098 1105
      * @param mixed $price
1099 1106
      * @param mixed $redemption
1100
-     * @param mixed $basis
1107
+     * @param integer $basis
1101 1108
      *
1102 1109
      * @return float
1103 1110
      */
@@ -1216,7 +1223,7 @@  discard block
 block discarded – undo
1216 1223
      *
1217 1224
      * @category Financial Functions
1218 1225
      *
1219
-     * @param float $nominal_rate Nominal interest rate
1226
+     * @param integer $nominal_rate Nominal interest rate
1220 1227
      * @param int $npery Number of compounding payments per year
1221 1228
      *
1222 1229
      * @return float
@@ -1244,12 +1251,12 @@  discard block
 block discarded – undo
1244 1251
      *
1245 1252
      * @category Financial Functions
1246 1253
      *
1247
-     * @param float $rate The interest rate per period
1254
+     * @param integer $rate The interest rate per period
1248 1255
      * @param int $nper Total number of payment periods in an annuity
1249
-     * @param float $pmt The payment made each period: it cannot change over the
1256
+     * @param integer $pmt The payment made each period: it cannot change over the
1250 1257
      *                            life of the annuity. Typically, pmt contains principal
1251 1258
      *                            and interest but no other fees or taxes.
1252
-     * @param float $pv present Value, or the lump-sum amount that a series of
1259
+     * @param integer $pv present Value, or the lump-sum amount that a series of
1253 1260
      *                            future payments is worth right now
1254 1261
      * @param int $type A number 0 or 1 and indicates when payments are due:
1255 1262
      *                                0 or omitted    At the end of the period.
@@ -1367,7 +1374,7 @@  discard block
 block discarded – undo
1367 1374
      * @param int $per Period for which we want to find the interest
1368 1375
      * @param int $nper Number of periods
1369 1376
      * @param float $pv Present Value
1370
-     * @param float $fv Future Value
1377
+     * @param integer $fv Future Value
1371 1378
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
1372 1379
      *
1373 1380
      * @return float
@@ -1562,7 +1569,7 @@  discard block
 block discarded – undo
1562 1569
      *
1563 1570
      * Returns the nominal interest rate given the effective rate and the number of compounding payments per year.
1564 1571
      *
1565
-     * @param float $effect_rate Effective interest rate
1572
+     * @param integer $effect_rate Effective interest rate
1566 1573
      * @param int $npery Number of compounding payments per year
1567 1574
      *
1568 1575
      * @return float
@@ -1586,10 +1593,10 @@  discard block
 block discarded – undo
1586 1593
      *
1587 1594
      * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate.
1588 1595
      *
1589
-     * @param float $rate Interest rate per period
1596
+     * @param integer $rate Interest rate per period
1590 1597
      * @param int $pmt Periodic payment (annuity)
1591
-     * @param float $pv Present Value
1592
-     * @param float $fv Future Value
1598
+     * @param integer $pv Present Value
1599
+     * @param integer $fv Future Value
1593 1600
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
1594 1601
      *
1595 1602
      * @return float
@@ -1655,10 +1662,10 @@  discard block
 block discarded – undo
1655 1662
      *
1656 1663
      * Returns the constant payment (annuity) for a cash flow with a constant interest rate.
1657 1664
      *
1658
-     * @param float $rate Interest rate per period
1665
+     * @param integer $rate Interest rate per period
1659 1666
      * @param int $nper Number of periods
1660
-     * @param float $pv Present Value
1661
-     * @param float $fv Future Value
1667
+     * @param integer $pv Present Value
1668
+     * @param integer $fv Future Value
1662 1669
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
1663 1670
      *
1664 1671
      * @return float
@@ -1693,7 +1700,7 @@  discard block
 block discarded – undo
1693 1700
      * @param int $per Period for which we want to find the interest
1694 1701
      * @param int $nper Number of periods
1695 1702
      * @param float $pv Present Value
1696
-     * @param float $fv Future Value
1703
+     * @param integer $fv Future Value
1697 1704
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
1698 1705
      *
1699 1706
      * @return float
@@ -1783,7 +1790,7 @@  discard block
 block discarded – undo
1783 1790
      * @param mixed $maturity
1784 1791
      * @param mixed $discount
1785 1792
      * @param mixed $redemption
1786
-     * @param mixed $basis
1793
+     * @param integer $basis
1787 1794
      *
1788 1795
      * @return float
1789 1796
      */
@@ -1835,7 +1842,7 @@  discard block
 block discarded – undo
1835 1842
      * @param mixed $issue
1836 1843
      * @param mixed $rate
1837 1844
      * @param mixed $yield
1838
-     * @param mixed $basis
1845
+     * @param integer $basis
1839 1846
      *
1840 1847
      * @return float
1841 1848
      */
@@ -1889,10 +1896,10 @@  discard block
 block discarded – undo
1889 1896
      *
1890 1897
      * Returns the Present Value of a cash flow with constant payments and interest rate (annuities).
1891 1898
      *
1892
-     * @param float $rate Interest rate per period
1899
+     * @param integer $rate Interest rate per period
1893 1900
      * @param int $nper Number of periods
1894
-     * @param float $pmt Periodic payment (annuity)
1895
-     * @param float $fv Future Value
1901
+     * @param integer $pmt Periodic payment (annuity)
1902
+     * @param integer $fv Future Value
1896 1903
      * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period
1897 1904
      *
1898 1905
      * @return float
@@ -1949,9 +1956,9 @@  discard block
 block discarded – undo
1949 1956
      * @param mixed $nper
1950 1957
      * @param mixed $pmt
1951 1958
      * @param mixed $pv
1952
-     * @param mixed $fv
1953
-     * @param mixed $type
1954
-     * @param mixed $guess
1959
+     * @param double $fv
1960
+     * @param integer $type
1961
+     * @param double $guess
1955 1962
      *
1956 1963
      * @return float
1957 1964
      **/
@@ -2020,7 +2027,7 @@  discard block
 block discarded – undo
2020 2027
      * @param mixed $maturity
2021 2028
      * @param mixed $investment
2022 2029
      * @param mixed $discount
2023
-     * @param mixed $basis
2030
+     * @param integer $basis
2024 2031
      *
2025 2032
      * @return float
2026 2033
      */
@@ -2390,7 +2397,7 @@  discard block
 block discarded – undo
2390 2397
      * @param mixed $maturity
2391 2398
      * @param mixed $price
2392 2399
      * @param mixed $redemption
2393
-     * @param mixed $basis
2400
+     * @param integer $basis
2394 2401
      *
2395 2402
      * @return float
2396 2403
      */
@@ -2447,7 +2454,7 @@  discard block
 block discarded – undo
2447 2454
      * @param mixed $issue
2448 2455
      * @param mixed $rate
2449 2456
      * @param mixed $price
2450
-     * @param mixed $basis
2457
+     * @param integer $basis
2451 2458
      *
2452 2459
      * @return float
2453 2460
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Gnumeric.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -808,6 +808,9 @@
 block discarded – undo
808 808
         return $styleArray;
809 809
     }
810 810
 
811
+    /**
812
+     * @param string $is
813
+     */
811 814
     private function parseRichText($is)
812 815
     {
813 816
         $value = new RichText();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xml.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -233,6 +233,9 @@  discard block
 block discarded – undo
233 233
         return $this->loadIntoExisting($pFilename, $spreadsheet);
234 234
     }
235 235
 
236
+    /**
237
+     * @param string $styleAttributeValue
238
+     */
236 239
     protected static function identifyFixedStyleValue($styleList, &$styleAttributeValue)
237 240
     {
238 241
         $styleAttributeValue = strtolower($styleAttributeValue);
@@ -764,6 +767,9 @@  discard block
 block discarded – undo
764 767
         return $spreadsheet;
765 768
     }
766 769
 
770
+    /**
771
+     * @param string $charset
772
+     */
767 773
     protected static function convertStringEncoding($string, $charset)
768 774
     {
769 775
         if ($charset != 'UTF-8') {
@@ -773,6 +779,9 @@  discard block
 block discarded – undo
773 779
         return $string;
774 780
     }
775 781
 
782
+    /**
783
+     * @param string $is
784
+     */
776 785
     protected function parseRichText($is)
777 786
     {
778 787
         $value = new RichText();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Font.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@
 block discarded – undo
238 238
      * Calculate an (approximate) OpenXML column width, based on font size and text contained.
239 239
      *
240 240
      * @param \PhpOffice\PhpSpreadsheet\Style\Font $font Font object
241
-     * @param RichText|string $cellText Text to calculate width
241
+     * @param string $cellText Text to calculate width
242 242
      * @param int $rotation Rotation angle
243 243
      * @param \PhpOffice\PhpSpreadsheet\Style\Font|null $defaultFont Font object
244 244
      *
Please login to merge, or discard this patch.