Completed
Push — develop ( e1f81f...539a89 )
by Adrien
16:11
created
tests/PhpSpreadsheet/Worksheet/RowCellIteratorTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
             ->getMock();
19 19
 
20 20
         $this->mockWorksheet->expects($this->any())
21
-                 ->method('getHighestColumn')
22
-                 ->will($this->returnValue('E'));
21
+                    ->method('getHighestColumn')
22
+                    ->will($this->returnValue('E'));
23 23
         $this->mockWorksheet->expects($this->any())
24
-                 ->method('getCellByColumnAndRow')
25
-                 ->will($this->returnValue($this->mockCell));
24
+                    ->method('getCellByColumnAndRow')
25
+                    ->will($this->returnValue($this->mockCell));
26 26
     }
27 27
 
28 28
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheet/Worksheet/WorksheetRowTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
             ->disableOriginalConstructor()
14 14
             ->getMock();
15 15
         $this->mockWorksheet->expects($this->any())
16
-                 ->method('getHighestColumn')
17
-                 ->will($this->returnValue('E'));
16
+                    ->method('getHighestColumn')
17
+                    ->will($this->returnValue('E'));
18 18
     }
19 19
 
20 20
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheet/Cell/DefaultValueBinderTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
             ->getMock();
25 25
         // Configure the stub.
26 26
         $this->cellStub->expects($this->any())
27
-             ->method('setValueExplicit')
28
-             ->will($this->returnValue(true));
27
+                ->method('setValueExplicit')
28
+                ->will($this->returnValue(true));
29 29
 
30 30
     }
31 31
 
Please login to merge, or discard this patch.
tests/PhpSpreadsheet/Cell/AdvancedValueBinderTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,22 +45,22 @@
 block discarded – undo
45 45
             ->disableOriginalConstructor()
46 46
             ->getMock();
47 47
         $cache->expects($this->any())
48
-                 ->method('getParent')
49
-                 ->will($this->returnValue($sheet));
48
+                    ->method('getParent')
49
+                    ->will($this->returnValue($sheet));
50 50
 
51 51
         $sheet->expects($this->once())
52
-                 ->method('getStyle')
53
-                 ->will($this->returnSelf());
52
+                    ->method('getStyle')
53
+                    ->will($this->returnSelf());
54 54
         $sheet->expects($this->once())
55
-                 ->method('getNumberFormat')
56
-                 ->will($this->returnSelf());
55
+                    ->method('getNumberFormat')
56
+                    ->will($this->returnSelf());
57 57
         $sheet->expects($this->once())
58
-                 ->method('setFormatCode')
59
-                 ->with($format)
60
-                 ->will($this->returnSelf());
58
+                    ->method('setFormatCode')
59
+                    ->with($format)
60
+                    ->will($this->returnSelf());
61 61
         $sheet->expects($this->any())
62
-                 ->method('getCellCacheController')
63
-                 ->will($this->returnValue($cache));
62
+                    ->method('getCellCacheController')
63
+                    ->will($this->returnValue($cache));
64 64
 
65 65
         \PHPExcel\Shared\StringHelper::setCurrencyCode($currencyCode);
66 66
         \PHPExcel\Shared\StringHelper::setDecimalSeparator($decimalSeparator);
Please login to merge, or discard this patch.
Examples/runall.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -29,105 +29,105 @@
 block discarded – undo
29 29
 error_reporting(E_ALL);
30 30
 
31 31
 if (PHP_SAPI != 'cli') {
32
-	die ('This script executes all tests, and should only be run from the command line');
32
+    die ('This script executes all tests, and should only be run from the command line');
33 33
 }
34 34
 
35 35
 // List of tests
36 36
 $aTests = array(
37
-	  '01simple.php'
38
-	, '01simplePCLZip.php'
39
-	, '02types.php'
40
-	, '02types-xls.php'
41
-	, '03formulas.php'
42
-	, '04printing.php'
43
-	, '05featuredemo.php'
44
-	, '06largescale.php'
45
-	, '06largescale-with-cellcaching.php'
46
-	, '06largescale-with-cellcaching-sqlite.php'
47
-	, '06largescale-with-cellcaching-sqlite3.php'
48
-	, '06largescale-xls.php'
49
-	, '07reader.php'
50
-	, '07readerPCLZip.php'
51
-	, '08conditionalformatting.php'
52
-	, '08conditionalformatting2.php'
53
-	, '09pagebreaks.php'
54
-	, '10autofilter.php'
55
-	, '10autofilter-selection-1.php'
56
-	, '10autofilter-selection-2.php'
57
-	, '10autofilter-selection-display.php'
58
-	, '11documentsecurity.php'
59
-	, '11documentsecurity-xls.php'
60
-	, '12cellProtection.php'
61
-	, '13calculation.php'
37
+        '01simple.php'
38
+    , '01simplePCLZip.php'
39
+    , '02types.php'
40
+    , '02types-xls.php'
41
+    , '03formulas.php'
42
+    , '04printing.php'
43
+    , '05featuredemo.php'
44
+    , '06largescale.php'
45
+    , '06largescale-with-cellcaching.php'
46
+    , '06largescale-with-cellcaching-sqlite.php'
47
+    , '06largescale-with-cellcaching-sqlite3.php'
48
+    , '06largescale-xls.php'
49
+    , '07reader.php'
50
+    , '07readerPCLZip.php'
51
+    , '08conditionalformatting.php'
52
+    , '08conditionalformatting2.php'
53
+    , '09pagebreaks.php'
54
+    , '10autofilter.php'
55
+    , '10autofilter-selection-1.php'
56
+    , '10autofilter-selection-2.php'
57
+    , '10autofilter-selection-display.php'
58
+    , '11documentsecurity.php'
59
+    , '11documentsecurity-xls.php'
60
+    , '12cellProtection.php'
61
+    , '13calculation.php'
62 62
     , '13calculationCyclicFormulae.php'
63
-	, '14excel5.php'
64
-	, '15datavalidation.php'
65
-	, '15datavalidation-xls.php'
66
-	, '16csv.php'
67
-	, '17html.php'
68
-	, '18extendedcalculation.php'
69
-	, '19namedrange.php'
70
-	, '20readexcel5.php'
71
-	, '21pdf.php'
72
-	, '22heavilyformatted.php'
73
-	, '23sharedstyles.php'
74
-	, '24readfilter.php'
75
-	, '25inmemoryimage.php'
76
-	, '26utf8.php'
77
-	, '27imagesexcel5.php'
78
-	, '28iterator.php'
79
-	, '29advancedvaluebinder.php'
80
-	, '30template.php'
81
-	, '31docproperties_write.php'
82
-	, '31docproperties_write-xls.php'
83
-	, '32chartreadwrite.php'
84
-	, '33chartcreate-area.php'
85
-	, '33chartcreate-bar.php'
86
-	, '33chartcreate-bar-stacked.php'
87
-	, '33chartcreate-column.php'
88
-	, '33chartcreate-column-2.php'
89
-	, '33chartcreate-line.php'
90
-	, '33chartcreate-pie.php'
91
-	, '33chartcreate-radar.php'
92
-	, '33chartcreate-scatter.php'
93
-	, '33chartcreate-stock.php'
94
-	, '33chartcreate-multiple-charts.php'
95
-	, '33chartcreate-composite.php'
96
-	, '34chartupdate.php'
97
-	, '35chartrender.php'
98
-	, '36chartreadwriteHTML.php'
99
-	, '36chartreadwritePDF.php'
100
-	, '37page_layout_view.php'
101
-	, '38cloneWorksheet.php'
63
+    , '14excel5.php'
64
+    , '15datavalidation.php'
65
+    , '15datavalidation-xls.php'
66
+    , '16csv.php'
67
+    , '17html.php'
68
+    , '18extendedcalculation.php'
69
+    , '19namedrange.php'
70
+    , '20readexcel5.php'
71
+    , '21pdf.php'
72
+    , '22heavilyformatted.php'
73
+    , '23sharedstyles.php'
74
+    , '24readfilter.php'
75
+    , '25inmemoryimage.php'
76
+    , '26utf8.php'
77
+    , '27imagesexcel5.php'
78
+    , '28iterator.php'
79
+    , '29advancedvaluebinder.php'
80
+    , '30template.php'
81
+    , '31docproperties_write.php'
82
+    , '31docproperties_write-xls.php'
83
+    , '32chartreadwrite.php'
84
+    , '33chartcreate-area.php'
85
+    , '33chartcreate-bar.php'
86
+    , '33chartcreate-bar-stacked.php'
87
+    , '33chartcreate-column.php'
88
+    , '33chartcreate-column-2.php'
89
+    , '33chartcreate-line.php'
90
+    , '33chartcreate-pie.php'
91
+    , '33chartcreate-radar.php'
92
+    , '33chartcreate-scatter.php'
93
+    , '33chartcreate-stock.php'
94
+    , '33chartcreate-multiple-charts.php'
95
+    , '33chartcreate-composite.php'
96
+    , '34chartupdate.php'
97
+    , '35chartrender.php'
98
+    , '36chartreadwriteHTML.php'
99
+    , '36chartreadwritePDF.php'
100
+    , '37page_layout_view.php'
101
+    , '38cloneWorksheet.php'
102 102
     , '39dropdown.php'
103
-	, '40duplicateStyle.php'
104
-	, '41password.php'
105
-	, '42richText.php'
103
+    , '40duplicateStyle.php'
104
+    , '41password.php'
105
+    , '42richText.php'
106 106
     , '43mergeWorkbooks.php'
107 107
     , '44worksheetInfo.php'
108
-	, 'OOCalcReader.php'
109
-	, 'OOCalcReaderPCLZip.php'
110
-	, 'SylkReader.php'
111
-	, 'Excel2003XMLReader.php'
112
-	, 'XMLReader.php'
113
-	, 'GnumericReader.php'
108
+    , 'OOCalcReader.php'
109
+    , 'OOCalcReaderPCLZip.php'
110
+    , 'SylkReader.php'
111
+    , 'Excel2003XMLReader.php'
112
+    , 'XMLReader.php'
113
+    , 'GnumericReader.php'
114 114
 );
115 115
 
116 116
 // First, clear all previous run results
117 117
 foreach ($aTests as $sTest) {
118
-	@unlink( str_replace('.php', '.xls', 	$sTest) );
119
-	@unlink( str_replace('.php', '.xlsx', 	$sTest) );
120
-	@unlink( str_replace('.php', '.csv',	$sTest) );
121
-	@unlink( str_replace('.php', '.htm',	$sTest) );
122
-	@unlink( str_replace('.php', '.pdf',	$sTest) );
118
+    @unlink( str_replace('.php', '.xls', 	$sTest) );
119
+    @unlink( str_replace('.php', '.xlsx', 	$sTest) );
120
+    @unlink( str_replace('.php', '.csv',	$sTest) );
121
+    @unlink( str_replace('.php', '.htm',	$sTest) );
122
+    @unlink( str_replace('.php', '.pdf',	$sTest) );
123 123
 }
124 124
 
125 125
 // Run all tests
126 126
 foreach ($aTests as $sTest) {
127
-	echo '============== TEST ==============' . "\r\n";
128
-	echo 'Test name: ' . $sTest . "\r\n";
129
-	echo "\r\n";
130
-	echo shell_exec('php ' . $sTest);
131
-	echo "\r\n";
132
-	echo "\r\n";
127
+    echo '============== TEST ==============' . "\r\n";
128
+    echo 'Test name: ' . $sTest . "\r\n";
129
+    echo "\r\n";
130
+    echo shell_exec('php ' . $sTest);
131
+    echo "\r\n";
132
+    echo "\r\n";
133 133
 }
134 134
\ No newline at end of file
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -566,49 +566,49 @@  discard block
 block discarded – undo
566 566
 
567 567
         // GKPIDDSI_CODEPAGE: CodePage
568 568
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01),
569
-                               'offset' => array('pack' => 'V'),
570
-                               'type'     => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer
571
-                               'data'    => array('data' => 1252));
569
+                                'offset' => array('pack' => 'V'),
570
+                                'type'     => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer
571
+                                'data'    => array('data' => 1252));
572 572
         $dataSection_NumProps++;
573 573
 
574 574
         // GKPIDDSI_CATEGORY : Category
575 575
         if ($this->spreadsheet->getProperties()->getCategory()) {
576 576
             $dataProp = $this->spreadsheet->getProperties()->getCategory();
577 577
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02),
578
-                                   'offset' => array('pack' => 'V'),
579
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E),
580
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
578
+                                    'offset' => array('pack' => 'V'),
579
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E),
580
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
581 581
             $dataSection_NumProps++;
582 582
         }
583 583
         // GKPIDDSI_VERSION :Version of the application that wrote the property storage
584 584
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x17),
585
-                               'offset' => array('pack' => 'V'),
586
-                               'type'     => array('pack' => 'V', 'data' => 0x03),
587
-                               'data'    => array('pack' => 'V', 'data' => 0x000C0000));
585
+                                'offset' => array('pack' => 'V'),
586
+                                'type'     => array('pack' => 'V', 'data' => 0x03),
587
+                                'data'    => array('pack' => 'V', 'data' => 0x000C0000));
588 588
         $dataSection_NumProps++;
589 589
         // GKPIDDSI_SCALE : FALSE
590 590
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0B),
591
-                               'offset' => array('pack' => 'V'),
592
-                               'type'     => array('pack' => 'V', 'data' => 0x0B),
593
-                               'data'    => array('data' => false));
591
+                                'offset' => array('pack' => 'V'),
592
+                                'type'     => array('pack' => 'V', 'data' => 0x0B),
593
+                                'data'    => array('data' => false));
594 594
         $dataSection_NumProps++;
595 595
         // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application
596 596
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x10),
597
-                               'offset' => array('pack' => 'V'),
598
-                               'type'     => array('pack' => 'V', 'data' => 0x0B),
599
-                               'data'    => array('data' => false));
597
+                                'offset' => array('pack' => 'V'),
598
+                                'type'     => array('pack' => 'V', 'data' => 0x0B),
599
+                                'data'    => array('data' => false));
600 600
         $dataSection_NumProps++;
601 601
         // GKPIDDSI_SHAREDOC : FALSE
602 602
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13),
603
-                               'offset' => array('pack' => 'V'),
604
-                               'type'     => array('pack' => 'V', 'data' => 0x0B),
605
-                               'data'    => array('data' => false));
603
+                                'offset' => array('pack' => 'V'),
604
+                                'type'     => array('pack' => 'V', 'data' => 0x0B),
605
+                                'data'    => array('data' => false));
606 606
         $dataSection_NumProps++;
607 607
         // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application
608 608
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x16),
609
-                               'offset' => array('pack' => 'V'),
610
-                               'type'     => array('pack' => 'V', 'data' => 0x0B),
611
-                               'data'    => array('data' => false));
609
+                                'offset' => array('pack' => 'V'),
610
+                                'type'     => array('pack' => 'V', 'data' => 0x0B),
611
+                                'data'    => array('data' => false));
612 612
         $dataSection_NumProps++;
613 613
 
614 614
         // GKPIDDSI_DOCSPARTS
@@ -618,50 +618,50 @@  discard block
 block discarded – undo
618 618
         $dataProp = pack('v', 0x0001);
619 619
         $dataProp .= pack('v', 0x0000);
620 620
         // array of UnalignedLpstr
621
-          // cch
622
-          $dataProp .= pack('v', 0x000A);
623
-          $dataProp .= pack('v', 0x0000);
624
-          // value
625
-          $dataProp .= 'Worksheet'.chr(0);
621
+            // cch
622
+            $dataProp .= pack('v', 0x000A);
623
+            $dataProp .= pack('v', 0x0000);
624
+            // value
625
+            $dataProp .= 'Worksheet'.chr(0);
626 626
 
627 627
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D),
628
-                               'offset' => array('pack' => 'V'),
629
-                               'type'     => array('pack' => 'V', 'data' => 0x101E),
630
-                               'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
628
+                                'offset' => array('pack' => 'V'),
629
+                                'type'     => array('pack' => 'V', 'data' => 0x101E),
630
+                                'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
631 631
         $dataSection_NumProps++;
632 632
 
633 633
         // GKPIDDSI_HEADINGPAIR
634 634
         // VtVecHeadingPairValue
635
-          // cElements
636
-          $dataProp = pack('v', 0x0002);
637
-          $dataProp .= pack('v', 0x0000);
638
-          // Array of vtHeadingPair
635
+            // cElements
636
+            $dataProp = pack('v', 0x0002);
637
+            $dataProp .= pack('v', 0x0000);
638
+            // Array of vtHeadingPair
639 639
             // vtUnalignedString - headingString
640
-              // stringType
641
-              $dataProp .= pack('v', 0x001E);
642
-              // padding
643
-              $dataProp .= pack('v', 0x0000);
644
-              // UnalignedLpstr
640
+                // stringType
641
+                $dataProp .= pack('v', 0x001E);
642
+                // padding
643
+                $dataProp .= pack('v', 0x0000);
644
+                // UnalignedLpstr
645 645
                 // cch
646 646
                 $dataProp .= pack('v', 0x0013);
647 647
                 $dataProp .= pack('v', 0x0000);
648 648
                 // value
649 649
                 $dataProp .= 'Feuilles de calcul';
650 650
             // vtUnalignedString - headingParts
651
-              // wType : 0x0003 = 32 bit signed integer
652
-              $dataProp .= pack('v', 0x0300);
653
-              // padding
654
-              $dataProp .= pack('v', 0x0000);
655
-              // value
656
-              $dataProp .= pack('v', 0x0100);
657
-              $dataProp .= pack('v', 0x0000);
658
-              $dataProp .= pack('v', 0x0000);
659
-              $dataProp .= pack('v', 0x0000);
651
+                // wType : 0x0003 = 32 bit signed integer
652
+                $dataProp .= pack('v', 0x0300);
653
+                // padding
654
+                $dataProp .= pack('v', 0x0000);
655
+                // value
656
+                $dataProp .= pack('v', 0x0100);
657
+                $dataProp .= pack('v', 0x0000);
658
+                $dataProp .= pack('v', 0x0000);
659
+                $dataProp .= pack('v', 0x0000);
660 660
 
661 661
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C),
662
-                               'offset' => array('pack' => 'V'),
663
-                               'type'     => array('pack' => 'V', 'data' => 0x100C),
664
-                               'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
662
+                                'offset' => array('pack' => 'V'),
663
+                                'type'     => array('pack' => 'V', 'data' => 0x100C),
664
+                                'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
665 665
         $dataSection_NumProps++;
666 666
 
667 667
         //         4     Section Length
@@ -762,88 +762,88 @@  discard block
 block discarded – undo
762 762
 
763 763
         // CodePage : CP-1252
764 764
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01),
765
-                               'offset' => array('pack' => 'V'),
766
-                               'type'     => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer
767
-                               'data'    => array('data' => 1252));
765
+                                'offset' => array('pack' => 'V'),
766
+                                'type'     => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer
767
+                                'data'    => array('data' => 1252));
768 768
         $dataSection_NumProps++;
769 769
 
770 770
         //    Title
771 771
         if ($this->spreadsheet->getProperties()->getTitle()) {
772 772
             $dataProp = $this->spreadsheet->getProperties()->getTitle();
773 773
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02),
774
-                                   'offset' => array('pack' => 'V'),
775
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
776
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
774
+                                    'offset' => array('pack' => 'V'),
775
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
776
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
777 777
             $dataSection_NumProps++;
778 778
         }
779 779
         //    Subject
780 780
         if ($this->spreadsheet->getProperties()->getSubject()) {
781 781
             $dataProp = $this->spreadsheet->getProperties()->getSubject();
782 782
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x03),
783
-                                   'offset' => array('pack' => 'V'),
784
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
785
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
783
+                                    'offset' => array('pack' => 'V'),
784
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
785
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
786 786
             $dataSection_NumProps++;
787 787
         }
788 788
         //    Author (Creator)
789 789
         if ($this->spreadsheet->getProperties()->getCreator()) {
790 790
             $dataProp = $this->spreadsheet->getProperties()->getCreator();
791 791
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x04),
792
-                                   'offset' => array('pack' => 'V'),
793
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
794
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
792
+                                    'offset' => array('pack' => 'V'),
793
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
794
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
795 795
             $dataSection_NumProps++;
796 796
         }
797 797
         //    Keywords
798 798
         if ($this->spreadsheet->getProperties()->getKeywords()) {
799 799
             $dataProp = $this->spreadsheet->getProperties()->getKeywords();
800 800
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x05),
801
-                                   'offset' => array('pack' => 'V'),
802
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
803
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
801
+                                    'offset' => array('pack' => 'V'),
802
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
803
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
804 804
             $dataSection_NumProps++;
805 805
         }
806 806
         //    Comments (Description)
807 807
         if ($this->spreadsheet->getProperties()->getDescription()) {
808 808
             $dataProp = $this->spreadsheet->getProperties()->getDescription();
809 809
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x06),
810
-                                   'offset' => array('pack' => 'V'),
811
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
812
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
810
+                                    'offset' => array('pack' => 'V'),
811
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
812
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
813 813
             $dataSection_NumProps++;
814 814
         }
815 815
         //    Last Saved By (LastModifiedBy)
816 816
         if ($this->spreadsheet->getProperties()->getLastModifiedBy()) {
817 817
             $dataProp = $this->spreadsheet->getProperties()->getLastModifiedBy();
818 818
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x08),
819
-                                   'offset' => array('pack' => 'V'),
820
-                                   'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
821
-                                   'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
819
+                                    'offset' => array('pack' => 'V'),
820
+                                    'type'     => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length
821
+                                    'data'    => array('data' => $dataProp, 'length' => strlen($dataProp)));
822 822
             $dataSection_NumProps++;
823 823
         }
824 824
         //    Created Date/Time
825 825
         if ($this->spreadsheet->getProperties()->getCreated()) {
826 826
             $dataProp = $this->spreadsheet->getProperties()->getCreated();
827 827
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C),
828
-                                   'offset' => array('pack' => 'V'),
829
-                                   'type'     => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
830
-                                   'data'    => array('data' => \PhpSpreadsheet\Shared\OLE::localDateToOLE($dataProp)));
828
+                                    'offset' => array('pack' => 'V'),
829
+                                    'type'     => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
830
+                                    'data'    => array('data' => \PhpSpreadsheet\Shared\OLE::localDateToOLE($dataProp)));
831 831
             $dataSection_NumProps++;
832 832
         }
833 833
         //    Modified Date/Time
834 834
         if ($this->spreadsheet->getProperties()->getModified()) {
835 835
             $dataProp = $this->spreadsheet->getProperties()->getModified();
836 836
             $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D),
837
-                                   'offset' => array('pack' => 'V'),
838
-                                   'type'     => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
839
-                                   'data'    => array('data' => \PhpSpreadsheet\Shared\OLE::localDateToOLE($dataProp)));
837
+                                    'offset' => array('pack' => 'V'),
838
+                                    'type'     => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601)
839
+                                    'data'    => array('data' => \PhpSpreadsheet\Shared\OLE::localDateToOLE($dataProp)));
840 840
             $dataSection_NumProps++;
841 841
         }
842 842
         //    Security
843 843
         $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13),
844
-                               'offset' => array('pack' => 'V'),
845
-                               'type'     => array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer
846
-                               'data'    => array('data' => 0x00));
844
+                                'offset' => array('pack' => 'V'),
845
+                                'type'     => array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer
846
+                                'data'    => array('data' => 0x00));
847 847
         $dataSection_NumProps++;
848 848
 
849 849
 
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/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.