@@ -228,7 +228,7 @@ |
||
228 | 228 | /** |
229 | 229 | * Set Rotation |
230 | 230 | * |
231 | - * @param float $pValue |
|
231 | + * @param integer $pValue |
|
232 | 232 | * @return Fill |
233 | 233 | */ |
234 | 234 | public function setRotation($pValue = 0) |
@@ -268,7 +268,7 @@ |
||
268 | 268 | /** |
269 | 269 | * Set Size |
270 | 270 | * |
271 | - * @param float $pValue |
|
271 | + * @param integer $pValue |
|
272 | 272 | * @return Font |
273 | 273 | */ |
274 | 274 | public function setSize($pValue = 10) |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** |
69 | 69 | * Get ColumnIndex |
70 | 70 | * |
71 | - * @return string |
|
71 | + * @return integer |
|
72 | 72 | */ |
73 | 73 | public function getColumnIndex() |
74 | 74 | { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** |
102 | 102 | * Set Width |
103 | 103 | * |
104 | - * @param float $pValue |
|
104 | + * @param integer $pValue |
|
105 | 105 | * @return ColumnDimension |
106 | 106 | */ |
107 | 107 | public function setWidth($pValue = -1) |
@@ -101,7 +101,7 @@ |
||
101 | 101 | /** |
102 | 102 | * Set Row Height |
103 | 103 | * |
104 | - * @param float $pValue |
|
104 | + * @param integer $pValue |
|
105 | 105 | * @return RowDimension |
106 | 106 | */ |
107 | 107 | public function setRowHeight($pValue = -1) |
@@ -1442,7 +1442,7 @@ |
||
1442 | 1442 | /** |
1443 | 1443 | * Set embed images |
1444 | 1444 | * |
1445 | - * @param bool $pValue |
|
1445 | + * @param string|boolean $pValue |
|
1446 | 1446 | * @return Spreadsheet_Writer_HTML |
1447 | 1447 | */ |
1448 | 1448 | public function setEmbedImages($pValue = '.') |
@@ -668,10 +668,10 @@ discard block |
||
668 | 668 | if ($drawing->getCoordinates() != $coordinates) { |
669 | 669 | continue; |
670 | 670 | } |
671 | - ob_start(); // Let's start output buffering. |
|
672 | - imagepng($drawing->getImageResource()); // This will normally output the image, but because of ob_start(), it won't. |
|
673 | - $contents = ob_get_contents(); // Instead, output above is saved to $contents |
|
674 | - ob_end_clean(); // End the output buffer. |
|
671 | + ob_start(); // Let's start output buffering. |
|
672 | + imagepng($drawing->getImageResource()); // This will normally output the image, but because of ob_start(), it won't. |
|
673 | + $contents = ob_get_contents(); // Instead, output above is saved to $contents |
|
674 | + ob_end_clean(); // End the output buffer. |
|
675 | 675 | |
676 | 676 | $dataUri = 'data:image/jpeg;base64,' . base64_encode($contents); |
677 | 677 | |
@@ -1582,7 +1582,7 @@ discard block |
||
1582 | 1582 | |
1583 | 1583 | if (!in_array($baseCell, $adjustedBaseCells)) { |
1584 | 1584 | // subtract rowspan by 1 |
1585 | - --$this->isBaseCell[$sheetIndex][ $baseCell[0] ][ $baseCell[1] ]['rowspan']; |
|
1585 | + --$this->isBaseCell[$sheetIndex][$baseCell[0]][$baseCell[1]]['rowspan']; |
|
1586 | 1586 | $adjustedBaseCells[] = $baseCell; |
1587 | 1587 | } |
1588 | 1588 | } |
@@ -167,16 +167,16 @@ discard block |
||
167 | 167 | } |
168 | 168 | |
169 | 169 | // Flags to indicate if attributes have been set. |
170 | - $atr_num = ($this->numberFormatIndex != 0)?1:0; |
|
171 | - $atr_fnt = ($this->fontIndex != 0)?1:0; |
|
170 | + $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0; |
|
171 | + $atr_fnt = ($this->fontIndex != 0) ? 1 : 0; |
|
172 | 172 | $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; |
173 | 173 | $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || |
174 | 174 | self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || |
175 | 175 | self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || |
176 | - self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()))?1:0; |
|
176 | + self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0; |
|
177 | 177 | $atr_pat = (($this->foregroundColor != 0x40) || |
178 | 178 | ($this->backgroundColor != 0x41) || |
179 | - self::mapFillType($this->_style->getFill()->getFillType()))?1:0; |
|
179 | + self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0; |
|
180 | 180 | $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) |
181 | 181 | | self::mapHidden($this->_style->getProtection()->getHidden()); |
182 | 182 | |
@@ -197,13 +197,13 @@ discard block |
||
197 | 197 | $this->_diag_color = 0; |
198 | 198 | } |
199 | 199 | |
200 | - $record = 0x00E0; // Record identifier |
|
201 | - $length = 0x0014; // Number of bytes to follow |
|
200 | + $record = 0x00E0; // Record identifier |
|
201 | + $length = 0x0014; // Number of bytes to follow |
|
202 | 202 | |
203 | - $ifnt = $this->fontIndex; // Index to FONT record |
|
204 | - $ifmt = $this->numberFormatIndex; // Index to FORMAT record |
|
203 | + $ifnt = $this->fontIndex; // Index to FONT record |
|
204 | + $ifmt = $this->numberFormatIndex; // Index to FORMAT record |
|
205 | 205 | |
206 | - $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment |
|
206 | + $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment |
|
207 | 207 | $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; |
208 | 208 | $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; |
209 | 209 | $align |= $this->textJustLast << 7; |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | $used_attrib |= $atr_pat << 6; |
216 | 216 | $used_attrib |= $atr_prot << 7; |
217 | 217 | |
218 | - $icv = $this->foregroundColor; // fg and bg pattern colors |
|
218 | + $icv = $this->foregroundColor; // fg and bg pattern colors |
|
219 | 219 | $icv |= $this->backgroundColor << 7; |
220 | 220 | |
221 | - $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color |
|
221 | + $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color |
|
222 | 222 | $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; |
223 | 223 | $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; |
224 | 224 | $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $border1 |= $diag_tl_to_rb << 30; |
234 | 234 | $border1 |= $diag_tr_to_lb << 31; |
235 | 235 | |
236 | - $border2 = $this->topBorderColor; // Border color |
|
236 | + $border2 = $this->topBorderColor; // Border color |
|
237 | 237 | $border2 |= $this->bottomBorderColor << 7; |
238 | 238 | $border2 |= $this->_diag_color << 14; |
239 | 239 | $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | \PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, |
414 | 414 | \PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY125 => 0x11, |
415 | 415 | \PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY0625 => 0x12, |
416 | - \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 |
|
417 | - \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 |
|
416 | + \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 |
|
417 | + \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 |
|
418 | 418 | ]; |
419 | 419 | |
420 | 420 | /** |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | $teststr = pack('d', 1.2345); |
111 | 111 | $number = pack('C8', 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); |
112 | 112 | if ($number == $teststr) { |
113 | - $byte_order = 0; // Little Endian |
|
113 | + $byte_order = 0; // Little Endian |
|
114 | 114 | } elseif ($number == strrev($teststr)) { |
115 | - $byte_order = 1; // Big Endian |
|
115 | + $byte_order = 1; // Big Endian |
|
116 | 116 | } else { |
117 | 117 | // Give up. I'll fix this in a later version. |
118 | 118 | throw new \PhpSpreadsheet\Writer\Exception('Required floating point format not supported on this platform.'); |
@@ -162,16 +162,16 @@ discard block |
||
162 | 162 | */ |
163 | 163 | protected function storeBof($type) |
164 | 164 | { |
165 | - $record = 0x0809; // Record identifier (BIFF5-BIFF8) |
|
165 | + $record = 0x0809; // Record identifier (BIFF5-BIFF8) |
|
166 | 166 | $length = 0x0010; |
167 | 167 | |
168 | 168 | // by inspection of real files, MS Office Excel 2007 writes the following |
169 | 169 | $unknown = pack('VV', 0x000100D1, 0x00000406); |
170 | 170 | |
171 | - $build = 0x0DBB; // Excel 97 |
|
172 | - $year = 0x07CC; // Excel 97 |
|
171 | + $build = 0x0DBB; // Excel 97 |
|
172 | + $year = 0x07CC; // Excel 97 |
|
173 | 173 | |
174 | - $version = 0x0600; // BIFF8 |
|
174 | + $version = 0x0600; // BIFF8 |
|
175 | 175 | |
176 | 176 | $header = pack('vv', $record, $length); |
177 | 177 | $data = pack('vvvv', $version, $type, $build, $year); |
@@ -183,8 +183,8 @@ discard block |
||
183 | 183 | */ |
184 | 184 | protected function storeEof() |
185 | 185 | { |
186 | - $record = 0x000A; // Record identifier |
|
187 | - $length = 0x0000; // Number of bytes to follow |
|
186 | + $record = 0x000A; // Record identifier |
|
187 | + $length = 0x0000; // Number of bytes to follow |
|
188 | 188 | |
189 | 189 | $header = pack('vv', $record, $length); |
190 | 190 | $this->append($header); |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | */ |
196 | 196 | public function writeEof() |
197 | 197 | { |
198 | - $record = 0x000A; // Record identifier |
|
199 | - $length = 0x0000; // Number of bytes to follow |
|
198 | + $record = 0x000A; // Record identifier |
|
199 | + $length = 0x0000; // Number of bytes to follow |
|
200 | 200 | $header = pack('vv', $record, $length); |
201 | 201 | |
202 | 202 | return $this->writeData($header); |
@@ -216,13 +216,13 @@ discard block |
||
216 | 216 | private function addContinue($data) |
217 | 217 | { |
218 | 218 | $limit = $this->limit; |
219 | - $record = 0x003C; // Record identifier |
|
219 | + $record = 0x003C; // Record identifier |
|
220 | 220 | |
221 | 221 | // The first 2080/8224 bytes remain intact. However, we have to change |
222 | 222 | // the length field of the record. |
223 | 223 | $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit); |
224 | 224 | |
225 | - $header = pack('vv', $record, $limit); // Headers for continue records |
|
225 | + $header = pack('vv', $record, $limit); // Headers for continue records |
|
226 | 226 | |
227 | 227 | // Retrieve chunks of 2080/8224 bytes +4 for the header. |
228 | 228 | $data_length = strlen($data); |
@@ -157,7 +157,7 @@ |
||
157 | 157 | // we need to write "Extension" but not already write for media content |
158 | 158 | $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes)); |
159 | 159 | foreach ($tabRibbonTypes as $aRibbonType) { |
160 | - $mimeType = 'image/.' . $aRibbonType;//we wrote $mimeType like customUI Editor |
|
160 | + $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor |
|
161 | 161 | $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType); |
162 | 162 | } |
163 | 163 | } |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | /** @var \PhpSpreadsheet\Style $style */ |
622 | 622 | foreach ($aStyles as $style) { |
623 | 623 | if (!array_key_exists($style->getFill()->getHashCode(), $aFills)) { |
624 | - $aFills[ $style->getFill()->getHashCode() ] = $style->getFill(); |
|
624 | + $aFills[$style->getFill()->getHashCode()] = $style->getFill(); |
|
625 | 625 | } |
626 | 626 | } |
627 | 627 | |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | /** @var \PhpSpreadsheet\Style $style */ |
645 | 645 | foreach ($aStyles as $style) { |
646 | 646 | if (!array_key_exists($style->getFont()->getHashCode(), $aFonts)) { |
647 | - $aFonts[ $style->getFont()->getHashCode() ] = $style->getFont(); |
|
647 | + $aFonts[$style->getFont()->getHashCode()] = $style->getFont(); |
|
648 | 648 | } |
649 | 649 | } |
650 | 650 | |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | /** @var \PhpSpreadsheet\Style $style */ |
668 | 668 | foreach ($aStyles as $style) { |
669 | 669 | if (!array_key_exists($style->getBorders()->getHashCode(), $aBorders)) { |
670 | - $aBorders[ $style->getBorders()->getHashCode() ] = $style->getBorders(); |
|
670 | + $aBorders[$style->getBorders()->getHashCode()] = $style->getBorders(); |
|
671 | 671 | } |
672 | 672 | } |
673 | 673 | |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | /** @var \PhpSpreadsheet\Style $style */ |
691 | 691 | foreach ($aStyles as $style) { |
692 | 692 | if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !array_key_exists($style->getNumberFormat()->getHashCode(), $aNumFmts)) { |
693 | - $aNumFmts[ $style->getNumberFormat()->getHashCode() ] = $style->getNumberFormat(); |
|
693 | + $aNumFmts[$style->getNumberFormat()->getHashCode()] = $style->getNumberFormat(); |
|
694 | 694 | } |
695 | 695 | } |
696 | 696 |