Completed
Push — develop ( e1f81f...539a89 )
by Adrien
16:11
created
src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
      *
286 286
      *    @param   string        $pRuleType
287 287
      *    @throws  \PhpSpreadsheet\Exception
288
-     *    @return  \PhpSpreadsheet\Worksheet\AutoFilter\Column
288
+     *    @return  Rule
289 289
      */
290 290
     public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER)
291 291
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
     /**
136 136
      * Return the current cell in this worksheet column
137 137
      *
138
-     * @return Row
138
+     * @return null|\PhpSpreadsheet\Cell
139 139
      */
140 140
     public function current()
141 141
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
     /**
230 230
      * Set Color
231 231
      *
232
-     * @param    \PhpSpreadsheet\Style_Color $pValue
232
+     * @param    \PhpSpreadsheet\Style\Color $pValue
233 233
      * @throws   \PhpSpreadsheet\Exception
234 234
      * @return   Shadow
235 235
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/CSV.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@
 block discarded – undo
311 311
     /**
312 312
      * Write line to CSV file
313 313
      *
314
-     * @param    mixed    $pFileHandle    PHP filehandle
314
+     * @param    resource    $pFileHandle    PHP filehandle
315 315
      * @param    array    $pValues        Array containing values in a row
316 316
      * @throws    Exception
317 317
      */
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007.php 2 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.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @var Excel2007\WriterPart[]
42 42
      */
43
-    private $writerParts    = array();
43
+    private $writerParts = array();
44 44
 
45 45
     /**
46 46
      * Private Spreadsheet
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      *
55 55
      * @var string[]
56 56
      */
57
-    private $stringTable    = array();
57
+    private $stringTable = array();
58 58
 
59 59
     /**
60 60
      * Private unique \PhpSpreadsheet\Style\Conditional HashTable
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @var \PhpSpreadsheet\HashTable
91 91
      */
92
-    private $bordersHashTable ;
92
+    private $bordersHashTable;
93 93
 
94 94
     /**
95 95
      * Private unique \PhpSpreadsheet\Style\NumberFormat HashTable
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
             $this->writerParts[$writer] = new $class($this);
138 138
         }
139 139
 
140
-        $hashTablesArray = array( 'stylesConditionalHashTable',    'fillHashTable',        'fontHashTable',
141
-                                  'bordersHashTable',                'numFmtHashTable',        'drawingHashTable',
140
+        $hashTablesArray = array('stylesConditionalHashTable', 'fillHashTable', 'fontHashTable',
141
+                                  'bordersHashTable', 'numFmtHashTable', 'drawingHashTable',
142 142
                                   'styleHashTable'
143 143
                                 );
144 144
 
145 145
         // Set HashTable variables
146 146
         foreach ($hashTablesArray as $tableName) {
147
-            $this->$tableName     = new \PhpSpreadsheet\HashTable();
147
+            $this->$tableName = new \PhpSpreadsheet\HashTable();
148 148
         }
149 149
     }
150 150
 
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 
233 233
             //if hasMacros, add the vbaProject.bin file, Certificate file(if exists)
234 234
             if ($this->spreadSheet->hasMacros()) {
235
-                $macrosCode=$this->spreadSheet->getMacrosCode();
235
+                $macrosCode = $this->spreadSheet->getMacrosCode();
236 236
                 if (!is_null($macrosCode)) {// we have the code ?
237
-                    $objZip->addFromString('xl/vbaProject.bin', $macrosCode);//allways in 'xl', allways named vbaProject.bin
237
+                    $objZip->addFromString('xl/vbaProject.bin', $macrosCode); //allways in 'xl', allways named vbaProject.bin
238 238
                     if ($this->spreadSheet->hasMacrosCertificate()) {//signed macros ?
239 239
                         // Yes : add the certificate file and the related rels file
240 240
                         $objZip->addFromString('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate());
@@ -244,16 +244,16 @@  discard block
 block discarded – undo
244 244
             }
245 245
             //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels)
246 246
             if ($this->spreadSheet->hasRibbon()) {
247
-                $tmpRibbonTarget=$this->spreadSheet->getRibbonXMLData('target');
247
+                $tmpRibbonTarget = $this->spreadSheet->getRibbonXMLData('target');
248 248
                 $objZip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data'));
249 249
                 if ($this->spreadSheet->hasRibbonBinObjects()) {
250
-                    $tmpRootPath=dirname($tmpRibbonTarget).'/';
251
-                    $ribbonBinObjects=$this->spreadSheet->getRibbonBinObjects('data');//the files to write
250
+                    $tmpRootPath = dirname($tmpRibbonTarget) . '/';
251
+                    $ribbonBinObjects = $this->spreadSheet->getRibbonBinObjects('data'); //the files to write
252 252
                     foreach ($ribbonBinObjects as $aPath => $aContent) {
253
-                        $objZip->addFromString($tmpRootPath.$aPath, $aContent);
253
+                        $objZip->addFromString($tmpRootPath . $aPath, $aContent);
254 254
                     }
255 255
                     //the rels for files
256
-                    $objZip->addFromString($tmpRootPath.'_rels/'.basename($tmpRibbonTarget).'.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet));
256
+                    $objZip->addFromString($tmpRootPath . '_rels/' . basename($tmpRibbonTarget) . '.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet));
257 257
                 }
258 258
             }
259 259
 
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   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         // It needs to call its parent's constructor explicitly
199 199
         parent::__construct();
200 200
 
201
-        $this->parser        = $parser;
201
+        $this->parser = $parser;
202 202
         $this->biffSize     = 0;
203 203
         $this->palette      = array();
204 204
         $this->countryCode = -1;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         $this->stringTotal      = &$str_total;
207 207
         $this->stringUnique     = &$str_unique;
208 208
         $this->stringTable      = &$str_table;
209
-        $this->colors        = &$colors;
209
+        $this->colors = &$colors;
210 210
         $this->setPaletteXl97();
211 211
 
212 212
         $this->spreadsheet = $spreadsheet;
@@ -220,11 +220,11 @@  discard block
 block discarded – undo
220 220
         for ($i = 0; $i < $countSheets; ++$i) {
221 221
             $phpSheet = $spreadsheet->getSheet($i);
222 222
 
223
-            $this->parser->setExtSheet($phpSheet->getTitle(), $i);  // Register worksheet name with parser
223
+            $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser
224 224
 
225 225
             $supbook_index = 0x00;
226 226
             $ref = pack('vvv', $supbook_index, $i, $i);
227
-            $this->parser->references[] = $ref;  // Register reference with parser
227
+            $this->parser->references[] = $ref; // Register reference with parser
228 228
 
229 229
             // Sheet tab colors?
230 230
             if ($phpSheet->isTabColorSet()) {
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
      */
471 471
     private function calcSheetOffsets()
472 472
     {
473
-        $boundsheet_length = 10;  // fixed length for a BOUNDSHEET record
473
+        $boundsheet_length = 10; // fixed length for a BOUNDSHEET record
474 474
 
475 475
         // size of Workbook globals part 1 + 3
476 476
         $offset            = $this->_datasize;
@@ -834,9 +834,9 @@  discard block
 block discarded – undo
834 834
         $record = 0x0018;
835 835
 
836 836
         // option flags
837
-        $options = ($isHidden  ? 0x21 : 0x00);
837
+        $options = ($isHidden ? 0x21 : 0x00);
838 838
 
839
-        $extra  = pack(
839
+        $extra = pack(
840 840
             'Cvvvvv',
841 841
             0x3B,
842 842
             $sheetIndex - 1,
@@ -864,9 +864,9 @@  discard block
 block discarded – undo
864 864
      */
865 865
     private function writeCodepage()
866 866
     {
867
-        $record = 0x0042;             // Record identifier
868
-        $length = 0x0002;             // Number of bytes to follow
869
-        $cv  = $this->codepage;   // The code page
867
+        $record = 0x0042; // Record identifier
868
+        $length = 0x0002; // Number of bytes to follow
869
+        $cv = $this->codepage; // The code page
870 870
 
871 871
         $header = pack('vv', $record, $length);
872 872
         $data   = pack('v', $cv);
@@ -879,24 +879,24 @@  discard block
 block discarded – undo
879 879
      */
880 880
     private function writeWindow1()
881 881
     {
882
-        $record = 0x003D;   // Record identifier
883
-        $length = 0x0012;   // Number of bytes to follow
882
+        $record = 0x003D; // Record identifier
883
+        $length = 0x0012; // Number of bytes to follow
884 884
 
885
-        $xWn  = 0x0000;     // Horizontal position of window
886
-        $yWn  = 0x0000;     // Vertical position of window
887
-        $dxWn = 0x25BC;     // Width of window
888
-        $dyWn = 0x1572;     // Height of window
885
+        $xWn  = 0x0000; // Horizontal position of window
886
+        $yWn  = 0x0000; // Vertical position of window
887
+        $dxWn = 0x25BC; // Width of window
888
+        $dyWn = 0x1572; // Height of window
889 889
 
890
-        $grbit = 0x0038;    // Option flags
890
+        $grbit = 0x0038; // Option flags
891 891
 
892 892
         // not supported by PhpSpreadsheet, so there is only one selected sheet, the active
893
-        $ctabsel = 1;       // Number of workbook tabs selected
893
+        $ctabsel = 1; // Number of workbook tabs selected
894 894
 
895
-        $wTabRatio = 0x0258;    // Tab to scrollbar ratio
895
+        $wTabRatio = 0x0258; // Tab to scrollbar ratio
896 896
 
897 897
         // not supported by PhpSpreadsheet, set to 0
898
-        $itabFirst = 0;     // 1st displayed worksheet
899
-        $itabCur   = $this->spreadsheet->getActiveSheetIndex();    // Active worksheet
898
+        $itabFirst = 0; // 1st displayed worksheet
899
+        $itabCur   = $this->spreadsheet->getActiveSheetIndex(); // Active worksheet
900 900
 
901 901
         $header = pack("vv", $record, $length);
902 902
         $data   = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio);
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
     private function writeBoundSheet($sheet, $offset)
913 913
     {
914 914
         $sheetname = $sheet->getTitle();
915
-        $record    = 0x0085;                    // Record identifier
915
+        $record    = 0x0085; // Record identifier
916 916
 
917 917
         // sheet state
918 918
         switch ($sheet->getSheetState()) {
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
         // sheet type
934 934
         $st = 0x00;
935 935
 
936
-        $grbit = 0x0000;                    // Visibility and sheet type
936
+        $grbit = 0x0000; // Visibility and sheet type
937 937
 
938 938
         $data = pack("VCC", $offset, $ss, $st);
939 939
         $data .= \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($sheetname);
@@ -948,8 +948,8 @@  discard block
 block discarded – undo
948 948
      */
949 949
     private function writeSupbookInternal()
950 950
     {
951
-        $record    = 0x01AE;   // Record identifier
952
-        $length    = 0x0004;   // Bytes to follow
951
+        $record    = 0x01AE; // Record identifier
952
+        $length    = 0x0004; // Bytes to follow
953 953
 
954 954
         $header    = pack("vv", $record, $length);
955 955
         $data      = pack("vv", $this->spreadsheet->getSheetCount(), 0x0401);
@@ -964,10 +964,10 @@  discard block
 block discarded – undo
964 964
     private function writeExternalsheetBiff8()
965 965
     {
966 966
         $totalReferences = count($this->parser->references);
967
-        $record = 0x0017;                     // Record identifier
968
-        $length = 2 + 6 * $totalReferences;  // Number of bytes to follow
967
+        $record = 0x0017; // Record identifier
968
+        $length = 2 + 6 * $totalReferences; // Number of bytes to follow
969 969
 
970
-        $supbook_index = 0;           // FIXME: only using internal SUPBOOK record
970
+        $supbook_index = 0; // FIXME: only using internal SUPBOOK record
971 971
         $header = pack("vv", $record, $length);
972 972
         $data   = pack('v', $totalReferences);
973 973
         for ($i = 0; $i < $totalReferences; ++$i) {
@@ -981,12 +981,12 @@  discard block
 block discarded – undo
981 981
      */
982 982
     private function writeStyle()
983 983
     {
984
-        $record = 0x0293;   // Record identifier
985
-        $length = 0x0004;   // Bytes to follow
984
+        $record = 0x0293; // Record identifier
985
+        $length = 0x0004; // Bytes to follow
986 986
 
987
-        $ixfe    = 0x8000;  // Index to cell style XF
988
-        $BuiltIn = 0x00;     // Built-in style
989
-        $iLevel  = 0xff;     // Outline style level
987
+        $ixfe    = 0x8000; // Index to cell style XF
988
+        $BuiltIn = 0x00; // Built-in style
989
+        $iLevel  = 0xff; // Outline style level
990 990
 
991 991
         $header = pack("vv", $record, $length);
992 992
         $data   = pack("vCC", $ixfe, $BuiltIn, $iLevel);
@@ -1001,14 +1001,14 @@  discard block
 block discarded – undo
1001 1001
      */
1002 1002
     private function writeNumberFormat($format, $ifmt)
1003 1003
     {
1004
-        $record = 0x041E;    // Record identifier
1004
+        $record = 0x041E; // Record identifier
1005 1005
 
1006 1006
         $numberFormatString = \PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong($format);
1007
-        $length = 2 + strlen($numberFormatString);    // Number of bytes to follow
1007
+        $length = 2 + strlen($numberFormatString); // Number of bytes to follow
1008 1008
 
1009 1009
 
1010 1010
         $header = pack("vv", $record, $length);
1011
-        $data   = pack("v", $ifmt) .  $numberFormatString;
1011
+        $data   = pack("v", $ifmt) . $numberFormatString;
1012 1012
         $this->append($header . $data);
1013 1013
     }
1014 1014
 
@@ -1017,12 +1017,12 @@  discard block
 block discarded – undo
1017 1017
      */
1018 1018
     private function writeDateMode()
1019 1019
     {
1020
-        $record = 0x0022;   // Record identifier
1021
-        $length = 0x0002;   // Bytes to follow
1020
+        $record = 0x0022; // Record identifier
1021
+        $length = 0x0002; // Bytes to follow
1022 1022
 
1023 1023
         $f1904  = (\PhpSpreadsheet\Shared\Date::getExcelCalendar() == \PhpSpreadsheet\Shared\Date::CALENDAR_MAC_1904)
1024 1024
             ? 1
1025
-            : 0;   // Flag for 1904 date system
1025
+            : 0; // Flag for 1904 date system
1026 1026
 
1027 1027
         $header = pack("vv", $record, $length);
1028 1028
         $data   = pack("v", $f1904);
@@ -1043,8 +1043,8 @@  discard block
 block discarded – undo
1043 1043
      */
1044 1044
     private function writeExternalCount($cxals)
1045 1045
     {
1046
-        $record = 0x0016;   // Record identifier
1047
-        $length = 0x0002;   // Number of bytes to follow
1046
+        $record = 0x0016; // Record identifier
1047
+        $length = 0x0002; // Number of bytes to follow
1048 1048
 
1049 1049
         $header = pack("vv", $record, $length);
1050 1050
         $data   = pack("v", $cxals);
@@ -1062,11 +1062,11 @@  discard block
 block discarded – undo
1062 1062
      */
1063 1063
     private function writeExternalSheet($sheetname)
1064 1064
     {
1065
-        $record = 0x0017;                     // Record identifier
1066
-        $length = 0x02 + strlen($sheetname);  // Number of bytes to follow
1065
+        $record = 0x0017; // Record identifier
1066
+        $length = 0x02 + strlen($sheetname); // Number of bytes to follow
1067 1067
 
1068
-        $cch    = strlen($sheetname);         // Length of sheet name
1069
-        $rgch   = 0x03;                       // Filename encoding
1068
+        $cch    = strlen($sheetname); // Length of sheet name
1069
+        $rgch   = 0x03; // Filename encoding
1070 1070
 
1071 1071
         $header = pack("vv", $record, $length);
1072 1072
         $data   = pack("CC", $cch, $rgch);
@@ -1086,20 +1086,20 @@  discard block
 block discarded – undo
1086 1086
      */
1087 1087
     private function writeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1088 1088
     {
1089
-        $record = 0x0018;       // Record identifier
1090
-        $length = 0x0024;       // Number of bytes to follow
1091
-
1092
-        $grbit  = 0x0020;       // Option flags
1093
-        $chKey  = 0x00;         // Keyboard shortcut
1094
-        $cch    = 0x01;         // Length of text name
1095
-        $cce    = 0x0015;       // Length of text definition
1096
-        $ixals  = $index + 1;   // Sheet index
1097
-        $itab   = $ixals;       // Equal to ixals
1098
-        $cchCustMenu    = 0x00;         // Length of cust menu text
1099
-        $cchDescription = 0x00;         // Length of description text
1100
-        $cchHelptopic   = 0x00;         // Length of help topic text
1101
-        $cchStatustext  = 0x00;         // Length of status bar text
1102
-        $rgch           = $type;        // Built-in name type
1089
+        $record = 0x0018; // Record identifier
1090
+        $length = 0x0024; // Number of bytes to follow
1091
+
1092
+        $grbit  = 0x0020; // Option flags
1093
+        $chKey  = 0x00; // Keyboard shortcut
1094
+        $cch    = 0x01; // Length of text name
1095
+        $cce    = 0x0015; // Length of text definition
1096
+        $ixals  = $index + 1; // Sheet index
1097
+        $itab   = $ixals; // Equal to ixals
1098
+        $cchCustMenu    = 0x00; // Length of cust menu text
1099
+        $cchDescription = 0x00; // Length of description text
1100
+        $cchHelptopic   = 0x00; // Length of help topic text
1101
+        $cchStatustext  = 0x00; // Length of status bar text
1102
+        $rgch           = $type; // Built-in name type
1103 1103
 
1104 1104
         $unknown03 = 0x3b;
1105 1105
         $unknown04 = 0xffff - $index;
@@ -1150,24 +1150,24 @@  discard block
 block discarded – undo
1150 1150
      */
1151 1151
     private function writeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax)
1152 1152
     {
1153
-        $record          = 0x0018;       // Record identifier
1154
-        $length          = 0x003d;       // Number of bytes to follow
1155
-        $grbit           = 0x0020;       // Option flags
1156
-        $chKey           = 0x00;         // Keyboard shortcut
1157
-        $cch             = 0x01;         // Length of text name
1158
-        $cce             = 0x002e;       // Length of text definition
1159
-        $ixals           = $index + 1;   // Sheet index
1160
-        $itab            = $ixals;       // Equal to ixals
1161
-        $cchCustMenu     = 0x00;         // Length of cust menu text
1162
-        $cchDescription  = 0x00;         // Length of description text
1163
-        $cchHelptopic    = 0x00;         // Length of help topic text
1164
-        $cchStatustext   = 0x00;         // Length of status bar text
1165
-        $rgch            = $type;        // Built-in name type
1153
+        $record          = 0x0018; // Record identifier
1154
+        $length          = 0x003d; // Number of bytes to follow
1155
+        $grbit           = 0x0020; // Option flags
1156
+        $chKey           = 0x00; // Keyboard shortcut
1157
+        $cch             = 0x01; // Length of text name
1158
+        $cce             = 0x002e; // Length of text definition
1159
+        $ixals           = $index + 1; // Sheet index
1160
+        $itab            = $ixals; // Equal to ixals
1161
+        $cchCustMenu     = 0x00; // Length of cust menu text
1162
+        $cchDescription  = 0x00; // Length of description text
1163
+        $cchHelptopic    = 0x00; // Length of help topic text
1164
+        $cchStatustext   = 0x00; // Length of status bar text
1165
+        $rgch            = $type; // Built-in name type
1166 1166
 
1167 1167
         $unknown01       = 0x29;
1168 1168
         $unknown02       = 0x002b;
1169 1169
         $unknown03       = 0x3b;
1170
-        $unknown04       = 0xffff-$index;
1170
+        $unknown04       = 0xffff - $index;
1171 1171
         $unknown05       = 0x0000;
1172 1172
         $unknown06       = 0x0000;
1173 1173
         $unknown07       = 0x1087;
@@ -1225,8 +1225,8 @@  discard block
 block discarded – undo
1225 1225
      */
1226 1226
     private function writeCountry()
1227 1227
     {
1228
-        $record = 0x008C;    // Record identifier
1229
-        $length = 4;         // Number of bytes to follow
1228
+        $record = 0x008C; // Record identifier
1229
+        $length = 4; // Number of bytes to follow
1230 1230
 
1231 1231
         $header = pack('vv', $record, $length);
1232 1232
         /* using the same country code always for simplicity */
@@ -1242,8 +1242,8 @@  discard block
 block discarded – undo
1242 1242
      */
1243 1243
     private function writeRecalcId()
1244 1244
     {
1245
-        $record = 0x01C1;    // Record identifier
1246
-        $length = 8;         // Number of bytes to follow
1245
+        $record = 0x01C1; // Record identifier
1246
+        $length = 8; // Number of bytes to follow
1247 1247
 
1248 1248
         $header = pack('vv', $record, $length);
1249 1249
 
@@ -1260,10 +1260,10 @@  discard block
 block discarded – undo
1260 1260
     {
1261 1261
         $aref = $this->palette;
1262 1262
 
1263
-        $record = 0x0092;                // Record identifier
1264
-        $length = 2 + 4 * count($aref);  // Number of bytes to follow
1265
-        $ccv    = count($aref);          // Number of RGB values to follow
1266
-        $data = '';                      // The RGB data
1263
+        $record = 0x0092; // Record identifier
1264
+        $length = 2 + 4 * count($aref); // Number of bytes to follow
1265
+        $ccv    = count($aref); // Number of RGB values to follow
1266
+        $data = ''; // The RGB data
1267 1267
 
1268 1268
         // Pack the RGB data
1269 1269
         foreach ($aref as $color) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/HTML.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1439,7 +1439,7 @@
 block discarded – undo
1439 1439
     /**
1440 1440
      * Set embed images
1441 1441
      *
1442
-     * @param boolean $pValue
1442
+     * @param string|boolean $pValue
1443 1443
      * @return Spreadsheet_Writer_HTML
1444 1444
      */
1445 1445
     public function setEmbedImages($pValue = '.')
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 
439 439
             // calculate start of <tbody>, <thead>
440 440
             $tbodyStart = $rowMin;
441
-            $theadStart = $theadEnd   = 0; // default: no <thead>    no </thead>
441
+            $theadStart = $theadEnd = 0; // default: no <thead>    no </thead>
442 442
             if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) {
443 443
                 $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop();
444 444
 
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
             }
452 452
 
453 453
             // Loop through cells
454
-            $row = $rowMin-1;
454
+            $row = $rowMin - 1;
455 455
             while ($row++ < $rowMax) {
456 456
                 // <thead> ?
457 457
                 if ($row == $theadStart) {
@@ -589,9 +589,9 @@  discard block
 block discarded – undo
589 589
             $html .= '<tr>';
590 590
             for ($col = 'A'; $col != $colMax; ++$col) {
591 591
                 $html .= '<td>';
592
-                $html .= $this->writeImageInCell($pSheet, $col.$row);
592
+                $html .= $this->writeImageInCell($pSheet, $col . $row);
593 593
                 if ($this->includeCharts) {
594
-                    $html .= $this->writeChartInCell($pSheet, $col.$row);
594
+                    $html .= $this->writeChartInCell($pSheet, $col . $row);
595 595
                 }
596 596
                 $html .= '</td>';
597 597
             }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                             // base64 encode the binary data, then break it
649 649
                             // into chunks according to RFC 2045 semantics
650 650
                             $base64 = chunk_split(base64_encode($picture));
651
-                            $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64;
651
+                            $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64;
652 652
                         } else {
653 653
                             $imageData = $filename;
654 654
                         }
@@ -665,10 +665,10 @@  discard block
 block discarded – undo
665 665
                 if ($drawing->getCoordinates() != $coordinates) {
666 666
                     continue;
667 667
                 }
668
-                ob_start();                                //  Let's start output buffering.
669
-                imagepng($drawing->getImageResource());    //  This will normally output the image, but because of ob_start(), it won't.
670
-                $contents = ob_get_contents();             //  Instead, output above is saved to $contents
671
-                ob_end_clean();                            //  End the output buffer.
668
+                ob_start(); //  Let's start output buffering.
669
+                imagepng($drawing->getImageResource()); //  This will normally output the image, but because of ob_start(), it won't.
670
+                $contents = ob_get_contents(); //  Instead, output above is saved to $contents
671
+                ob_end_clean(); //  End the output buffer.
672 672
 
673 673
                 $dataUri = "data:image/jpeg;base64," . base64_encode($contents);
674 674
 
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
                 //  max-width: 100% ensures that image doesnt overflow containing cell
677 677
                 //  width: X sets width of supplied image.
678 678
                 //  As a result, images bigger than cell will be contained and images smaller will not get stretched
679
-                $html .= '<img src="'.$dataUri.'" style="max-width:100%;width:'.$drawing->getWidth().'px;" />';
679
+                $html .= '<img src="' . $dataUri . '" style="max-width:100%;width:' . $drawing->getWidth() . 'px;" />';
680 680
             }
681 681
         }
682 682
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
             if ($chart instanceof Spreadsheet_Chart) {
702 702
                 $chartCoordinates = $chart->getTopLeftPosition();
703 703
                 if ($chartCoordinates['cell'] == $coordinates) {
704
-                    $chartFileName = \Spreadsheet\Shared\File::sysGetTempDir().'/'.uniqid().'.png';
704
+                    $chartFileName = \Spreadsheet\Shared\File::sysGetTempDir() . '/' . uniqid() . '.png';
705 705
                     if (!$chart->render($chartFileName)) {
706 706
                         return;
707 707
                     }
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
                         // base64 encode the binary data, then break it
715 715
                         // into chunks according to RFC 2045 semantics
716 716
                         $base64 = chunk_split(base64_encode($picture));
717
-                        $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64;
717
+                        $imageData = 'data:' . $imageDetails['mime'] . ';base64,' . $base64;
718 718
 
719 719
                         $html .= '<div style="position: relative;">';
720 720
                         $html .= '<img style="position: absolute; z-index: 1; left: ' . $chartCoordinates['xOffset'] . 'px; top: ' . $chartCoordinates['yOffset'] . 'px; width: ' . $imageDetails[0] . 'px; height: ' . $imageDetails[1] . 'px;" src="' . $imageData . '" border="0" />' . PHP_EOL;
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 
810 810
 
811 811
         // table { }
812
-        $css['table']['border-collapse']  = 'collapse';
812
+        $css['table']['border-collapse'] = 'collapse';
813 813
         if (!$this->isPdf) {
814 814
             $css['table']['page-break-after'] = 'always';
815 815
         }
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
         if ($textAlign = $this->mapHAlign($pStyle->getHorizontal())) {
968 968
             $css['text-align'] = $textAlign;
969 969
             if (in_array($textAlign, array('left', 'right'))) {
970
-                $css['padding-'.$textAlign] = (string)((int)$pStyle->getIndent() * 9).'px';
970
+                $css['padding-' . $textAlign] = (string) ((int) $pStyle->getIndent() * 9) . 'px';
971 971
             }
972 972
         }
973 973
 
@@ -1258,9 +1258,9 @@  discard block
 block discarded – undo
1258 1258
                         }
1259 1259
                         $cellData = htmlspecialchars($cellData);
1260 1260
                         if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperScript()) {
1261
-                            $cellData = '<sup>'.$cellData.'</sup>';
1261
+                            $cellData = '<sup>' . $cellData . '</sup>';
1262 1262
                         } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubScript()) {
1263
-                            $cellData = '<sub>'.$cellData.'</sub>';
1263
+                            $cellData = '<sub>' . $cellData . '</sub>';
1264 1264
                         }
1265 1265
                     }
1266 1266
 
@@ -1370,7 +1370,7 @@  discard block
 block discarded – undo
1370 1370
                     $html .= $cellData;
1371 1371
 
1372 1372
                     // Column end
1373
-                    $html .= '</'.$cellType.'>' . PHP_EOL;
1373
+                    $html .= '</' . $cellType . '>' . PHP_EOL;
1374 1374
                 }
1375 1375
 
1376 1376
                 // Next column
@@ -1515,7 +1515,7 @@  discard block
 block discarded – undo
1515 1515
         foreach ($sheetIndexes as $sheetIndex) {
1516 1516
             $sheet = $this->spreadsheet->getSheet($sheetIndex);
1517 1517
 
1518
-            $candidateSpannedRow  = array();
1518
+            $candidateSpannedRow = array();
1519 1519
 
1520 1520
             // loop through all Excel merged cells
1521 1521
             foreach ($sheet->getMergeCells() as $cells) {
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
 
1578 1578
                         if (!in_array($baseCell, $adjustedBaseCells)) {
1579 1579
                             // subtract rowspan by 1
1580
-                            --$this->isBaseCell[$sheetIndex][ $baseCell[0] ][ $baseCell[1] ]['rowspan'];
1580
+                            --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan'];
1581 1581
                             $adjustedBaseCells[] = $baseCell;
1582 1582
                         }
1583 1583
                     }
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.