Completed
Push — develop ( 685e29...09d456 )
by Adrien
14:14
created
Examples/37page_layout_view.php 1 patch
Spacing   +11 added lines, -11 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("PHPOffice")
47 47
 							 ->setLastModifiedBy("PHPOffice")
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
 $objPHPExcel->setActiveSheetIndex(0)
58 58
             ->setCellValue('A1', 'Hello')
59 59
             ->setCellValue('B2', 'world!');
@@ -65,19 +65,19 @@  discard block
 block discarded – undo
65 65
 $objPHPExcel->getActiveSheet()->getSheetView()->setView(PHPExcel\Worksheet\SheetView::SHEETVIEW_PAGE_LAYOUT);
66 66
 
67 67
 // Save Excel 2007 file
68
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
68
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
69 69
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
70 70
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
71
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
71
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
72 72
 // Save Excel5 file
73
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
73
+echo date('H:i:s'), " Write to Excel5 format", EOL;
74 74
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
75 75
 $objWriter->save(str_replace('.php', '.xls', __FILE__));
76
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
76
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
77 77
 
78 78
 // Echo memory peak usage
79
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
79
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
80 80
 
81 81
 // Echo done
82
-echo date('H:i:s') , " Done writing files" , EOL;
83
-echo 'Files have been created in ' , getcwd() , EOL;
82
+echo date('H:i:s'), " Done writing files", EOL;
83
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/42richText.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/39dropdown.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()
47 47
     ->setCreator("PHPOffice")
48 48
 	->setLastModifiedBy("PHPOffice")
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 $column = 'F';
63 63
 
64 64
 // Set data for dropdowns
65
-foreach(glob('./data/continents/*') as $key => $filename) {
65
+foreach (glob('./data/continents/*') as $key => $filename) {
66 66
     $continent = pathinfo($filename, PATHINFO_FILENAME);
67 67
     echo "Loading $continent", EOL;
68
-    $continent = str_replace(' ','_',$continent);
68
+    $continent = str_replace(' ', '_', $continent);
69 69
     $countries = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
70 70
     $countryCount = count($countries);
71 71
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         ->setVisible(false);
85 85
 
86 86
     $objPHPExcel->getActiveSheet()
87
-        ->setCellValue($continentColumn . ($key+1), $continent);
87
+        ->setCellValue($continentColumn . ($key + 1), $continent);
88 88
 
89 89
     ++$column;
90 90
 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 $objPHPExcel->addNamedRange(
98 98
     new PHPExcel\NamedRange(
99 99
         'Continents', 
100
-        $objPHPExcel->getActiveSheet(), $continentColumn . '1:' . $continentColumn . ($key+1)
100
+        $objPHPExcel->getActiveSheet(), $continentColumn . '1:' . $continentColumn . ($key + 1)
101 101
     )
102 102
 );
103 103
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 $objValidation = $objPHPExcel->getActiveSheet()
120 120
     ->getCell('B1')
121 121
     ->getDataValidation();
122
-$objValidation->setType( PHPExcel\Cell\DataValidation::TYPE_LIST )
123
-    ->setErrorStyle( PHPExcel\Cell\DataValidation::STYLE_INFORMATION )
122
+$objValidation->setType(PHPExcel\Cell\DataValidation::TYPE_LIST)
123
+    ->setErrorStyle(PHPExcel\Cell\DataValidation::STYLE_INFORMATION)
124 124
     ->setAllowBlank(false)
125 125
     ->setShowInputMessage(true)
126 126
     ->setShowErrorMessage(true)
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 $objValidation = $objPHPExcel->getActiveSheet()
141 141
     ->getCell('B3')
142 142
     ->getDataValidation();
143
-$objValidation->setType( PHPExcel\Cell\DataValidation::TYPE_LIST )
144
-    ->setErrorStyle( PHPExcel\Cell\DataValidation::STYLE_INFORMATION )
143
+$objValidation->setType(PHPExcel\Cell\DataValidation::TYPE_LIST)
144
+    ->setErrorStyle(PHPExcel\Cell\DataValidation::STYLE_INFORMATION)
145 145
     ->setAllowBlank(false)
146 146
     ->setShowInputMessage(true)
147 147
     ->setShowErrorMessage(true)
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
 
163 163
 // Save Excel 2007 file
164 164
 // This linked validation list method only seems to work for Excel2007, not for Excel5
165
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
165
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
166 166
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
167 167
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
168
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
168
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
169 169
 
170 170
 // Echo memory peak usage
171
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
171
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
172 172
 
173 173
 // Echo done
174
-echo date('H:i:s') , " Done writing files" , EOL;
175
-echo 'Files have been created in ' , getcwd() , EOL;
174
+echo date('H:i:s'), " Done writing files", EOL;
175
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/GnumericReader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 /** \PHPExcel\IOFactory */
34 34
 require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
35 35
 
36
-echo date('H:i:s') , " Load from Gnumeric file" , PHP_EOL;
36
+echo date('H:i:s'), " Load from Gnumeric file", PHP_EOL;
37 37
 $callStartTime = microtime(true);
38 38
 
39 39
 $objReader = \PHPExcel\IOFactory::createReader('Gnumeric');
@@ -42,19 +42,19 @@  discard block
 block discarded – undo
42 42
 
43 43
 $callEndTime = microtime(true);
44 44
 $callTime = $callEndTime - $callStartTime;
45
-echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL;
45
+echo 'Call time to read Workbook was ', sprintf('%.4f', $callTime), " seconds", PHP_EOL;
46 46
 // Echo memory usage
47
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
47
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", PHP_EOL;
48 48
 
49 49
 
50
-echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
50
+echo date('H:i:s'), " Write to Excel2007 format", PHP_EOL;
51 51
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
52 52
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
53
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;
53
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', __FILE__), PHP_EOL;
54 54
 
55 55
 
56 56
 // Echo memory peak usage
57
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
57
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", PHP_EOL;
58 58
 
59 59
 // Echo done
60
-echo date('H:i:s') , " Done writing file" , PHP_EOL;
60
+echo date('H:i:s'), " Done writing file", PHP_EOL;
Please login to merge, or discard this patch.
Examples/Quadratic.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@
 block discarded – undo
52 52
 		echo '<hr /><b>Roots:</b><br />';
53 53
 
54 54
 		$callStartTime = microtime(true);
55
-		echo $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue().'<br />';
56
-		echo $objPHPExcel->getActiveSheet()->getCell('B6')->getCalculatedValue().'<br />';
55
+		echo $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue() . '<br />';
56
+		echo $objPHPExcel->getActiveSheet()->getCell('B6')->getCalculatedValue() . '<br />';
57 57
 		$callEndTime = microtime(true);
58 58
 		$callTime = $callEndTime - $callStartTime;
59 59
 
60
-		echo '<hr />Call time for Quadratic Equation Solution was '.sprintf('%.4f',$callTime).' seconds<br /><hr />';
61
-		echo ' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />';
60
+		echo '<hr />Call time for Quadratic Equation Solution was ' . sprintf('%.4f', $callTime) . ' seconds<br /><hr />';
61
+		echo ' Peak memory usage: ' . (memory_get_peak_usage(true) / 1024 / 1024) . ' MB<br />';
62 62
 	}
63 63
 }
64 64
 
Please login to merge, or discard this patch.
Examples/07reader.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 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
 
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 	exit("Please run 05featuredemo.php first." . EOL);
42 42
 }
43 43
 
44
-echo date('H:i:s') , " Load from Excel2007 file" , EOL;
44
+echo date('H:i:s'), " Load from Excel2007 file", EOL;
45 45
 $callStartTime = microtime(true);
46 46
 
47 47
 $objPHPExcel = \PHPExcel\IOFactory::load("05featuredemo.xlsx");
48 48
 
49 49
 $callEndTime = microtime(true);
50 50
 $callTime = $callEndTime - $callStartTime;
51
-echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
51
+echo 'Call time to read Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
52 52
 // Echo memory usage
53
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
53
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
54 54
 
55 55
 
56
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
56
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
57 57
 $callStartTime = microtime(true);
58 58
 
59 59
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
 $callEndTime = microtime(true);
63 63
 $callTime = $callEndTime - $callStartTime;
64 64
 
65
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
66
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
65
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
66
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
67 67
 // Echo memory usage
68
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
68
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
69 69
 
70 70
 
71 71
 // Echo memory peak usage
72
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
72
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
73 73
 
74 74
 // Echo done
75
-echo date('H:i:s') , " Done writing file" , EOL;
76
-echo 'File has been created in ' , getcwd() , EOL;
75
+echo date('H:i:s'), " Done writing file", EOL;
76
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/34chartupdate.php 1 patch
Spacing   +12 added lines, -12 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
 
@@ -43,36 +43,36 @@  discard block
 block discarded – undo
43 43
 	exit("Please run 33chartcreate-bar.php first." . EOL);
44 44
 }
45 45
 
46
-echo date('H:i:s') , " Load from Excel2007 file" , EOL;
46
+echo date('H:i:s'), " Load from Excel2007 file", EOL;
47 47
 $objReader = \PHPExcel\IOFactory::createReader("Excel2007");
48 48
 $objReader->setIncludeCharts(TRUE);
49 49
 $objPHPExcel = $objReader->load("33chartcreate-bar.xlsx");
50 50
 
51 51
 
52
-echo date('H:i:s') , " Update cell data values that are displayed in the chart" , EOL;
52
+echo date('H:i:s'), " Update cell data values that are displayed in the chart", EOL;
53 53
 $objWorksheet = $objPHPExcel->getActiveSheet();
54 54
 $objWorksheet->fromArray(
55 55
 	array(
56
-		array(50-12,   50-15,		50-21),
57
-		array(50-56,   50-73,		50-86),
58
-		array(50-52,   50-61,		50-69),
59
-		array(50-30,   50-32,		50),
56
+		array(50 - 12, 50 - 15, 50 - 21),
57
+		array(50 - 56, 50 - 73, 50 - 86),
58
+		array(50 - 52, 50 - 61, 50 - 69),
59
+		array(50 - 30, 50 - 32, 50),
60 60
 	),
61 61
 	NULL,
62 62
 	'B2'
63 63
 );
64 64
 
65 65
 // Save Excel 2007 file
66
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
66
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
67 67
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
68 68
 $objWriter->setIncludeCharts(TRUE);
69 69
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
70
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
70
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
71 71
 
72 72
 
73 73
 // Echo memory peak usage
74
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
74
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
75 75
 
76 76
 // Echo done
77
-echo date('H:i:s') , " Done writing file" , EOL;
78
-echo 'File has been created in ' , getcwd() , EOL;
77
+echo date('H:i:s'), " Done writing file", EOL;
78
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/40duplicateStyle.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
 ini_set('display_startup_errors', TRUE);
6 6
 date_default_timezone_set('Europe/London');
7 7
 
8
-define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
8
+define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
9 9
 
10 10
 date_default_timezone_set('Europe/London');
11 11
 
12 12
 /** Include PHPExcel */
13 13
 require_once dirname(__FILE__) . '/../src/Bootstrap.php';
14 14
 
15
-echo date('H:i:s') , " Create new PHPExcel object" , EOL;
15
+echo date('H:i:s'), " Create new PHPExcel object", EOL;
16 16
 $objPHPExcel = new \PHPExcel\Spreadsheet();
17 17
 $worksheet = $objPHPExcel->getActiveSheet();
18 18
 
19
-echo date('H:i:s') , " Create styles array" , EOL;
19
+echo date('H:i:s'), " Create styles array", EOL;
20 20
 $styles = array();
21 21
 for ($i = 0; $i < 10; $i++) {
22 22
     $style = new \PHPExcel\Style();
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $styles[] = $style;
25 25
 }
26 26
 
27
-echo date('H:i:s') , " Add data (begin)" , EOL;
27
+echo date('H:i:s'), " Add data (begin)", EOL;
28 28
 $t = microtime(true);
29 29
 for ($col = 0; $col < 50; $col++) {
30 30
     for ($row = 0; $row < 100; $row++) {
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
     }
37 37
 }
38 38
 $d = microtime(true) - $t;
39
-echo date('H:i:s') , " Add data (end), time: " . round($d, 2) . " s", EOL;
39
+echo date('H:i:s'), " Add data (end), time: " . round($d, 2) . " s", EOL;
40 40
 
41 41
 
42
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
42
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
43 43
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
44 44
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
45
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
45
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
46 46
 
47 47
 
48
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
48
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
49 49
 
50
-echo date('H:i:s') , " Done writing file" , EOL;
51
-echo 'File has been created in ' , getcwd() , EOL;
50
+echo date('H:i:s'), " Done writing file", EOL;
51
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/33chartcreate-stock.php 1 patch
Spacing   +26 added lines, -26 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,12 +44,12 @@  discard block
 block discarded – undo
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46 46
 	array(
47
-		array('Counts', 		'Max', 		'Min', 		'Min Threshold', 	'Max Threshold'	),
48
-		array(10,		 		10, 		5, 			0, 					50				),
49
-		array(30,		 		20, 		10, 		0,	 				50				),
50
-		array(20,		 		30, 		15, 		0,	 				50				),
51
-		array(40,		 		10, 		0, 			0, 					50				),
52
-		array(100,		 		40, 		5, 			0, 					50				),
47
+		array('Counts', 'Max', 'Min', 'Min Threshold', 'Max Threshold'),
48
+		array(10, 10, 5, 0, 50),
49
+		array(30, 20, 10, 0, 50),
50
+		array(20, 30, 15, 0, 50),
51
+		array(40, 10, 0, 0, 50),
52
+		array(100, 40, 5, 0, 50),
53 53
 	), null, 'A1', true
54 54
 );
55 55
 $objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel\Style\NumberFormat::FORMAT_NUMBER_00);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 //		Data values
77 77
 //		Data Marker
78 78
 $xAxisTickValues = array(
79
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5),	//	Counts
79
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5), //	Counts
80 80
 );
81 81
 //	Set the Data values for each data series we want to plot
82 82
 //		Datatype
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 
95 95
 //	Build the dataseries
96 96
 $series = new \PHPExcel\Chart\DataSeries(
97
-	\PHPExcel\Chart\DataSeries::TYPE_STOCKCHART,	// plotType
98
-	null,										// plotGrouping - if we set this to not null, then xlsx throws error
99
-	range(0, count($dataSeriesValues)-1),		// plotOrder
100
-	$dataSeriesLabels,							// plotLabel
101
-	$xAxisTickValues,							// plotCategory
97
+	\PHPExcel\Chart\DataSeries::TYPE_STOCKCHART, // plotType
98
+	null, // plotGrouping - if we set this to not null, then xlsx throws error
99
+	range(0, count($dataSeriesValues) - 1), // plotOrder
100
+	$dataSeriesLabels, // plotLabel
101
+	$xAxisTickValues, // plotCategory
102 102
 	$dataSeriesValues							// plotValues
103 103
 );
104 104
 
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
 
114 114
 //	Create the chart
115 115
 $chart = new \PHPExcel\Chart(
116
-	'stock-chart',	// name
117
-	$title,			// title
118
-	$legend,		// legend
119
-	$plotArea,		// plotArea
120
-	true,			// plotVisibleOnly
121
-	0,				// displayBlanksAs
122
-	$xAxisLabel,	// xAxisLabel
116
+	'stock-chart', // name
117
+	$title, // title
118
+	$legend, // legend
119
+	$plotArea, // plotArea
120
+	true, // plotVisibleOnly
121
+	0, // displayBlanksAs
122
+	$xAxisLabel, // xAxisLabel
123 123
 	$yAxisLabel		// yAxisLabel
124 124
 );
125 125
 
@@ -132,20 +132,20 @@  discard block
 block discarded – undo
132 132
 
133 133
 
134 134
 // Save Excel 2007 file
135
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
135
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
136 136
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
137 137
 $objWriter->setIncludeCharts(TRUE);
138 138
 $filename = str_replace('.php', '.xlsx', __FILE__);
139
-if(file_exists($filename)) {
139
+if (file_exists($filename)) {
140 140
 	unlink($filename);
141 141
 }
142 142
 $objWriter->save($filename);
143
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
143
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
144 144
 
145 145
 
146 146
 // Echo memory peak usage
147
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
147
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
148 148
 
149 149
 // Echo done
150
-echo date('H:i:s') , " Done writing file" , EOL;
151
-echo 'File has been created in ' , getcwd() , EOL;
150
+echo date('H:i:s'), " Done writing file", EOL;
151
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.