Completed
Push — develop ( 685e29...09d456 )
by Adrien
14:14
created
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.
Documentation/Examples/index.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -21,28 +21,28 @@
 block discarded – undo
21 21
 
22 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) {
29
-		$fileData = file_get_contents($exampleFile);
28
+    foreach($exampleList as $exampleFile) {
29
+        $fileData = file_get_contents($exampleFile);
30 30
 
31
-		$h1Pattern = '#<h1>(.*?)</h1>#';
32
-		$h2Pattern = '#<h2>(.*?)</h2>#';
31
+        $h1Pattern = '#<h1>(.*?)</h1>#';
32
+        $h2Pattern = '#<h2>(.*?)</h2>#';
33 33
 
34
-		if (preg_match($h1Pattern, $fileData, $out)) {
35
-			$h1Text = $out[1];
36
-			$h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
34
+        if (preg_match($h1Pattern, $fileData, $out)) {
35
+            $h1Text = $out[1];
36
+            $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : '';
37 37
 
38
-			echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
39
-			if (($h2Text > '') &&
40
-				(pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) {
41
-				echo $h2Text,'<br />';
42
-			}
43
-		}
38
+            echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />';
39
+            if (($h2Text > '') &&
40
+                (pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) {
41
+                echo $h2Text,'<br />';
42
+            }
43
+        }
44 44
 
45
-	}
45
+    }
46 46
 }
47 47
 
48 48
 ?>
Please login to merge, or discard this 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 2 patches
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
     /**
148 148
      * Get parent. Only used for style supervisor
149 149
      *
150
-     * @return PhpSpreadsheet
150
+     * @return Style
151 151
      */
152 152
     public function getParent()
153 153
     {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/ReferenceHelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@
 block discarded – undo
450 450
                 if ($cell->getDataType() == Cell\DataType::TYPE_FORMULA) {
451 451
                     // Formula should be adjusted
452 452
                     $pSheet->getCell($newCoordinates)
453
-                           ->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
453
+                            ->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle()));
454 454
                 } else {
455 455
                     // Formula should not be adjusted
456 456
                     $pSheet->getCell($newCoordinates)->setValue($cell->getValue());
Please login to merge, or discard this patch.
Spacing   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -169,8 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $aBreaks = $pSheet->getBreaks();
171 171
         ($pNumCols > 0 || $pNumRows > 0) ?
172
-            uksort($aBreaks, ['self', 'cellReverseSort']) :
173
-            uksort($aBreaks, ['self', 'cellSort']);
172
+            uksort($aBreaks, ['self', 'cellReverseSort']) : uksort($aBreaks, ['self', 'cellSort']);
174 173
 
175 174
         foreach ($aBreaks as $key => $value) {
176 175
             if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) {
@@ -230,8 +229,7 @@  discard block
 block discarded – undo
230 229
     {
231 230
         $aHyperlinkCollection = $pSheet->getHyperlinkCollection();
232 231
         ($pNumCols > 0 || $pNumRows > 0) ?
233
-            uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) :
234
-            uksort($aHyperlinkCollection, ['self', 'cellSort']);
232
+            uksort($aHyperlinkCollection, ['self', 'cellReverseSort']) : uksort($aHyperlinkCollection, ['self', 'cellSort']);
235 233
 
236 234
         foreach ($aHyperlinkCollection as $key => $value) {
237 235
             $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
@@ -256,8 +254,7 @@  discard block
 block discarded – undo
256 254
     {
257 255
         $aDataValidationCollection = $pSheet->getDataValidationCollection();
258 256
         ($pNumCols > 0 || $pNumRows > 0) ?
259
-            uksort($aDataValidationCollection, ['self', 'cellReverseSort']) :
260
-            uksort($aDataValidationCollection, ['self', 'cellSort']);
257
+            uksort($aDataValidationCollection, ['self', 'cellReverseSort']) : uksort($aDataValidationCollection, ['self', 'cellSort']);
261 258
 
262 259
         foreach ($aDataValidationCollection as $key => $value) {
263 260
             $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
@@ -303,8 +300,7 @@  discard block
 block discarded – undo
303 300
     {
304 301
         $aProtectedCells = $pSheet->getProtectedCells();
305 302
         ($pNumCols > 0 || $pNumRows > 0) ?
306
-            uksort($aProtectedCells, ['self', 'cellReverseSort']) :
307
-            uksort($aProtectedCells, ['self', 'cellSort']);
303
+            uksort($aProtectedCells, ['self', 'cellReverseSort']) : uksort($aProtectedCells, ['self', 'cellSort']);
308 304
         foreach ($aProtectedCells as $key => $value) {
309 305
             $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows);
310 306
             if ($key != $newReference) {
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.
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.