Completed
Pull Request — develop (#218)
by
unknown
63:56
created
src/PhpSpreadsheet/Writer/Html.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1188,7 +1188,7 @@
 block discarded – undo
1188 1188
      * @param Worksheet $pSheet \PhpOffice\PhpSpreadsheet\Worksheet
1189 1189
      * @param array $pValues Array containing cells in a row
1190 1190
      * @param int $pRow Row number (0-based)
1191
-     * @param mixed $cellType eg: 'td'
1191
+     * @param string $cellType eg: 'td'
1192 1192
      *
1193 1193
      * @throws WriterException
1194 1194
      *
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
      *
581 581
      * @throws Exception
582 582
      *
583
-     * @return false|Chart
583
+     * @return Chart
584 584
      */
585 585
     public function getChartByIndex($index)
586 586
     {
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
      * @param string $column Return the highest data row for the specified column,
1092 1092
      *                                     or the highest data row of any column if no column letter is passed
1093 1093
      *
1094
-     * @return string Highest row number that contains data
1094
+     * @return integer Highest row number that contains data
1095 1095
      */
1096 1096
     public function getHighestDataRow($column = null)
1097 1097
     {
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
      * Set a cell value.
1144 1144
      *
1145 1145
      * @param string $pCoordinate Coordinate of the cell, eg: 'A1'
1146
-     * @param mixed $pValue Value of the cell
1146
+     * @param string $pValue Value of the cell
1147 1147
      * @param string $pDataType Explicit data type, see Cell\DataType::TYPE_*
1148 1148
      *
1149 1149
      * @return Worksheet
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
      * Get row dimension at a specific row.
1349 1349
      *
1350 1350
      * @param int $pRow Numeric index of the row
1351
-     * @param mixed $create
1351
+     * @param boolean $create
1352 1352
      *
1353 1353
      * @return Worksheet\RowDimension
1354 1354
      */
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
      * Get column dimension at a specific column.
1375 1375
      *
1376 1376
      * @param string $pColumn String index of the column eg: 'A'
1377
-     * @param mixed $create
1377
+     * @param boolean $create
1378 1378
      *
1379 1379
      * @return Worksheet\ColumnDimension
1380 1380
      */
@@ -1920,7 +1920,7 @@  discard block
 block discarded – undo
1920 1920
     /**
1921 1921
      * Set AutoFilter.
1922 1922
      *
1923
-     * @param Worksheet\AutoFilter|string $pValue
1923
+     * @param string $pValue
1924 1924
      *            A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility
1925 1925
      *
1926 1926
      * @throws Exception
@@ -2984,7 +2984,7 @@  discard block
 block discarded – undo
2984 2984
      *
2985 2985
      * @throws Exception
2986 2986
      *
2987
-     * @return objWorksheet
2987
+     * @return Worksheet
2988 2988
      */
2989 2989
     public function setCodeName($pValue, $validate = true)
2990 2990
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Cell.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -961,7 +961,7 @@
 block discarded – undo
961 961
      *
962 962
      *    [ 'A1:A3' => 'x', 'A4' => 'y' ]
963 963
      *
964
-     * @param array $pCoordCollection associative array mapping coordinates to values
964
+     * @param Cell\DataValidation[] $pCoordCollection associative array mapping coordinates to values
965 965
      *
966 966
      * @return array associative array mapping coordinate ranges to valuea
967 967
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
 
2689 2689
     /**
2690 2690
      * @param string $cellReference
2691
-     * @param mixed $cellValue
2691
+     * @param boolean $cellValue
2692 2692
      */
2693 2693
     public function saveValueToCache($cellReference, $cellValue)
2694 2694
     {
@@ -2813,7 +2813,7 @@  discard block
 block discarded – undo
2813 2813
      *
2814 2814
      * @param mixed &$matrix matrix operand
2815 2815
      *
2816
-     * @return int[] An array comprising the number of rows, and number of columns
2816
+     * @return integer[] An array comprising the number of rows, and number of columns
2817 2817
      */
2818 2818
     private static function getMatrixDimensions(&$matrix)
2819 2819
     {
@@ -3801,6 +3801,9 @@  discard block
 block discarded – undo
3801 3801
         return $output;
3802 3802
     }
3803 3803
 
3804
+    /**
3805
+     * @param string|null $cellID
3806
+     */
3804 3807
     private function validateBinaryOperand($cellID, &$operand, &$stack)
3805 3808
     {
3806 3809
         if (is_array($operand)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3849,7 +3849,7 @@
 block discarded – undo
3849 3849
      *
3850 3850
      * @return bool
3851 3851
      */
3852
-    private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack &$stack, $recursingArrays = false)
3852
+    private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, Stack & $stack, $recursingArrays = false)
3853 3853
     {
3854 3854
         //    If we're dealing with matrix operations, we want a matrix result
3855 3855
         if ((is_array($operand1)) || (is_array($operand2))) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Engineering.php 1 patch
Doc Comments   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1855,7 +1855,7 @@  discard block
 block discarded – undo
1855 1855
      *
1856 1856
      * @param string $complexNumber the complex number for which you want the real coefficient
1857 1857
      *
1858
-     * @return float
1858
+     * @return string
1859 1859
      */
1860 1860
     public static function IMREAL($complexNumber)
1861 1861
     {
@@ -2294,6 +2294,7 @@  discard block
 block discarded – undo
2294 2294
      *        IMSUM(complexNumber[,complexNumber[,...]])
2295 2295
      *
2296 2296
      * @param string ...$complexNumbers Series of complex numbers to add
2297
+     * @param string[] $complexNumbers
2297 2298
      *
2298 2299
      * @return string
2299 2300
      */
@@ -2334,6 +2335,7 @@  discard block
 block discarded – undo
2334 2335
      *        IMPRODUCT(complexNumber[,complexNumber[,...]])
2335 2336
      *
2336 2337
      * @param string ...$complexNumbers Series of complex numbers to multiply
2338
+     * @param string[] $complexNumbers
2337 2339
      *
2338 2340
      * @return string
2339 2341
      */
@@ -2377,7 +2379,7 @@  discard block
 block discarded – undo
2377 2379
      *        DELTA(a[,b])
2378 2380
      *
2379 2381
      * @param float $a the first number
2380
-     * @param float $b The second number. If omitted, b is assumed to be zero.
2382
+     * @param integer $b The second number. If omitted, b is assumed to be zero.
2381 2383
      *
2382 2384
      * @return int
2383 2385
      */
@@ -2400,7 +2402,7 @@  discard block
 block discarded – undo
2400 2402
      * functions you calculate the count of values that exceed a threshold.
2401 2403
      *
2402 2404
      * @param float $number the value to test against step
2403
-     * @param float $step The threshold value.
2405
+     * @param integer $step The threshold value.
2404 2406
      *                                    If you omit a value for step, GESTEP uses zero.
2405 2407
      *
2406 2408
      * @return int
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/MathTrig.php 1 patch
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -56,6 +56,10 @@  discard block
 block discarded – undo
56 56
         return [(int) $value];
57 57
     }
58 58
 
59
+    /**
60
+     * @param integer $num
61
+     * @param integer $n
62
+     */
59 63
     private static function romanCut($num, $n)
60 64
     {
61 65
         return ($num - ($num % $n)) / $n;
@@ -508,7 +512,7 @@  discard block
 block discarded – undo
508 512
      * @category Mathematical and Trigonometric Functions
509 513
      *
510 514
      * @param float $number The positive real number for which you want the logarithm
511
-     * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10.
515
+     * @param integer $base The base of the logarithm. If base is omitted, it is assumed to be 10.
512 516
      *
513 517
      * @return float
514 518
      */
@@ -826,8 +830,8 @@  discard block
 block discarded – undo
826 830
      *
827 831
      * Computes x raised to the power y.
828 832
      *
829
-     * @param float $x
830
-     * @param float $y
833
+     * @param integer $x
834
+     * @param integer $y
831 835
      *
832 836
      * @return float
833 837
      */
@@ -901,7 +905,7 @@  discard block
 block discarded – undo
901 905
      *
902 906
      * @param mixed ...$args Data values
903 907
      *
904
-     * @return float
908
+     * @return integer
905 909
      */
906 910
     public static function QUOTIENT(...$args)
907 911
     {
@@ -1039,9 +1043,6 @@  discard block
 block discarded – undo
1039 1043
      *
1040 1044
      * Returns the sum of a power series
1041 1045
      *
1042
-     * @param float $x Input value to the power series
1043
-     * @param float $n Initial power to which you want to raise $x
1044
-     * @param float $m Step by which to increase $n for each term in the series
1045 1046
      * @param array of mixed Data Series
1046 1047
      *
1047 1048
      * @return float
@@ -1219,7 +1220,7 @@  discard block
 block discarded – undo
1219 1220
      * @param mixed $aArgs
1220 1221
      * @param mixed $sumArgs
1221 1222
      *
1222
-     * @return float
1223
+     * @return integer
1223 1224
      */
1224 1225
     public static function SUMIF($aArgs, $condition, $sumArgs = [])
1225 1226
     {
@@ -1259,9 +1260,8 @@  discard block
 block discarded – undo
1259 1260
      *    @category Mathematical and Trigonometric Functions
1260 1261
      *
1261 1262
      * @param mixed $args Data values
1262
-     * @param string $condition the criteria that defines which cells will be summed
1263 1263
      *
1264
-     * @return float
1264
+     * @return integer
1265 1265
      */
1266 1266
     public static function SUMIFS(...$args)
1267 1267
     {
@@ -1450,7 +1450,7 @@  discard block
 block discarded – undo
1450 1450
      *
1451 1451
      * Truncates value to the number of fractional digits by number_digits.
1452 1452
      *
1453
-     * @param float $value
1453
+     * @param integer $value
1454 1454
      * @param int $digits
1455 1455
      *
1456 1456
      * @return float Truncated value
Please login to merge, or discard this patch.
tests/PhpSpreadsheetTests/Writer/Xls/WorkbookTest.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 
9 9
 namespace PhpOffice\PhpSpreadsheetTests\Writer\Xls\Workbook;
10 10
 
11
-use PhpOffice\PhpSpreadsheet\Spreadsheet;
12
-use PhpOffice\PhpSpreadsheet\Writer\Xls\Parser;
13
-use PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook;
11
+use PhpOffice\PhpSpreadsheet\Spreadsheet;
12
+use PhpOffice\PhpSpreadsheet\Writer\Xls\Parser;
13
+use PhpOffice\PhpSpreadsheet\Writer\Xls\Workbook;
14 14
 use PHPUnit_Framework_TestCase;
15 15
 
16 16
 class WorkbookTest extends PHPUnit_Framework_TestCase
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     private $workbook;
20 20
 
21 21
 
22
-    protected function setUp(){
22
+    protected function setUp() {
23 23
         $spreadsheet = new Spreadsheet();
24 24
         $strTotal = 0;
25 25
         $strUnique = 0;
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $colors = [];
28 28
         $parser = new Parser();
29 29
 
30
-        $this->workbook = new Workbook($spreadsheet, $strTotal, $strUnique, $str_table, $colors,$parser);
30
+        $this->workbook = new Workbook($spreadsheet, $strTotal, $strUnique, $str_table, $colors, $parser);
31 31
     }
32 32
 
33 33
     protected function tearDown()
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @param mixed $expectedResult
42 42
      */
43
-    public function testAddColor($testColors,$expectedResult){
43
+    public function testAddColor($testColors, $expectedResult) {
44 44
         $result = 0;
45 45
 
46 46
         $workbookReflection = new \ReflectionClass(Workbook::class);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $methodAddColor->setAccessible(TRUE);
50 50
         $propertyPalette->setAccessible(TRUE);
51 51
 
52
-        foreach($testColors as $testColor){
52
+        foreach ($testColors as $testColor) {
53 53
             $result = $methodAddColor->invoke($this->workbook, $testColor);
54 54
         }
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->assertEquals($expectedResult, $palette);
59 59
     }
60 60
 
61
-    public function providerAddColor(){
61
+    public function providerAddColor() {
62 62
         $this->setUp();
63 63
 
64 64
         $workbookReflection = new \ReflectionClass(Workbook::class);
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
      * @param array $palette palette color
129 129
      * @return string rgb string
130 130
      */
131
-    public static function paletteToColor($palette){
132
-        return self::right('00'.dechex(intval($palette[0])),2)
133
-            .self::right('00'.dechex(intval($palette[1])),2)
134
-            .self::right('00'.dechex(intval($palette[2])),2);
131
+    public static function paletteToColor($palette) {
132
+        return self::right('00' . dechex(intval($palette[0])), 2)
133
+            .self::right('00' . dechex(intval($palette[1])), 2)
134
+            .self::right('00' . dechex(intval($palette[2])), 2);
135 135
     }
136 136
 
137 137
     /**
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
      * @param integer $nbchar number of char at right of string
142 142
      * @return string
143 143
      */
144
-    public static function right($value,$nbchar)
144
+    public static function right($value, $nbchar)
145 145
     {
146
-            return mb_substr($value,mb_strlen($value)-$nbchar, $nbchar);
146
+            return mb_substr($value, mb_strlen($value) - $nbchar, $nbchar);
147 147
     }
148 148
 }
Please login to merge, or discard this patch.