Completed
Push — develop ( 67d526...98e00e )
by Adrien
26:15 queued 12:26
created
Documentation/Examples/Calculations/DateTime/DATEVALUE.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	'26 March 2012',	'29 Feb 2012',	'April 1, 2012',	'25/12/2012',
36
-					'2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
-					'17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
-					'03-MAY-07',		'03-13-07',
39
-				  );
36
+                    '2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
+                    '17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
+                    '03-MAY-07',		'03-13-07',
39
+                    );
40 40
 $testDateCount = count($testDates);
41 41
 
42 42
 for($row = 1; $row <= $testDateCount; ++$row) {
43
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
-	$worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
43
+    $worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
+    $worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
+    $worksheet->setCellValue('C'.$row, '=B'.$row);
46 46
 }
47 47
 
48 48
 $worksheet->getStyle('C1:C'.$testDateCount)
49
-          ->getNumberFormat()
50
-          ->setFormatCode('yyyy-mmm-dd');
49
+            ->getNumberFormat()
50
+            ->setFormatCode('yyyy-mmm-dd');
51 51
 
52 52
 
53 53
 echo '<hr />';
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 		<th>Formatted DateStamp</th>
65 65
 	</tr>
66 66
 	<?php
67
-	for ($row = 1; $row <= $testDateCount; ++$row) {
68
-		echo '<tr>';
69
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
73
-		echo '</tr>';
74
-	}
75
-	?>
67
+    for ($row = 1; $row <= $testDateCount; ++$row) {
68
+        echo '<tr>';
69
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
+            echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
73
+        echo '</tr>';
74
+    }
75
+    ?>
76 76
 </table>
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	'26 March 2012',	'29 Feb 2012',	'April 1, 2012',	'25/12/2012',
36
-					'2012-Oct-31',		'5th November',	'January 1st',		'April 2012',
37
-					'17-03',			'03-2012',		'29 Feb 2011',		'03-05-07',
38
-					'03-MAY-07',		'03-13-07',
35
+$testDates = array('26 March 2012', '29 Feb 2012', 'April 1, 2012', '25/12/2012',
36
+					'2012-Oct-31', '5th November', 'January 1st', 'April 2012',
37
+					'17-03', '03-2012', '29 Feb 2011', '03-05-07',
38
+					'03-MAY-07', '03-13-07',
39 39
 				  );
40 40
 $testDateCount = count($testDates);
41 41
 
42
-for($row = 1; $row <= $testDateCount; ++$row) {
43
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
44
-	$worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')');
45
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
42
+for ($row = 1; $row <= $testDateCount; ++$row) {
43
+	$worksheet->setCellValue('A' . $row, $testDates[$row - 1]);
44
+	$worksheet->setCellValue('B' . $row, '=DATEVALUE(A' . $row . ')');
45
+	$worksheet->setCellValue('C' . $row, '=B' . $row);
46 46
 }
47 47
 
48
-$worksheet->getStyle('C1:C'.$testDateCount)
48
+$worksheet->getStyle('C1:C' . $testDateCount)
49 49
           ->getNumberFormat()
50 50
           ->setFormatCode('yyyy-mmm-dd');
51 51
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	<?php
67 67
 	for ($row = 1; $row <= $testDateCount; ++$row) {
68 68
 		echo '<tr>';
69
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
70
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
71
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
72
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
70
+			echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
71
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
72
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
73 73
 		echo '</tr>';
74 74
 	}
75 75
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/DATE.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -33,22 +33,22 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	array(2012,3,26),	array(2012,2,29),	array(2012,4,1),	array(2012,12,25),
36
-					array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
-					array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
-					array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
-					array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
40
-				  );
36
+                    array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
+                    array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
+                    array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
+                    array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
40
+                    );
41 41
 $testDateCount = count($testDates);
42 42
 
43 43
 $worksheet->fromArray($testDates,NULL,'A1',true);
44 44
 
45 45
 for ($row = 1; $row <= $testDateCount; ++$row) {
46
-	$worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
46
+    $worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
+    $worksheet->setCellValue('E'.$row, '=D'.$row);
48 48
 }
49 49
 $worksheet->getStyle('E1:E'.$testDateCount)
50
-          ->getNumberFormat()
51
-          ->setFormatCode('yyyy-mmm-dd');
50
+            ->getNumberFormat()
51
+            ->setFormatCode('yyyy-mmm-dd');
52 52
 
53 53
 
54 54
 echo '<hr />';
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 		<th>Day</th>
70 70
 	<tr>
71 71
 	<?php
72
-	for ($row = 1; $row <= $testDateCount; ++$row) {
73
-		echo '<tr>';
74
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
80
-		echo '</tr>';
81
-	}
82
-	?>
72
+    for ($row = 1; $row <= $testDateCount; ++$row) {
73
+        echo '<tr>';
74
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
+            echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
+            echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
+            echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
80
+        echo '</tr>';
81
+    }
82
+    ?>
83 83
 </table>
84 84
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 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
-$testDates = array(	array(2012,3,26),	array(2012,2,29),	array(2012,4,1),	array(2012,12,25),
36
-					array(2012,10,31),	array(2012,11,5),	array(2012,1,1),	array(2012,3,17),
37
-					array(2011,2,29),	array(7,5,3),		array(2012,13,1),	array(2012,11,45),
38
-					array(2012,0,0),	array(2012,1,0),	array(2012,0,1),
39
-					array(2012,-2,2),	array(2012,2,-2),	array(2012,-2,-2),
35
+$testDates = array(array(2012, 3, 26), array(2012, 2, 29), array(2012, 4, 1), array(2012, 12, 25),
36
+					array(2012, 10, 31), array(2012, 11, 5), array(2012, 1, 1), array(2012, 3, 17),
37
+					array(2011, 2, 29), array(7, 5, 3), array(2012, 13, 1), array(2012, 11, 45),
38
+					array(2012, 0, 0), array(2012, 1, 0), array(2012, 0, 1),
39
+					array(2012, -2, 2), array(2012, 2, -2), array(2012, -2, -2),
40 40
 				  );
41 41
 $testDateCount = count($testDates);
42 42
 
43
-$worksheet->fromArray($testDates,NULL,'A1',true);
43
+$worksheet->fromArray($testDates, NULL, 'A1', true);
44 44
 
45 45
 for ($row = 1; $row <= $testDateCount; ++$row) {
46
-	$worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')');
47
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
46
+	$worksheet->setCellValue('D' . $row, '=DATE(A' . $row . ',B' . $row . ',C' . $row . ')');
47
+	$worksheet->setCellValue('E' . $row, '=D' . $row);
48 48
 }
49
-$worksheet->getStyle('E1:E'.$testDateCount)
49
+$worksheet->getStyle('E1:E' . $testDateCount)
50 50
           ->getNumberFormat()
51 51
           ->setFormatCode('yyyy-mmm-dd');
52 52
 
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 	<?php
72 72
 	for ($row = 1; $row <= $testDateCount; ++$row) {
73 73
 		echo '<tr>';
74
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
78
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
79
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
74
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
75
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
76
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
77
+			echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
78
+			echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
79
+			echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
80 80
 		echo '</tr>';
81 81
 	}
82 82
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/TIME.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,20 +33,20 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	array(3,15),		array(13,15),	array(15,15,15),	array(3,15,30),
36
-					array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
-					array(13,-14,-15),	array(0,0,-1)
38
-				  );
36
+                    array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
+                    array(13,-14,-15),	array(0,0,-1)
38
+                    );
39 39
 $testDateCount = count($testDates);
40 40
 
41 41
 $worksheet->fromArray($testDates,NULL,'A1',true);
42 42
 
43 43
 for ($row = 1; $row <= $testDateCount; ++$row) {
44
-	$worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
44
+    $worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
+    $worksheet->setCellValue('E'.$row, '=D'.$row);
46 46
 }
47 47
 $worksheet->getStyle('E1:E'.$testDateCount)
48
-          ->getNumberFormat()
49
-          ->setFormatCode('hh:mm:ss');
48
+            ->getNumberFormat()
49
+            ->setFormatCode('hh:mm:ss');
50 50
 
51 51
 
52 52
 echo '<hr />';
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
 		<th>Second</th>
68 68
 	<tr>
69 69
 	<?php
70
-	for ($row = 1; $row <= $testDateCount; ++$row) {
71
-		echo '<tr>';
72
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
78
-		echo '</tr>';
79
-	}
80
-	?>
70
+    for ($row = 1; $row <= $testDateCount; ++$row) {
71
+        echo '<tr>';
72
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
+            echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
+            echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
+            echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
78
+        echo '</tr>';
79
+    }
80
+    ?>
81 81
 </table>
82 82
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,19 +32,19 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	array(3,15),		array(13,15),	array(15,15,15),	array(3,15,30),
36
-					array(15,15,15),	array(5),		array(9,15,0),		array(9,15,-1),
37
-					array(13,-14,-15),	array(0,0,-1)
35
+$testDates = array(array(3, 15), array(13, 15), array(15, 15, 15), array(3, 15, 30),
36
+					array(15, 15, 15), array(5), array(9, 15, 0), array(9, 15, -1),
37
+					array(13, -14, -15), array(0, 0, -1)
38 38
 				  );
39 39
 $testDateCount = count($testDates);
40 40
 
41
-$worksheet->fromArray($testDates,NULL,'A1',true);
41
+$worksheet->fromArray($testDates, NULL, 'A1', true);
42 42
 
43 43
 for ($row = 1; $row <= $testDateCount; ++$row) {
44
-	$worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')');
45
-	$worksheet->setCellValue('E'.$row, '=D'.$row);
44
+	$worksheet->setCellValue('D' . $row, '=TIME(A' . $row . ',B' . $row . ',C' . $row . ')');
45
+	$worksheet->setCellValue('E' . $row, '=D' . $row);
46 46
 }
47
-$worksheet->getStyle('E1:E'.$testDateCount)
47
+$worksheet->getStyle('E1:E' . $testDateCount)
48 48
           ->getNumberFormat()
49 49
           ->setFormatCode('hh:mm:ss');
50 50
 
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 	<?php
70 70
 	for ($row = 1; $row <= $testDateCount; ++$row) {
71 71
 		echo '<tr>';
72
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
73
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
74
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
75
-			echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>';
76
-			echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>';
77
-			echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>';
72
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
73
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
74
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
75
+			echo '<td>', $worksheet->getCell('D' . $row)->getValue(), '</td>';
76
+			echo '<td>', $worksheet->getCell('D' . $row)->getFormattedValue(), '</td>';
77
+			echo '<td>', $worksheet->getCell('E' . $row)->getFormattedValue(), '</td>';
78 78
 		echo '</tr>';
79 79
 	}
80 80
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/DateTime/TIMEVALUE.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 
34 34
 // Add some data
35 35
 $testDates = array(	'3:15',	'13:15',	'15:15:15',	'3:15 AM',	'3:15 PM',	'5PM',	'9:15AM',	'13:15AM'
36
-				  );
36
+                    );
37 37
 $testDateCount = count($testDates);
38 38
 
39 39
 for($row = 1; $row <= $testDateCount; ++$row) {
40
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
-	$worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
40
+    $worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
+    $worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
+    $worksheet->setCellValue('C'.$row, '=B'.$row);
43 43
 }
44 44
 
45 45
 $worksheet->getStyle('C1:C'.$testDateCount)
46
-          ->getNumberFormat()
47
-          ->setFormatCode('hh:mm:ss');
46
+            ->getNumberFormat()
47
+            ->setFormatCode('hh:mm:ss');
48 48
 
49 49
 
50 50
 echo '<hr />';
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 		<th>Formatted TimeStamp</th>
61 61
 	</tr>
62 62
 	<?php
63
-	for ($row = 1; $row <= $testDateCount; ++$row) {
64
-		echo '<tr>';
65
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
-		echo '</tr>';
70
-	}
71
-	?>
63
+    for ($row = 1; $row <= $testDateCount; ++$row) {
64
+        echo '<tr>';
65
+            echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
+            echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
+            echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
+            echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
69
+        echo '</tr>';
70
+    }
71
+    ?>
72 72
 </table>
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
 $worksheet = $objPHPExcel->getActiveSheet();
33 33
 
34 34
 // Add some data
35
-$testDates = array(	'3:15',	'13:15',	'15:15:15',	'3:15 AM',	'3:15 PM',	'5PM',	'9:15AM',	'13:15AM'
35
+$testDates = array('3:15', '13:15', '15:15:15', '3:15 AM', '3:15 PM', '5PM', '9:15AM', '13:15AM'
36 36
 				  );
37 37
 $testDateCount = count($testDates);
38 38
 
39
-for($row = 1; $row <= $testDateCount; ++$row) {
40
-	$worksheet->setCellValue('A'.$row, $testDates[$row-1]);
41
-	$worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')');
42
-	$worksheet->setCellValue('C'.$row, '=B'.$row);
39
+for ($row = 1; $row <= $testDateCount; ++$row) {
40
+	$worksheet->setCellValue('A' . $row, $testDates[$row - 1]);
41
+	$worksheet->setCellValue('B' . $row, '=TIMEVALUE(A' . $row . ')');
42
+	$worksheet->setCellValue('C' . $row, '=B' . $row);
43 43
 }
44 44
 
45
-$worksheet->getStyle('C1:C'.$testDateCount)
45
+$worksheet->getStyle('C1:C' . $testDateCount)
46 46
           ->getNumberFormat()
47 47
           ->setFormatCode('hh:mm:ss');
48 48
 
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 	<?php
63 63
 	for ($row = 1; $row <= $testDateCount; ++$row) {
64 64
 		echo '<tr>';
65
-		    echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>';
66
-			echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>';
67
-			echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>';
68
-			echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>';
65
+		    echo '<td>', $worksheet->getCell('A' . $row)->getFormattedValue(), '</td>';
66
+			echo '<td>', $worksheet->getCell('B' . $row)->getValue(), '</td>';
67
+			echo '<td>', $worksheet->getCell('B' . $row)->getFormattedValue(), '</td>';
68
+			echo '<td>', $worksheet->getCell('C' . $row)->getFormattedValue(), '</td>';
69 69
 		echo '</tr>';
70 70
 	}
71 71
 	?>
Please login to merge, or discard this patch.
Documentation/Examples/Calculations/index.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -23,27 +23,27 @@
 block discarded – undo
23 23
 
24 24
 foreach($exampleTypeList as $exampleType) {
25 25
 
26
-	echo '<h2>' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Function Examples</h2>';
26
+    echo '<h2>' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Function Examples</h2>';
27 27
 
28
-	$exampleList = glob('./'.$exampleType.'/*.php');
28
+    $exampleList = glob('./'.$exampleType.'/*.php');
29 29
 
30
-	foreach($exampleList as $exampleFile) {
31
-		$fileData = file_get_contents($exampleFile);
30
+    foreach($exampleList as $exampleFile) {
31
+        $fileData = file_get_contents($exampleFile);
32 32
 
33
-		$h1Pattern = '#<h1>(.*?)</h1>#';
34
-		$h2Pattern = '#<h2>(.*?)</h2>#';
33
+        $h1Pattern = '#<h1>(.*?)</h1>#';
34
+        $h2Pattern = '#<h2>(.*?)</h2>#';
35 35
 
36
-		if (preg_match($h1Pattern, $fileData, $out)) {
37
-			$h1Text = $out[1];
38
-			$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
36
+        if (preg_match($h1Pattern, $fileData, $out)) {
37
+            $h1Text = $out[1];
38
+            $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
39 39
 
40
-			echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
41
-			if ($h2Text > '') {
42
-				echo $h2Text,'<br />';
43
-			}
44
-		}
40
+            echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
41
+            if ($h2Text > '') {
42
+                echo $h2Text,'<br />';
43
+            }
44
+        }
45 45
 
46
-	}
46
+    }
47 47
 }
48 48
 
49 49
 ?>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 
20 20
 echo '<h1>PHPExcel Calculation Function Examples</h1>';
21 21
 
22
-$exampleTypeList = glob('./*',GLOB_ONLYDIR);
22
+$exampleTypeList = glob('./*', GLOB_ONLYDIR);
23 23
 
24
-foreach($exampleTypeList as $exampleType) {
24
+foreach ($exampleTypeList as $exampleType) {
25 25
 
26
-	echo '<h2>' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Function Examples</h2>';
26
+	echo '<h2>' . pathinfo($exampleType, PATHINFO_BASENAME) . ' Function Examples</h2>';
27 27
 
28
-	$exampleList = glob('./'.$exampleType.'/*.php');
28
+	$exampleList = glob('./' . $exampleType . '/*.php');
29 29
 
30
-	foreach($exampleList as $exampleFile) {
30
+	foreach ($exampleList as $exampleFile) {
31 31
 		$fileData = file_get_contents($exampleFile);
32 32
 
33 33
 		$h1Pattern = '#<h1>(.*?)</h1>#';
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 			$h1Text = $out[1];
38 38
 			$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
39 39
 
40
-			echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
40
+			echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />';
41 41
 			if ($h2Text > '') {
42
-				echo $h2Text,'<br />';
42
+				echo $h2Text, '<br />';
43 43
 			}
44 44
 		}
45 45
 
Please login to merge, or discard this patch.
Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader01.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -39,53 +39,53 @@
 block discarded – undo
39 39
 
40 40
 /**  Read the document's creator property  **/
41 41
 $creator = $objPHPExcel->getProperties()->getCreator();
42
-echo '<b>Document Creator: </b>',$creator,'<br />';
42
+echo '<b>Document Creator: </b>', $creator, '<br />';
43 43
 
44 44
 /**  Read the Date when the workbook was created (as a PHP timestamp value)  **/
45 45
 $creationDatestamp = $objPHPExcel->getProperties()->getCreated();
46 46
 /**  Format the date and time using the standard PHP date() function  **/
47
-$creationDate = date('l, d<\s\up>S</\s\up> F Y',$creationDatestamp);
48
-$creationTime = date('g:i A',$creationDatestamp);
49
-echo '<b>Created On: </b>',$creationDate,' at ',$creationTime,'<br />';
47
+$creationDate = date('l, d<\s\up>S</\s\up> F Y', $creationDatestamp);
48
+$creationTime = date('g:i A', $creationDatestamp);
49
+echo '<b>Created On: </b>', $creationDate, ' at ', $creationTime, '<br />';
50 50
 
51 51
 /**  Read the name of the last person to modify this workbook  **/
52 52
 $modifiedBy = $objPHPExcel->getProperties()->getLastModifiedBy();
53
-echo '<b>Last Modified By: </b>',$modifiedBy,'<br />';
53
+echo '<b>Last Modified By: </b>', $modifiedBy, '<br />';
54 54
 
55 55
 /**  Read the Date when the workbook was last modified (as a PHP timestamp value)  **/
56 56
 $modifiedDatestamp = $objPHPExcel->getProperties()->getModified();
57 57
 /**  Format the date and time using the standard PHP date() function  **/
58
-$modifiedDate = date('l, d<\s\up>S</\s\up> F Y',$modifiedDatestamp);
59
-$modifiedTime = date('g:i A',$modifiedDatestamp);
60
-echo '<b>Last Modified On: </b>',$modifiedDate,' at ',$modifiedTime,'<br />';
58
+$modifiedDate = date('l, d<\s\up>S</\s\up> F Y', $modifiedDatestamp);
59
+$modifiedTime = date('g:i A', $modifiedDatestamp);
60
+echo '<b>Last Modified On: </b>', $modifiedDate, ' at ', $modifiedTime, '<br />';
61 61
 
62 62
 /**  Read the workbook title property  **/
63 63
 $workbookTitle = $objPHPExcel->getProperties()->getTitle();
64
-echo '<b>Title: </b>',$workbookTitle,'<br />';
64
+echo '<b>Title: </b>', $workbookTitle, '<br />';
65 65
 
66 66
 /**  Read the workbook description property  **/
67 67
 $description = $objPHPExcel->getProperties()->getDescription();
68
-echo '<b>Description: </b>',$description,'<br />';
68
+echo '<b>Description: </b>', $description, '<br />';
69 69
 
70 70
 /**  Read the workbook subject property  **/
71 71
 $subject = $objPHPExcel->getProperties()->getSubject();
72
-echo '<b>Subject: </b>',$subject,'<br />';
72
+echo '<b>Subject: </b>', $subject, '<br />';
73 73
 
74 74
 /**  Read the workbook keywords property  **/
75 75
 $keywords = $objPHPExcel->getProperties()->getKeywords();
76
-echo '<b>Keywords: </b>',$keywords,'<br />';
76
+echo '<b>Keywords: </b>', $keywords, '<br />';
77 77
 
78 78
 /**  Read the workbook category property  **/
79 79
 $category = $objPHPExcel->getProperties()->getCategory();
80
-echo '<b>Category: </b>',$category,'<br />';
80
+echo '<b>Category: </b>', $category, '<br />';
81 81
 
82 82
 /**  Read the workbook company property  **/
83 83
 $company = $objPHPExcel->getProperties()->getCompany();
84
-echo '<b>Company: </b>',$company,'<br />';
84
+echo '<b>Company: </b>', $company, '<br />';
85 85
 
86 86
 /**  Read the workbook manager property  **/
87 87
 $manager = $objPHPExcel->getProperties()->getManager();
88
-echo '<b>Manager: </b>',$manager,'<br />';
88
+echo '<b>Manager: </b>', $manager, '<br />';
89 89
 
90 90
 
91 91
 ?>
Please login to merge, or discard this patch.
Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader04.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 /**  Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook  */
47 47
 $sheetNames = $objPHPExcel->getSheetNames();
48 48
 foreach($sheetNames as $sheetIndex => $sheetName) {
49
-	echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />';
49
+    echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />';
50 50
 }
51 51
 
52 52
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@
 block discarded – undo
40 40
 echo 'Reading the number of Worksheets in the WorkBook<br />';
41 41
 /**  Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook  */
42 42
 $sheetCount = $objPHPExcel->getSheetCount();
43
-echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />';
43
+echo 'There ', (($sheetCount == 1) ? 'is' : 'are'), ' ', $sheetCount, ' WorkSheet', (($sheetCount == 1) ? '' : 's'), ' in the WorkBook<br /><br />';
44 44
 
45 45
 echo 'Reading the names of Worksheets in the WorkBook<br />';
46 46
 /**  Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook  */
47 47
 $sheetNames = $objPHPExcel->getSheetNames();
48
-foreach($sheetNames as $sheetIndex => $sheetName) {
49
-	echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />';
48
+foreach ($sheetNames as $sheetIndex => $sheetName) {
49
+	echo 'WorkSheet #', $sheetIndex, ' is named "', $sheetName, '"<br />';
50 50
 }
51 51
 
52 52
 
Please login to merge, or discard this patch.
Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader02.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
 echo '<b>Custom Property names: </b><br />';
44 44
 foreach($customPropertyList as $customPropertyName) {
45
-	echo $customPropertyName,'<br />';
45
+    echo $customPropertyName,'<br />';
46 46
 }
47 47
 
48 48
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
 $customPropertyList = $objPHPExcel->getProperties()->getCustomProperties();
42 42
 
43 43
 echo '<b>Custom Property names: </b><br />';
44
-foreach($customPropertyList as $customPropertyName) {
45
-	echo $customPropertyName,'<br />';
44
+foreach ($customPropertyList as $customPropertyName) {
45
+	echo $customPropertyName, '<br />';
46 46
 }
47 47
 
48 48
 
Please login to merge, or discard this patch.
Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader03.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -43,34 +43,34 @@
 block discarded – undo
43 43
 echo '<b>Custom Properties: </b><br />';
44 44
 /**  Loop through the list of custom properties  **/
45 45
 foreach($customPropertyList as $customPropertyName) {
46
-	echo '<b>',$customPropertyName,': </b>';
47
-	/**  Retrieve the property value  **/
48
-	$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName);
49
-	/**  Retrieve the property type  **/
50
-	$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName);
51
-
52
-	/**  Manipulate properties as appropriate for display purposes  **/
53
-	switch($propertyType) {
54
-		case 'i' :	//	integer
55
-			$propertyType = 'integer number';
56
-			break;
57
-		case 'f' :	//	float
58
-			$propertyType = 'floating point number';
59
-			break;
60
-		case 's' :	//	string
61
-			$propertyType = 'string';
62
-			break;
63
-		case 'd' :	//	date
64
-			$propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A',$propertyValue);
65
-			$propertyType = 'date';
66
-			break;
67
-		case 'b' :	//	boolean
68
-			$propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE';
69
-			$propertyType = 'boolean';
70
-			break;
71
-	}
72
-
73
-	echo $propertyValue,' (',$propertyType,')<br />';
46
+    echo '<b>',$customPropertyName,': </b>';
47
+    /**  Retrieve the property value  **/
48
+    $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName);
49
+    /**  Retrieve the property type  **/
50
+    $propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName);
51
+
52
+    /**  Manipulate properties as appropriate for display purposes  **/
53
+    switch($propertyType) {
54
+        case 'i' :	//	integer
55
+            $propertyType = 'integer number';
56
+            break;
57
+        case 'f' :	//	float
58
+            $propertyType = 'floating point number';
59
+            break;
60
+        case 's' :	//	string
61
+            $propertyType = 'string';
62
+            break;
63
+        case 'd' :	//	date
64
+            $propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A',$propertyValue);
65
+            $propertyType = 'date';
66
+            break;
67
+        case 'b' :	//	boolean
68
+            $propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE';
69
+            $propertyType = 'boolean';
70
+            break;
71
+    }
72
+
73
+    echo $propertyValue,' (',$propertyType,')<br />';
74 74
 }
75 75
 
76 76
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
 
43 43
 echo '<b>Custom Properties: </b><br />';
44 44
 /**  Loop through the list of custom properties  **/
45
-foreach($customPropertyList as $customPropertyName) {
46
-	echo '<b>',$customPropertyName,': </b>';
45
+foreach ($customPropertyList as $customPropertyName) {
46
+	echo '<b>', $customPropertyName, ': </b>';
47 47
 	/**  Retrieve the property value  **/
48 48
 	$propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName);
49 49
 	/**  Retrieve the property type  **/
50 50
 	$propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName);
51 51
 
52 52
 	/**  Manipulate properties as appropriate for display purposes  **/
53
-	switch($propertyType) {
53
+	switch ($propertyType) {
54 54
 		case 'i' :	//	integer
55 55
 			$propertyType = 'integer number';
56 56
 			break;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			$propertyType = 'string';
62 62
 			break;
63 63
 		case 'd' :	//	date
64
-			$propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A',$propertyValue);
64
+			$propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A', $propertyValue);
65 65
 			$propertyType = 'date';
66 66
 			break;
67 67
 		case 'b' :	//	boolean
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 			break;
71 71
 	}
72 72
 
73
-	echo $propertyValue,' (',$propertyType,')<br />';
73
+	echo $propertyValue, ' (', $propertyType, ')<br />';
74 74
 }
75 75
 
76 76
 
Please login to merge, or discard this patch.