Completed
Push — develop ( f74fde...e6bbc4 )
by Adrien
21:27
created
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/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.
Documentation/Examples/Reader/exampleReader18.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 echo '<h3>Worksheet Names</h3>';
42 42
 echo '<ol>';
43 43
 foreach ($worksheetNames as $worksheetName) {
44
-	echo '<li>', $worksheetName, '</li>';
44
+    echo '<li>', $worksheetName, '</li>';
45 45
 }
46 46
 echo '</ol>';
47 47
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 //	$inputFileType = 'Gnumeric';
34 34
 $inputFileName = './sampleData/example1.xls';
35 35
 
36
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />';
36
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />';
37 37
 
38 38
 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
39 39
 $worksheetData = $objReader->listWorksheetInfo($inputFileName);
Please login to merge, or discard this patch.
Documentation/Examples/Reader/exampleReader19.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
41 41
 echo '<h3>Worksheet Information</h3>';
42 42
 echo '<ol>';
43 43
 foreach ($worksheetData as $worksheet) {
44
-	echo '<li>', $worksheet['worksheetName'], '<br />';
45
-	echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '<br />';
46
-	echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows'];
47
-	echo '</li>';
44
+    echo '<li>', $worksheet['worksheetName'], '<br />';
45
+    echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '<br />';
46
+    echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows'];
47
+    echo '</li>';
48 48
 }
49 49
 echo '</ol>';
50 50
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 //	$inputFileType = 'Gnumeric';
34 34
 $inputFileName = './sampleData/example1.xls';
35 35
 
36
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />';
36
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' information using IOFactory with a defined reader type of ', $inputFileType, '<br />';
37 37
 
38 38
 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
39 39
 $worksheetData = $objReader->listWorksheetInfo($inputFileName);
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Worksheet/RowDimension.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     /**
102 102
      * Set Row Height
103 103
      *
104
-     * @param float $pValue
104
+     * @param integer $pValue
105 105
      * @return RowDimension
106 106
      */
107 107
     public function setRowHeight($pValue = -1)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Shared/OLE.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@
 block discarded – undo
266 266
     public function _readPpsWks($blockId)
267 267
     {
268 268
         $fh = $this->getStream($blockId);
269
-        for ($pos = 0;; $pos += 128) {
269
+        for ($pos = 0; ; $pos += 128) {
270 270
             fseek($fh, $pos, SEEK_SET);
271 271
             $nameUtf16 = fread($fh, 64);
272 272
             $nameLength = self::_readInt2($fh);
Please login to merge, or discard this patch.