Completed
Push — develop ( 685e29...09d456 )
by Adrien
14:14
created
Examples/15datavalidation-xls.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 ini_set('display_startup_errors', TRUE);
32 32
 date_default_timezone_set('Europe/London');
33 33
 
34
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
34
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
35 35
 
36 36
 date_default_timezone_set('Europe/London');
37 37
 
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
 // Create new PHPExcel object
43
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
43
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
44 44
 $objPHPExcel = new \PHPExcel\Spreadsheet();
45 45
 
46 46
 
47 47
 // Set document properties
48
-echo date('H:i:s') , " Set document properties" , EOL;
48
+echo date('H:i:s'), " Set document properties", EOL;
49 49
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
50 50
 							 ->setLastModifiedBy("Maarten Balliauw")
51 51
 							 ->setTitle("Office 2007 XLSX Test Document")
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 
58 58
 // Create a first sheet
59
-echo date('H:i:s') , " Add data" , EOL;
59
+echo date('H:i:s'), " Add data", EOL;
60 60
 $objPHPExcel->setActiveSheetIndex(0);
61 61
 $objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data validation...")
62 62
                               ->setCellValue('A3', "Number:")
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 
75 75
 
76 76
 // Set data validation
77
-echo date('H:i:s') , " Set data validation" , EOL;
77
+echo date('H:i:s'), " Set data validation", EOL;
78 78
 $objValidation = $objPHPExcel->getActiveSheet()->getCell('B3')->getDataValidation();
79
-$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_WHOLE );
80
-$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_STOP );
79
+$objValidation->setType(\PHPExcel\Cell\DataValidation::TYPE_WHOLE);
80
+$objValidation->setErrorStyle(\PHPExcel\Cell\DataValidation::STYLE_STOP);
81 81
 $objValidation->setAllowBlank(true);
82 82
 $objValidation->setShowInputMessage(true);
83 83
 $objValidation->setShowErrorMessage(true);
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
 $objValidation->setFormula2(20);
90 90
 
91 91
 $objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation();
92
-$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
93
-$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
92
+$objValidation->setType(\PHPExcel\Cell\DataValidation::TYPE_LIST);
93
+$objValidation->setErrorStyle(\PHPExcel\Cell\DataValidation::STYLE_INFORMATION);
94 94
 $objValidation->setAllowBlank(false);
95 95
 $objValidation->setShowInputMessage(true);
96 96
 $objValidation->setShowErrorMessage(true);
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
 $objValidation->setError('Value is not in list.');
100 100
 $objValidation->setPromptTitle('Pick from list');
101 101
 $objValidation->setPrompt('Please pick a value from the drop-down list.');
102
-$objValidation->setFormula1('"Item A,Item B,Item C"');	// Make sure to put the list items between " and "  !!!
102
+$objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the list items between " and "  !!!
103 103
 
104 104
 $objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation();
105
-$objValidation->setType( \PHPExcel\Cell\DataValidation::TYPE_LIST );
106
-$objValidation->setErrorStyle( \PHPExcel\Cell\DataValidation::STYLE_INFORMATION );
105
+$objValidation->setType(\PHPExcel\Cell\DataValidation::TYPE_LIST);
106
+$objValidation->setErrorStyle(\PHPExcel\Cell\DataValidation::STYLE_INFORMATION);
107 107
 $objValidation->setAllowBlank(false);
108 108
 $objValidation->setShowInputMessage(true);
109 109
 $objValidation->setShowErrorMessage(true);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 $objValidation->setError('Value is not in list.');
113 113
 $objValidation->setPromptTitle('Pick from list');
114 114
 $objValidation->setPrompt('Please pick a value from the drop-down list.');
115
-$objValidation->setFormula1('$D$2:$D$6');	// Make sure NOT to put a range of cells or a formula between " and "  !!!
115
+$objValidation->setFormula1('$D$2:$D$6'); // Make sure NOT to put a range of cells or a formula between " and "  !!!
116 116
 
117 117
 
118 118
 // Set active sheet index to the first sheet, so Excel opens this as the first sheet
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 
122 122
 // Save Excel 95 file
123
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
123
+echo date('H:i:s'), " Write to Excel5 format", EOL;
124 124
 $callStartTime = microtime(true);
125 125
 
126 126
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
 $callEndTime = microtime(true);
129 129
 $callTime = $callEndTime - $callStartTime;
130 130
 
131
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
132
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
131
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
132
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
133 133
 // Echo memory usage
134
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
134
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
135 135
 
136 136
 
137 137
 // Echo memory peak usage
138
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
138
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
139 139
 
140 140
 // Echo done
141
-echo date('H:i:s') , " Done writing file" , EOL;
142
-echo 'File has been created in ' , getcwd() , EOL;
141
+echo date('H:i:s'), " Done writing file", EOL;
142
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -47,30 +47,30 @@
 block discarded – undo
47 47
 // Set document properties
48 48
 echo date('H:i:s') , " Set document properties" , EOL;
49 49
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
50
-							 ->setLastModifiedBy("Maarten Balliauw")
51
-							 ->setTitle("Office 2007 XLSX Test Document")
52
-							 ->setSubject("Office 2007 XLSX Test Document")
53
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
54
-							 ->setKeywords("office 2007 openxml php")
55
-							 ->setCategory("Test result file");
50
+                                ->setLastModifiedBy("Maarten Balliauw")
51
+                                ->setTitle("Office 2007 XLSX Test Document")
52
+                                ->setSubject("Office 2007 XLSX Test Document")
53
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
54
+                                ->setKeywords("office 2007 openxml php")
55
+                                ->setCategory("Test result file");
56 56
 
57 57
 
58 58
 // Create a first sheet
59 59
 echo date('H:i:s') , " Add data" , EOL;
60 60
 $objPHPExcel->setActiveSheetIndex(0);
61 61
 $objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data validation...")
62
-                              ->setCellValue('A3', "Number:")
63
-                              ->setCellValue('B3', "10")
64
-                              ->setCellValue('A5', "List:")
65
-                              ->setCellValue('B5', "Item A")
66
-                              ->setCellValue('A7', "List #2:")
67
-                              ->setCellValue('B7', "Item #2")
68
-                              ->setCellValue('D2', "Item #1")
69
-                              ->setCellValue('D3', "Item #2")
70
-                              ->setCellValue('D4', "Item #3")
71
-                              ->setCellValue('D5', "Item #4")
72
-                              ->setCellValue('D6', "Item #5")
73
-                              ;
62
+                                ->setCellValue('A3', "Number:")
63
+                                ->setCellValue('B3', "10")
64
+                                ->setCellValue('A5', "List:")
65
+                                ->setCellValue('B5', "Item A")
66
+                                ->setCellValue('A7', "List #2:")
67
+                                ->setCellValue('B7', "Item #2")
68
+                                ->setCellValue('D2', "Item #1")
69
+                                ->setCellValue('D3', "Item #2")
70
+                                ->setCellValue('D4', "Item #3")
71
+                                ->setCellValue('D5', "Item #4")
72
+                                ->setCellValue('D6', "Item #5")
73
+                                ;
74 74
 
75 75
 
76 76
 // Set data validation
Please login to merge, or discard this patch.
Examples/Excel2003XMLReader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
35 35
 
36 36
 
37
-echo date('H:i:s') , " Load from Excel2003XML file" , PHP_EOL;
37
+echo date('H:i:s'), " Load from Excel2003XML file", PHP_EOL;
38 38
 $callStartTime = microtime(true);
39 39
 
40 40
 $objReader = \PHPExcel\IOFactory::createReader('Excel2003XML');
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
 
44 44
 $callEndTime = microtime(true);
45 45
 $callTime = $callEndTime - $callStartTime;
46
-echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL;
46
+echo 'Call time to read Workbook was ', sprintf('%.4f', $callTime), " seconds", PHP_EOL;
47 47
 // Echo memory usage
48
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
48
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", PHP_EOL;
49 49
 
50 50
 
51
-echo date('H:i:s') , " Write to Excel5 format" , PHP_EOL;
51
+echo date('H:i:s'), " Write to Excel5 format", PHP_EOL;
52 52
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
53 53
 $objWriter->save(str_replace('.php', '.xls', __FILE__));
54
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', __FILE__) , PHP_EOL;
54
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', __FILE__), PHP_EOL;
55 55
 
56 56
 
57 57
 // Echo memory peak usage
58
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
58
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", PHP_EOL;
59 59
 
60 60
 // Echo done
61
-echo date('H:i:s') , " Done writing file" , PHP_EOL;
61
+echo date('H:i:s'), " Done writing file", PHP_EOL;
Please login to merge, or discard this patch.
Examples/runall.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -114,11 +114,11 @@
 block discarded – undo
114 114
 
115 115
 // First, clear all previous run results
116 116
 foreach ($aTests as $sTest) {
117
-	@unlink( str_replace('.php', '.xls', 	$sTest) );
118
-	@unlink( str_replace('.php', '.xlsx', 	$sTest) );
119
-	@unlink( str_replace('.php', '.csv',	$sTest) );
120
-	@unlink( str_replace('.php', '.htm',	$sTest) );
121
-	@unlink( str_replace('.php', '.pdf',	$sTest) );
117
+	@unlink(str_replace('.php', '.xls', $sTest));
118
+	@unlink(str_replace('.php', '.xlsx', $sTest));
119
+	@unlink(str_replace('.php', '.csv', $sTest));
120
+	@unlink(str_replace('.php', '.htm', $sTest));
121
+	@unlink(str_replace('.php', '.pdf', $sTest));
122 122
 }
123 123
 
124 124
 // Run all tests
Please login to merge, or discard this 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.
Examples/33chartcreate-column-2.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 $objPHPExcel = new \PHPExcel\Spreadsheet();
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46
-	array(
47
-		array('',		'',		'Budget',	'Forecast',	'Actual'),
48
-		array('2010',	'Q1',   47,   		44,			43		),
49
-		array('',		'Q2',   56,   		53,			50		),
50
-		array('',		'Q3',   52,   		46,			45		),
51
-		array('',		'Q4',   45,   		40,			40		),
52
-		array('2011',	'Q1',   51,   		42,			46		),
53
-		array('',		'Q2',   53,   		58,			56		),
54
-		array('',		'Q3',   64,   		66,			69		),
55
-		array('',		'Q4',   54,   		55,			56		),
56
-		array('2012',	'Q1',   49,   		52,			58		),
57
-		array('',		'Q2',   68,   		73,			86		),
58
-		array('',		'Q3',   72,   		78,			0		),
59
-		array('',		'Q4',   50,   		60,			0		),
60
-	)
46
+    array(
47
+        array('',		'',		'Budget',	'Forecast',	'Actual'),
48
+        array('2010',	'Q1',   47,   		44,			43		),
49
+        array('',		'Q2',   56,   		53,			50		),
50
+        array('',		'Q3',   52,   		46,			45		),
51
+        array('',		'Q4',   45,   		40,			40		),
52
+        array('2011',	'Q1',   51,   		42,			46		),
53
+        array('',		'Q2',   53,   		58,			56		),
54
+        array('',		'Q3',   64,   		66,			69		),
55
+        array('',		'Q4',   54,   		55,			56		),
56
+        array('2012',	'Q1',   49,   		52,			58		),
57
+        array('',		'Q2',   68,   		73,			86		),
58
+        array('',		'Q3',   72,   		78,			0		),
59
+        array('',		'Q4',   50,   		60,			0		),
60
+    )
61 61
 );
62 62
 
63 63
 //	Set the Labels for each data series we want to plot
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 //		Data values
69 69
 //		Data Marker
70 70
 $dataSeriesLabels = array(
71
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	'Budget'
72
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	'Forecast'
73
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1),	//	'Actual'
71
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	'Budget'
72
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	'Forecast'
73
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1),	//	'Actual'
74 74
 );
75 75
 //	Set the X-Axis Labels
76 76
 //		Datatype
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 //		Data values
81 81
 //		Data Marker
82 82
 $xAxisTickValues = array(
83
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12),	//	Q1 to Q4 for 2010 to 2012
83
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12),	//	Q1 to Q4 for 2010 to 2012
84 84
 );
85 85
 //	Set the Data values for each data series we want to plot
86 86
 //		Datatype
@@ -90,19 +90,19 @@  discard block
 block discarded – undo
90 90
 //		Data values
91 91
 //		Data Marker
92 92
 $dataSeriesValues = array(
93
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
94
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
95
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', NULL, 12),
93
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12),
94
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12),
95
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', NULL, 12),
96 96
 );
97 97
 
98 98
 //	Build the dataseries
99 99
 $series = new \PHPExcel\Chart\DataSeries(
100
-	\PHPExcel\Chart\DataSeries::TYPE_BARCHART,		// plotType
101
-	\PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED,	// plotGrouping
102
-	range(0, count($dataSeriesValues)-1),			// plotOrder
103
-	$dataSeriesLabels,								// plotLabel
104
-	$xAxisTickValues,								// plotCategory
105
-	$dataSeriesValues								// plotValues
100
+    \PHPExcel\Chart\DataSeries::TYPE_BARCHART,		// plotType
101
+    \PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED,	// plotGrouping
102
+    range(0, count($dataSeriesValues)-1),			// plotOrder
103
+    $dataSeriesLabels,								// plotLabel
104
+    $xAxisTickValues,								// plotCategory
105
+    $dataSeriesValues								// plotValues
106 106
 );
107 107
 //	Set additional dataseries parameters
108 108
 //		Make it a vertical column rather than a horizontal bar graph
@@ -120,14 +120,14 @@  discard block
 block discarded – undo
120 120
 
121 121
 //	Create the chart
122 122
 $chart = new \PHPExcel\Chart(
123
-	'chart1',		// name
124
-	$title,			// title
125
-	$legend,		// legend
126
-	$plotArea,		// plotArea
127
-	true,			// plotVisibleOnly
128
-	0,				// displayBlanksAs
129
-	$xAxisLabel,	// xAxisLabel
130
-	$yAxisLabel		// yAxisLabel
123
+    'chart1',		// name
124
+    $title,			// title
125
+    $legend,		// legend
126
+    $plotArea,		// plotArea
127
+    true,			// plotVisibleOnly
128
+    0,				// displayBlanksAs
129
+    $xAxisLabel,	// xAxisLabel
130
+    $yAxisLabel		// yAxisLabel
131 131
 );
132 132
 
133 133
 //	Set the position where the chart should appear in the worksheet
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 ini_set('display_startup_errors', TRUE);
7 7
 date_default_timezone_set('Europe/London');
8 8
 
9
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
9
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
10 10
 
11 11
 date_default_timezone_set('Europe/London');
12 12
 
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46 46
 	array(
47
-		array('',		'',		'Budget',	'Forecast',	'Actual'),
48
-		array('2010',	'Q1',   47,   		44,			43		),
49
-		array('',		'Q2',   56,   		53,			50		),
50
-		array('',		'Q3',   52,   		46,			45		),
51
-		array('',		'Q4',   45,   		40,			40		),
52
-		array('2011',	'Q1',   51,   		42,			46		),
53
-		array('',		'Q2',   53,   		58,			56		),
54
-		array('',		'Q3',   64,   		66,			69		),
55
-		array('',		'Q4',   54,   		55,			56		),
56
-		array('2012',	'Q1',   49,   		52,			58		),
57
-		array('',		'Q2',   68,   		73,			86		),
58
-		array('',		'Q3',   72,   		78,			0		),
59
-		array('',		'Q4',   50,   		60,			0		),
47
+		array('', '', 'Budget', 'Forecast', 'Actual'),
48
+		array('2010', 'Q1', 47, 44, 43),
49
+		array('', 'Q2', 56, 53, 50),
50
+		array('', 'Q3', 52, 46, 45),
51
+		array('', 'Q4', 45, 40, 40),
52
+		array('2011', 'Q1', 51, 42, 46),
53
+		array('', 'Q2', 53, 58, 56),
54
+		array('', 'Q3', 64, 66, 69),
55
+		array('', 'Q4', 54, 55, 56),
56
+		array('2012', 'Q1', 49, 52, 58),
57
+		array('', 'Q2', 68, 73, 86),
58
+		array('', 'Q3', 72, 78, 0),
59
+		array('', 'Q4', 50, 60, 0),
60 60
 	)
61 61
 );
62 62
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 //		Data values
69 69
 //		Data Marker
70 70
 $dataSeriesLabels = array(
71
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	'Budget'
72
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	'Forecast'
73
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1),	//	'Actual'
71
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //	'Budget'
72
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //	'Forecast'
73
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //	'Actual'
74 74
 );
75 75
 //	Set the X-Axis Labels
76 76
 //		Datatype
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 //		Data values
81 81
 //		Data Marker
82 82
 $xAxisTickValues = array(
83
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12),	//	Q1 to Q4 for 2010 to 2012
83
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12), //	Q1 to Q4 for 2010 to 2012
84 84
 );
85 85
 //	Set the Data values for each data series we want to plot
86 86
 //		Datatype
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 
98 98
 //	Build the dataseries
99 99
 $series = new \PHPExcel\Chart\DataSeries(
100
-	\PHPExcel\Chart\DataSeries::TYPE_BARCHART,		// plotType
101
-	\PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED,	// plotGrouping
102
-	range(0, count($dataSeriesValues)-1),			// plotOrder
103
-	$dataSeriesLabels,								// plotLabel
104
-	$xAxisTickValues,								// plotCategory
100
+	\PHPExcel\Chart\DataSeries::TYPE_BARCHART, // plotType
101
+	\PHPExcel\Chart\DataSeries::GROUPING_CLUSTERED, // plotGrouping
102
+	range(0, count($dataSeriesValues) - 1), // plotOrder
103
+	$dataSeriesLabels, // plotLabel
104
+	$xAxisTickValues, // plotCategory
105 105
 	$dataSeriesValues								// plotValues
106 106
 );
107 107
 //	Set additional dataseries parameters
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
 
121 121
 //	Create the chart
122 122
 $chart = new \PHPExcel\Chart(
123
-	'chart1',		// name
124
-	$title,			// title
125
-	$legend,		// legend
126
-	$plotArea,		// plotArea
127
-	true,			// plotVisibleOnly
128
-	0,				// displayBlanksAs
129
-	$xAxisLabel,	// xAxisLabel
123
+	'chart1', // name
124
+	$title, // title
125
+	$legend, // legend
126
+	$plotArea, // plotArea
127
+	true, // plotVisibleOnly
128
+	0, // displayBlanksAs
129
+	$xAxisLabel, // xAxisLabel
130 130
 	$yAxisLabel		// yAxisLabel
131 131
 );
132 132
 
@@ -139,16 +139,16 @@  discard block
 block discarded – undo
139 139
 
140 140
 
141 141
 // Save Excel 2007 file
142
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
142
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
143 143
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
144 144
 $objWriter->setIncludeCharts(TRUE);
145 145
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
146
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
146
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
147 147
 
148 148
 
149 149
 // Echo memory peak usage
150
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
150
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
151 151
 
152 152
 // Echo done
153
-echo date('H:i:s') , " Done writing file" , EOL;
154
-echo 'File has been created in ' , getcwd() , EOL;
153
+echo date('H:i:s'), " Done writing file", EOL;
154
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/OOCalcReaderPCLZip.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file
37 37
 PHPExcel\Settings::setZipClass(PHPExcel\Settings::PCLZIP);
38 38
 
39
-echo date('H:i:s') , " Load from OOCalc file" , PHP_EOL;
39
+echo date('H:i:s'), " Load from OOCalc file", PHP_EOL;
40 40
 $callStartTime = microtime(true);
41 41
 
42 42
 $objReader = \PHPExcel\IOFactory::createReader('OOCalc');
@@ -45,20 +45,20 @@  discard block
 block discarded – undo
45 45
 
46 46
 $callEndTime = microtime(true);
47 47
 $callTime = $callEndTime - $callStartTime;
48
-echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL;
48
+echo 'Call time to read Workbook was ', sprintf('%.4f', $callTime), " seconds", PHP_EOL;
49 49
 // Echo memory usage
50
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
50
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", PHP_EOL;
51 51
 
52 52
 
53
-echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
53
+echo date('H:i:s'), " Write to Excel2007 format", PHP_EOL;
54 54
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
55 55
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
56
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
56
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', __FILE__), PHP_EOL;
57 57
 
58 58
 
59 59
 // Echo memory peak usage
60
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
60
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", PHP_EOL;
61 61
 
62 62
 // Echo done
63
-echo date('H:i:s') , " Done writing file" , PHP_EOL;
63
+echo date('H:i:s'), " Done writing file", PHP_EOL;
64 64
 
Please login to merge, or discard this patch.
Examples/36chartreadwriteHTML.php 2 patches
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
 if (!PHPExcel\Settings::setChartRenderer(
25
-		$rendererName,
26
-		$rendererLibraryPath
27
-	)) {
28
-	die(
29
-		'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
30
-		EOL .
31
-		'at the top of this script as appropriate for your directory structure'
32
-	);
25
+        $rendererName,
26
+        $rendererLibraryPath
27
+    )) {
28
+    die(
29
+        'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
30
+        EOL .
31
+        'at the top of this script as appropriate for your directory structure'
32
+    );
33 33
 }
34 34
 
35 35
 
@@ -37,81 +37,81 @@  discard block
 block discarded – undo
37 37
 $inputFileNames = 'templates/36write*.xlsx';
38 38
 
39 39
 if ((isset($argc)) && ($argc > 1)) {
40
-	$inputFileNames = array();
41
-	for($i = 1; $i < $argc; ++$i) {
42
-		$inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i];
43
-	}
40
+    $inputFileNames = array();
41
+    for($i = 1; $i < $argc; ++$i) {
42
+        $inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i];
43
+    }
44 44
 } else {
45
-	$inputFileNames = glob($inputFileNames);
45
+    $inputFileNames = glob($inputFileNames);
46 46
 }
47 47
 foreach($inputFileNames as $inputFileName) {
48
-	$inputFileNameShort = basename($inputFileName);
49
-
50
-	if (!file_exists($inputFileName)) {
51
-		echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL;
52
-		continue;
53
-	}
54
-
55
-	echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
56
-
57
-	$objReader = \PHPExcel\IOFactory::createReader($inputFileType);
58
-	$objReader->setIncludeCharts(TRUE);
59
-	$objPHPExcel = $objReader->load($inputFileName);
60
-
61
-
62
-	echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL;
63
-	foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
64
-		$sheetName = $worksheet->getTitle();
65
-		echo 'Worksheet: ' , $sheetName , EOL;
66
-
67
-		$chartNames = $worksheet->getChartNames();
68
-		if(empty($chartNames)) {
69
-			echo '    There are no charts in this worksheet' , EOL;
70
-		} else {
71
-			natsort($chartNames);
72
-			foreach($chartNames as $i => $chartName) {
73
-				$chart = $worksheet->getChartByName($chartName);
74
-				if (!is_null($chart->getTitle())) {
75
-					$caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"';
76
-				} else {
77
-					$caption = 'Untitled';
78
-				}
79
-				echo '    ' , $chartName , ' - ' , $caption , EOL;
80
-				echo str_repeat(' ',strlen($chartName)+3);
81
-				$groupCount = $chart->getPlotArea()->getPlotGroupCount();
82
-				if ($groupCount == 1) {
83
-					$chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType();
84
-					echo '    ' , $chartType , EOL;
85
-				} else {
86
-					$chartTypes = array();
87
-					for($i = 0; $i < $groupCount; ++$i) {
88
-						$chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();
89
-					}
90
-					$chartTypes = array_unique($chartTypes);
91
-					if (count($chartTypes) == 1) {
92
-						$chartType = 'Multiple Plot ' . array_pop($chartTypes);
93
-						echo '    ' , $chartType , EOL;
94
-					} elseif (count($chartTypes) == 0) {
95
-						echo '    *** Type not yet implemented' , EOL;
96
-					} else {
97
-						echo '    Combination Chart' , EOL;
98
-					}
99
-				}
100
-			}
101
-		}
102
-	}
103
-
104
-
105
-	$outputFileName = str_replace('.xlsx', '.html', basename($inputFileName));
106
-
107
-	echo date('H:i:s') , " Write Tests to HTML file " , EOL;
108
-	$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
109
-	$objWriter->setIncludeCharts(TRUE);
110
-	$objWriter->save($outputFileName);
111
-	echo date('H:i:s') , " File written to " , $outputFileName , EOL;
112
-
113
-	$objPHPExcel->disconnectWorksheets();
114
-	unset($objPHPExcel);
48
+    $inputFileNameShort = basename($inputFileName);
49
+
50
+    if (!file_exists($inputFileName)) {
51
+        echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL;
52
+        continue;
53
+    }
54
+
55
+    echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
56
+
57
+    $objReader = \PHPExcel\IOFactory::createReader($inputFileType);
58
+    $objReader->setIncludeCharts(TRUE);
59
+    $objPHPExcel = $objReader->load($inputFileName);
60
+
61
+
62
+    echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL;
63
+    foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
64
+        $sheetName = $worksheet->getTitle();
65
+        echo 'Worksheet: ' , $sheetName , EOL;
66
+
67
+        $chartNames = $worksheet->getChartNames();
68
+        if(empty($chartNames)) {
69
+            echo '    There are no charts in this worksheet' , EOL;
70
+        } else {
71
+            natsort($chartNames);
72
+            foreach($chartNames as $i => $chartName) {
73
+                $chart = $worksheet->getChartByName($chartName);
74
+                if (!is_null($chart->getTitle())) {
75
+                    $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"';
76
+                } else {
77
+                    $caption = 'Untitled';
78
+                }
79
+                echo '    ' , $chartName , ' - ' , $caption , EOL;
80
+                echo str_repeat(' ',strlen($chartName)+3);
81
+                $groupCount = $chart->getPlotArea()->getPlotGroupCount();
82
+                if ($groupCount == 1) {
83
+                    $chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType();
84
+                    echo '    ' , $chartType , EOL;
85
+                } else {
86
+                    $chartTypes = array();
87
+                    for($i = 0; $i < $groupCount; ++$i) {
88
+                        $chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();
89
+                    }
90
+                    $chartTypes = array_unique($chartTypes);
91
+                    if (count($chartTypes) == 1) {
92
+                        $chartType = 'Multiple Plot ' . array_pop($chartTypes);
93
+                        echo '    ' , $chartType , EOL;
94
+                    } elseif (count($chartTypes) == 0) {
95
+                        echo '    *** Type not yet implemented' , EOL;
96
+                    } else {
97
+                        echo '    Combination Chart' , EOL;
98
+                    }
99
+                }
100
+            }
101
+        }
102
+    }
103
+
104
+
105
+    $outputFileName = str_replace('.xlsx', '.html', basename($inputFileName));
106
+
107
+    echo date('H:i:s') , " Write Tests to HTML file " , EOL;
108
+    $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'HTML');
109
+    $objWriter->setIncludeCharts(TRUE);
110
+    $objWriter->save($outputFileName);
111
+    echo date('H:i:s') , " File written to " , $outputFileName , EOL;
112
+
113
+    $objPHPExcel->disconnectWorksheets();
114
+    unset($objPHPExcel);
115 115
 }
116 116
 
117 117
 // Echo memory peak usage
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 ini_set('display_startup_errors', TRUE);
7 7
 date_default_timezone_set('Europe/London');
8 8
 
9
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
9
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
10 10
 
11 11
 date_default_timezone_set('Europe/London');
12 12
 
@@ -61,63 +61,63 @@  discard block
 block discarded – undo
61 61
 
62 62
 if ((isset($argc)) && ($argc > 1)) {
63 63
 	$inputFileNames = array();
64
-	for($i = 1; $i < $argc; ++$i) {
64
+	for ($i = 1; $i < $argc; ++$i) {
65 65
 		$inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i];
66 66
 	}
67 67
 } else {
68 68
 	$inputFileNames = glob($inputFileNames);
69 69
 }
70
-foreach($inputFileNames as $inputFileName) {
70
+foreach ($inputFileNames as $inputFileName) {
71 71
 	$inputFileNameShort = basename($inputFileName);
72 72
 
73 73
 	if (!file_exists($inputFileName)) {
74
-		echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL;
74
+		echo date('H:i:s'), " File ", $inputFileNameShort, ' does not exist', EOL;
75 75
 		continue;
76 76
 	}
77 77
 
78
-	echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL;
78
+	echo date('H:i:s'), " Load Test from $inputFileType file ", $inputFileNameShort, EOL;
79 79
 
80 80
 	$objReader = \PHPExcel\IOFactory::createReader($inputFileType);
81 81
 	$objReader->setIncludeCharts(TRUE);
82 82
 	$objPHPExcel = $objReader->load($inputFileName);
83 83
 
84 84
 
85
-	echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL;
85
+	echo date('H:i:s'), " Iterate worksheets looking at the charts", EOL;
86 86
 	foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
87 87
 		$sheetName = $worksheet->getTitle();
88
-		echo 'Worksheet: ' , $sheetName , EOL;
88
+		echo 'Worksheet: ', $sheetName, EOL;
89 89
 
90 90
 		$chartNames = $worksheet->getChartNames();
91
-		if(empty($chartNames)) {
92
-			echo '    There are no charts in this worksheet' , EOL;
91
+		if (empty($chartNames)) {
92
+			echo '    There are no charts in this worksheet', EOL;
93 93
 		} else {
94 94
 			natsort($chartNames);
95
-			foreach($chartNames as $i => $chartName) {
95
+			foreach ($chartNames as $i => $chartName) {
96 96
 				$chart = $worksheet->getChartByName($chartName);
97 97
 				if (!is_null($chart->getTitle())) {
98
-					$caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"';
98
+					$caption = '"' . implode(' ', $chart->getTitle()->getCaption()) . '"';
99 99
 				} else {
100 100
 					$caption = 'Untitled';
101 101
 				}
102
-				echo '    ' , $chartName , ' - ' , $caption , EOL;
103
-				echo str_repeat(' ',strlen($chartName)+3);
102
+				echo '    ', $chartName, ' - ', $caption, EOL;
103
+				echo str_repeat(' ', strlen($chartName) + 3);
104 104
 				$groupCount = $chart->getPlotArea()->getPlotGroupCount();
105 105
 				if ($groupCount == 1) {
106 106
 					$chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType();
107
-					echo '    ' , $chartType , EOL;
107
+					echo '    ', $chartType, EOL;
108 108
 				} else {
109 109
 					$chartTypes = array();
110
-					for($i = 0; $i < $groupCount; ++$i) {
110
+					for ($i = 0; $i < $groupCount; ++$i) {
111 111
 						$chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType();
112 112
 					}
113 113
 					$chartTypes = array_unique($chartTypes);
114 114
 					if (count($chartTypes) == 1) {
115 115
 						$chartType = 'Multiple Plot ' . array_pop($chartTypes);
116
-						echo '    ' , $chartType , EOL;
116
+						echo '    ', $chartType, EOL;
117 117
 					} elseif (count($chartTypes) == 0) {
118
-						echo '    *** Type not yet implemented' , EOL;
118
+						echo '    *** Type not yet implemented', EOL;
119 119
 					} else {
120
-						echo '    Combination Chart' , EOL;
120
+						echo '    Combination Chart', EOL;
121 121
 					}
122 122
 				}
123 123
 			}
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
 
128 128
 	$outputFileName = str_replace('.xlsx', '.pdf', basename($inputFileName));
129 129
 
130
-	echo date('H:i:s') , " Write Tests to HTML file " , EOL;
130
+	echo date('H:i:s'), " Write Tests to HTML file ", EOL;
131 131
 	$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'PDF');
132 132
 	$objWriter->setIncludeCharts(TRUE);
133 133
 	$objWriter->save($outputFileName);
134
-	echo date('H:i:s') , " File written to " , $outputFileName , EOL;
134
+	echo date('H:i:s'), " File written to ", $outputFileName, EOL;
135 135
 
136 136
 	$objPHPExcel->disconnectWorksheets();
137 137
 	unset($objPHPExcel);
138 138
 }
139 139
 
140 140
 // Echo memory peak usage
141
-echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
141
+echo date('H:i:s'), ' Peak memory usage: ', (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
142 142
 
143 143
 // Echo done
144
-echo date('H:i:s') , " Done writing files" , EOL;
145
-echo 'Files have been created in ' , getcwd() , EOL;
144
+echo date('H:i:s'), " Done writing files", EOL;
145
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/44worksheetInfo.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 ini_set('display_errors', TRUE);
30 30
 ini_set('display_startup_errors', TRUE);
31 31
 
32
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
32
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
33 33
 
34 34
 date_default_timezone_set('Europe/London');
35 35
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
 
40 40
 if (!file_exists("05featuredemo.xlsx")) {
41
-	exit("Please run 05featuredemo.php first." . EOL);
41
+    exit("Please run 05featuredemo.php first." . EOL);
42 42
 }
43 43
 
44 44
 echo date('H:i:s') , " Load from Excel2007 file" , EOL;
Please login to merge, or discard this patch.
Examples/08conditionalformatting2.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
 // Set document properties
46 46
 echo date('H:i:s') , " Set document properties" , EOL;
47 47
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
48
-							 ->setLastModifiedBy("Maarten Balliauw")
49
-							 ->setTitle("Office 2007 XLSX Test Document")
50
-							 ->setSubject("Office 2007 XLSX Test Document")
51
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
52
-							 ->setKeywords("office 2007 openxml php")
53
-							 ->setCategory("Test result file");
48
+                                ->setLastModifiedBy("Maarten Balliauw")
49
+                                ->setTitle("Office 2007 XLSX Test Document")
50
+                                ->setSubject("Office 2007 XLSX Test Document")
51
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
52
+                                ->setKeywords("office 2007 openxml php")
53
+                                ->setCategory("Test result file");
54 54
 
55 55
 
56 56
 // Create a first sheet, representing sales data
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 //	duplicate the conditional styles across a range of cells
98 98
 echo date('H:i:s') , " Duplicate the conditional formatting across a range of cells" , EOL;
99 99
 $objPHPExcel->getActiveSheet()->duplicateConditionalStyle(
100
-				$objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles(),
101
-				'A2:A8'
102
-			  );
100
+                $objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles(),
101
+                'A2:A8'
102
+                );
103 103
 
104 104
 
105 105
 // Save Excel 2007 file
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 ini_set('display_errors', TRUE);
31 31
 ini_set('display_startup_errors', TRUE);
32 32
 
33
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
33
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
34 34
 
35 35
 date_default_timezone_set('Europe/London');
36 36
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 // Create new PHPExcel object
42
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
42
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
43 43
 $objPHPExcel = new \PHPExcel\Spreadsheet();
44 44
 
45 45
 // Set document properties
46
-echo date('H:i:s') , " Set document properties" , EOL;
46
+echo date('H:i:s'), " Set document properties", EOL;
47 47
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
48 48
 							 ->setLastModifiedBy("Maarten Balliauw")
49 49
 							 ->setTitle("Office 2007 XLSX Test Document")
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 
56 56
 // Create a first sheet, representing sales data
57
-echo date('H:i:s') , " Add some data" , EOL;
57
+echo date('H:i:s'), " Add some data", EOL;
58 58
 $objPHPExcel->setActiveSheetIndex(0);
59 59
 $objPHPExcel->getActiveSheet()
60 60
     ->setCellValue('A1', '-0.5')
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 
77 77
 // Add conditional formatting
78
-echo date('H:i:s') , " Add conditional formatting" , EOL;
78
+echo date('H:i:s'), " Add conditional formatting", EOL;
79 79
 $objConditional1 = new \PHPExcel\Style\Conditional();
80 80
 $objConditional1->setConditionType(\PHPExcel\Style\Conditional::CONDITION_CELLIS)
81 81
     ->setOperatorType(\PHPExcel\Style\Conditional::OPERATOR_LESSTHAN)
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 
97 97
 //	duplicate the conditional styles across a range of cells
98
-echo date('H:i:s') , " Duplicate the conditional formatting across a range of cells" , EOL;
98
+echo date('H:i:s'), " Duplicate the conditional formatting across a range of cells", EOL;
99 99
 $objPHPExcel->getActiveSheet()->duplicateConditionalStyle(
100 100
 				$objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles(),
101 101
 				'A2:A8'
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
 
105 105
 // Save Excel 2007 file
106
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
106
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
107 107
 $callStartTime = microtime(true);
108 108
 
109 109
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
 $callEndTime = microtime(true);
112 112
 $callTime = $callEndTime - $callStartTime;
113 113
 
114
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
115
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
114
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
115
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
116 116
 // Save Excel5 file
117
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
117
+echo date('H:i:s'), " Write to Excel5 format", EOL;
118 118
 $callStartTime = microtime(true);
119 119
 
120 120
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
@@ -122,15 +122,15 @@  discard block
 block discarded – undo
122 122
 $callEndTime = microtime(true);
123 123
 $callTime = $callEndTime - $callStartTime;
124 124
 
125
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
126
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
125
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
126
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
127 127
 // Echo memory usage
128
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
128
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
129 129
 
130 130
 
131 131
 // Echo memory peak usage
132
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
132
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
133 133
 
134 134
 // Echo done
135
-echo date('H:i:s') , " Done writing file" , EOL;
136
-echo 'File has been created in ' , getcwd() , EOL;
135
+echo date('H:i:s'), " Done writing file", EOL;
136
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/04printing.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,19 +45,19 @@
 block discarded – undo
45 45
 // Set document properties
46 46
 echo date('H:i:s') , " Set document properties" , EOL;
47 47
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
48
-							 ->setLastModifiedBy("Maarten Balliauw")
49
-							 ->setTitle("Office 2007 XLSX Test Document")
50
-							 ->setSubject("Office 2007 XLSX Test Document")
51
-							 ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
52
-							 ->setKeywords("office 2007 openxml php")
53
-							 ->setCategory("Test result file");
48
+                                ->setLastModifiedBy("Maarten Balliauw")
49
+                                ->setTitle("Office 2007 XLSX Test Document")
50
+                                ->setSubject("Office 2007 XLSX Test Document")
51
+                                ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
52
+                                ->setKeywords("office 2007 openxml php")
53
+                                ->setCategory("Test result file");
54 54
 
55 55
 
56 56
 // Add some data, we will use printing features
57 57
 echo date('H:i:s') , " Add some data" , EOL;
58 58
 for ($i = 1; $i < 200; $i++) {
59
-	$objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $i);
60
-	$objPHPExcel->getActiveSheet()->setCellValue('B' . $i, 'Test value');
59
+    $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $i);
60
+    $objPHPExcel->getActiveSheet()->setCellValue('B' . $i, 'Test value');
61 61
 }
62 62
 
63 63
 // Set header and footer. When no different headers for odd/even are used, odd header is assumed.
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 ini_set('display_errors', TRUE);
31 31
 ini_set('display_startup_errors', TRUE);
32 32
 
33
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
33
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
34 34
 
35 35
 date_default_timezone_set('Europe/London');
36 36
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 // Create new PHPExcel object
42
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
42
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
43 43
 $objPHPExcel = new \PHPExcel\Spreadsheet();
44 44
 
45 45
 // Set document properties
46
-echo date('H:i:s') , " Set document properties" , EOL;
46
+echo date('H:i:s'), " Set document properties", EOL;
47 47
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
48 48
 							 ->setLastModifiedBy("Maarten Balliauw")
49 49
 							 ->setTitle("Office 2007 XLSX Test Document")
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
 
55 55
 
56 56
 // Add some data, we will use printing features
57
-echo date('H:i:s') , " Add some data" , EOL;
57
+echo date('H:i:s'), " Add some data", EOL;
58 58
 for ($i = 1; $i < 200; $i++) {
59 59
 	$objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $i);
60 60
 	$objPHPExcel->getActiveSheet()->setCellValue('B' . $i, 'Test value');
61 61
 }
62 62
 
63 63
 // Set header and footer. When no different headers for odd/even are used, odd header is assumed.
64
-echo date('H:i:s') , " Set header/footer" , EOL;
64
+echo date('H:i:s'), " Set header/footer", EOL;
65 65
 $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HPlease treat this document as confidential!');
66 66
 $objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N');
67 67
 
68 68
 // Add a drawing to the header
69
-echo date('H:i:s') , " Add a drawing to the header" , EOL;
69
+echo date('H:i:s'), " Add a drawing to the header", EOL;
70 70
 $objDrawing = new \PHPExcel\Worksheet\HeaderFooterDrawing();
71 71
 $objDrawing->setName('PHPExcel logo');
72 72
 $objDrawing->setPath('./images/phpexcel_logo.gif');
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
 $objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, \PHPExcel\Worksheet\HeaderFooter::IMAGE_HEADER_LEFT);
75 75
 
76 76
 // Set page orientation and size
77
-echo date('H:i:s') , " Set page orientation and size" , EOL;
77
+echo date('H:i:s'), " Set page orientation and size", EOL;
78 78
 $objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(\PHPExcel\Worksheet\PageSetup::ORIENTATION_LANDSCAPE);
79 79
 $objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(\PHPExcel\Worksheet\PageSetup::PAPERSIZE_A4);
80 80
 
81 81
 // Rename worksheet
82
-echo date('H:i:s') , " Rename worksheet" , EOL;
82
+echo date('H:i:s'), " Rename worksheet", EOL;
83 83
 $objPHPExcel->getActiveSheet()->setTitle('Printing');
84 84
 
85 85
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 
90 90
 // Save Excel 2007 file
91
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
91
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
92 92
 $callStartTime = microtime(true);
93 93
 
94 94
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
 $callEndTime = microtime(true);
97 97
 $callTime = $callEndTime - $callStartTime;
98 98
 
99
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
100
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
99
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
100
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
101 101
 // Echo memory usage
102
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
102
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
103 103
 
104 104
 
105 105
 // Save Excel 95 file
106
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
106
+echo date('H:i:s'), " Write to Excel5 format", EOL;
107 107
 $callStartTime = microtime(true);
108 108
 
109 109
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
@@ -111,15 +111,15 @@  discard block
 block discarded – undo
111 111
 $callEndTime = microtime(true);
112 112
 $callTime = $callEndTime - $callStartTime;
113 113
 
114
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
115
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
114
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
115
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
116 116
 // Echo memory usage
117
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
117
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
118 118
 
119 119
 
120 120
 // Echo memory peak usage
121
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
121
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
122 122
 
123 123
 // Echo done
124
-echo date('H:i:s') , " Done writing files" , EOL;
125
-echo 'Files have been created in ' , getcwd() , EOL;
124
+echo date('H:i:s'), " Done writing files", EOL;
125
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.