Completed
Push — develop ( 685e29...09d456 )
by Adrien
14:14
created
src/PhpSpreadsheet/Writer/Excel2007.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@
 block discarded – undo
397 397
     /**
398 398
      * Get PhpSpreadsheet object
399 399
      *
400
-     * @return PhpSpreadsheet
400
+     * @return \PhpSpreadsheet\Spreadsheet
401 401
      * @throws \PhpSpreadsheet\Writer\Exception
402 402
      */
403 403
     public function getPhpSpreadsheet()
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,8 +138,8 @@
 block discarded – undo
138 138
         }
139 139
 
140 140
         $hashTablesArray = ['stylesConditionalHashTable',    'fillHashTable',        'fontHashTable',
141
-                                  'bordersHashTable',                'numFmtHashTable',        'drawingHashTable',
142
-                                  'styleHashTable',
141
+                                    'bordersHashTable',                'numFmtHashTable',        'drawingHashTable',
142
+                                    'styleHashTable',
143 143
                                 ];
144 144
 
145 145
         // Set HashTable variables
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
             $this->writerParts[$writer] = new $class($this);
138 138
         }
139 139
 
140
-        $hashTablesArray = ['stylesConditionalHashTable',    'fillHashTable',        'fontHashTable',
141
-                                  'bordersHashTable',                'numFmtHashTable',        'drawingHashTable',
140
+        $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable',
141
+                                  'bordersHashTable', 'numFmtHashTable', 'drawingHashTable',
142 142
                                   'styleHashTable',
143 143
                                 ];
144 144
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
                 $macrosCode = $this->spreadSheet->getMacrosCode();
236 236
                 if (!is_null($macrosCode)) {
237 237
                     // we have the code ?
238
-                    $objZip->addFromString('xl/vbaProject.bin', $macrosCode);//allways in 'xl', allways named vbaProject.bin
238
+                    $objZip->addFromString('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin
239 239
                     if ($this->spreadSheet->hasMacrosCertificate()) {
240 240
                         //signed macros ?
241 241
                         // Yes : add the certificate file and the related rels file
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                 $objZip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data'));
251 251
                 if ($this->spreadSheet->hasRibbonBinObjects()) {
252 252
                     $tmpRootPath = dirname($tmpRibbonTarget) . '/';
253
-                    $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data');//the files to write
253
+                    $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write
254 254
                     foreach ($ribbonBinObjects as $aPath => $aContent) {
255 255
                         $objZip->addFromString($tmpRootPath . $aPath, $aContent);
256 256
                     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007/Chart.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -411,6 +411,8 @@  discard block
 block discarded – undo
411 411
      * @param  string $id1
412 412
      * @param  string $id2
413 413
      * @param  boolean $isMultiLevelSeries
414
+     * @param null|Axis $xAxis
415
+     * @param null|Axis $yAxis
414 416
      *
415 417
      * @throws  \PhpSpreadsheet\Writer\Exception
416 418
      */
@@ -533,6 +535,10 @@  discard block
 block discarded – undo
533 535
      * @param  string $id1
534 536
      * @param  string $id2
535 537
      * @param  boolean $isMultiLevelSeries
538
+     * @param null|Axis $xAxis
539
+     * @param null|Axis $yAxis
540
+     * @param null|GridLines $majorGridlines
541
+     * @param null|GridLines $minorGridlines
536 542
      *
537 543
      * @throws  \PhpSpreadsheet\Writer\Exception
538 544
      */
@@ -1259,7 +1265,6 @@  discard block
 block discarded – undo
1259 1265
      * @param  \PhpSpreadsheet\Shared\XMLWriter $objWriter XML Writer
1260 1266
      * @param  string $groupType Type of plot for dataseries
1261 1267
      * @param  string $dataType Datatype of series values
1262
-     * @param  \PhpSpreadsheet\Worksheet $pSheet
1263 1268
      *
1264 1269
      * @throws  \PhpSpreadsheet\Writer\Exception
1265 1270
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/Workbook.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -191,7 +191,9 @@  discard block
 block discarded – undo
191 191
      * @param int        &$str_unique    Total number of unique strings
192 192
      * @param array        &$str_table        String Table
193 193
      * @param array        &$colors        Colour Table
194
-     * @param mixed        $parser            The formula parser created for the Workbook
194
+     * @param Parser        $parser            The formula parser created for the Workbook
195
+     * @param integer $str_total
196
+     * @param integer $str_unique
195 197
      */
196 198
     public function __construct(\PhpSpreadsheet\Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, $parser)
197 199
     {
@@ -238,6 +240,7 @@  discard block
 block discarded – undo
238 240
      *
239 241
      * @param \PhpSpreadsheet\Style
240 242
      * @param boolean Is it a style XF?
243
+     * @param \PhpSpreadsheet\Style $style
241 244
      * @return int Index to XF record
242 245
      */
243 246
     public function addXfWriter($style, $isStyleXf = false)
@@ -790,7 +793,7 @@  discard block
 block discarded – undo
790 793
      *
791 794
      * @param    string        $name            The name in UTF-8
792 795
      * @param    string        $formulaData    The binary formula data
793
-     * @param    string        $sheetIndex        1-based sheet index the defined name applies to. 0 = global
796
+     * @param    integer        $sheetIndex        1-based sheet index the defined name applies to. 0 = global
794 797
      * @param    boolean        $isBuiltIn        Built-in name?
795 798
      * @return    string    Complete binary record data
796 799
      */
Please login to merge, or discard this patch.
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
         for ($i = 0; $i < $countSheets; ++$i) {
220 220
             $phpSheet = $spreadsheet->getSheet($i);
221 221
 
222
-            $this->parser->setExtSheet($phpSheet->getTitle(), $i);  // Register worksheet name with parser
222
+            $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser
223 223
 
224 224
             $supbook_index = 0x00;
225 225
             $ref = pack('vvv', $supbook_index, $i, $i);
226
-            $this->parser->references[] = $ref;  // Register reference with parser
226
+            $this->parser->references[] = $ref; // Register reference with parser
227 227
 
228 228
             // Sheet tab colors?
229 229
             if ($phpSheet->isTabColorSet()) {
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
      */
468 468
     private function calcSheetOffsets()
469 469
     {
470
-        $boundsheet_length = 10;  // fixed length for a BOUNDSHEET record
470
+        $boundsheet_length = 10; // fixed length for a BOUNDSHEET record
471 471
 
472 472
         // size of Workbook globals part 1 + 3
473 473
         $offset = $this->_datasize;
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
         $record = 0x0018;
832 832
 
833 833
         // option flags
834
-        $options = ($isHidden  ? 0x21 : 0x00);
834
+        $options = ($isHidden ? 0x21 : 0x00);
835 835
 
836 836
         $extra = pack(
837 837
             'Cvvvvv',
@@ -861,9 +861,9 @@  discard block
 block discarded – undo
861 861
      */
862 862
     private function writeCodepage()
863 863
     {
864
-        $record = 0x0042;             // Record identifier
865
-        $length = 0x0002;             // Number of bytes to follow
866
-        $cv = $this->codepage;   // The code page
864
+        $record = 0x0042; // Record identifier
865
+        $length = 0x0002; // Number of bytes to follow
866
+        $cv = $this->codepage; // The code page
867 867
 
868 868
         $header = pack('vv', $record, $length);
869 869
         $data = pack('v', $cv);
@@ -876,24 +876,24 @@  discard block
 block discarded – undo
876 876
      */
877 877
     private function writeWindow1()
878 878
     {
879
-        $record = 0x003D;   // Record identifier
880
-        $length = 0x0012;   // Number of bytes to follow
879
+        $record = 0x003D; // Record identifier
880
+        $length = 0x0012; // Number of bytes to follow
881 881
 
882
-        $xWn = 0x0000;     // Horizontal position of window
883
-        $yWn = 0x0000;     // Vertical position of window
884
-        $dxWn = 0x25BC;     // Width of window
885
-        $dyWn = 0x1572;     // Height of window
882
+        $xWn = 0x0000; // Horizontal position of window
883
+        $yWn = 0x0000; // Vertical position of window
884
+        $dxWn = 0x25BC; // Width of window
885
+        $dyWn = 0x1572; // Height of window
886 886
 
887
-        $grbit = 0x0038;    // Option flags
887
+        $grbit = 0x0038; // Option flags
888 888
 
889 889
         // not supported by PhpSpreadsheet, so there is only one selected sheet, the active
890
-        $ctabsel = 1;       // Number of workbook tabs selected
890
+        $ctabsel = 1; // Number of workbook tabs selected
891 891
 
892
-        $wTabRatio = 0x0258;    // Tab to scrollbar ratio
892
+        $wTabRatio = 0x0258; // Tab to scrollbar ratio
893 893
 
894 894
         // not supported by PhpSpreadsheet, set to 0
895
-        $itabFirst = 0;     // 1st displayed worksheet
896
-        $itabCur = $this->spreadsheet->getActiveSheetIndex();    // Active worksheet
895
+        $itabFirst = 0; // 1st displayed worksheet
896
+        $itabCur = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet
897 897
 
898 898
         $header = pack('vv', $record, $length);
899 899
         $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio);
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
     private function writeBoundSheet($sheet, $offset)
910 910
     {
911 911
         $sheetname = $sheet->getTitle();
912
-        $record = 0x0085;                    // Record identifier
912
+        $record = 0x0085; // Record identifier
913 913
 
914 914
         // sheet state
915 915
         switch ($sheet->getSheetState()) {
@@ -930,7 +930,7 @@  discard block
 block discarded – undo
930 930
         // sheet type
931 931
         $st = 0x00;
932 932
 
933
-        $grbit = 0x0000;                    // Visibility and sheet type
933
+        $grbit = 0x0000; // Visibility and sheet type
934 934
 
935 935
         $data = pack('VCC', $offset, $ss, $st);
936 936
         $data .= \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($sheetname);
@@ -945,8 +945,8 @@  discard block
 block discarded – undo
945 945
      */
946 946
     private function writeSupbookInternal()
947 947
     {
948
-        $record = 0x01AE;   // Record identifier
949
-        $length = 0x0004;   // Bytes to follow
948
+        $record = 0x01AE; // Record identifier
949
+        $length = 0x0004; // Bytes to follow
950 950
 
951 951
         $header = pack('vv', $record, $length);
952 952
         $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401);
@@ -961,10 +961,10 @@  discard block
 block discarded – undo
961 961
     private function writeExternalsheetBiff8()
962 962
     {
963 963
         $totalReferences = count($this->parser->references);
964
-        $record = 0x0017;                     // Record identifier
965
-        $length = 2 + 6 * $totalReferences;  // Number of bytes to follow
964
+        $record = 0x0017; // Record identifier
965
+        $length = 2 + 6 * $totalReferences; // Number of bytes to follow
966 966
 
967
-        $supbook_index = 0;           // FIXME: only using internal SUPBOOK record
967
+        $supbook_index = 0; // FIXME: only using internal SUPBOOK record
968 968
         $header = pack('vv', $record, $length);
969 969
         $data = pack('v', $totalReferences);
970 970
         for ($i = 0; $i < $totalReferences; ++$i) {
@@ -979,12 +979,12 @@  discard block
 block discarded – undo
979 979
      */
980 980
     private function writeStyle()
981 981
     {
982
-        $record = 0x0293;   // Record identifier
983
-        $length = 0x0004;   // Bytes to follow
982
+        $record = 0x0293; // Record identifier
983
+        $length = 0x0004; // Bytes to follow
984 984
 
985
-        $ixfe = 0x8000;  // Index to cell style XF
986
-        $BuiltIn = 0x00;     // Built-in style
987
-        $iLevel = 0xff;     // Outline style level
985
+        $ixfe = 0x8000; // Index to cell style XF
986
+        $BuiltIn = 0x00; // Built-in style
987
+        $iLevel = 0xff; // Outline style level
988 988
 
989 989
         $header = pack('vv', $record, $length);
990 990
         $data = pack('vCC', $ixfe, $BuiltIn, $iLevel);
@@ -999,10 +999,10 @@  discard block
 block discarded – undo
999 999
      */
1000 1000
     private function writeNumberFormat($format, $ifmt)
1001 1001
     {
1002
-        $record = 0x041E;    // Record identifier
1002
+        $record = 0x041E; // Record identifier
1003 1003
 
1004 1004
         $numberFormatString = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($format);
1005
-        $length = 2 + strlen($numberFormatString);    // Number of bytes to follow
1005
+        $length = 2 + strlen($numberFormatString); // Number of bytes to follow
1006 1006
 
1007 1007
         $header = pack('vv', $record, $length);
1008 1008
         $data = pack('v', $ifmt) . $numberFormatString;
@@ -1014,12 +1014,12 @@  discard block
 block discarded – undo
1014 1014
      */
1015 1015
     private function writeDateMode()
1016 1016
     {
1017
-        $record = 0x0022;   // Record identifier
1018
-        $length = 0x0002;   // Bytes to follow
1017
+        $record = 0x0022; // Record identifier
1018
+        $length = 0x0002; // Bytes to follow
1019 1019
 
1020 1020
         $f1904 = (\PhpSpreadsheet\Shared\Date::getExcelCalendar() == \PhpSpreadsheet\Shared\Date::CALENDAR_MAC_1904)
1021 1021
             ? 1
1022
-            : 0;   // Flag for 1904 date system
1022
+            : 0; // Flag for 1904 date system
1023 1023
 
1024 1024
         $header = pack('vv', $record, $length);
1025 1025
         $data = pack('v', $f1904);
@@ -1040,8 +1040,8 @@  discard block
 block discarded – undo
1040 1040
      */
1041 1041
     private function writeExternalCount($cxals)
1042 1042
     {
1043
-        $record = 0x0016;   // Record identifier
1044
-        $length = 0x0002;   // Number of bytes to follow
1043
+        $record = 0x0016; // Record identifier
1044
+        $length = 0x0002; // Number of bytes to follow
1045 1045
 
1046 1046
         $header = pack('vv', $record, $length);
1047 1047
         $data = pack('v', $cxals);
@@ -1059,11 +1059,11 @@  discard block
 block discarded – undo
1059 1059
      */
1060 1060
     private function writeExternalSheet($sheetname)
1061 1061
     {
1062
-        $record = 0x0017;                     // Record identifier
1063
-        $length = 0x02 + strlen($sheetname);  // Number of bytes to follow
1062
+        $record = 0x0017; // Record identifier
1063
+        $length = 0x02 + strlen($sheetname); // Number of bytes to follow
1064 1064
 
1065
-        $cch = strlen($sheetname);         // Length of sheet name
1066
-        $rgch = 0x03;                       // Filename encoding
1065
+        $cch = strlen($sheetname); // Length of sheet name
1066
+        $rgch = 0x03; // Filename encoding
1067 1067
 
1068 1068
         $header = pack('vv', $record, $length);
1069 1069
         $data = pack('CC', $cch, $rgch);
@@ -1083,20 +1083,20 @@  discard block
 block discarded – undo
1083 1083
      */
1084 1084
     private function writeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1085 1085
     {
1086
-        $record = 0x0018;       // Record identifier
1087
-        $length = 0x0024;       // Number of bytes to follow
1088
-
1089
-        $grbit = 0x0020;       // Option flags
1090
-        $chKey = 0x00;         // Keyboard shortcut
1091
-        $cch = 0x01;         // Length of text name
1092
-        $cce = 0x0015;       // Length of text definition
1093
-        $ixals = $index + 1;   // Sheet index
1094
-        $itab = $ixals;       // Equal to ixals
1095
-        $cchCustMenu = 0x00;         // Length of cust menu text
1096
-        $cchDescription = 0x00;         // Length of description text
1097
-        $cchHelptopic = 0x00;         // Length of help topic text
1098
-        $cchStatustext = 0x00;         // Length of status bar text
1099
-        $rgch = $type;        // Built-in name type
1086
+        $record = 0x0018; // Record identifier
1087
+        $length = 0x0024; // Number of bytes to follow
1088
+
1089
+        $grbit = 0x0020; // Option flags
1090
+        $chKey = 0x00; // Keyboard shortcut
1091
+        $cch = 0x01; // Length of text name
1092
+        $cce = 0x0015; // Length of text definition
1093
+        $ixals = $index + 1; // Sheet index
1094
+        $itab = $ixals; // Equal to ixals
1095
+        $cchCustMenu = 0x00; // Length of cust menu text
1096
+        $cchDescription = 0x00; // Length of description text
1097
+        $cchHelptopic = 0x00; // Length of help topic text
1098
+        $cchStatustext = 0x00; // Length of status bar text
1099
+        $rgch = $type; // Built-in name type
1100 1100
 
1101 1101
         $unknown03 = 0x3b;
1102 1102
         $unknown04 = 0xffff - $index;
@@ -1147,19 +1147,19 @@  discard block
 block discarded – undo
1147 1147
      */
1148 1148
     private function writeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1149 1149
     {
1150
-        $record = 0x0018;       // Record identifier
1151
-        $length = 0x003d;       // Number of bytes to follow
1152
-        $grbit = 0x0020;       // Option flags
1153
-        $chKey = 0x00;         // Keyboard shortcut
1154
-        $cch = 0x01;         // Length of text name
1155
-        $cce = 0x002e;       // Length of text definition
1156
-        $ixals = $index + 1;   // Sheet index
1157
-        $itab = $ixals;       // Equal to ixals
1158
-        $cchCustMenu = 0x00;         // Length of cust menu text
1159
-        $cchDescription = 0x00;         // Length of description text
1160
-        $cchHelptopic = 0x00;         // Length of help topic text
1161
-        $cchStatustext = 0x00;         // Length of status bar text
1162
-        $rgch = $type;        // Built-in name type
1150
+        $record = 0x0018; // Record identifier
1151
+        $length = 0x003d; // Number of bytes to follow
1152
+        $grbit = 0x0020; // Option flags
1153
+        $chKey = 0x00; // Keyboard shortcut
1154
+        $cch = 0x01; // Length of text name
1155
+        $cce = 0x002e; // Length of text definition
1156
+        $ixals = $index + 1; // Sheet index
1157
+        $itab = $ixals; // Equal to ixals
1158
+        $cchCustMenu = 0x00; // Length of cust menu text
1159
+        $cchDescription = 0x00; // Length of description text
1160
+        $cchHelptopic = 0x00; // Length of help topic text
1161
+        $cchStatustext = 0x00; // Length of status bar text
1162
+        $rgch = $type; // Built-in name type
1163 1163
 
1164 1164
         $unknown01 = 0x29;
1165 1165
         $unknown02 = 0x002b;
@@ -1222,8 +1222,8 @@  discard block
 block discarded – undo
1222 1222
      */
1223 1223
     private function writeCountry()
1224 1224
     {
1225
-        $record = 0x008C;    // Record identifier
1226
-        $length = 4;         // Number of bytes to follow
1225
+        $record = 0x008C; // Record identifier
1226
+        $length = 4; // Number of bytes to follow
1227 1227
 
1228 1228
         $header = pack('vv', $record, $length);
1229 1229
         /* using the same country code always for simplicity */
@@ -1239,8 +1239,8 @@  discard block
 block discarded – undo
1239 1239
      */
1240 1240
     private function writeRecalcId()
1241 1241
     {
1242
-        $record = 0x01C1;    // Record identifier
1243
-        $length = 8;         // Number of bytes to follow
1242
+        $record = 0x01C1; // Record identifier
1243
+        $length = 8; // Number of bytes to follow
1244 1244
 
1245 1245
         $header = pack('vv', $record, $length);
1246 1246
 
@@ -1257,10 +1257,10 @@  discard block
 block discarded – undo
1257 1257
     {
1258 1258
         $aref = $this->palette;
1259 1259
 
1260
-        $record = 0x0092;                // Record identifier
1261
-        $length = 2 + 4 * count($aref);  // Number of bytes to follow
1262
-        $ccv = count($aref);          // Number of RGB values to follow
1263
-        $data = '';                      // The RGB data
1260
+        $record = 0x0092; // Record identifier
1261
+        $length = 2 + 4 * count($aref); // Number of bytes to follow
1262
+        $ccv = count($aref); // Number of RGB values to follow
1263
+        $data = ''; // The RGB data
1264 1264
 
1265 1265
         // Pack the RGB data
1266 1266
         foreach ($aref as $color) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/OpenDocument.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * Get writer part
69 69
      *
70 70
      * @param  string  $pPartName  Writer part name
71
-     * @return \PhpSpreadsheet\Writer\Excel2007\WriterPart
71
+     * @return OpenDocument\WriterPart|null
72 72
      */
73 73
     public function getWriterPart($pPartName = '')
74 74
     {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      *
180 180
      * @param  \PhpSpreadsheet\Spreadsheet $spreadsheet  PhpSpreadsheet object
181 181
      * @throws \PhpSpreadsheet\Writer\Exception
182
-     * @return Excel2007
182
+     * @return OpenDocument
183 183
      */
184 184
     public function setPhpSpreadsheet(\PhpSpreadsheet\SpreadSheet $spreadsheet = null)
185 185
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/CodePage.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -40,117 +40,117 @@
 block discarded – undo
40 40
     {
41 41
         switch ($codePage) {
42 42
             case 367:
43
-                return 'ASCII';    //    ASCII
43
+                return 'ASCII'; //    ASCII
44 44
             case 437:
45
-                return 'CP437';    //    OEM US
45
+                return 'CP437'; //    OEM US
46 46
             case 720:
47
-                throw new \PhpSpreadsheet\Exception('Code page 720 not supported.');    //    OEM Arabic
47
+                throw new \PhpSpreadsheet\Exception('Code page 720 not supported.'); //    OEM Arabic
48 48
             case 737:
49
-                return 'CP737';    //    OEM Greek
49
+                return 'CP737'; //    OEM Greek
50 50
             case 775:
51
-                return 'CP775';    //    OEM Baltic
51
+                return 'CP775'; //    OEM Baltic
52 52
             case 850:
53
-                return 'CP850';    //    OEM Latin I
53
+                return 'CP850'; //    OEM Latin I
54 54
             case 852:
55
-                return 'CP852';    //    OEM Latin II (Central European)
55
+                return 'CP852'; //    OEM Latin II (Central European)
56 56
             case 855:
57
-                return 'CP855';    //    OEM Cyrillic
57
+                return 'CP855'; //    OEM Cyrillic
58 58
             case 857:
59
-                return 'CP857';    //    OEM Turkish
59
+                return 'CP857'; //    OEM Turkish
60 60
             case 858:
61
-                return 'CP858';    //    OEM Multilingual Latin I with Euro
61
+                return 'CP858'; //    OEM Multilingual Latin I with Euro
62 62
             case 860:
63
-                return 'CP860';    //    OEM Portugese
63
+                return 'CP860'; //    OEM Portugese
64 64
             case 861:
65
-                return 'CP861';    //    OEM Icelandic
65
+                return 'CP861'; //    OEM Icelandic
66 66
             case 862:
67
-                return 'CP862';    //    OEM Hebrew
67
+                return 'CP862'; //    OEM Hebrew
68 68
             case 863:
69
-                return 'CP863';    //    OEM Canadian (French)
69
+                return 'CP863'; //    OEM Canadian (French)
70 70
             case 864:
71
-                return 'CP864';    //    OEM Arabic
71
+                return 'CP864'; //    OEM Arabic
72 72
             case 865:
73
-                return 'CP865';    //    OEM Nordic
73
+                return 'CP865'; //    OEM Nordic
74 74
             case 866:
75
-                return 'CP866';    //    OEM Cyrillic (Russian)
75
+                return 'CP866'; //    OEM Cyrillic (Russian)
76 76
             case 869:
77
-                return 'CP869';    //    OEM Greek (Modern)
77
+                return 'CP869'; //    OEM Greek (Modern)
78 78
             case 874:
79
-                return 'CP874';    //    ANSI Thai
79
+                return 'CP874'; //    ANSI Thai
80 80
             case 932:
81
-                return 'CP932';    //    ANSI Japanese Shift-JIS
81
+                return 'CP932'; //    ANSI Japanese Shift-JIS
82 82
             case 936:
83
-                return 'CP936';    //    ANSI Chinese Simplified GBK
83
+                return 'CP936'; //    ANSI Chinese Simplified GBK
84 84
             case 949:
85
-                return 'CP949';    //    ANSI Korean (Wansung)
85
+                return 'CP949'; //    ANSI Korean (Wansung)
86 86
             case 950:
87
-                return 'CP950';    //    ANSI Chinese Traditional BIG5
87
+                return 'CP950'; //    ANSI Chinese Traditional BIG5
88 88
             case 1200:
89 89
                 return 'UTF-16LE'; //    UTF-16 (BIFF8)
90 90
             case 1250:
91
-                return 'CP1250';   //    ANSI Latin II (Central European)
91
+                return 'CP1250'; //    ANSI Latin II (Central European)
92 92
             case 1251:
93
-                return 'CP1251';   //    ANSI Cyrillic
93
+                return 'CP1251'; //    ANSI Cyrillic
94 94
             case 0:
95 95
                 //    CodePage is not always correctly set when the xls file was saved by Apple's Numbers program
96 96
             case 1252:
97
-                return 'CP1252';   //    ANSI Latin I (BIFF4-BIFF7)
97
+                return 'CP1252'; //    ANSI Latin I (BIFF4-BIFF7)
98 98
             case 1253:
99
-                return 'CP1253';   //    ANSI Greek
99
+                return 'CP1253'; //    ANSI Greek
100 100
             case 1254:
101
-                return 'CP1254';   //    ANSI Turkish
101
+                return 'CP1254'; //    ANSI Turkish
102 102
             case 1255:
103
-                return 'CP1255';   //    ANSI Hebrew
103
+                return 'CP1255'; //    ANSI Hebrew
104 104
             case 1256:
105
-                return 'CP1256';   //    ANSI Arabic
105
+                return 'CP1256'; //    ANSI Arabic
106 106
             case 1257:
107
-                return 'CP1257';   //    ANSI Baltic
107
+                return 'CP1257'; //    ANSI Baltic
108 108
             case 1258:
109
-                return 'CP1258';   //    ANSI Vietnamese
109
+                return 'CP1258'; //    ANSI Vietnamese
110 110
             case 1361:
111
-                return 'CP1361';   //    ANSI Korean (Johab)
111
+                return 'CP1361'; //    ANSI Korean (Johab)
112 112
             case 10000:
113
-                return 'MAC';      //    Apple Roman
113
+                return 'MAC'; //    Apple Roman
114 114
             case 10001:
115
-                return 'CP932';    //    Macintosh Japanese
115
+                return 'CP932'; //    Macintosh Japanese
116 116
             case 10002:
117
-                return 'CP950';    //    Macintosh Chinese Traditional
117
+                return 'CP950'; //    Macintosh Chinese Traditional
118 118
             case 10003:
119
-                return 'CP1361';   //    Macintosh Korean
119
+                return 'CP1361'; //    Macintosh Korean
120 120
             case 10004:
121 121
                 return 'MACARABIC'; //    Apple Arabic
122 122
             case 10005:
123 123
                 return 'MACHEBREW'; //    Apple Hebrew
124 124
             case 10006:
125
-                return 'MACGREEK';  //    Macintosh Greek
125
+                return 'MACGREEK'; //    Macintosh Greek
126 126
             case 10007:
127
-                return 'MACCYRILLIC';  //    Macintosh Cyrillic
127
+                return 'MACCYRILLIC'; //    Macintosh Cyrillic
128 128
             case 10008:
129
-                return 'CP936';  //    Macintosh - Simplified Chinese (GB 2312)
129
+                return 'CP936'; //    Macintosh - Simplified Chinese (GB 2312)
130 130
             case 10010:
131
-                return 'MACROMANIA';    //    Macintosh Romania
131
+                return 'MACROMANIA'; //    Macintosh Romania
132 132
             case 10017:
133
-                return 'MACUKRAINE';    //    Macintosh Ukraine
133
+                return 'MACUKRAINE'; //    Macintosh Ukraine
134 134
             case 10021:
135
-                return 'MACTHAI';    //    Macintosh Thai
135
+                return 'MACTHAI'; //    Macintosh Thai
136 136
             case 10029:
137
-                return 'MACCENTRALEUROPE';  //    Macintosh Central Europe
137
+                return 'MACCENTRALEUROPE'; //    Macintosh Central Europe
138 138
             case 10079:
139
-                return 'MACICELAND';  //    Macintosh Icelandic
139
+                return 'MACICELAND'; //    Macintosh Icelandic
140 140
             case 10081:
141
-                return 'MACTURKISH';  //    Macintosh Turkish
141
+                return 'MACTURKISH'; //    Macintosh Turkish
142 142
             case 10082:
143
-                return 'MACCROATIAN';    //    Macintosh Croatian
143
+                return 'MACCROATIAN'; //    Macintosh Croatian
144 144
             case 21010:
145
-                return 'UTF-16LE';  //    UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
145
+                return 'UTF-16LE'; //    UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
146 146
             case 32768:
147
-                return 'MAC';      //    Apple Roman
147
+                return 'MAC'; //    Apple Roman
148 148
             case 32769:
149
-                throw new \PhpSpreadsheet\Exception('Code page 32769 not supported.');  //    ANSI Latin I (BIFF2-BIFF3)
149
+                throw new \PhpSpreadsheet\Exception('Code page 32769 not supported.'); //    ANSI Latin I (BIFF2-BIFF3)
150 150
             case 65000:
151
-                return 'UTF-7';    //    Unicode (UTF-7)
151
+                return 'UTF-7'; //    Unicode (UTF-7)
152 152
             case 65001:
153
-                return 'UTF-8';    //    Unicode (UTF-8)
153
+                return 'UTF-8'; //    Unicode (UTF-8)
154 154
         }
155 155
         throw new \PhpSpreadsheet\Exception('Unknown codepage: ' . $codePage);
156 156
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/DateTime.php 2 patches
Doc Comments   +18 added lines, -26 removed lines patch added patch discarded remove patch
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
@@ -918,10 +918,6 @@  discard block
 block discarded – undo
918 918
      *                                            PHP DateTime object, or a standard date string
919 919
      * @param    mixed            $endDate        Excel date serial value (float), PHP date timestamp (integer),
920 920
      *                                            PHP DateTime object, or a standard date string
921
-     * @param    mixed            $holidays,...    Optional series of Excel date serial value (float), PHP date
922
-     *                                            timestamp (integer), PHP DateTime object, or a standard date
923
-     *                                            strings that will be excluded from the working calendar, such
924
-     *                                            as state and federal holidays and floating holidays.
925 921
      * @return    int            Interval between the dates
926 922
      */
927 923
     public static function NETWORKDAYS($startDate, $endDate)
@@ -1003,10 +999,6 @@  discard block
 block discarded – undo
1003 999
      * @param    int        $endDays        The number of nonweekend and nonholiday days before or after
1004 1000
      *                                        startDate. A positive value for days yields a future date; a
1005 1001
      *                                        negative value yields a past date.
1006
-     * @param    mixed        $holidays,...    Optional series of Excel date serial value (float), PHP date
1007
-     *                                        timestamp (integer), PHP DateTime object, or a standard date
1008
-     *                                        strings that will be excluded from the working calendar, such
1009
-     *                                        as state and federal holidays and floating holidays.
1010 1002
      * @return    mixed    Excel date/time serial value, PHP date/time serial value or PHP date/time object,
1011 1003
      *                        depending on the value of the ReturnDateType flag
1012 1004
      */
@@ -1110,7 +1102,7 @@  discard block
 block discarded – undo
1110 1102
      * Excel Function:
1111 1103
      *        DAY(dateValue)
1112 1104
      *
1113
-     * @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),
1114 1106
      *                                    PHP DateTime object, or a standard date string
1115 1107
      * @return    int        Day of the month
1116 1108
      */
@@ -1143,7 +1135,7 @@  discard block
 block discarded – undo
1143 1135
      * Excel Function:
1144 1136
      *        WEEKDAY(dateValue[,style])
1145 1137
      *
1146
-     * @param    mixed    $dateValue        Excel date serial value (float), PHP date timestamp (integer),
1138
+     * @param    integer    $dateValue        Excel date serial value (float), PHP date timestamp (integer),
1147 1139
      *                                    PHP DateTime object, or a standard date string
1148 1140
      * @param    int        $style            A number that determines the type of return value
1149 1141
      *                                        1 or omitted    Numbers 1 (Sunday) through 7 (Saturday).
@@ -1219,9 +1211,9 @@  discard block
 block discarded – undo
1219 1211
      * Excel Function:
1220 1212
      *        WEEKNUM(dateValue[,style])
1221 1213
      *
1222
-     * @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),
1223 1215
      *                                    PHP DateTime object, or a standard date string
1224
-     * @param    bool    $method            Week begins on Sunday or Monday
1216
+     * @param    integer    $method            Week begins on Sunday or Monday
1225 1217
      *                                        1 or omitted    Week begins on Sunday.
1226 1218
      *                                        2                Week begins on Monday.
1227 1219
      * @return    int        Week Number
@@ -1267,7 +1259,7 @@  discard block
 block discarded – undo
1267 1259
      * Excel Function:
1268 1260
      *        MONTH(dateValue)
1269 1261
      *
1270
-     * @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),
1271 1263
      *                                    PHP DateTime object, or a standard date string
1272 1264
      * @return    int        Month of the year
1273 1265
      */
@@ -1299,7 +1291,7 @@  discard block
 block discarded – undo
1299 1291
      * Excel Function:
1300 1292
      *        YEAR(dateValue)
1301 1293
      *
1302
-     * @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),
1303 1295
      *                                    PHP DateTime object, or a standard date string
1304 1296
      * @return    int        Year
1305 1297
      */
@@ -1330,7 +1322,7 @@  discard block
 block discarded – undo
1330 1322
      * Excel Function:
1331 1323
      *        HOUR(timeValue)
1332 1324
      *
1333
-     * @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),
1334 1326
      *                                    PHP DateTime object, or a standard time string
1335 1327
      * @return    int        Hour
1336 1328
      */
@@ -1370,7 +1362,7 @@  discard block
 block discarded – undo
1370 1362
      * Excel Function:
1371 1363
      *        MINUTE(timeValue)
1372 1364
      *
1373
-     * @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),
1374 1366
      *                                    PHP DateTime object, or a standard time string
1375 1367
      * @return    int        Minute
1376 1368
      */
@@ -1410,7 +1402,7 @@  discard block
 block discarded – undo
1410 1402
      * Excel Function:
1411 1403
      *        SECOND(timeValue)
1412 1404
      *
1413
-     * @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),
1414 1406
      *                                    PHP DateTime object, or a standard time string
1415 1407
      * @return    int        Second
1416 1408
      */
@@ -1452,7 +1444,7 @@  discard block
 block discarded – undo
1452 1444
      * Excel Function:
1453 1445
      *        EDATE(dateValue,adjustmentMonths)
1454 1446
      *
1455
-     * @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),
1456 1448
      *                                        PHP DateTime object, or a standard date string
1457 1449
      * @param    int        $adjustmentMonths    The number of months before or after start_date.
1458 1450
      *                                        A positive value for months yields a future date;
@@ -1497,7 +1489,7 @@  discard block
 block discarded – undo
1497 1489
      * Excel Function:
1498 1490
      *        EOMONTH(dateValue,adjustmentMonths)
1499 1491
      *
1500
-     * @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),
1501 1493
      *                                        PHP DateTime object, or a standard date string
1502 1494
      * @param    int        $adjustmentMonths    The number of months before or after start_date.
1503 1495
      *                                        A positive value for months yields a future date;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
 
425 425
                 return (float) \PhpSpreadsheet\Shared\Date::formattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second);
426 426
             case Functions::RETURNDATE_PHP_NUMERIC:
427
-                return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second));    // -2147468400; //    -2147472000 + 3600
427
+                return (integer) \PhpSpreadsheet\Shared\Date::excelToTimestamp(\PhpSpreadsheet\Shared\Date::formattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; //    -2147472000 + 3600
428 428
             case Functions::RETURNDATE_PHP_OBJECT:
429 429
                 $dayAdjust = 0;
430 430
                 if ($hour < 0) {
@@ -1036,7 +1036,7 @@  discard block
 block discarded – undo
1036 1036
 
1037 1037
         $startDoW = self::DAYOFWEEK($startDate, 3);
1038 1038
         if (self::DAYOFWEEK($startDate, 3) >= 5) {
1039
-            $startDate += ($decrementing) ? -$startDoW + 4: 7 - $startDoW;
1039
+            $startDate += ($decrementing) ? -$startDoW + 4 : 7 - $startDoW;
1040 1040
             ($decrementing) ? $endDays++ : $endDays--;
1041 1041
         }
1042 1042
 
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
         //    Adjust the calculated end date if it falls over a weekend
1047 1047
         $endDoW = self::DAYOFWEEK($endDate, 3);
1048 1048
         if ($endDoW >= 5) {
1049
-            $endDate += ($decrementing) ? -$endDoW + 4: 7 - $endDoW;
1049
+            $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW;
1050 1050
         }
1051 1051
 
1052 1052
         //    Test any extra holiday parameters
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Functions.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
      * IS_EVEN
385 385
      *
386 386
      * @param    mixed $value Value to check
387
-     * @return    bool
387
+     * @return    string|boolean
388 388
      */
389 389
     public static function isEven($value = null)
390 390
     {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * IS_ODD
404 404
      *
405 405
      * @param    mixed $value Value to check
406
-     * @return    bool
406
+     * @return    string|boolean
407 407
      */
408 408
     public static function isOdd($value = null)
409 409
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Logical.php 2 patches
Doc Comments   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@  discard block
 block discarded – undo
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
-     * @return    bool        The logical AND of the arguments.
78
+     * @return    string|boolean        The logical AND of the arguments.
80 79
      */
81 80
     public static function logicalAnd()
82 81
     {
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
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
-     * @return    bool        The logical OR of the arguments.
132
+     * @return    string|boolean        The logical OR of the arguments.
135 133
      */
136 134
     public static function logicalOr()
137 135
     {
@@ -185,7 +183,7 @@  discard block
 block discarded – undo
185 183
      *
186 184
      * @category Logical Functions
187 185
      * @param    mixed        $logical    A value or expression that can be evaluated to TRUE or FALSE
188
-     * @return    bool        The boolean inverse of the argument.
186
+     * @return    boolean|string        The boolean inverse of the argument.
189 187
      */
190 188
     public static function NOT($logical = false)
191 189
     {
@@ -230,8 +228,8 @@  discard block
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -237,8 +237,8 @@
 block discarded – undo
237 237
      */
238 238
     public static function statementIf($condition = true, $returnIfTrue = 0, $returnIfFalse = false)
239 239
     {
240
-        $condition = (is_null($condition))     ? true :  (boolean) Functions::flattenSingleValue($condition);
241
-        $returnIfTrue = (is_null($returnIfTrue))  ? 0 :     Functions::flattenSingleValue($returnIfTrue);
240
+        $condition = (is_null($condition)) ? true : (boolean) Functions::flattenSingleValue($condition);
241
+        $returnIfTrue = (is_null($returnIfTrue)) ? 0 : Functions::flattenSingleValue($returnIfTrue);
242 242
         $returnIfFalse = (is_null($returnIfFalse)) ? false : Functions::flattenSingleValue($returnIfFalse);
243 243
 
244 244
         return ($condition) ? $returnIfTrue : $returnIfFalse;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Calculation/Statistical.php 2 patches
Doc Comments   +6 added lines, -44 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      *
125 125
      * @param p require p>0
126 126
      * @param q require q>0
127
-     * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
127
+     * @return double if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow
128 128
      * @author Jaco van Kooten
129 129
      */
130 130
     private static function logBeta($p, $q)
@@ -146,6 +146,8 @@  discard block
 block discarded – undo
146 146
      * Evaluates of continued fraction part of incomplete beta function.
147 147
      * Based on an idea from Numerical Recipes (W.H. Press et al, 1992).
148 148
      * @author Jaco van Kooten
149
+     * @param double $p
150
+     * @param double $q
149 151
      */
150 152
     private static function betaFraction($x, $p, $q)
151 153
     {
@@ -702,7 +704,6 @@  discard block
 block discarded – undo
702 704
      *        AVEDEV(value1[,value2[, ...]])
703 705
      *
704 706
      * @category Statistical Functions
705
-     * @param    mixed        $arg,...        Data values
706 707
      * @return    float
707 708
      */
708 709
     public static function AVEDEV()
@@ -751,7 +752,6 @@  discard block
 block discarded – undo
751 752
      *        AVERAGE(value1[,value2[, ...]])
752 753
      *
753 754
      * @category Statistical Functions
754
-     * @param    mixed        $arg,...        Data values
755 755
      * @return    float
756 756
      */
757 757
     public static function AVERAGE()
@@ -792,7 +792,6 @@  discard block
 block discarded – undo
792 792
      *        AVERAGEA(value1[,value2[, ...]])
793 793
      *
794 794
      * @category Statistical Functions
795
-     * @param    mixed        $arg,...        Data values
796 795
      * @return    float
797 796
      */
798 797
     public static function AVERAGEA()
@@ -837,7 +836,6 @@  discard block
 block discarded – undo
837 836
      *        AVERAGEIF(value1[,value2[, ...]],condition)
838 837
      *
839 838
      * @category Mathematical and Trigonometric Functions
840
-     * @param    mixed        $arg,...        Data values
841 839
      * @param    string        $condition        The criteria that defines which cells will be checked.
842 840
      * @param    mixed[]        $averageArgs    Data values
843 841
      * @return    float
@@ -882,7 +880,6 @@  discard block
 block discarded – undo
882 880
      * @param    float        $value            Value at which you want to evaluate the distribution
883 881
      * @param    float        $alpha            Parameter to the distribution
884 882
      * @param    float        $beta            Parameter to the distribution
885
-     * @param    bool        $cumulative
886 883
      * @return    float
887 884
      */
888 885
     public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1)
@@ -919,9 +916,8 @@  discard block
 block discarded – undo
919 916
      * @param    float        $probability    Probability at which you want to evaluate the distribution
920 917
      * @param    float        $alpha            Parameter to the distribution
921 918
      * @param    float        $beta            Parameter to the distribution
922
-     * @param    float        $rMin            Minimum value
923
-     * @param    float        $rMax            Maximum value
924
-     * @param    bool        $cumulative
919
+     * @param    integer        $rMin            Minimum value
920
+     * @param    integer        $rMax            Maximum value
925 921
      * @return    float
926 922
      */
927 923
     public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1)
@@ -1172,7 +1168,6 @@  discard block
 block discarded – undo
1172 1168
      *        COUNT(value1[,value2[, ...]])
1173 1169
      *
1174 1170
      * @category Statistical Functions
1175
-     * @param    mixed        $arg,...        Data values
1176 1171
      * @return    int
1177 1172
      */
1178 1173
     public static function COUNT()
@@ -1204,7 +1199,6 @@  discard block
 block discarded – undo
1204 1199
      *        COUNTA(value1[,value2[, ...]])
1205 1200
      *
1206 1201
      * @category Statistical Functions
1207
-     * @param    mixed        $arg,...        Data values
1208 1202
      * @return    int
1209 1203
      */
1210 1204
     public static function COUNTA()
@@ -1232,7 +1226,6 @@  discard block
 block discarded – undo
1232 1226
      *        COUNTBLANK(value1[,value2[, ...]])
1233 1227
      *
1234 1228
      * @category Statistical Functions
1235
-     * @param    mixed        $arg,...        Data values
1236 1229
      * @return    int
1237 1230
      */
1238 1231
     public static function COUNTBLANK()
@@ -1260,7 +1253,6 @@  discard block
 block discarded – undo
1260 1253
      *        COUNTIF(value1[,value2[, ...]],condition)
1261 1254
      *
1262 1255
      * @category Statistical Functions
1263
-     * @param    mixed        $arg,...        Data values
1264 1256
      * @param    string        $condition        The criteria that defines which cells will be counted.
1265 1257
      * @return    int
1266 1258
      */
@@ -1445,7 +1437,6 @@  discard block
 block discarded – undo
1445 1437
      *        DEVSQ(value1[,value2[, ...]])
1446 1438
      *
1447 1439
      * @category Statistical Functions
1448
-     * @param    mixed        $arg,...        Data values
1449 1440
      * @return    float
1450 1441
      */
1451 1442
     public static function DEVSQ()
@@ -1727,7 +1718,6 @@  discard block
 block discarded – undo
1727 1718
      *        GEOMEAN(value1[,value2[, ...]])
1728 1719
      *
1729 1720
      * @category Statistical Functions
1730
-     * @param    mixed        $arg,...        Data values
1731 1721
      * @return    float
1732 1722
      */
1733 1723
     public static function GEOMEAN()
@@ -1786,7 +1776,6 @@  discard block
 block discarded – undo
1786 1776
      *        HARMEAN(value1[,value2[, ...]])
1787 1777
      *
1788 1778
      * @category Statistical Functions
1789
-     * @param    mixed        $arg,...        Data values
1790 1779
      * @return    float
1791 1780
      */
1792 1781
     public static function HARMEAN()
@@ -1940,8 +1929,6 @@  discard block
 block discarded – undo
1940 1929
      *        LARGE(value1[,value2[, ...]],entry)
1941 1930
      *
1942 1931
      * @category Statistical Functions
1943
-     * @param    mixed        $arg,...        Data values
1944
-     * @param    int            $entry            Position (ordered from the largest) in the array or range of data to return
1945 1932
      * @return    float
1946 1933
      */
1947 1934
     public static function LARGE()
@@ -2163,7 +2150,6 @@  discard block
 block discarded – undo
2163 2150
      *        MAX(value1[,value2[, ...]])
2164 2151
      *
2165 2152
      * @category Statistical Functions
2166
-     * @param    mixed        $arg,...        Data values
2167 2153
      * @return    float
2168 2154
      */
2169 2155
     public static function MAX()
@@ -2197,7 +2183,6 @@  discard block
 block discarded – undo
2197 2183
      *        MAXA(value1[,value2[, ...]])
2198 2184
      *
2199 2185
      * @category Statistical Functions
2200
-     * @param    mixed        $arg,...        Data values
2201 2186
      * @return    float
2202 2187
      */
2203 2188
     public static function MAXA()
@@ -2236,7 +2221,6 @@  discard block
 block discarded – undo
2236 2221
      *        MAXIF(value1[,value2[, ...]],condition)
2237 2222
      *
2238 2223
      * @category Mathematical and Trigonometric Functions
2239
-     * @param    mixed        $arg,...        Data values
2240 2224
      * @param    string        $condition        The criteria that defines which cells will be checked.
2241 2225
      * @return    float
2242 2226
      */
@@ -2275,7 +2259,6 @@  discard block
 block discarded – undo
2275 2259
      *        MEDIAN(value1[,value2[, ...]])
2276 2260
      *
2277 2261
      * @category Statistical Functions
2278
-     * @param    mixed        $arg,...        Data values
2279 2262
      * @return    float
2280 2263
      */
2281 2264
     public static function MEDIAN()
@@ -2317,7 +2300,6 @@  discard block
 block discarded – undo
2317 2300
      *        MIN(value1[,value2[, ...]])
2318 2301
      *
2319 2302
      * @category Statistical Functions
2320
-     * @param    mixed        $arg,...        Data values
2321 2303
      * @return    float
2322 2304
      */
2323 2305
     public static function MIN()
@@ -2351,7 +2333,6 @@  discard block
 block discarded – undo
2351 2333
      *        MINA(value1[,value2[, ...]])
2352 2334
      *
2353 2335
      * @category Statistical Functions
2354
-     * @param    mixed        $arg,...        Data values
2355 2336
      * @return    float
2356 2337
      */
2357 2338
     public static function MINA()
@@ -2390,7 +2371,6 @@  discard block
 block discarded – undo
2390 2371
      *        MINIF(value1[,value2[, ...]],condition)
2391 2372
      *
2392 2373
      * @category Mathematical and Trigonometric Functions
2393
-     * @param    mixed        $arg,...        Data values
2394 2374
      * @param    string        $condition        The criteria that defines which cells will be checked.
2395 2375
      * @return    float
2396 2376
      */
@@ -2466,7 +2446,6 @@  discard block
 block discarded – undo
2466 2446
      *        MODE(value1[,value2[, ...]])
2467 2447
      *
2468 2448
      * @category Statistical Functions
2469
-     * @param    mixed        $arg,...        Data values
2470 2449
      * @return    float
2471 2450
      */
2472 2451
     public static function MODE()
@@ -2569,9 +2548,9 @@  discard block
 block discarded – undo
2569 2548
      *
2570 2549
      * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.
2571 2550
      *
2572
-     * @param    float        $value
2573 2551
      * @param    float        $mean        Mean Value
2574 2552
      * @param    float        $stdDev        Standard Deviation
2553
+     * @param double $probability
2575 2554
      * @return    float
2576 2555
      */
2577 2556
     public static function NORMINV($probability, $mean, $stdDev)
@@ -2633,8 +2612,6 @@  discard block
 block discarded – undo
2633 2612
      *        PERCENTILE(value1[,value2[, ...]],entry)
2634 2613
      *
2635 2614
      * @category Statistical Functions
2636
-     * @param    mixed        $arg,...        Data values
2637
-     * @param    float        $entry            Percentile value in the range 0..1, inclusive.
2638 2615
      * @return    float
2639 2616
      */
2640 2617
     public static function PERCENTILE()
@@ -2798,8 +2775,6 @@  discard block
 block discarded – undo
2798 2775
      *        QUARTILE(value1[,value2[, ...]],entry)
2799 2776
      *
2800 2777
      * @category Statistical Functions
2801
-     * @param    mixed        $arg,...        Data values
2802
-     * @param    int            $entry            Quartile value in the range 1..3, inclusive.
2803 2778
      * @return    float
2804 2779
      */
2805 2780
     public static function QUARTILE()
@@ -2960,8 +2935,6 @@  discard block
 block discarded – undo
2960 2935
      *        SMALL(value1[,value2[, ...]],entry)
2961 2936
      *
2962 2937
      * @category Statistical Functions
2963
-     * @param    mixed        $arg,...        Data values
2964
-     * @param    int            $entry            Position (ordered from the smallest) in the array or range of data to return
2965 2938
      * @return    float
2966 2939
      */
2967 2940
     public static function SMALL()
@@ -3029,7 +3002,6 @@  discard block
 block discarded – undo
3029 3002
      *        STDEV(value1[,value2[, ...]])
3030 3003
      *
3031 3004
      * @category Statistical Functions
3032
-     * @param    mixed        $arg,...        Data values
3033 3005
      * @return    float
3034 3006
      */
3035 3007
     public static function STDEV()
@@ -3076,7 +3048,6 @@  discard block
 block discarded – undo
3076 3048
      *        STDEVA(value1[,value2[, ...]])
3077 3049
      *
3078 3050
      * @category Statistical Functions
3079
-     * @param    mixed        $arg,...        Data values
3080 3051
      * @return    float
3081 3052
      */
3082 3053
     public static function STDEVA()
@@ -3126,7 +3097,6 @@  discard block
 block discarded – undo
3126 3097
      *        STDEVP(value1[,value2[, ...]])
3127 3098
      *
3128 3099
      * @category Statistical Functions
3129
-     * @param    mixed        $arg,...        Data values
3130 3100
      * @return    float
3131 3101
      */
3132 3102
     public static function STDEVP()
@@ -3171,7 +3141,6 @@  discard block
 block discarded – undo
3171 3141
      *        STDEVPA(value1[,value2[, ...]])
3172 3142
      *
3173 3143
      * @category Statistical Functions
3174
-     * @param    mixed        $arg,...        Data values
3175 3144
      * @return    float
3176 3145
      */
3177 3146
     public static function STDEVPA()
@@ -3403,8 +3372,6 @@  discard block
 block discarded – undo
3403 3372
      *        TRIMEAN(value1[,value2[, ...]], $discard)
3404 3373
      *
3405 3374
      * @category Statistical Functions
3406
-     * @param    mixed        $arg,...        Data values
3407
-     * @param    float        $discard        Percentage to discard
3408 3375
      * @return    float
3409 3376
      */
3410 3377
     public static function TRIMMEAN()
@@ -3447,7 +3414,6 @@  discard block
 block discarded – undo
3447 3414
      *        VAR(value1[,value2[, ...]])
3448 3415
      *
3449 3416
      * @category Statistical Functions
3450
-     * @param    mixed        $arg,...        Data values
3451 3417
      * @return    float
3452 3418
      */
3453 3419
     public static function VARFunc()
@@ -3489,7 +3455,6 @@  discard block
 block discarded – undo
3489 3455
      *        VARA(value1[,value2[, ...]])
3490 3456
      *
3491 3457
      * @category Statistical Functions
3492
-     * @param    mixed        $arg,...        Data values
3493 3458
      * @return    float
3494 3459
      */
3495 3460
     public static function VARA()
@@ -3540,7 +3505,6 @@  discard block
 block discarded – undo
3540 3505
      *        VARP(value1[,value2[, ...]])
3541 3506
      *
3542 3507
      * @category Statistical Functions
3543
-     * @param    mixed        $arg,...        Data values
3544 3508
      * @return    float
3545 3509
      */
3546 3510
     public static function VARP()
@@ -3583,7 +3547,6 @@  discard block
 block discarded – undo
3583 3547
      *        VARPA(value1[,value2[, ...]])
3584 3548
      *
3585 3549
      * @category Statistical Functions
3586
-     * @param    mixed        $arg,...        Data values
3587 3550
      * @return    float
3588 3551
      */
3589 3552
     public static function VARPA()
@@ -3668,7 +3631,6 @@  discard block
 block discarded – undo
3668 3631
      * @param    float        $dataSet
3669 3632
      * @param    float        $m0        Alpha Parameter
3670 3633
      * @param    float        $sigma    Beta Parameter
3671
-     * @param    bool        $cumulative
3672 3634
      * @return    float
3673 3635
      */
3674 3636
     public static function ZTEST($dataSet, $m0, $sigma = null)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -520,8 +520,8 @@
 block discarded – undo
520 520
         ];
521 521
 
522 522
         //    Define lower and upper region break-points.
523
-        $p_low = 0.02425;            //Use lower region approx. below this
524
-        $p_high = 1 - $p_low;        //Use upper region approx. above this
523
+        $p_low = 0.02425; //Use lower region approx. below this
524
+        $p_high = 1 - $p_low; //Use upper region approx. above this
525 525
 
526 526
         if (0 < $p && $p < $p_low) {
527 527
             //    Rational approximation for lower region.
Please login to merge, or discard this patch.