Completed
Push — develop ( 942ad7...b0621f )
by Adrien
22:01 queued 09:22
created
Examples/01simple-download-ods.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,10 +79,10 @@
 block discarded – undo
79 79
 header('Cache-Control: max-age=1');
80 80
 
81 81
 // If you're serving to IE over SSL, then the following may be needed
82
-header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
83
-header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
84
-header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
85
-header ('Pragma: public'); // HTTP/1.0
82
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
83
+header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
84
+header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
85
+header('Pragma: public'); // HTTP/1.0
86 86
 
87 87
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
88 88
 $objWriter->save('php://output');
Please login to merge, or discard this patch.
Examples/36chartreadwriteHTML.php 1 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/06largescale-with-cellcaching-sqlite3.php 1 patch
Spacing   +17 added lines, -17 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,18 +39,18 @@  discard block
 block discarded – undo
39 39
 
40 40
 $cacheMethod = \PHPExcel\CachedObjectStorageFactory::CACHE_TO_SQLITE;
41 41
 if (\PHPExcel\Settings::setCacheStorageMethod($cacheMethod)) {
42
-    echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL;
42
+    echo date('H:i:s'), " Enable Cell Caching using ", $cacheMethod, " method", EOL;
43 43
 } else {
44
-    echo date('H:i:s') , " Unable to set Cell Caching using " , $cacheMethod , " method, reverting to memory" , EOL;
44
+    echo date('H:i:s'), " Unable to set Cell Caching using ", $cacheMethod, " method, reverting to memory", EOL;
45 45
 }
46 46
 
47 47
 
48 48
 // Create new PHPExcel object
49
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
49
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
50 50
 $objPHPExcel = new \PHPExcel\Spreadsheet();
51 51
 
52 52
 // Set document properties
53
-echo date('H:i:s') , " Set properties" , EOL;
53
+echo date('H:i:s'), " Set properties", EOL;
54 54
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
55 55
 							 ->setLastModifiedBy("Maarten Balliauw")
56 56
 							 ->setTitle("Office 2007 XLSX Test Document")
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 
63 63
 // Create a first sheet
64
-echo date('H:i:s') , " Add data" , EOL;
64
+echo date('H:i:s'), " Add data", EOL;
65 65
 $objPHPExcel->setActiveSheetIndex(0);
66 66
 $objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname");
67 67
 $objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname");
@@ -71,24 +71,24 @@  discard block
 block discarded – undo
71 71
 
72 72
 
73 73
 // Hide "Phone" and "fax" column
74
-echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL;
74
+echo date('H:i:s'), " Hide 'Phone' and 'fax' columns", EOL;
75 75
 $objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false);
76 76
 $objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false);
77 77
 
78 78
 
79 79
 // Set outline levels
80
-echo date('H:i:s') , " Set outline levels" , EOL;
80
+echo date('H:i:s'), " Set outline levels", EOL;
81 81
 $objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1)
82 82
                                                        ->setVisible(false)
83 83
                                                        ->setCollapsed(true);
84 84
 
85 85
 // Freeze panes
86
-echo date('H:i:s') , " Freeze panes" , EOL;
86
+echo date('H:i:s'), " Freeze panes", EOL;
87 87
 $objPHPExcel->getActiveSheet()->freezePane('A2');
88 88
 
89 89
 
90 90
 // Rows to repeat at top
91
-echo date('H:i:s') , " Rows to repeat at top" , EOL;
91
+echo date('H:i:s'), " Rows to repeat at top", EOL;
92 92
 $objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1);
93 93
 
94 94
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 
109 109
 // Save Excel 2007 file
110
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
110
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
111 111
 $callStartTime = microtime(true);
112 112
 
113 113
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -115,15 +115,15 @@  discard block
 block discarded – undo
115 115
 $callEndTime = microtime(true);
116 116
 $callTime = $callEndTime - $callStartTime;
117 117
 
118
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
119
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
118
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
119
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
120 120
 // Echo memory usage
121
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
121
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
122 122
 
123 123
 
124 124
 // Echo memory peak usage
125
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
125
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
126 126
 
127 127
 // Echo done
128
-echo date('H:i:s') , " Done writing file" , EOL;
129
-echo 'File has been created in ' , getcwd() , EOL;
128
+echo date('H:i:s'), " Done writing file", EOL;
129
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/01pharSimple.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@  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
 /** Include PHPExcel */
37 37
 require_once dirname(__FILE__) . '/../src/Bootstrap.php';
38 38
 
39 39
 
40 40
 // Create new PHPExcel object
41
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
41
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
42 42
 $objPHPExcel = new \PHPExcel\Spreadsheet();
43 43
 
44 44
 // Set document properties
45
-echo date('H:i:s') , " Set document properties" , EOL;
45
+echo date('H:i:s'), " Set document properties", EOL;
46 46
 $objPHPExcel->getProperties()->setCreator("Maarten Balliauw")
47 47
 	->setLastModifiedBy("Maarten Balliauw")
48 48
 	->setTitle("PHPExcel Test Document")
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 
55 55
 // Add some data
56
-echo date('H:i:s') , " Add some data" , EOL;
56
+echo date('H:i:s'), " Add some data", EOL;
57 57
 
58 58
 $html1 = '<font color="#0000ff">
59 59
 <h1 align="center">My very first example of rich text<br />generated from html markup</h1>
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
 
126 126
 // Rename worksheet
127
-echo date('H:i:s') , " Rename worksheet" , EOL;
127
+echo date('H:i:s'), " Rename worksheet", EOL;
128 128
 $objPHPExcel->getActiveSheet()
129 129
     ->setTitle('Rich Text Examples');
130 130
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
 
136 136
 // Save Excel 2007 file
137
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
137
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
138 138
 $callStartTime = microtime(true);
139 139
 
140 140
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -142,14 +142,14 @@  discard block
 block discarded – undo
142 142
 $callEndTime = microtime(true);
143 143
 $callTime = $callEndTime - $callStartTime;
144 144
 
145
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
146
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
145
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
146
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
147 147
 // Echo memory usage
148
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
148
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
149 149
 
150 150
 
151 151
 // Save Excel 95 file
152
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
152
+echo date('H:i:s'), " Write to Excel5 format", EOL;
153 153
 $callStartTime = microtime(true);
154 154
 
155 155
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 $callEndTime = microtime(true);
158 158
 $callTime = $callEndTime - $callStartTime;
159 159
 
160
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
161
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
160
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
161
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
162 162
 // Echo memory usage
163
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
163
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
164 164
 
165 165
 
166 166
 // Echo memory peak usage
167
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
167
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
168 168
 
169 169
 // Echo done
170
-echo date('H:i:s') , " Done writing files" , EOL;
171
-echo 'Files have been created in ' , getcwd() , EOL;
170
+echo date('H:i:s'), " Done writing files", EOL;
171
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/01simple-download-xlsx.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,10 +79,10 @@
 block discarded – undo
79 79
 header('Cache-Control: max-age=1');
80 80
 
81 81
 // If you're serving to IE over SSL, then the following may be needed
82
-header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
83
-header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified
84
-header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1
85
-header ('Pragma: public'); // HTTP/1.0
82
+header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
83
+header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified
84
+header('Cache-Control: cache, must-revalidate'); // HTTP/1.1
85
+header('Pragma: public'); // HTTP/1.0
86 86
 
87 87
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
88 88
 $objWriter->save('php://output');
Please login to merge, or discard this patch.
Examples/33chartcreate-radar.php 1 patch
Spacing   +38 added lines, -38 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('',	2010,	2011,	2012),
48
-		array('Jan',   47,   45,		71),
49
-		array('Feb',   56,   73,		86),
50
-		array('Mar',   52,   61,		69),
51
-		array('Apr',   40,   52,		60),
52
-		array('May',   42,   55,		71),
53
-		array('Jun',   58,   63,		76),
54
-		array('Jul',   53,   61,		89),
55
-		array('Aug',   46,   69,		85),
56
-		array('Sep',   62,   75,		81),
57
-		array('Oct',   51,   70,		96),
58
-		array('Nov',   55,   66,		89),
59
-		array('Dec',   68,   62,		0),
47
+		array('', 2010, 2011, 2012),
48
+		array('Jan', 47, 45, 71),
49
+		array('Feb', 56, 73, 86),
50
+		array('Mar', 52, 61, 69),
51
+		array('Apr', 40, 52, 60),
52
+		array('May', 42, 55, 71),
53
+		array('Jun', 58, 63, 76),
54
+		array('Jul', 53, 61, 89),
55
+		array('Aug', 46, 69, 85),
56
+		array('Sep', 62, 75, 81),
57
+		array('Oct', 51, 70, 96),
58
+		array('Nov', 55, 66, 89),
59
+		array('Dec', 68, 62, 0),
60 60
 	)
61 61
 );
62 62
 
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 //		Data values
70 70
 //		Data Marker
71 71
 $dataSeriesLabels = array(
72
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	2011
73
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	2012
72
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //	2011
73
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //	2012
74 74
 );
75 75
 //	Set the X-Axis Labels
76 76
 //		Datatype
@@ -80,8 +80,8 @@  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:$A$13', NULL, 12),	//	Jan to Dec
84
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12),	//	Jan to Dec
83
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), //	Jan to Dec
84
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), //	Jan to Dec
85 85
 );
86 86
 //	Set the Data values for each data series we want to plot
87 87
 //		Datatype
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 
98 98
 //	Build the dataseries
99 99
 $series = new \PHPExcel\Chart\DataSeries(
100
-	\PHPExcel\Chart\DataSeries::TYPE_RADARCHART,	// plotType
101
-	NULL,											// plotGrouping (Radar charts don't have any grouping)
102
-	range(0, count($dataSeriesValues)-1),			// plotOrder
103
-	$dataSeriesLabels,								// plotLabel
104
-	$xAxisTickValues,								// plotCategory
105
-	$dataSeriesValues,								// plotValues
106
-    NULL,                                           // plotDirection
107
-	NULL,											// smooth line
100
+	\PHPExcel\Chart\DataSeries::TYPE_RADARCHART, // plotType
101
+	NULL, // plotGrouping (Radar charts don't have any grouping)
102
+	range(0, count($dataSeriesValues) - 1), // plotOrder
103
+	$dataSeriesLabels, // plotLabel
104
+	$xAxisTickValues, // plotCategory
105
+	$dataSeriesValues, // plotValues
106
+    NULL, // plotDirection
107
+	NULL, // smooth line
108 108
 	\PHPExcel\Chart\DataSeries::STYLE_MARKER		// plotStyle
109 109
 );
110 110
 
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
 
122 122
 //	Create the chart
123 123
 $chart = new \PHPExcel\Chart(
124
-	'chart1',		// name
125
-	$title,			// title
126
-	$legend,		// legend
127
-	$plotArea,		// plotArea
128
-	true,			// plotVisibleOnly
129
-	0,				// displayBlanksAs
130
-	NULL,			// xAxisLabel
124
+	'chart1', // name
125
+	$title, // title
126
+	$legend, // legend
127
+	$plotArea, // plotArea
128
+	true, // plotVisibleOnly
129
+	0, // displayBlanksAs
130
+	NULL, // xAxisLabel
131 131
 	NULL			// yAxisLabel		- Radar charts don't have a Y-Axis
132 132
 );
133 133
 
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
 
141 141
 
142 142
 // Save Excel 2007 file
143
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
143
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
144 144
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
145 145
 $objWriter->setIncludeCharts(TRUE);
146 146
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
147
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
147
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
148 148
 
149 149
 
150 150
 // Echo memory peak usage
151
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
151
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
152 152
 
153 153
 // Echo done
154
-echo date('H:i:s') , " Done writing file" , EOL;
155
-echo 'File has been created in ' , getcwd() , EOL;
154
+echo date('H:i:s'), " Done writing file", EOL;
155
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/CodePage.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -40,117 +40,117 @@
 block discarded – undo
40 40
     {
41 41
         switch ($codePage) {
42 42
             case 367:
43
-                return 'ASCII';    //    ASCII
43
+                return 'ASCII'; //    ASCII
44 44
             case 437:
45
-                return 'CP437';    //    OEM US
45
+                return 'CP437'; //    OEM US
46 46
             case 720:
47
-                throw new \PhpSpreadsheet\Exception('Code page 720 not supported.');    //    OEM Arabic
47
+                throw new \PhpSpreadsheet\Exception('Code page 720 not supported.'); //    OEM Arabic
48 48
             case 737:
49
-                return 'CP737';    //    OEM Greek
49
+                return 'CP737'; //    OEM Greek
50 50
             case 775:
51
-                return 'CP775';    //    OEM Baltic
51
+                return 'CP775'; //    OEM Baltic
52 52
             case 850:
53
-                return 'CP850';    //    OEM Latin I
53
+                return 'CP850'; //    OEM Latin I
54 54
             case 852:
55
-                return 'CP852';    //    OEM Latin II (Central European)
55
+                return 'CP852'; //    OEM Latin II (Central European)
56 56
             case 855:
57
-                return 'CP855';    //    OEM Cyrillic
57
+                return 'CP855'; //    OEM Cyrillic
58 58
             case 857:
59
-                return 'CP857';    //    OEM Turkish
59
+                return 'CP857'; //    OEM Turkish
60 60
             case 858:
61
-                return 'CP858';    //    OEM Multilingual Latin I with Euro
61
+                return 'CP858'; //    OEM Multilingual Latin I with Euro
62 62
             case 860:
63
-                return 'CP860';    //    OEM Portugese
63
+                return 'CP860'; //    OEM Portugese
64 64
             case 861:
65
-                return 'CP861';    //    OEM Icelandic
65
+                return 'CP861'; //    OEM Icelandic
66 66
             case 862:
67
-                return 'CP862';    //    OEM Hebrew
67
+                return 'CP862'; //    OEM Hebrew
68 68
             case 863:
69
-                return 'CP863';    //    OEM Canadian (French)
69
+                return 'CP863'; //    OEM Canadian (French)
70 70
             case 864:
71
-                return 'CP864';    //    OEM Arabic
71
+                return 'CP864'; //    OEM Arabic
72 72
             case 865:
73
-                return 'CP865';    //    OEM Nordic
73
+                return 'CP865'; //    OEM Nordic
74 74
             case 866:
75
-                return 'CP866';    //    OEM Cyrillic (Russian)
75
+                return 'CP866'; //    OEM Cyrillic (Russian)
76 76
             case 869:
77
-                return 'CP869';    //    OEM Greek (Modern)
77
+                return 'CP869'; //    OEM Greek (Modern)
78 78
             case 874:
79
-                return 'CP874';    //    ANSI Thai
79
+                return 'CP874'; //    ANSI Thai
80 80
             case 932:
81
-                return 'CP932';    //    ANSI Japanese Shift-JIS
81
+                return 'CP932'; //    ANSI Japanese Shift-JIS
82 82
             case 936:
83
-                return 'CP936';    //    ANSI Chinese Simplified GBK
83
+                return 'CP936'; //    ANSI Chinese Simplified GBK
84 84
             case 949:
85
-                return 'CP949';    //    ANSI Korean (Wansung)
85
+                return 'CP949'; //    ANSI Korean (Wansung)
86 86
             case 950:
87
-                return 'CP950';    //    ANSI Chinese Traditional BIG5
87
+                return 'CP950'; //    ANSI Chinese Traditional BIG5
88 88
             case 1200:
89 89
                 return 'UTF-16LE'; //    UTF-16 (BIFF8)
90 90
             case 1250:
91
-                return 'CP1250';   //    ANSI Latin II (Central European)
91
+                return 'CP1250'; //    ANSI Latin II (Central European)
92 92
             case 1251:
93
-                return 'CP1251';   //    ANSI Cyrillic
93
+                return 'CP1251'; //    ANSI Cyrillic
94 94
             case 0:
95 95
                 //    CodePage is not always correctly set when the xls file was saved by Apple's Numbers program
96 96
             case 1252:
97
-                return 'CP1252';   //    ANSI Latin I (BIFF4-BIFF7)
97
+                return 'CP1252'; //    ANSI Latin I (BIFF4-BIFF7)
98 98
             case 1253:
99
-                return 'CP1253';   //    ANSI Greek
99
+                return 'CP1253'; //    ANSI Greek
100 100
             case 1254:
101
-                return 'CP1254';   //    ANSI Turkish
101
+                return 'CP1254'; //    ANSI Turkish
102 102
             case 1255:
103
-                return 'CP1255';   //    ANSI Hebrew
103
+                return 'CP1255'; //    ANSI Hebrew
104 104
             case 1256:
105
-                return 'CP1256';   //    ANSI Arabic
105
+                return 'CP1256'; //    ANSI Arabic
106 106
             case 1257:
107
-                return 'CP1257';   //    ANSI Baltic
107
+                return 'CP1257'; //    ANSI Baltic
108 108
             case 1258:
109
-                return 'CP1258';   //    ANSI Vietnamese
109
+                return 'CP1258'; //    ANSI Vietnamese
110 110
             case 1361:
111
-                return 'CP1361';   //    ANSI Korean (Johab)
111
+                return 'CP1361'; //    ANSI Korean (Johab)
112 112
             case 10000:
113
-                return 'MAC';      //    Apple Roman
113
+                return 'MAC'; //    Apple Roman
114 114
             case 10001:
115
-                return 'CP932';    //    Macintosh Japanese
115
+                return 'CP932'; //    Macintosh Japanese
116 116
             case 10002:
117
-                return 'CP950';    //    Macintosh Chinese Traditional
117
+                return 'CP950'; //    Macintosh Chinese Traditional
118 118
             case 10003:
119
-                return 'CP1361';   //    Macintosh Korean
119
+                return 'CP1361'; //    Macintosh Korean
120 120
             case 10004:
121 121
                 return 'MACARABIC'; //    Apple Arabic
122 122
             case 10005:
123 123
                 return 'MACHEBREW'; //    Apple Hebrew
124 124
             case 10006:
125
-                return 'MACGREEK';  //    Macintosh Greek
125
+                return 'MACGREEK'; //    Macintosh Greek
126 126
             case 10007:
127
-                return 'MACCYRILLIC';  //    Macintosh Cyrillic
127
+                return 'MACCYRILLIC'; //    Macintosh Cyrillic
128 128
             case 10008:
129
-                return 'CP936';  //    Macintosh - Simplified Chinese (GB 2312)
129
+                return 'CP936'; //    Macintosh - Simplified Chinese (GB 2312)
130 130
             case 10010:
131
-                return 'MACROMANIA';    //    Macintosh Romania
131
+                return 'MACROMANIA'; //    Macintosh Romania
132 132
             case 10017:
133
-                return 'MACUKRAINE';    //    Macintosh Ukraine
133
+                return 'MACUKRAINE'; //    Macintosh Ukraine
134 134
             case 10021:
135
-                return 'MACTHAI';    //    Macintosh Thai
135
+                return 'MACTHAI'; //    Macintosh Thai
136 136
             case 10029:
137
-                return 'MACCENTRALEUROPE';  //    Macintosh Central Europe
137
+                return 'MACCENTRALEUROPE'; //    Macintosh Central Europe
138 138
             case 10079:
139
-                return 'MACICELAND';  //    Macintosh Icelandic
139
+                return 'MACICELAND'; //    Macintosh Icelandic
140 140
             case 10081:
141
-                return 'MACTURKISH';  //    Macintosh Turkish
141
+                return 'MACTURKISH'; //    Macintosh Turkish
142 142
             case 10082:
143
-                return 'MACCROATIAN';    //    Macintosh Croatian
143
+                return 'MACCROATIAN'; //    Macintosh Croatian
144 144
             case 21010:
145
-                return 'UTF-16LE';  //    UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
145
+                return 'UTF-16LE'; //    UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE
146 146
             case 32768:
147
-                return 'MAC';      //    Apple Roman
147
+                return 'MAC'; //    Apple Roman
148 148
             case 32769:
149
-                throw new \PhpSpreadsheet\Exception('Code page 32769 not supported.');  //    ANSI Latin I (BIFF2-BIFF3)
149
+                throw new \PhpSpreadsheet\Exception('Code page 32769 not supported.'); //    ANSI Latin I (BIFF2-BIFF3)
150 150
             case 65000:
151
-                return 'UTF-7';    //    Unicode (UTF-7)
151
+                return 'UTF-7'; //    Unicode (UTF-7)
152 152
             case 65001:
153
-                return 'UTF-8';    //    Unicode (UTF-8)
153
+                return 'UTF-8'; //    Unicode (UTF-8)
154 154
         }
155 155
         throw new \PhpSpreadsheet\Exception('Unknown codepage: ' . $codePage);
156 156
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/CSV.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,10 +116,10 @@
 block discarded – undo
116 116
         }
117 117
 
118 118
         if ($this->excelCompatibility) {
119
-            $this->setUseBOM(true);                //  Enforce UTF-8 BOM Header
120
-            $this->setIncludeSeparatorLine(true);  //  Set separator line
121
-            $this->setEnclosure('"');              //  Set enclosure to "
122
-            $this->setDelimiter(';');              //  Set delimiter to a semi-colon
119
+            $this->setUseBOM(true); //  Enforce UTF-8 BOM Header
120
+            $this->setIncludeSeparatorLine(true); //  Set separator line
121
+            $this->setEnclosure('"'); //  Set enclosure to "
122
+            $this->setDelimiter(';'); //  Set delimiter to a semi-colon
123 123
             $this->setLineEnding("\r\n");
124 124
         }
125 125
         if ($this->useBOM) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/Xf.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -167,16 +167,16 @@  discard block
 block discarded – undo
167 167
         }
168 168
 
169 169
         // Flags to indicate if attributes have been set.
170
-        $atr_num = ($this->numberFormatIndex != 0)?1:0;
171
-        $atr_fnt = ($this->fontIndex != 0)?1:0;
170
+        $atr_num = ($this->numberFormatIndex != 0) ? 1 : 0;
171
+        $atr_fnt = ($this->fontIndex != 0) ? 1 : 0;
172 172
         $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0;
173 173
         $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) ||
174 174
                         self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) ||
175 175
                         self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) ||
176
-                        self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()))?1:0;
176
+                        self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle())) ? 1 : 0;
177 177
         $atr_pat = (($this->foregroundColor != 0x40) ||
178 178
                         ($this->backgroundColor != 0x41) ||
179
-                        self::mapFillType($this->_style->getFill()->getFillType()))?1:0;
179
+                        self::mapFillType($this->_style->getFill()->getFillType())) ? 1 : 0;
180 180
         $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked())
181 181
                         | self::mapHidden($this->_style->getProtection()->getHidden());
182 182
 
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
             $this->_diag_color = 0;
198 198
         }
199 199
 
200
-        $record = 0x00E0;              // Record identifier
201
-        $length = 0x0014;              // Number of bytes to follow
200
+        $record = 0x00E0; // Record identifier
201
+        $length = 0x0014; // Number of bytes to follow
202 202
 
203
-        $ifnt = $this->fontIndex;   // Index to FONT record
204
-        $ifmt = $this->numberFormatIndex;  // Index to FORMAT record
203
+        $ifnt = $this->fontIndex; // Index to FONT record
204
+        $ifmt = $this->numberFormatIndex; // Index to FORMAT record
205 205
 
206
-        $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal());       // Alignment
206
+        $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment
207 207
         $align |= (int) $this->_style->getAlignment()->getWrapText() << 3;
208 208
         $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4;
209 209
         $align |= $this->textJustLast << 7;
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
         $used_attrib |= $atr_pat << 6;
216 216
         $used_attrib |= $atr_prot << 7;
217 217
 
218
-        $icv = $this->foregroundColor;      // fg and bg pattern colors
218
+        $icv = $this->foregroundColor; // fg and bg pattern colors
219 219
         $icv |= $this->backgroundColor << 7;
220 220
 
221
-        $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle());          // Border line style and color
221
+        $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color
222 222
         $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4;
223 223
         $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8;
224 224
         $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12;
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $border1 |= $diag_tl_to_rb << 30;
234 234
         $border1 |= $diag_tr_to_lb << 31;
235 235
 
236
-        $border2 = $this->topBorderColor;    // Border color
236
+        $border2 = $this->topBorderColor; // Border color
237 237
         $border2 |= $this->bottomBorderColor << 7;
238 238
         $border2 |= $this->_diag_color << 14;
239 239
         $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21;
@@ -413,8 +413,8 @@  discard block
 block discarded – undo
413 413
         \PhpSpreadsheet\Style\Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10,
414 414
         \PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY125 => 0x11,
415 415
         \PhpSpreadsheet\Style\Fill::FILL_PATTERN_GRAY0625 => 0x12,
416
-        \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_LINEAR => 0x00,    // does not exist in BIFF8
417
-        \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_PATH => 0x00,    // does not exist in BIFF8
416
+        \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8
417
+        \PhpSpreadsheet\Style\Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8
418 418
     ];
419 419
 
420 420
     /**
Please login to merge, or discard this patch.