Completed
Push — develop ( a23f68...3723bb )
by Adrien
19:36
created
src/PhpSpreadsheet/Shared/Font.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
      * Calculate an (approximate) OpenXML column width, based on font size and text contained
236 236
      *
237 237
      * @param     \PhpOffice\PhpSpreadsheet\Style\Font            $font            Font object
238
-     * @param     \PhpOffice\PhpSpreadsheet\RichText|string    $cellText        Text to calculate width
238
+     * @param     string    $cellText        Text to calculate width
239 239
      * @param     int                        $rotation        Rotation angle
240 240
      * @param     \PhpOffice\PhpSpreadsheet\Style\Font|null    $defaultFont    Font object
241 241
      * @return     int        Column width
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -164,21 +164,21 @@
 block discarded – undo
164 164
         $ret = str_pad($this->Name, 64, "\x00");
165 165
 
166 166
         $ret .= pack('v', strlen($this->Name) + 2)  // 66
167
-              . pack('c', $this->Type)              // 67
168
-              . pack('c', 0x00) //UK                // 68
169
-              . pack('V', $this->PrevPps) //Prev    // 72
170
-              . pack('V', $this->NextPps) //Next    // 76
171
-              . pack('V', $this->DirPps)  //Dir     // 80
172
-              . "\x00\x09\x02\x00"                  // 84
173
-              . "\x00\x00\x00\x00"                  // 88
174
-              . "\xc0\x00\x00\x00"                  // 92
175
-              . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
176
-              . "\x00\x00\x00\x00"                  // 100
177
-              . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
178
-              . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
179
-              . pack('V', isset($this->startBlock) ? $this->startBlock : 0)  // 120
180
-              . pack('V', $this->Size)               // 124
181
-              . pack('V', 0); // 128
167
+                . pack('c', $this->Type)              // 67
168
+                . pack('c', 0x00) //UK                // 68
169
+                . pack('V', $this->PrevPps) //Prev    // 72
170
+                . pack('V', $this->NextPps) //Next    // 76
171
+                . pack('V', $this->DirPps)  //Dir     // 80
172
+                . "\x00\x09\x02\x00"                  // 84
173
+                . "\x00\x00\x00\x00"                  // 88
174
+                . "\xc0\x00\x00\x00"                  // 92
175
+                . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
176
+                . "\x00\x00\x00\x00"                  // 100
177
+                . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
178
+                . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
179
+                . pack('V', isset($this->startBlock) ? $this->startBlock : 0)  // 120
180
+                . pack('V', $this->Size)               // 124
181
+                . pack('V', 0); // 128
182 182
         return $ret;
183 183
     }
184 184
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx.php 1 patch
Doc Comments   +12 added lines, -1 removed lines patch added patch discarded remove patch
@@ -281,6 +281,11 @@  discard block
 block discarded – undo
281 281
         return isset($c->v) ? (string) $c->v : null;
282 282
     }
283 283
 
284
+    /**
285
+     * @param string $r
286
+     * @param string $cellDataType
287
+     * @param string $castBaseType
288
+     */
284 289
     private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType)
285 290
     {
286 291
         $cellDataType = 'f';
@@ -335,7 +340,7 @@  discard block
 block discarded – undo
335 340
      *
336 341
      * @param     string         $pFilename
337 342
      * @throws    Exception
338
-     * @return    Spreadsheet
343
+     * @return    \PhpOffice\PhpSpreadsheet\Spreadsheet
339 344
      */
340 345
     public function load($pFilename)
341 346
     {
@@ -2005,6 +2010,9 @@  discard block
 block discarded – undo
2005 2010
         }
2006 2011
     }
2007 2012
 
2013
+    /**
2014
+     * @param \PhpOffice\PhpSpreadsheet\Style\Border $docBorder
2015
+     */
2008 2016
     private static function readBorder($docBorder, $eleBorder)
2009 2017
     {
2010 2018
         if (isset($eleBorder['style'])) {
@@ -2127,6 +2135,9 @@  discard block
 block discarded – undo
2127 2135
         return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add");
2128 2136
     }
2129 2137
 
2138
+    /**
2139
+     * @param string $style
2140
+     */
2130 2141
     private static function toCSSArray($style)
2131 2142
     {
2132 2143
         $style = str_replace(["\r", "\n"], '', $style);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx/Chart.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -204,6 +204,9 @@
 block discarded – undo
204 204
         return $chart;
205 205
     }
206 206
 
207
+    /**
208
+     * @param string $type
209
+     */
207 210
     private static function chartTitle($titleDetails, $namespacesChartMeta, $type)
208 211
     {
209 212
         $caption = [];
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xlsx.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,8 +140,8 @@
 block discarded – undo
140 140
         }
141 141
 
142 142
         $hashTablesArray = ['stylesConditionalHashTable', 'fillHashTable', 'fontHashTable',
143
-                                  'bordersHashTable', 'numFmtHashTable', 'drawingHashTable',
144
-                                  'styleHashTable',
143
+                                    'bordersHashTable', 'numFmtHashTable', 'drawingHashTable',
144
+                                    'styleHashTable',
145 145
                                 ];
146 146
 
147 147
         // Set HashTable variables
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5157,7 +5157,7 @@  discard block
 block discarded – undo
5157 5157
      * is in one piece.
5158 5158
      * Moves to next current position in data stream to start of next record different from a CONtINUE record
5159 5159
      *
5160
-     * @return array
5160
+     * @return integer|null
5161 5161
      */
5162 5162
     private function getSplicedRecordData()
5163 5163
     {
@@ -5421,7 +5421,7 @@  discard block
 block discarded – undo
5421 5421
      * @param string $formulaData Formula data
5422 5422
      * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas
5423 5423
      * @throws Exception
5424
-     * @return array
5424
+     * @return string
5425 5425
      */
5426 5426
     private function getNextToken($formulaData, $baseCell = 'A1')
5427 5427
     {
@@ -6989,7 +6989,7 @@  discard block
 block discarded – undo
6989 6989
      * section 2.5.15
6990 6990
      *
6991 6991
      * @param string $subData
6992
-     * @return array
6992
+     * @return string
6993 6993
      */
6994 6994
     private function readBIFF8CellRangeAddressList($subData)
6995 6995
     {
@@ -7100,7 +7100,7 @@  discard block
 block discarded – undo
7100 7100
      * section 2.5.8
7101 7101
      *
7102 7102
      * @param string $arrayData
7103
-     * @return array
7103
+     * @return string
7104 7104
      */
7105 7105
     private static function readBIFF8ConstantArray($arrayData)
7106 7106
     {
@@ -7138,7 +7138,7 @@  discard block
 block discarded – undo
7138 7138
      * returns e.g. array('value' => '5', 'size' => 9)
7139 7139
      *
7140 7140
      * @param string $valueData
7141
-     * @return array
7141
+     * @return string
7142 7142
      */
7143 7143
     private static function readBIFF8Constant($valueData)
7144 7144
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls/MD5.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -190,6 +190,11 @@
 block discarded – undo
190 190
         return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z)
191 191
     }
192 192
 
193
+    /**
194
+     * @param string[] $func
195
+     * @param integer $s
196
+     * @param integer $t
197
+     */
193 198
     private static function step($func, &$A, $B, $C, $D, $M, $s, $t)
194 199
     {
195 200
         $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls/Worksheet.php 2 patches
Doc Comments   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -199,10 +199,12 @@  discard block
 block discarded – undo
199 199
      * @param int        &$str_unique    Total number of unique strings
200 200
      * @param array        &$str_table        String Table
201 201
      * @param array        &$colors        Colour Table
202
-     * @param mixed        $parser            The formula parser created for the Workbook
202
+     * @param Parser        $parser            The formula parser created for the Workbook
203 203
      * @param bool    $preCalculateFormulas    Flag indicating whether formulas should be calculated or just written
204 204
      * @param string    $phpSheet        The worksheet to write
205 205
      * @param \PhpSpreadsheet\Worksheet $phpSheet
206
+     * @param integer $str_total
207
+     * @param integer $str_unique
206 208
      */
207 209
     public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, $parser, $preCalculateFormulas, $phpSheet)
208 210
     {
@@ -611,7 +613,7 @@  discard block
 block discarded – undo
611 613
      * @param int $row    Zero indexed row
612 614
      * @param int $col    Zero indexed column
613 615
      * @param float   $num    The number to write
614
-     * @param mixed   $xfIndex The optional XF format
616
+     * @param integer   $xfIndex The optional XF format
615 617
      * @return int
616 618
      */
617 619
     private function writeNumber($row, $col, $num, $xfIndex)
@@ -717,7 +719,7 @@  discard block
 block discarded – undo
717 719
      * @param int $row    Zero indexed row
718 720
      * @param int $col    Zero indexed column
719 721
      * @param string  $str    The string to write
720
-     * @param mixed   $xfIndex The XF format index for the cell
722
+     * @param integer   $xfIndex The XF format index for the cell
721 723
      * @return int
722 724
      */
723 725
     private function writeLabelSst($row, $col, $str, $xfIndex)
@@ -783,7 +785,7 @@  discard block
 block discarded – undo
783 785
      *
784 786
      * @param int $row    Zero indexed row
785 787
      * @param int $col    Zero indexed column
786
-     * @param mixed   $xfIndex The XF format index
788
+     * @param integer   $xfIndex The XF format index
787 789
      */
788 790
     public function writeBlank($row, $col, $xfIndex)
789 791
     {
@@ -830,7 +832,7 @@  discard block
 block discarded – undo
830 832
      * @param int $row     Zero indexed row
831 833
      * @param int $col     Zero indexed column
832 834
      * @param string  $formula The formula text string
833
-     * @param mixed   $xfIndex  The XF format index
835
+     * @param integer   $xfIndex  The XF format index
834 836
      * @param mixed   $calculatedValue  Calculated value
835 837
      * @return int
836 838
      */
@@ -2299,8 +2301,8 @@  discard block
 block discarded – undo
2299 2301
      * @param mixed   $bitmap  The bitmap filename or GD-image resource
2300 2302
      * @param int $x       The horizontal position (offset) of the image inside the cell.
2301 2303
      * @param int $y       The vertical position (offset) of the image inside the cell.
2302
-     * @param float   $scale_x The horizontal scale
2303
-     * @param float   $scale_y The vertical scale
2304
+     * @param integer   $scale_x The horizontal scale
2305
+     * @param integer   $scale_y The vertical scale
2304 2306
      */
2305 2307
     public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1)
2306 2308
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1147,14 +1147,14 @@
 block discarded – undo
1147 1147
 
1148 1148
         // Pack the main data stream
1149 1149
         $data = pack('vvvv', $row1, $row2, $col1, $col2) .
1150
-                          $unknown1 .
1151
-                          $link_type .
1152
-                          $unknown2 .
1153
-                          $up_count .
1154
-                          $dir_short_len .
1155
-                          $dir_short .
1156
-                          $unknown3 .
1157
-                          $stream_len; /*.
1150
+                            $unknown1 .
1151
+                            $link_type .
1152
+                            $unknown2 .
1153
+                            $up_count .
1154
+                            $dir_short_len .
1155
+                            $dir_short .
1156
+                            $unknown3 .
1157
+                            $stream_len; /*.
1158 1158
                           $dir_long_len .
1159 1159
                           $unknown4     .
1160 1160
                           $dir_long     .
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Xls/Font.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
         $bFamily = 0; // Font family
86 86
         $bCharSet = \PHPExcel\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set
87 87
 
88
-        $record = 0x31;        // Record identifier
89
-        $reserved = 0x00;    // Reserved
90
-        $grbit = 0x00;        // Font attributes
88
+        $record = 0x31; // Record identifier
89
+        $reserved = 0x00; // Reserved
90
+        $grbit = 0x00; // Font attributes
91 91
         if ($this->font->getItalic()) {
92 92
             $grbit |= 0x02;
93 93
         }
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
     private static function mapBold($bold)
135 135
     {
136 136
         if ($bold) {
137
-            return 0x2BC;  //  700 = Bold font weight
137
+            return 0x2BC; //  700 = Bold font weight
138 138
         }
139
-        return 0x190;      //  400 = Normal font weight
139
+        return 0x190; //  400 = Normal font weight
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.