Completed
Push — develop ( 539a89...685e29 )
by Adrien
11:28
created
src/PhpSpreadsheet/CachedObjectStorage/CacheBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
         foreach ($this->getCellList() as $coord) {
197 197
             sscanf($coord, '%[A-Z]%d', $c, $r);
198 198
             $row[$r] = $r;
199
-            $col[$c] = strlen($c).$c;
199
+            $col[$c] = strlen($c) . $c;
200 200
         }
201 201
         if (!empty($row)) {
202 202
             // Determine highest column and row
Please login to merge, or discard this patch.
src/PhpSpreadsheet/CachedObjectStorage/SQLite.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         if ($this->currentCellIsDirty && !empty($this->currentObjectID)) {
55 55
             $this->currentObject->detach();
56 56
 
57
-            if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES('".$this->currentObjectID."','".sqlite_escape_string(serialize($this->currentObject))."')")) {
57
+            if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_" . $this->TableName . " VALUES('" . $this->currentObjectID . "','" . sqlite_escape_string(serialize($this->currentObject)) . "')")) {
58 58
                 throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
59 59
             }
60 60
             $this->currentCellIsDirty = false;
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         }
98 98
         $this->storeData();
99 99
 
100
-        $query = "SELECT value FROM kvp_".$this->TableName." WHERE id='".$pCoord."'";
100
+        $query = "SELECT value FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'";
101 101
         $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC);
102 102
         if ($cellResultSet === false) {
103 103
             throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         }
133 133
 
134 134
         //    Check if the requested entry exists in the cache
135
-        $query = "SELECT id FROM kvp_".$this->TableName." WHERE id='".$pCoord."'";
135
+        $query = "SELECT id FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'";
136 136
         $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC);
137 137
         if ($cellResultSet === false) {
138 138
             throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         //    Check if the requested entry exists in the cache
160
-        $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$pCoord."'";
160
+        $query = "DELETE FROM kvp_" . $this->TableName . " WHERE id='" . $pCoord . "'";
161 161
         if (!$this->DBHandle->queryExec($query)) {
162 162
             throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
163 163
         }
@@ -179,13 +179,13 @@  discard block
 block discarded – undo
179 179
             $this->currentObjectID = $toAddress;
180 180
         }
181 181
 
182
-        $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$toAddress."'";
182
+        $query = "DELETE FROM kvp_" . $this->TableName . " WHERE id='" . $toAddress . "'";
183 183
         $result = $this->DBHandle->exec($query);
184 184
         if ($result === false) {
185 185
             throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
186 186
         }
187 187
 
188
-        $query = "UPDATE kvp_".$this->TableName." SET id='".$toAddress."' WHERE id='".$fromAddress."'";
188
+        $query = "UPDATE kvp_" . $this->TableName . " SET id='" . $toAddress . "' WHERE id='" . $fromAddress . "'";
189 189
         $result = $this->DBHandle->exec($query);
190 190
         if ($result === false) {
191 191
             throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $this->storeData();
207 207
         }
208 208
 
209
-        $query = "SELECT id FROM kvp_".$this->TableName;
209
+        $query = "SELECT id FROM kvp_" . $this->TableName;
210 210
         $cellIdsResult = $this->DBHandle->unbufferedQuery($query, SQLITE_ASSOC);
211 211
         if ($cellIdsResult === false) {
212 212
             throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 
234 234
         //    Get a new id for the new table name
235 235
         $tableName = str_replace('.', '_', $this->getUniqueID());
236
-        if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
236
+        if (!$this->DBHandle->queryExec('CREATE TABLE kvp_' . $tableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)
237 237
             AS SELECT * FROM kvp_'.$this->TableName)
238 238
         ) {
239 239
             throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             if ($this->DBHandle === false) {
279 279
                 throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
280 280
             }
281
-            if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
281
+            if (!$this->DBHandle->queryExec('CREATE TABLE kvp_' . $this->TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
282 282
                 throw new \PHPExcel\Exception(sqlite_error_string($this->DBHandle->lastError()));
283 283
             }
284 284
         }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     public function __destruct()
291 291
     {
292 292
         if (!is_null($this->DBHandle)) {
293
-            $this->DBHandle->queryExec('DROP TABLE kvp_'.$this->TableName);
293
+            $this->DBHandle->queryExec('DROP TABLE kvp_' . $this->TableName);
294 294
         }
295 295
         $this->DBHandle = null;
296 296
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/CachedObjectStorage/SQLite3.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
             $this->storeData();
241 241
         }
242 242
 
243
-        $query = "SELECT id FROM kvp_".$this->TableName;
243
+        $query = "SELECT id FROM kvp_" . $this->TableName;
244 244
         $cellIdsResult = $this->DBHandle->query($query);
245 245
         if ($cellIdsResult === false) {
246 246
             throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
         //    Get a new id for the new table name
269 269
         $tableName = str_replace('.', '_', $this->getUniqueID());
270
-        if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
270
+        if (!$this->DBHandle->exec('CREATE TABLE kvp_' . $tableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)
271 271
             AS SELECT * FROM kvp_'.$this->TableName)
272 272
         ) {
273 273
             throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
@@ -312,15 +312,15 @@  discard block
 block discarded – undo
312 312
             if ($this->DBHandle === false) {
313 313
                 throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
314 314
             }
315
-            if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
315
+            if (!$this->DBHandle->exec('CREATE TABLE kvp_' . $this->TableName . ' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) {
316 316
                 throw new \PHPExcel\Exception($this->DBHandle->lastErrorMsg());
317 317
             }
318 318
         }
319 319
 
320
-        $this->selectQuery = $this->DBHandle->prepare("SELECT value FROM kvp_".$this->TableName." WHERE id = :id");
321
-        $this->insertQuery = $this->DBHandle->prepare("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES(:id,:data)");
322
-        $this->updateQuery = $this->DBHandle->prepare("UPDATE kvp_".$this->TableName." SET id=:toId WHERE id=:fromId");
323
-        $this->deleteQuery = $this->DBHandle->prepare("DELETE FROM kvp_".$this->TableName." WHERE id = :id");
320
+        $this->selectQuery = $this->DBHandle->prepare("SELECT value FROM kvp_" . $this->TableName . " WHERE id = :id");
321
+        $this->insertQuery = $this->DBHandle->prepare("INSERT OR REPLACE INTO kvp_" . $this->TableName . " VALUES(:id,:data)");
322
+        $this->updateQuery = $this->DBHandle->prepare("UPDATE kvp_" . $this->TableName . " SET id=:toId WHERE id=:fromId");
323
+        $this->deleteQuery = $this->DBHandle->prepare("DELETE FROM kvp_" . $this->TableName . " WHERE id = :id");
324 324
     }
325 325
 
326 326
     /**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     public function __destruct()
330 330
     {
331 331
         if (!is_null($this->DBHandle)) {
332
-            $this->DBHandle->exec('DROP TABLE kvp_'.$this->TableName);
332
+            $this->DBHandle->exec('DROP TABLE kvp_' . $this->TableName);
333 333
             $this->DBHandle->close();
334 334
         }
335 335
         $this->DBHandle = null;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
         }
427 427
         // Some of the printable ASCII characters are invalid:  * : / \ ? [ ] and  first and last characters cannot be a "'"
428 428
         if ((str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) ||
429
-            (Shared\StringHelper::substring($pValue, -1, 1)=='\'') ||
430
-            (Shared\StringHelper::substring($pValue, 0, 1)=='\'')) {
429
+            (Shared\StringHelper::substring($pValue, -1, 1) == '\'') ||
430
+            (Shared\StringHelper::substring($pValue, 0, 1) == '\'')) {
431 431
             throw new Exception('Invalid character found in sheet code name');
432 432
         }
433 433
 
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
     public function calculateWorksheetDimension()
688 688
     {
689 689
         // Return
690
-        return 'A1' . ':' .  $this->getHighestColumn() . $this->getHighestRow();
690
+        return 'A1' . ':' . $this->getHighestColumn() . $this->getHighestRow();
691 691
     }
692 692
 
693 693
     /**
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
     public function calculateWorksheetDataDimension()
699 699
     {
700 700
         // Return
701
-        return 'A1' . ':' .  $this->getHighestDataColumn() . $this->getHighestDataRow();
701
+        return 'A1' . ':' . $this->getHighestDataColumn() . $this->getHighestDataRow();
702 702
     }
703 703
 
704 704
     /**
@@ -1158,8 +1158,8 @@  discard block
 block discarded – undo
1158 1158
         }
1159 1159
 
1160 1160
         // Named range?
1161
-        if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1162
-            (preg_match('/^'.Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) {
1161
+        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
1162
+            (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) {
1163 1163
             $namedRange = NamedRange::resolveRange($pCoordinate, $this);
1164 1164
             if ($namedRange !== null) {
1165 1165
                 $pCoordinate = $namedRange->getRange();
@@ -1255,8 +1255,8 @@  discard block
 block discarded – undo
1255 1255
         }
1256 1256
 
1257 1257
         // Named range?
1258
-        if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
1259
-            (preg_match('/^'.Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) {
1258
+        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
1259
+            (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) {
1260 1260
             $namedRange = NamedRange::resolveRange($pCoordinate, $this);
1261 1261
             if ($namedRange !== null) {
1262 1262
                 $pCoordinate = $namedRange->getRange();
@@ -2360,7 +2360,7 @@  discard block
 block discarded – undo
2360 2360
         $pCoordinate = preg_replace('/^([0-9]+):([0-9]+)$/', 'A${1}:XFD${2}', $pCoordinate);
2361 2361
 
2362 2362
         if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) {
2363
-            list($first, ) = Cell::splitRange($pCoordinate);
2363
+            list($first,) = Cell::splitRange($pCoordinate);
2364 2364
             $this->activeCell = $first[0];
2365 2365
         } else {
2366 2366
             $this->activeCell = $pCoordinate;
@@ -2467,9 +2467,9 @@  discard block
 block discarded – undo
2467 2467
         $returnValue = array();
2468 2468
         //    Identify the range that we need to extract from the worksheet
2469 2469
         list($rangeStart, $rangeEnd) = Cell::rangeBoundaries($pRange);
2470
-        $minCol = Cell::stringFromColumnIndex($rangeStart[0] -1);
2470
+        $minCol = Cell::stringFromColumnIndex($rangeStart[0] - 1);
2471 2471
         $minRow = $rangeStart[1];
2472
-        $maxCol = Cell::stringFromColumnIndex($rangeEnd[0] -1);
2472
+        $maxCol = Cell::stringFromColumnIndex($rangeEnd[0] - 1);
2473 2473
         $maxRow = $rangeEnd[1];
2474 2474
 
2475 2475
         $maxCol++;
@@ -2483,9 +2483,9 @@  discard block
 block discarded – undo
2483 2483
                 $cRef = ($returnCellRef) ? $col : ++$c;
2484 2484
                 //    Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen
2485 2485
                 //        so we test and retrieve directly against cellCollection
2486
-                if ($this->cellCollection->isDataSet($col.$row)) {
2486
+                if ($this->cellCollection->isDataSet($col . $row)) {
2487 2487
                     // Cell exists
2488
-                    $cell = $this->cellCollection->getCacheData($col.$row);
2488
+                    $cell = $this->cellCollection->getCacheData($col . $row);
2489 2489
                     if ($cell->getValue() !== null) {
2490 2490
                         if ($cell->getValue() instanceof RichText) {
2491 2491
                             $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText();
@@ -2542,7 +2542,7 @@  discard block
 block discarded – undo
2542 2542
             return $pWorkSheet->rangeToArray($pCellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef);
2543 2543
         }
2544 2544
 
2545
-        throw new Exception('Named Range '.$pNamedRange.' does not exist.');
2545
+        throw new Exception('Named Range ' . $pNamedRange . ' does not exist.');
2546 2546
     }
2547 2547
 
2548 2548
 
@@ -2565,7 +2565,7 @@  discard block
 block discarded – undo
2565 2565
         $maxCol = $this->getHighestColumn();
2566 2566
         $maxRow = $this->getHighestRow();
2567 2567
         // Return
2568
-        return $this->rangeToArray('A1:'.$maxCol.$maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef);
2568
+        return $this->rangeToArray('A1:' . $maxCol . $maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef);
2569 2569
     }
2570 2570
 
2571 2571
     /**
@@ -2815,7 +2815,7 @@  discard block
 block discarded – undo
2815 2815
             if ($rangeBoundaries[1][1] > $maxRow) {
2816 2816
                 $rangeBoundaries[1][1] = $maxRow;
2817 2817
             }
2818
-            $rangeSet = $rangeBoundaries[0][0].$rangeBoundaries[0][1].':'.$rangeBoundaries[1][0].$rangeBoundaries[1][1];
2818
+            $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1];
2819 2819
         }
2820 2820
         unset($rangeSet);
2821 2821
         $stRange = implode(' ', $rangeBlocks);
@@ -2912,7 +2912,7 @@  discard block
 block discarded – undo
2912 2912
         if ($this->getCodeName() == $pValue) {
2913 2913
             return $this;
2914 2914
         }
2915
-        $pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same
2915
+        $pValue = str_replace(' ', '_', $pValue); //Excel does this automatically without flinching, we are doing the same
2916 2916
         // Syntax check
2917 2917
         // throw an exception if not valid
2918 2918
         self::checkSheetCodeName($pValue);
@@ -2941,13 +2941,13 @@  discard block
 block discarded – undo
2941 2941
                     }
2942 2942
                 }
2943 2943
 
2944
-                $pValue = $pValue . '_' . $i;// ok, we have a valid name
2944
+                $pValue = $pValue . '_' . $i; // ok, we have a valid name
2945 2945
                 //codeName is'nt used in formula : no need to call for an update
2946 2946
                 //return $this->setTitle($altTitle, $updateFormulaCellReferences);
2947 2947
             }
2948 2948
         }
2949 2949
 
2950
-        $this->codeName=$pValue;
2950
+        $this->codeName = $pValue;
2951 2951
         return $this;
2952 2952
     }
2953 2953
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel5/MD5.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
         $C = $this->c;
88 88
         $D = $this->d;
89 89
 
90
-        $F = ['self','f'];
91
-        $G = ['self','g'];
92
-        $H = ['self','h'];
93
-        $I = ['self','i'];
90
+        $F = ['self', 'f'];
91
+        $G = ['self', 'g'];
92
+        $H = ['self', 'h'];
93
+        $I = ['self', 'i'];
94 94
 
95 95
         /* ROUND 1 */
96 96
         self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
     private static function i($X, $Y, $Z)
189 189
     {
190
-        return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z)
190
+        return ($Y ^ ($X | (~ $Z))); // Y XOR (X OR NOT Z)
191 191
     }
192 192
 
193 193
     private static function step($func, &$A, $B, $C, $D, $M, $s, $t)
@@ -200,6 +200,6 @@  discard block
 block discarded – undo
200 200
     private static function rotate($decimal, $bits)
201 201
     {
202 202
         $binary = str_pad(decbin($decimal), 32, "0", STR_PAD_LEFT);
203
-        return bindec(substr($binary, $bits).substr($binary, 0, $bits));
203
+        return bindec(substr($binary, $bits) . substr($binary, 0, $bits));
204 204
     }
205 205
 }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/CSV.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $this->skipBOM();
191 191
         $this->checkSeparator();
192 192
 
193
-        $escapeEnclosures = array( "\\" . $this->enclosure, $this->enclosure . $this->enclosure );
193
+        $escapeEnclosures = array("\\" . $this->enclosure, $this->enclosure . $this->enclosure);
194 194
 
195 195
         $worksheetInfo = array();
196 196
         $worksheetInfo[0]['worksheetName'] = 'Worksheet';
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
         }
262 262
         $sheet = $objPHPExcel->setActiveSheetIndex($this->sheetIndex);
263 263
 
264
-        $escapeEnclosures = array( "\\" . $this->enclosure,
264
+        $escapeEnclosures = array("\\" . $this->enclosure,
265 265
                                    $this->enclosure . $this->enclosure
266 266
                                  );
267 267
 
268 268
         // Set our starting row based on whether we're in contiguous mode or not
269 269
         $currentRow = 1;
270 270
         if ($this->contiguous) {
271
-            $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow(): $this->contiguousRow;
271
+            $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow() : $this->contiguousRow;
272 272
         }
273 273
 
274 274
         // Loop through each line of the file in turn
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/BIFFwriter.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @var integer
87 87
      * @see addContinue()
88 88
      */
89
-    private $limit    = 8224;
89
+    private $limit = 8224;
90 90
 
91 91
     /**
92 92
      * Constructor
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
             $teststr = pack("d", 1.2345);
112 112
             $number  = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F);
113 113
             if ($number == $teststr) {
114
-                $byte_order = 0;    // Little Endian
114
+                $byte_order = 0; // Little Endian
115 115
             } elseif ($number == strrev($teststr)) {
116
-                $byte_order = 1;    // Big Endian
116
+                $byte_order = 1; // Big Endian
117 117
             } else {
118 118
                 // Give up. I'll fix this in a later version.
119 119
                 throw new \PHPExcel\Writer\Exception("Required floating point format not supported on this platform.");
@@ -165,16 +165,16 @@  discard block
 block discarded – undo
165 165
      */
166 166
     protected function storeBof($type)
167 167
     {
168
-        $record  = 0x0809;            // Record identifier    (BIFF5-BIFF8)
168
+        $record  = 0x0809; // Record identifier    (BIFF5-BIFF8)
169 169
         $length  = 0x0010;
170 170
 
171 171
         // by inspection of real files, MS Office Excel 2007 writes the following
172 172
         $unknown = pack("VV", 0x000100D1, 0x00000406);
173 173
 
174
-        $build   = 0x0DBB;            //    Excel 97
175
-        $year    = 0x07CC;            //    Excel 97
174
+        $build   = 0x0DBB; //    Excel 97
175
+        $year    = 0x07CC; //    Excel 97
176 176
 
177
-        $version = 0x0600;            //    BIFF8
177
+        $version = 0x0600; //    BIFF8
178 178
 
179 179
         $header  = pack("vv", $record, $length);
180 180
         $data    = pack("vvvv", $version, $type, $build, $year);
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
      */
189 189
     protected function storeEof()
190 190
     {
191
-        $record    = 0x000A;   // Record identifier
192
-        $length    = 0x0000;   // Number of bytes to follow
191
+        $record    = 0x000A; // Record identifier
192
+        $length    = 0x0000; // Number of bytes to follow
193 193
 
194 194
         $header    = pack("vv", $record, $length);
195 195
         $this->append($header);
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function writeEof()
204 204
     {
205
-        $record    = 0x000A;   // Record identifier
206
-        $length    = 0x0000;   // Number of bytes to follow
205
+        $record    = 0x000A; // Record identifier
206
+        $length    = 0x0000; // Number of bytes to follow
207 207
         $header    = pack("vv", $record, $length);
208 208
         return $this->writeData($header);
209 209
     }
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
     private function addContinue($data)
224 224
     {
225 225
         $limit  = $this->limit;
226
-        $record = 0x003C;         // Record identifier
226
+        $record = 0x003C; // Record identifier
227 227
 
228 228
         // The first 2080/8224 bytes remain intact. However, we have to change
229 229
         // the length field of the record.
230 230
         $tmp = substr($data, 0, 2) . pack("v", $limit) . substr($data, 4, $limit);
231 231
 
232
-        $header = pack("vv", $record, $limit);  // Headers for continue records
232
+        $header = pack("vv", $record, $limit); // Headers for continue records
233 233
 
234 234
         // Retrieve chunks of 2080/8224 bytes +4 for the header.
235 235
         $data_length = strlen($data);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/Escher.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 $innerData = '';
93 93
 
94 94
                 // write the dgg
95
-                $recVer            = 0x0;
95
+                $recVer = 0x0;
96 96
                 $recInstance    = 0x0000;
97 97
                 $recType        = 0xF006;
98 98
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
                 $length            = strlen($data);
207 207
 
208 208
                 $recVerInstance  = $recVer;
209
-                $recVerInstance |=    $recInstance << 4;
209
+                $recVerInstance |= $recInstance << 4;
210 210
 
211 211
                 $header = pack('vvV', $recVerInstance, $recType, $length);
212 212
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
                         $length            = strlen($innerData);
238 238
 
239 239
                         $recVerInstance  = $recVer;
240
-                        $recVerInstance |=    $recInstance << 4;
240
+                        $recVerInstance |= $recInstance << 4;
241 241
 
242 242
                         $header = pack('vvV', $recVerInstance, $recType, $length);
243 243
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                         $length            = strlen($innerData);
265 265
 
266 266
                         $recVerInstance  = $recVer;
267
-                        $recVerInstance |=    $recInstance << 4;
267
+                        $recVerInstance |= $recInstance << 4;
268 268
 
269 269
                         $header = pack('vvV', $recVerInstance, $recType, $length);
270 270
 
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
                 if ($this->object->getOPTCollection()) {
407 407
                     $optData = '';
408 408
 
409
-                    $recVer            = 0x3;
409
+                    $recVer = 0x3;
410 410
                     $recInstance    = count($this->object->getOPTCollection());
411 411
                     $recType        = 0xF00B;
412 412
                     foreach ($this->object->getOPTCollection() as $property => $value) {
413 413
                         $optData .= pack('vV', $property, $value);
414 414
                     }
415
-                    $length            = strlen($optData);
415
+                    $length = strlen($optData);
416 416
 
417 417
                     $recVerInstance  = $recVer;
418 418
                     $recVerInstance |= $recInstance << 4;
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
                 if ($this->object->getStartCoordinates()) {
426 426
                     $clientAnchorData = '';
427 427
 
428
-                    $recVer            = 0x0;
428
+                    $recVer = 0x0;
429 429
                     $recInstance    = 0x0;
430 430
                     $recType        = 0xF010;
431 431
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 
454 454
                     $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY);
455 455
                     
456
-                    $length            = strlen($clientAnchorData);
456
+                    $length = strlen($clientAnchorData);
457 457
 
458 458
                     $recVerInstance  = $recVer;
459 459
                     $recVerInstance |= $recInstance << 4;
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 if (!$this->object->getSpgr()) {
467 467
                     $clientDataData = '';
468 468
 
469
-                    $recVer            = 0x0;
469
+                    $recVer = 0x0;
470 470
                     $recInstance    = 0x0;
471 471
                     $recType        = 0xF011;
472 472
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/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.