Completed
Push — develop ( 942ad7...b0621f )
by Adrien
22:01 queued 09:22
created
Documentation/Examples/Reader/exampleReader02.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 $inputFileName = './sampleData/example1.xls';
30 30
 
31
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using PHPExcel_Reader_Excel5<br />';
31
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using PHPExcel_Reader_Excel5<br />';
32 32
 $objReader = new PHPExcel_Reader_Excel5();
33 33
 //	$objReader = new PHPExcel_Reader_Excel2007();
34 34
 //	$objReader = new PHPExcel_Reader_Excel2003XML();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
 echo '<hr />';
43 43
 
44
-$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
44
+$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, true, true, true);
45 45
 var_dump($sheetData);
46 46
 
47 47
 
Please login to merge, or discard this patch.
Documentation/Examples/Reader/exampleReader08.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@
 block discarded – undo
32 32
 //	$inputFileType = 'OOCalc';
33 33
 //	$inputFileType = 'Gnumeric';
34 34
 $inputFileName = './sampleData/example1.xls';
35
-$sheetnames = array('Data Sheet #1','Data Sheet #3');
35
+$sheetnames = array('Data Sheet #1', 'Data Sheet #3');
36 36
 
37
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
37
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
38 38
 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
39
-echo 'Loading Sheet',((count($sheetnames) == 1) ? '' : 's'),' "',implode('" and "',$sheetnames),'" only<br />';
39
+echo 'Loading Sheet', ((count($sheetnames) == 1) ? '' : 's'), ' "', implode('" and "', $sheetnames), '" only<br />';
40 40
 $objReader->setLoadSheetsOnly($sheetnames);
41 41
 $objPHPExcel = $objReader->load($inputFileName);
42 42
 
43 43
 
44 44
 echo '<hr />';
45 45
 
46
-echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
46
+echo $objPHPExcel->getSheetCount(), ' worksheet', (($objPHPExcel->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
47 47
 $loadedSheetNames = $objPHPExcel->getSheetNames();
48
-foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
49
-	echo $sheetIndex,' -> ',$loadedSheetName,'<br />';
48
+foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
49
+	echo $sheetIndex, ' -> ', $loadedSheetName, '<br />';
50 50
 }
51 51
 
52 52
 
Please login to merge, or discard this patch.
Documentation/Examples/Reader/exampleReader14.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 
34 34
 	/**  Set the list of rows that we want to read  */
35 35
 	public function setRows($startRow, $chunkSize) {
36
-		$this->_startRow	= $startRow;
37
-		$this->_endRow		= $startRow + $chunkSize;
36
+		$this->_startRow = $startRow;
37
+		$this->_endRow = $startRow + $chunkSize;
38 38
 	}
39 39
 
40 40
 	public function readCell($column, $row, $worksheetName = '') {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 
50
-echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />';
50
+echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />';
51 51
 /**  Create a new Reader of the type defined in $inputFileType  **/
52 52
 $objReader = PHPExcel_IOFactory::createReader($inputFileType);
53 53
 
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 /**  Loop to read our worksheet in "chunk size" blocks  **/
75 75
 /**  $startRow is set to 2 initially because we always read the headings in row #1  **/
76 76
 for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) {
77
-	echo 'Loading WorkSheet #',($sheet+1),' using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />';
77
+	echo 'Loading WorkSheet #', ($sheet + 1), ' using configurable filter for headings row 1 and for rows ', $startRow, ' to ', ($startRow + $chunkSize - 1), '<br />';
78 78
 	/**  Tell the Read Filter, the limits on which rows we want to read this iteration  **/
79
-	$chunkFilter->setRows($startRow,$chunkSize);
79
+	$chunkFilter->setRows($startRow, $chunkSize);
80 80
 
81 81
     /**  Increment the worksheet index pointer for the Reader  **/
82 82
     $objReader->setSheetIndex($sheet);
83 83
 	/**  Load only the rows that match our filter into a new worksheet in the PHPExcel Object  **/
84
-    $objReader->loadIntoExisting($inputFileName,$objPHPExcel);
84
+    $objReader->loadIntoExisting($inputFileName, $objPHPExcel);
85 85
     /**  Set the worksheet title (to reference the "sheet" of data that we've loaded)  **/
86 86
     /**    and increment the sheet index as well  **/
87
-    $objPHPExcel->getActiveSheet()->setTitle('Country Data #'.(++$sheet));
87
+    $objPHPExcel->getActiveSheet()->setTitle('Country Data #' . (++$sheet));
88 88
 }
89 89
 
90 90
 
91 91
 echo '<hr />';
92 92
 
93
-echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />';
93
+echo $objPHPExcel->getSheetCount(), ' worksheet', (($objPHPExcel->getSheetCount() == 1) ? '' : 's'), ' loaded<br /><br />';
94 94
 $loadedSheetNames = $objPHPExcel->getSheetNames();
95
-foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) {
96
-	echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />';
95
+foreach ($loadedSheetNames as $sheetIndex => $loadedSheetName) {
96
+	echo '<b>Worksheet #', $sheetIndex, ' -> ', $loadedSheetName, '</b><br />';
97 97
 	$objPHPExcel->setActiveSheetIndexByName($loadedSheetName);
98
-	$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,false,false,true);
98
+	$sheetData = $objPHPExcel->getActiveSheet()->toArray(null, false, false, true);
99 99
 	var_dump($sheetData);
100 100
 	echo '<br />';
101 101
 }
Please login to merge, or discard this patch.
Documentation/Examples/Reader/exampleReader05.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/Reader/exampleReader19.php 1 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/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 
18 18
 <?php
19 19
 
20
-$exampleTypeList = glob('./*',GLOB_ONLYDIR);
20
+$exampleTypeList = glob('./*', GLOB_ONLYDIR);
21 21
 
22
-foreach($exampleTypeList as $exampleType) {
22
+foreach ($exampleTypeList as $exampleType) {
23 23
 
24
-	echo '<h1>PHPExcel ' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Examples</h1>';
24
+	echo '<h1>PHPExcel ' . pathinfo($exampleType, PATHINFO_BASENAME) . ' Examples</h1>';
25 25
 
26
-	$exampleList = glob('./'.$exampleType.'/*.php');
26
+	$exampleList = glob('./' . $exampleType . '/*.php');
27 27
 
28
-	foreach($exampleList as $exampleFile) {
28
+	foreach ($exampleList as $exampleFile) {
29 29
 		$fileData = file_get_contents($exampleFile);
30 30
 
31 31
 		$h1Pattern = '#<h1>(.*?)</h1>#';
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 			$h1Text = $out[1];
36 36
 			$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
37 37
 
38
-			echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
38
+			echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />';
39 39
 			if (($h2Text > '') &&
40
-				(pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) {
41
-				echo $h2Text,'<br />';
40
+				(pathinfo($exampleType, PATHINFO_BASENAME) != 'Calculations')) {
41
+				echo $h2Text, '<br />';
42 42
 			}
43 43
 		}
44 44
 
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Style.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -618,7 +618,7 @@
 block discarded – undo
618 618
             $this->numberFormat->getHashCode() .
619 619
             $hashConditionals .
620 620
             $this->protection->getHashCode() .
621
-            ($this->quotePrefix  ? 't' : 'f') .
621
+            ($this->quotePrefix ? 't' : 'f') .
622 622
             __CLASS__
623 623
         );
624 624
     }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel5/Font.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
         $bFamily = 0; // Font family
86 86
         $bCharSet = \PHPExcel\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set
87 87
 
88
-        $record = 0x31;        // Record identifier
89
-        $reserved = 0x00;    // Reserved
90
-        $grbit = 0x00;        // Font attributes
88
+        $record = 0x31; // Record identifier
89
+        $reserved = 0x00; // Reserved
90
+        $grbit = 0x00; // Font attributes
91 91
         if ($this->font->getItalic()) {
92 92
             $grbit |= 0x02;
93 93
         }
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
     private static function mapBold($bold)
135 135
     {
136 136
         if ($bold) {
137
-            return 0x2BC;  //  700 = Bold font weight
137
+            return 0x2BC; //  700 = Bold font weight
138 138
         }
139
-        return 0x190;      //  400 = Normal font weight
139
+        return 0x190; //  400 = Normal font weight
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Writer/Excel2007/Rels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
                 'http://schemas.microsoft.com/office/2006/relationships/vbaProject',
169 169
                 'vbaProject.bin'
170 170
             );
171
-            ++$i;//increment i if needed for an another relation
171
+            ++$i; //increment i if needed for an another relation
172 172
         }
173 173
 
174 174
         $objWriter->endElement();
Please login to merge, or discard this patch.