Completed
Push — develop ( e1f81f...539a89 )
by Adrien
16:11
created
src/PhpSpreadsheet/Writer/Excel2007/ContentTypes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
         $aMediaContentTypes = array();
130 130
         $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count();
131 131
         for ($i = 0; $i < $mediaCount; ++$i) {
132
-            $extension     = '';
133
-            $mimeType     = '';
132
+            $extension = '';
133
+            $mimeType = '';
134 134
 
135 135
             if ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof \PhpSpreadsheet\Worksheet\Drawing) {
136 136
                 $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getExtension());
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
         if ($spreadsheet->hasRibbonBinObjects()) {
153 153
             // Some additional objects in the ribbon ?
154 154
             // we need to write "Extension" but not already write for media content
155
-            $tabRibbonTypes=array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes));
155
+            $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes));
156 156
             foreach ($tabRibbonTypes as $aRibbonType) {
157
-                $mimeType='image/.'.$aRibbonType;//we wrote $mimeType like customUI Editor
157
+                $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor
158 158
                 $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType);
159 159
             }
160 160
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007/Comments.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
         // XML header
46 46
         $objWriter->startDocument('1.0', 'UTF-8', 'yes');
47 47
 
48
-          // Comments cache
49
-          $comments    = $pWorksheet->getComments();
48
+            // Comments cache
49
+            $comments    = $pWorksheet->getComments();
50 50
 
51
-          // Authors cache
52
-          $authors    = array();
53
-          $authorId    = 0;
51
+            // Authors cache
52
+            $authors    = array();
53
+            $authorId    = 0;
54 54
         foreach ($comments as $comment) {
55 55
             if (!isset($authors[$comment->getAuthor()])) {
56 56
                 $authors[$comment->getAuthor()] = $authorId++;
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
         // XML header
126 126
         $objWriter->startDocument('1.0', 'UTF-8', 'yes');
127 127
 
128
-          // Comments cache
129
-          $comments    = $pWorksheet->getComments();
128
+            // Comments cache
129
+            $comments    = $pWorksheet->getComments();
130 130
 
131 131
         // xml
132 132
         $objWriter->startElement('xml');
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
      */
188 188
     private function writeVMLComment(\PhpSpreadsheet\Shared\XMLWriter $objWriter = null, $pCellReference = 'A1', \PhpSpreadsheet\Comment $pComment = null)
189 189
     {
190
-         // Metadata
191
-         list($column, $row) = \PhpSpreadsheet\Cell::coordinateFromString($pCellReference);
192
-         $column = \PhpSpreadsheet\Cell::columnIndexFromString($column);
193
-         $id = 1024 + $column + $row;
194
-         $id = substr($id, 0, 4);
190
+            // Metadata
191
+            list($column, $row) = \PhpSpreadsheet\Cell::coordinateFromString($pCellReference);
192
+            $column = \PhpSpreadsheet\Cell::columnIndexFromString($column);
193
+            $id = 1024 + $column + $row;
194
+            $id = substr($id, 0, 4);
195 195
 
196 196
         // v:shape
197 197
         $objWriter->startElement('v:shape');
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007/StringTable.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             // Create string lookup table
41 41
             $aStringTable = array();
42 42
             $cellCollection = null;
43
-            $aFlippedStringTable = null;    // For faster lookup
43
+            $aFlippedStringTable = null; // For faster lookup
44 44
 
45 45
             // Is an existing table given?
46 46
             if (($pExistingTable !== null) && is_array($pExistingTable)) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             foreach ($pStringTable as $textElement) {
106 106
                 $objWriter->startElement('si');
107 107
 
108
-                if (! $textElement instanceof \PhpSpreadsheet\RichText) {
108
+                if (!$textElement instanceof \PhpSpreadsheet\RichText) {
109 109
                     $textToWrite = \PhpSpreadsheet\Shared\StringHelper::controlCharacterPHP2OOXML($textElement);
110 110
                     $objWriter->startElement('t');
111 111
                     if ($textToWrite !== trim($textToWrite)) {
@@ -146,31 +146,31 @@  discard block
 block discarded – undo
146 146
         $elements = $pRichText->getRichTextElements();
147 147
         foreach ($elements as $element) {
148 148
             // r
149
-            $objWriter->startElement($prefix.'r');
149
+            $objWriter->startElement($prefix . 'r');
150 150
 
151 151
             // rPr
152 152
             if ($element instanceof \PhpSpreadsheet\RichText\Run) {
153 153
                 // rPr
154
-                $objWriter->startElement($prefix.'rPr');
154
+                $objWriter->startElement($prefix . 'rPr');
155 155
 
156 156
                 // rFont
157
-                $objWriter->startElement($prefix.'rFont');
157
+                $objWriter->startElement($prefix . 'rFont');
158 158
                 $objWriter->writeAttribute('val', $element->getFont()->getName());
159 159
                 $objWriter->endElement();
160 160
 
161 161
                 // Bold
162
-                $objWriter->startElement($prefix.'b');
162
+                $objWriter->startElement($prefix . 'b');
163 163
                 $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false'));
164 164
                 $objWriter->endElement();
165 165
 
166 166
                 // Italic
167
-                $objWriter->startElement($prefix.'i');
167
+                $objWriter->startElement($prefix . 'i');
168 168
                 $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false'));
169 169
                 $objWriter->endElement();
170 170
 
171 171
                 // Superscript / subscript
172 172
                 if ($element->getFont()->getSuperScript() || $element->getFont()->getSubScript()) {
173
-                    $objWriter->startElement($prefix.'vertAlign');
173
+                    $objWriter->startElement($prefix . 'vertAlign');
174 174
                     if ($element->getFont()->getSuperScript()) {
175 175
                         $objWriter->writeAttribute('val', 'superscript');
176 176
                     } elseif ($element->getFont()->getSubScript()) {
@@ -180,22 +180,22 @@  discard block
 block discarded – undo
180 180
                 }
181 181
 
182 182
                 // Strikethrough
183
-                $objWriter->startElement($prefix.'strike');
183
+                $objWriter->startElement($prefix . 'strike');
184 184
                 $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false'));
185 185
                 $objWriter->endElement();
186 186
 
187 187
                 // Color
188
-                $objWriter->startElement($prefix.'color');
188
+                $objWriter->startElement($prefix . 'color');
189 189
                 $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB());
190 190
                 $objWriter->endElement();
191 191
 
192 192
                 // Size
193
-                $objWriter->startElement($prefix.'sz');
193
+                $objWriter->startElement($prefix . 'sz');
194 194
                 $objWriter->writeAttribute('val', $element->getFont()->getSize());
195 195
                 $objWriter->endElement();
196 196
 
197 197
                 // Underline
198
-                $objWriter->startElement($prefix.'u');
198
+                $objWriter->startElement($prefix . 'u');
199 199
                 $objWriter->writeAttribute('val', $element->getFont()->getUnderline());
200 200
                 $objWriter->endElement();
201 201
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             }
204 204
 
205 205
             // t
206
-            $objWriter->startElement($prefix.'t');
206
+            $objWriter->startElement($prefix . 't');
207 207
             $objWriter->writeAttribute('xml:space', 'preserve');
208 208
             $objWriter->writeRawData(\PhpSpreadsheet\Shared\StringHelper::controlCharacterPHP2OOXML($element->getText()));
209 209
             $objWriter->endElement();
@@ -236,10 +236,10 @@  discard block
 block discarded – undo
236 236
         $elements = $pRichText->getRichTextElements();
237 237
         foreach ($elements as $element) {
238 238
             // r
239
-            $objWriter->startElement($prefix.'r');
239
+            $objWriter->startElement($prefix . 'r');
240 240
 
241 241
             // rPr
242
-            $objWriter->startElement($prefix.'rPr');
242
+            $objWriter->startElement($prefix . 'rPr');
243 243
 
244 244
             // Bold
245 245
             $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0));
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike'));
261 261
 
262 262
             // rFont
263
-            $objWriter->startElement($prefix.'latin');
263
+            $objWriter->startElement($prefix . 'latin');
264 264
                 $objWriter->writeAttribute('typeface', $element->getFont()->getName());
265 265
             $objWriter->endElement();
266 266
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $objWriter->endElement();
279 279
 
280 280
             // t
281
-            $objWriter->startElement($prefix.'t');
281
+            $objWriter->startElement($prefix . 't');
282 282
 //                    $objWriter->writeAttribute('xml:space', 'preserve');    //    Excel2010 accepts, Excel2007 complains
283 283
             $objWriter->writeRawData(\PhpSpreadsheet\Shared\StringHelper::controlCharacterPHP2OOXML($element->getText()));
284 284
             $objWriter->endElement();
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
         // Loop through stringtable and add flipped items to $returnValue
302 302
         foreach ($stringTable as $key => $value) {
303
-            if (! $value instanceof \PhpSpreadsheet\RichText) {
303
+            if (!$value instanceof \PhpSpreadsheet\RichText) {
304 304
                 $returnValue[$value] = $key;
305 305
             } elseif ($value instanceof \PhpSpreadsheet\RichText) {
306 306
                 $returnValue[$value->getHashCode()] = $key;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007/Drawing.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             // Loop through charts and write the chart position
70 70
             if ($chartCount > 0) {
71 71
                 for ($c = 0; $c < $chartCount; ++$c) {
72
-                    $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c+$i);
72
+                    $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c + $i);
73 73
                 }
74 74
             }
75 75
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 $objWriter->writeAttribute('macro', '');
115 115
                 $objWriter->startElement('xdr:nvGraphicFramePr');
116 116
                     $objWriter->startElement('xdr:cNvPr');
117
-                        $objWriter->writeAttribute('name', 'Chart '.$pRelationId);
117
+                        $objWriter->writeAttribute('name', 'Chart ' . $pRelationId);
118 118
                         $objWriter->writeAttribute('id', 1025 * $pRelationId);
119 119
                     $objWriter->endElement();
120 120
                     $objWriter->startElement('xdr:cNvGraphicFramePr');
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                         $objWriter->startElement('c:chart');
141 141
                             $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart');
142 142
                             $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
143
-                            $objWriter->writeAttribute('r:id', 'rId'.$pRelationId);
143
+                            $objWriter->writeAttribute('r:id', 'rId' . $pRelationId);
144 144
                         $objWriter->endElement();
145 145
                     $objWriter->endElement();
146 146
                 $objWriter->endElement();
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
             // xdr:oneCellAnchor
167 167
             $objWriter->startElement('xdr:oneCellAnchor');
168 168
             // Image location
169
-            $aCoordinates         = \PhpSpreadsheet\Cell::coordinateFromString($pDrawing->getCoordinates());
170
-            $aCoordinates[0]     = \PhpSpreadsheet\Cell::columnIndexFromString($aCoordinates[0]);
169
+            $aCoordinates = \PhpSpreadsheet\Cell::coordinateFromString($pDrawing->getCoordinates());
170
+            $aCoordinates[0] = \PhpSpreadsheet\Cell::columnIndexFromString($aCoordinates[0]);
171 171
 
172 172
             // xdr:from
173 173
             $objWriter->startElement('xdr:from');
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
     public function allDrawings(\PhpSpreadsheet\SpreadSheet $spreadsheet = null)
571 571
     {
572 572
         // Get an array of all drawings
573
-        $aDrawings    = array();
573
+        $aDrawings = array();
574 574
 
575 575
         // Loop through PhpSpreadsheet
576 576
         $sheetCount = $spreadsheet->getSheetCount();
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Chart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -668,7 +668,7 @@
 block discarded – undo
668 668
             set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath);
669 669
         }
670 670
 
671
-        $rendererName = '\\PhpSpreadsheet\\Chart\\Renderer\\'.$libraryName;
671
+        $rendererName = '\\PhpSpreadsheet\\Chart\\Renderer\\' . $libraryName;
672 672
         $renderer = new $rendererName($this);
673 673
 
674 674
         if ($outputDestination == 'php://output') {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/Excel5.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
         $y1 = $offsetY;
234 234
 
235 235
         // Initialise end cell to the same as the start cell
236
-        $col_end    = $col_start;  // Col containing lower right corner of object
237
-        $row_end    = $row_start;  // Row containing bottom right corner of object
236
+        $col_end    = $col_start; // Col containing lower right corner of object
237
+        $row_end    = $row_start; // Row containing bottom right corner of object
238 238
 
239 239
         // Zero the specified offset if greater than the cell dimensions
240 240
         if ($x1 >= self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start))) {
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
             $y1 = 0;
245 245
         }
246 246
 
247
-        $width      = $width  + $x1 -1;
248
-        $height     = $height + $y1 -1;
247
+        $width      = $width + $x1 - 1;
248
+        $height     = $height + $y1 - 1;
249 249
 
250 250
         // Subtract the underlying cell widths to find the end cell of the image
251 251
         while ($width >= self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end))) {
@@ -264,21 +264,21 @@  discard block
 block discarded – undo
264 264
         if (self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start)) == 0) {
265 265
             return;
266 266
         }
267
-        if (self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end))   == 0) {
267
+        if (self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end)) == 0) {
268 268
             return;
269 269
         }
270 270
         if (self::sizeRow($sheet, $row_start + 1) == 0) {
271 271
             return;
272 272
         }
273
-        if (self::sizeRow($sheet, $row_end + 1)   == 0) {
273
+        if (self::sizeRow($sheet, $row_end + 1) == 0) {
274 274
             return;
275 275
         }
276 276
 
277 277
         // Convert the pixel values to the percentage value expected by Excel
278
-        $x1 = $x1     / self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start))   * 1024;
279
-        $y1 = $y1     / self::sizeRow($sheet, $row_start + 1)   *  256;
280
-        $x2 = ($width + 1)  / self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end))     * 1024; // Distance to right side of object
281
-        $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1)     *  256; // Distance to bottom of object
278
+        $x1 = $x1 / self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start)) * 1024;
279
+        $y1 = $y1 / self::sizeRow($sheet, $row_start + 1) * 256;
280
+        $x2 = ($width + 1) / self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object
281
+        $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object
282 282
 
283 283
         $startCoordinates = \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start) . ($row_start + 1);
284 284
         $endCoordinates = \PhpSpreadsheet\Cell::stringFromColumnIndex($col_end) . ($row_end + 1);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS/Root.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-    * Method for saving the whole OLE container (including files).
54
-    * In fact, if called with an empty argument (or '-'), it saves to a
55
-    * temporary file and then outputs it's contents to stdout.
56
-    * If a resource pointer to a stream created by fopen() is passed
57
-    * it will be used, but you have to close such stream by yourself.
58
-    *
59
-    * @param string|resource $filename The name of the file or stream where to save the OLE container.
60
-    * @access public
61
-    * @return mixed true on success
62
-    * @throws \PhpSpreadsheet\Writer\Exception
63
-    */
53
+     * Method for saving the whole OLE container (including files).
54
+     * In fact, if called with an empty argument (or '-'), it saves to a
55
+     * temporary file and then outputs it's contents to stdout.
56
+     * If a resource pointer to a stream created by fopen() is passed
57
+     * it will be used, but you have to close such stream by yourself.
58
+     *
59
+     * @param string|resource $filename The name of the file or stream where to save the OLE container.
60
+     * @access public
61
+     * @return mixed true on success
62
+     * @throws \PhpSpreadsheet\Writer\Exception
63
+     */
64 64
     public function save($filename)
65 65
     {
66 66
         // Initial Setting for saving
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
     }
117 117
 
118 118
     /**
119
-    * Calculate some numbers
120
-    *
121
-    * @access public
122
-    * @param array $raList Reference to an array of PPS's
123
-    * @return array The array of numbers
124
-    */
119
+     * Calculate some numbers
120
+     *
121
+     * @access public
122
+     * @param array $raList Reference to an array of PPS's
123
+     * @return array The array of numbers
124
+     */
125 125
     public function _calcSize(&$raList)
126 126
     {
127 127
         // Calculate Basic Setting
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
     }
155 155
 
156 156
     /**
157
-    * Helper function for caculating a magic value for block sizes
158
-    *
159
-    * @access public
160
-    * @param integer $i2 The argument
161
-    * @see save()
162
-    * @return integer
163
-    */
157
+     * Helper function for caculating a magic value for block sizes
158
+     *
159
+     * @access public
160
+     * @param integer $i2 The argument
161
+     * @see save()
162
+     * @return integer
163
+     */
164 164
     private static function adjust2($i2)
165 165
     {
166 166
         $iWk = log($i2)/log(2);
@@ -168,13 +168,13 @@  discard block
 block discarded – undo
168 168
     }
169 169
 
170 170
     /**
171
-    * Save OLE header
172
-    *
173
-    * @access public
174
-    * @param integer $iSBDcnt
175
-    * @param integer $iBBcnt
176
-    * @param integer $iPPScnt
177
-    */
171
+     * Save OLE header
172
+     *
173
+     * @access public
174
+     * @param integer $iSBDcnt
175
+     * @param integer $iBBcnt
176
+     * @param integer $iPPScnt
177
+     */
178 178
     public function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt)
179 179
     {
180 180
         $FILE = $this->_FILEH_;
@@ -249,12 +249,12 @@  discard block
 block discarded – undo
249 249
     }
250 250
 
251 251
     /**
252
-    * Saving big data (PPS's with data bigger than \PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL)
253
-    *
254
-    * @access public
255
-    * @param integer $iStBlk
256
-    * @param array &$raList Reference to array of PPS's
257
-    */
252
+     * Saving big data (PPS's with data bigger than \PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL)
253
+     *
254
+     * @access public
255
+     * @param integer $iStBlk
256
+     * @param array &$raList Reference to array of PPS's
257
+     */
258 258
     public function _saveBigData($iStBlk, &$raList)
259 259
     {
260 260
         $FILE = $this->_FILEH_;
@@ -297,11 +297,11 @@  discard block
 block discarded – undo
297 297
     }
298 298
 
299 299
     /**
300
-    * get small data (PPS's with data smaller than \PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL)
301
-    *
302
-    * @access public
303
-    * @param array &$raList Reference to array of PPS's
304
-    */
300
+     * get small data (PPS's with data smaller than \PhpSpreadsheet\Shared\OLE::OLE_DATA_SIZE_SMALL)
301
+     *
302
+     * @access public
303
+     * @param array &$raList Reference to array of PPS's
304
+     */
305 305
     public function _makeSmallData(&$raList)
306 306
     {
307 307
         $sRes = '';
@@ -354,11 +354,11 @@  discard block
 block discarded – undo
354 354
     }
355 355
 
356 356
     /**
357
-    * Saves all the PPS's WKs
358
-    *
359
-    * @access public
360
-    * @param array $raList Reference to an array with all PPS's
361
-    */
357
+     * Saves all the PPS's WKs
358
+     *
359
+     * @access public
360
+     * @param array $raList Reference to an array with all PPS's
361
+     */
362 362
     public function _savePps(&$raList)
363 363
     {
364 364
         // Save each PPS WK
@@ -375,13 +375,13 @@  discard block
 block discarded – undo
375 375
     }
376 376
 
377 377
     /**
378
-    * Saving Big Block Depot
379
-    *
380
-    * @access public
381
-    * @param integer $iSbdSize
382
-    * @param integer $iBsize
383
-    * @param integer $iPpsCnt
384
-    */
378
+     * Saving Big Block Depot
379
+     *
380
+     * @access public
381
+     * @param integer $iSbdSize
382
+     * @param integer $iBsize
383
+     * @param integer $iPpsCnt
384
+     */
385 385
     public function _saveBbd($iSbdSize, $iBsize, $iPpsCnt)
386 386
     {
387 387
         $FILE = $this->_FILEH_;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE/PPS.php 1 patch
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -32,98 +32,98 @@  discard block
 block discarded – undo
32 32
 class PPS
33 33
 {
34 34
     /**
35
-    * The PPS index
36
-    * @var integer
37
-    */
35
+     * The PPS index
36
+     * @var integer
37
+     */
38 38
     public $No;
39 39
 
40 40
     /**
41
-    * The PPS name (in Unicode)
42
-    * @var string
43
-    */
41
+     * The PPS name (in Unicode)
42
+     * @var string
43
+     */
44 44
     public $Name;
45 45
 
46 46
     /**
47
-    * The PPS type. Dir, Root or File
48
-    * @var integer
49
-    */
47
+     * The PPS type. Dir, Root or File
48
+     * @var integer
49
+     */
50 50
     public $Type;
51 51
 
52 52
     /**
53
-    * The index of the previous PPS
54
-    * @var integer
55
-    */
53
+     * The index of the previous PPS
54
+     * @var integer
55
+     */
56 56
     public $PrevPps;
57 57
 
58 58
     /**
59
-    * The index of the next PPS
60
-    * @var integer
61
-    */
59
+     * The index of the next PPS
60
+     * @var integer
61
+     */
62 62
     public $NextPps;
63 63
 
64 64
     /**
65
-    * The index of it's first child if this is a Dir or Root PPS
66
-    * @var integer
67
-    */
65
+     * The index of it's first child if this is a Dir or Root PPS
66
+     * @var integer
67
+     */
68 68
     public $DirPps;
69 69
 
70 70
     /**
71
-    * A timestamp
72
-    * @var integer
73
-    */
71
+     * A timestamp
72
+     * @var integer
73
+     */
74 74
     public $Time1st;
75 75
 
76 76
     /**
77
-    * A timestamp
78
-    * @var integer
79
-    */
77
+     * A timestamp
78
+     * @var integer
79
+     */
80 80
     public $Time2nd;
81 81
 
82 82
     /**
83
-    * Starting block (small or big) for this PPS's data  inside the container
84
-    * @var integer
85
-    */
83
+     * Starting block (small or big) for this PPS's data  inside the container
84
+     * @var integer
85
+     */
86 86
     public $startBlock;
87 87
 
88 88
     /**
89
-    * The size of the PPS's data (in bytes)
90
-    * @var integer
91
-    */
89
+     * The size of the PPS's data (in bytes)
90
+     * @var integer
91
+     */
92 92
     public $Size;
93 93
 
94 94
     /**
95
-    * The PPS's data (only used if it's not using a temporary file)
96
-    * @var string
97
-    */
95
+     * The PPS's data (only used if it's not using a temporary file)
96
+     * @var string
97
+     */
98 98
     public $_data;
99 99
 
100 100
     /**
101
-    * Array of child PPS's (only used by Root and Dir PPS's)
102
-    * @var array
103
-    */
101
+     * Array of child PPS's (only used by Root and Dir PPS's)
102
+     * @var array
103
+     */
104 104
     public $children = array();
105 105
 
106 106
     /**
107
-    * Pointer to OLE container
108
-    * @var OLE
109
-    */
107
+     * Pointer to OLE container
108
+     * @var OLE
109
+     */
110 110
     public $ole;
111 111
 
112 112
     /**
113
-    * The constructor
114
-    *
115
-    * @access public
116
-    * @param integer $No   The PPS index
117
-    * @param string  $name The PPS name
118
-    * @param integer $type The PPS type. Dir, Root or File
119
-    * @param integer $prev The index of the previous PPS
120
-    * @param integer $next The index of the next PPS
121
-    * @param integer $dir  The index of it's first child if this is a Dir or Root PPS
122
-    * @param integer $time_1st A timestamp
123
-    * @param integer $time_2nd A timestamp
124
-    * @param string  $data  The (usually binary) source data of the PPS
125
-    * @param array   $children Array containing children PPS for this PPS
126
-    */
113
+     * The constructor
114
+     *
115
+     * @access public
116
+     * @param integer $No   The PPS index
117
+     * @param string  $name The PPS name
118
+     * @param integer $type The PPS type. Dir, Root or File
119
+     * @param integer $prev The index of the previous PPS
120
+     * @param integer $next The index of the next PPS
121
+     * @param integer $dir  The index of it's first child if this is a Dir or Root PPS
122
+     * @param integer $time_1st A timestamp
123
+     * @param integer $time_2nd A timestamp
124
+     * @param string  $data  The (usually binary) source data of the PPS
125
+     * @param array   $children Array containing children PPS for this PPS
126
+     */
127 127
     public function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
128 128
     {
129 129
         $this->No      = $No;
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
     /**
147
-    * Returns the amount of data saved for this PPS
148
-    *
149
-    * @access public
150
-    * @return integer The amount of data (in bytes)
151
-    */
147
+     * Returns the amount of data saved for this PPS
148
+     *
149
+     * @access public
150
+     * @return integer The amount of data (in bytes)
151
+     */
152 152
     public function getDataLen()
153 153
     {
154 154
         if (!isset($this->_data)) {
@@ -164,43 +164,43 @@  discard block
 block discarded – undo
164 164
     }
165 165
 
166 166
     /**
167
-    * Returns a string with the PPS's WK (What is a WK?)
168
-    *
169
-    * @access public
170
-    * @return string The binary string
171
-    */
167
+     * Returns a string with the PPS's WK (What is a WK?)
168
+     *
169
+     * @access public
170
+     * @return string The binary string
171
+     */
172 172
     public function _getPpsWk()
173 173
     {
174 174
         $ret = str_pad($this->Name, 64, "\x00");
175 175
 
176 176
         $ret .= pack("v", strlen($this->Name) + 2)  // 66
177
-              . pack("c", $this->Type)              // 67
178
-              . pack("c", 0x00) //UK                // 68
179
-              . pack("V", $this->PrevPps) //Prev    // 72
180
-              . pack("V", $this->NextPps) //Next    // 76
181
-              . pack("V", $this->DirPps)  //Dir     // 80
182
-              . "\x00\x09\x02\x00"                  // 84
183
-              . "\x00\x00\x00\x00"                  // 88
184
-              . "\xc0\x00\x00\x00"                  // 92
185
-              . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
186
-              . "\x00\x00\x00\x00"                  // 100
187
-              . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
188
-              . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
189
-              . pack("V", isset($this->startBlock) ? $this->startBlock : 0)  // 120
190
-              . pack("V", $this->Size)               // 124
191
-              . pack("V", 0);                        // 128
177
+                . pack("c", $this->Type)              // 67
178
+                . pack("c", 0x00) //UK                // 68
179
+                . pack("V", $this->PrevPps) //Prev    // 72
180
+                . pack("V", $this->NextPps) //Next    // 76
181
+                . pack("V", $this->DirPps)  //Dir     // 80
182
+                . "\x00\x09\x02\x00"                  // 84
183
+                . "\x00\x00\x00\x00"                  // 88
184
+                . "\xc0\x00\x00\x00"                  // 92
185
+                . "\x00\x00\x00\x46"                  // 96 // Seems to be ok only for Root
186
+                . "\x00\x00\x00\x00"                  // 100
187
+                . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st)          // 108
188
+                . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd)          // 116
189
+                . pack("V", isset($this->startBlock) ? $this->startBlock : 0)  // 120
190
+                . pack("V", $this->Size)               // 124
191
+                . pack("V", 0);                        // 128
192 192
         return $ret;
193 193
     }
194 194
 
195 195
     /**
196
-    * Updates index and pointers to previous, next and children PPS's for this
197
-    * PPS. I don't think it'll work with Dir PPS's.
198
-    *
199
-    * @access public
200
-    * @param array &$raList Reference to the array of PPS's for the whole OLE
201
-    *                          container
202
-    * @return integer          The index for this PPS
203
-    */
196
+     * Updates index and pointers to previous, next and children PPS's for this
197
+     * PPS. I don't think it'll work with Dir PPS's.
198
+     *
199
+     * @access public
200
+     * @param array &$raList Reference to the array of PPS's for the whole OLE
201
+     *                          container
202
+     * @return integer          The index for this PPS
203
+     */
204 204
     public static function _savePpsSetPnt(&$raList, $to_save, $depth = 0)
205 205
     {
206 206
         if (!is_array($to_save) || (empty($to_save))) {
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.