Completed
Push — develop ( e0a9f9...ba7054 )
by Adrien
19:36
created
src/PhpSpreadsheet/Writer/PDF/DomPDF.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $fileHandle = parent::prepareForSave($pFilename);
59 59
 
60 60
         //  Default PDF paper size
61
-        $paperSize = 'LETTER';    //    Letter    (8.5 in. by 11 in.)
61
+        $paperSize = 'LETTER'; //    Letter    (8.5 in. by 11 in.)
62 62
 
63 63
         //  Check for paper size and page orientation
64 64
         if (is_null($this->getSheetIndex())) {
Please login to merge, or discard this patch.
Documentation/Examples/Reader/exampleReader03.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 //	$inputFileType = 'Gnumeric';
34 34
 $inputFileName = './sampleData/example1.xls';
35 35
 
36
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
36
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
37 37
 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
38 38
 echo 'Turning Formatting off for Load<br />';
39 39
 $objReader->setReadDataOnly(true);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 echo '<hr />';
44 44
 
45
-$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
45
+$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
46 46
 var_dump($sheetData);
47 47
 
48 48
 
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DPRODUCT.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The height of the Apple tree between 10\' and 16\' tall');
52 52
 $worksheet->setCellValue('B12', '=DGET(A4:E10,"Height",A1:F2)');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 echo '<h4>Database</h4>';
59 59
 
60
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
60
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
61 61
 var_dump($databaseData);
62 62
 
63 63
 
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 
70 70
 echo 'ALL' . '<br /><br />';
71 71
 
72
-echo $worksheet->getCell("A12")->getValue() .'<br />';
73
-echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
72
+echo $worksheet->getCell("A12")->getValue() . '<br />';
73
+echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
74 74
 
75 75
 echo '<h4>Criteria</h4>';
76 76
 
77
-$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
77
+$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);
78 78
 var_dump($criteriaData);
79 79
 
80
-echo $worksheet->getCell("A13")->getValue() .'<br />';
80
+echo $worksheet->getCell("A13")->getValue() . '<br />';
81 81
 echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
82 82
 
83 83
 
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/Database/DMAX.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
42
-                 );
36
+                    array( 'Apple',  18,       20,    14,      105.00  ),
37
+                    array( 'Pear',   12,       12,    10,       96.00  ),
38
+                    array( 'Cherry', 13,       14,     9,      105.00  ),
39
+                    array( 'Apple',  14,       15,    10,       75.00  ),
40
+                    array( 'Pear',    9,        8,     8,       76.80  ),
41
+                    array( 'Apple',   8,        9,     6,       45.00  ),
42
+                    );
43 43
 $criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
-                 );
44
+                    array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
+                    array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
46
+                    );
47 47
 
48 48
 $worksheet->fromArray( $criteria, NULL, 'A1' );
49 49
 $worksheet->fromArray( $database, NULL, 'A4' );
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$database = array( array( 'Tree',  'Height', 'Age', 'Yield', 'Profit' ),
36
-                   array( 'Apple',  18,       20,    14,      105.00  ),
37
-                   array( 'Pear',   12,       12,    10,       96.00  ),
38
-                   array( 'Cherry', 13,       14,     9,      105.00  ),
39
-                   array( 'Apple',  14,       15,    10,       75.00  ),
40
-                   array( 'Pear',    9,        8,     8,       76.80  ),
41
-                   array( 'Apple',   8,        9,     6,       45.00  ),
35
+$database = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit'),
36
+                   array('Apple', 18, 20, 14, 105.00),
37
+                   array('Pear', 12, 12, 10, 96.00),
38
+                   array('Cherry', 13, 14, 9, 105.00),
39
+                   array('Apple', 14, 15, 10, 75.00),
40
+                   array('Pear', 9, 8, 8, 76.80),
41
+                   array('Apple', 8, 9, 6, 45.00),
42 42
                  );
43
-$criteria = array( array( 'Tree',      'Height', 'Age', 'Yield', 'Profit', 'Height' ),
44
-                   array( '="=Apple"', '>10',    NULL,  NULL,    NULL,     '<16'    ),
45
-                   array( '="=Pear"',  NULL,     NULL,  NULL,    NULL,     NULL     )
43
+$criteria = array(array('Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'),
44
+                   array('="=Apple"', '>10', NULL, NULL, NULL, '<16'),
45
+                   array('="=Pear"', NULL, NULL, NULL, NULL, NULL)
46 46
                  );
47 47
 
48
-$worksheet->fromArray( $criteria, NULL, 'A1' );
49
-$worksheet->fromArray( $database, NULL, 'A4' );
48
+$worksheet->fromArray($criteria, NULL, 'A1');
49
+$worksheet->fromArray($database, NULL, 'A4');
50 50
 
51 51
 $worksheet->setCellValue('A12', 'The height of the Apple tree between 10\' and 16\' tall');
52 52
 $worksheet->setCellValue('B12', '=DGET(A4:E10,"Height",A1:F2)');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
 echo '<h4>Database</h4>';
59 59
 
60
-$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true);
60
+$databaseData = $worksheet->rangeToArray('A4:E10', null, true, true, true);
61 61
 var_dump($databaseData);
62 62
 
63 63
 
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 
70 70
 echo 'ALL' . '<br /><br />';
71 71
 
72
-echo $worksheet->getCell("A12")->getValue() .'<br />';
73
-echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />';
72
+echo $worksheet->getCell("A12")->getValue() . '<br />';
73
+echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() . '<br /><br />';
74 74
 
75 75
 echo '<h4>Criteria</h4>';
76 76
 
77
-$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true);
77
+$criteriaData = $worksheet->rangeToArray('A1:A2', null, true, true, true);
78 78
 var_dump($criteriaData);
79 79
 
80
-echo $worksheet->getCell("A13")->getValue() .'<br />';
80
+echo $worksheet->getCell("A13")->getValue() . '<br />';
81 81
 echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue();
82 82
 
83 83
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/PDF/TcPDF.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $fileHandle = parent::prepareForSave($pFilename);
59 59
 
60 60
         //  Default PDF paper size
61
-        $paperSize = 'LETTER';    //    Letter    (8.5 in. by 11 in.)
61
+        $paperSize = 'LETTER'; //    Letter    (8.5 in. by 11 in.)
62 62
 
63 63
         //  Check for paper size and page orientation
64 64
         if (is_null($this->getSheetIndex())) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/PDF/MPDF.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $fileHandle = parent::prepareForSave($pFilename);
59 59
 
60 60
         //  Default PDF paper size
61
-        $paperSize = 'LETTER';    //    Letter    (8.5 in. by 11 in.)
61
+        $paperSize = 'LETTER'; //    Letter    (8.5 in. by 11 in.)
62 62
 
63 63
         //  Check for paper size and page orientation
64 64
         if (is_null($this->getSheetIndex())) {
Please login to merge, or discard this patch.
Examples/07readerPCLZip.php 2 patches
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.
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/33chartcreate-scatter.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 $objPHPExcel = new \PHPExcel\Spreadsheet();
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46
-	array(
47
-		array('',	2010,	2011,	2012),
48
-		array('Q1',   12,   15,		21),
49
-		array('Q2',   56,   73,		86),
50
-		array('Q3',   52,   61,		69),
51
-		array('Q4',   30,   32,		0),
52
-	)
46
+    array(
47
+        array('',	2010,	2011,	2012),
48
+        array('Q1',   12,   15,		21),
49
+        array('Q2',   56,   73,		86),
50
+        array('Q3',   52,   61,		69),
51
+        array('Q4',   30,   32,		0),
52
+    )
53 53
 );
54 54
 
55 55
 //	Set the Labels for each data series we want to plot
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 //		Data values
61 61
 //		Data Marker
62 62
 $dataSeriesLabels = array(
63
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1),	//	2010
64
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	2011
65
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	2012
63
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1),	//	2010
64
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	2011
65
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	2012
66 66
 );
67 67
 //	Set the X-Axis Labels
68 68
 $xAxisTickValues = array(
69
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4),	//	Q1 to Q4
69
+    new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4),	//	Q1 to Q4
70 70
 );
71 71
 //	Set the Data values for each data series we want to plot
72 72
 //		Datatype
@@ -76,22 +76,22 @@  discard block
 block discarded – undo
76 76
 //		Data values
77 77
 //		Data Marker
78 78
 $dataSeriesValues = array(
79
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
80
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
81
-	new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
79
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4),
80
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4),
81
+    new \PHPExcel\Chart\DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4),
82 82
 );
83 83
 
84 84
 //	Build the dataseries
85 85
 $series = new \PHPExcel\Chart\DataSeries(
86
-	\PHPExcel\Chart\DataSeries::TYPE_SCATTERCHART,	// plotType
87
-	NULL,											// plotGrouping (Scatter charts don't have any grouping)
88
-	range(0, count($dataSeriesValues)-1),			// plotOrder
89
-	$dataSeriesLabels,								// plotLabel
90
-	$xAxisTickValues,								// plotCategory
91
-	$dataSeriesValues,								// plotValues
86
+    \PHPExcel\Chart\DataSeries::TYPE_SCATTERCHART,	// plotType
87
+    NULL,											// plotGrouping (Scatter charts don't have any grouping)
88
+    range(0, count($dataSeriesValues)-1),			// plotOrder
89
+    $dataSeriesLabels,								// plotLabel
90
+    $xAxisTickValues,								// plotCategory
91
+    $dataSeriesValues,								// plotValues
92 92
     NULL,                                           // plotDirection
93
-	NULL,											// smooth line
94
-	\PHPExcel\Chart\DataSeries::STYLE_LINEMARKER		// plotStyle
93
+    NULL,											// smooth line
94
+    \PHPExcel\Chart\DataSeries::STYLE_LINEMARKER		// plotStyle
95 95
 );
96 96
 
97 97
 //	Set the series in the plot area
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 
106 106
 //	Create the chart
107 107
 $chart = new \PHPExcel\Chart(
108
-	'chart1',		// name
109
-	$title,			// title
110
-	$legend,		// legend
111
-	$plotArea,		// plotArea
112
-	true,			// plotVisibleOnly
113
-	0,				// displayBlanksAs
114
-	NULL,			// xAxisLabel
115
-	$yAxisLabel		// yAxisLabel
108
+    'chart1',		// name
109
+    $title,			// title
110
+    $legend,		// legend
111
+    $plotArea,		// plotArea
112
+    true,			// plotVisibleOnly
113
+    0,				// displayBlanksAs
114
+    NULL,			// xAxisLabel
115
+    $yAxisLabel		// yAxisLabel
116 116
 );
117 117
 
118 118
 //	Set the position where the chart should appear in the worksheet
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 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,11 +44,11 @@  discard block
 block discarded – undo
44 44
 $objWorksheet = $objPHPExcel->getActiveSheet();
45 45
 $objWorksheet->fromArray(
46 46
 	array(
47
-		array('',	2010,	2011,	2012),
48
-		array('Q1',   12,   15,		21),
49
-		array('Q2',   56,   73,		86),
50
-		array('Q3',   52,   61,		69),
51
-		array('Q4',   30,   32,		0),
47
+		array('', 2010, 2011, 2012),
48
+		array('Q1', 12, 15, 21),
49
+		array('Q2', 56, 73, 86),
50
+		array('Q3', 52, 61, 69),
51
+		array('Q4', 30, 32, 0),
52 52
 	)
53 53
 );
54 54
 
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 //		Data values
61 61
 //		Data Marker
62 62
 $dataSeriesLabels = array(
63
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1),	//	2010
64
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1),	//	2011
65
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1),	//	2012
63
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //	2010
64
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //	2011
65
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //	2012
66 66
 );
67 67
 //	Set the X-Axis Labels
68 68
 $xAxisTickValues = array(
69
-	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4),	//	Q1 to Q4
69
+	new \PHPExcel\Chart\DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), //	Q1 to Q4
70 70
 );
71 71
 //	Set the Data values for each data series we want to plot
72 72
 //		Datatype
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
 //	Build the dataseries
85 85
 $series = new \PHPExcel\Chart\DataSeries(
86
-	\PHPExcel\Chart\DataSeries::TYPE_SCATTERCHART,	// plotType
87
-	NULL,											// plotGrouping (Scatter charts don't have any grouping)
88
-	range(0, count($dataSeriesValues)-1),			// plotOrder
89
-	$dataSeriesLabels,								// plotLabel
90
-	$xAxisTickValues,								// plotCategory
91
-	$dataSeriesValues,								// plotValues
92
-    NULL,                                           // plotDirection
93
-	NULL,											// smooth line
86
+	\PHPExcel\Chart\DataSeries::TYPE_SCATTERCHART, // plotType
87
+	NULL, // plotGrouping (Scatter charts don't have any grouping)
88
+	range(0, count($dataSeriesValues) - 1), // plotOrder
89
+	$dataSeriesLabels, // plotLabel
90
+	$xAxisTickValues, // plotCategory
91
+	$dataSeriesValues, // plotValues
92
+    NULL, // plotDirection
93
+	NULL, // smooth line
94 94
 	\PHPExcel\Chart\DataSeries::STYLE_LINEMARKER		// plotStyle
95 95
 );
96 96
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 
106 106
 //	Create the chart
107 107
 $chart = new \PHPExcel\Chart(
108
-	'chart1',		// name
109
-	$title,			// title
110
-	$legend,		// legend
111
-	$plotArea,		// plotArea
112
-	true,			// plotVisibleOnly
113
-	0,				// displayBlanksAs
114
-	NULL,			// xAxisLabel
108
+	'chart1', // name
109
+	$title, // title
110
+	$legend, // legend
111
+	$plotArea, // plotArea
112
+	true, // plotVisibleOnly
113
+	0, // displayBlanksAs
114
+	NULL, // xAxisLabel
115 115
 	$yAxisLabel		// yAxisLabel
116 116
 );
117 117
 
@@ -124,16 +124,16 @@  discard block
 block discarded – undo
124 124
 
125 125
 
126 126
 // Save Excel 2007 file
127
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
127
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
128 128
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
129 129
 $objWriter->setIncludeCharts(TRUE);
130 130
 $objWriter->save(str_replace('.php', '.xlsx', __FILE__));
131
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
131
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
132 132
 
133 133
 
134 134
 // Echo memory peak usage
135
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
135
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
136 136
 
137 137
 // Echo done
138
-echo date('H:i:s') , " Done writing file" , EOL;
139
-echo 'File has been created in ' , getcwd() , EOL;
138
+echo date('H:i:s'), " Done writing file", EOL;
139
+echo 'File has been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.
Examples/41password.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  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
 
37 37
 include "05featuredemo.inc.php";
38 38
 
39 39
 // Save Excel 2007 file
40
-echo date('H:i:s') , " Write to Excel2007 format" , EOL;
40
+echo date('H:i:s'), " Write to Excel2007 format", EOL;
41 41
 $callStartTime = microtime(true);
42 42
 
43 43
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 $callEndTime = microtime(true);
46 46
 $callTime = $callEndTime - $callStartTime;
47 47
 
48
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
49
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
48
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
49
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
50 50
 // Echo memory usage
51
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
51
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
52 52
 
53 53
 
54 54
 // Save Excel 95 file
55
-echo date('H:i:s') , " Write to Excel5 format" , EOL;
55
+echo date('H:i:s'), " Write to Excel5 format", EOL;
56 56
 $callStartTime = microtime(true);
57 57
 
58 58
 $objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel5');
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 $callEndTime = microtime(true);
61 61
 $callTime = $callEndTime - $callStartTime;
62 62
 
63
-echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
64
-echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
63
+echo date('H:i:s'), " File written to ", str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)), EOL;
64
+echo 'Call time to write Workbook was ', sprintf('%.4f', $callTime), " seconds", EOL;
65 65
 // Echo memory usage
66
-echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
66
+echo date('H:i:s'), ' Current memory usage: ', (memory_get_usage(true) / 1024 / 1024), " MB", EOL;
67 67
 
68 68
 
69 69
 // Echo memory peak usage
70
-echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
70
+echo date('H:i:s'), " Peak memory usage: ", (memory_get_peak_usage(true) / 1024 / 1024), " MB", EOL;
71 71
 
72 72
 // Echo done
73
-echo date('H:i:s') , " Done writing files" , EOL;
74
-echo 'Files have been created in ' , getcwd() , EOL;
73
+echo date('H:i:s'), " Done writing files", EOL;
74
+echo 'Files have been created in ', getcwd(), EOL;
Please login to merge, or discard this patch.