@@ -31,17 +31,17 @@ |
||
31 | 31 | |
32 | 32 | // Add some data |
33 | 33 | $database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
40 | - ]; |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | + ]; |
|
41 | 41 | $criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
44 | - ]; |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | + ]; |
|
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
47 | 47 | $worksheet->fromArray($database, null, 'A4'); |
@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -31,17 +31,17 @@ |
||
31 | 31 | |
32 | 32 | // Add some data |
33 | 33 | $database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
40 | - ]; |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | + ]; |
|
41 | 41 | $criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
44 | - ]; |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | + ]; |
|
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
47 | 47 | $worksheet->fromArray($database, null, 'A4'); |
@@ -30,17 +30,17 @@ |
||
30 | 30 | $worksheet = $spreadsheet->getActiveSheet(); |
31 | 31 | |
32 | 32 | // Add some data |
33 | -$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | - ['Apple', 18, 20, 14, 105.00], |
|
35 | - ['Pear', 12, 12, 10, 96.00], |
|
36 | - ['Cherry', 13, 14, 9, 105.00], |
|
37 | - ['Apple', 14, 15, 10, 75.00], |
|
38 | - ['Pear', 9, 8, 8, 76.80], |
|
39 | - ['Apple', 8, 9, 6, 45.00], |
|
33 | +$database = [['Tree', 'Height', 'Age', 'Yield', 'Profit'], |
|
34 | + ['Apple', 18, 20, 14, 105.00], |
|
35 | + ['Pear', 12, 12, 10, 96.00], |
|
36 | + ['Cherry', 13, 14, 9, 105.00], |
|
37 | + ['Apple', 14, 15, 10, 75.00], |
|
38 | + ['Pear', 9, 8, 8, 76.80], |
|
39 | + ['Apple', 8, 9, 6, 45.00], |
|
40 | 40 | ]; |
41 | -$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | - ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | - ['="=Pear"', null, null, null, null, null], |
|
41 | +$criteria = [['Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height'], |
|
42 | + ['="=Apple"', '>10', null, null, null, '<16'], |
|
43 | + ['="=Pear"', null, null, null, null, null], |
|
44 | 44 | ]; |
45 | 45 | |
46 | 46 | $worksheet->fromArray($criteria, null, 'A1'); |
@@ -36,9 +36,9 @@ |
||
36 | 36 | $h1Text = $out[1]; |
37 | 37 | $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; |
38 | 38 | |
39 | - echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />'; |
|
39 | + echo '<a href="', $exampleFile, '">', $h1Text, '</a><br />'; |
|
40 | 40 | if ($h2Text > '') { |
41 | - echo $h2Text,'<br />'; |
|
41 | + echo $h2Text, '<br />'; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | } |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | $bFamily = 0; // Font family |
83 | 83 | $bCharSet = \PhpOffice\PhpSpreadsheet\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set |
84 | 84 | |
85 | - $record = 0x31; // Record identifier |
|
86 | - $reserved = 0x00; // Reserved |
|
87 | - $grbit = 0x00; // Font attributes |
|
85 | + $record = 0x31; // Record identifier |
|
86 | + $reserved = 0x00; // Reserved |
|
87 | + $grbit = 0x00; // Font attributes |
|
88 | 88 | if ($this->font->getItalic()) { |
89 | 89 | $grbit |= 0x02; |
90 | 90 | } |
@@ -132,10 +132,10 @@ discard block |
||
132 | 132 | private static function mapBold($bold) |
133 | 133 | { |
134 | 134 | if ($bold) { |
135 | - return 0x2BC; // 700 = Bold font weight |
|
135 | + return 0x2BC; // 700 = Bold font weight |
|
136 | 136 | } |
137 | 137 | |
138 | - return 0x190; // 400 = Normal font weight |
|
138 | + return 0x190; // 400 = Normal font weight |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; |
|
65 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory with a defined reader type of ', $inputFileType, '<br />'; |
|
66 | 66 | /* Create a new Reader of the type defined in $inputFileType **/ |
67 | 67 | $reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType); |
68 | 68 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | /* Tell the Reader that we want to use the Read Filter that we've Instantiated **/ |
69 | 69 | /* and that we want to store it in contiguous rows/columns **/ |
70 | 70 | $reader->setReadFilter($chunkFilter) |
71 | - ->setContiguous(true); |
|
71 | + ->setContiguous(true); |
|
72 | 72 | |
73 | 73 | /* Instantiate a new PhpSpreadsheet object manually **/ |
74 | 74 | $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet(); |
@@ -79,10 +79,10 @@ |
||
79 | 79 | /** |
80 | 80 | * Create a new DataSeriesValues object. |
81 | 81 | * |
82 | - * @param mixed $dataType |
|
82 | + * @param string $dataType |
|
83 | 83 | * @param string $dataSource |
84 | 84 | * @param null|mixed $formatCode |
85 | - * @param mixed $pointCount |
|
85 | + * @param integer $pointCount |
|
86 | 86 | * @param mixed $dataValues |
87 | 87 | * @param null|mixed $marker |
88 | 88 | */ |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @param row Row number to use in the cell reference |
38 | 38 | * @param column Column number to use in the cell reference |
39 | - * @param relativity Flag indicating the type of reference to return |
|
39 | + * @param relativity integer indicating the type of reference to return |
|
40 | 40 | * 1 or omitted Absolute |
41 | 41 | * 2 Absolute row; relative column |
42 | 42 | * 3 Relative row; absolute column |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param sheetText Optional Name of worksheet to use |
48 | 48 | * @param mixed $row |
49 | 49 | * @param mixed $column |
50 | - * @param mixed $relativity |
|
50 | + * @param integer $relativity |
|
51 | 51 | * @param mixed $referenceStyle |
52 | 52 | * @param mixed $sheetText |
53 | 53 | * |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | * |
359 | 359 | * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or |
360 | 360 | * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. |
361 | - * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. |
|
361 | + * @param rows integer number of rows, up or down, that you want the upper-left cell to refer to. |
|
362 | 362 | * Using 5 as the rows argument specifies that the upper-left cell in the reference is |
363 | 363 | * five rows below reference. Rows can be positive (which means below the starting reference) |
364 | 364 | * or negative (which means above the starting reference). |
@@ -370,8 +370,8 @@ discard block |
||
370 | 370 | * @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. |
371 | 371 | * @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. |
372 | 372 | * @param null|mixed $cellAddress |
373 | - * @param mixed $rows |
|
374 | - * @param mixed $columns |
|
373 | + * @param integer $rows |
|
374 | + * @param integer $columns |
|
375 | 375 | * @param null|mixed $height |
376 | 376 | * @param null|mixed $width |
377 | 377 | * @param \PhpOffice\PhpSpreadsheet\Cell $pCell |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | * |
500 | 500 | * @param mixed $lookupValue The value that you want to match in lookup_array |
501 | 501 | * @param mixed $lookupArray The range of cells being searched |
502 | - * @param mixed $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. |
|
502 | + * @param integer $matchType The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. |
|
503 | 503 | * |
504 | 504 | * @return int The relative position of the found item |
505 | 505 | */ |
@@ -613,8 +613,8 @@ discard block |
||
613 | 613 | * @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required. |
614 | 614 | * @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required. |
615 | 615 | * @param mixed $arrayValues |
616 | - * @param mixed $rowNum |
|
617 | - * @param mixed $columnNum |
|
616 | + * @param integer $rowNum |
|
617 | + * @param integer $columnNum |
|
618 | 618 | * |
619 | 619 | * @return mixed the value of a specified cell or array of cells |
620 | 620 | */ |
@@ -710,11 +710,11 @@ discard block |
||
710 | 710 | * |
711 | 711 | * @param lookup_value The value that you want to match in lookup_array |
712 | 712 | * @param lookup_array The range of cells being searched |
713 | - * @param index_number The column number in table_array from which the matching value must be returned. The first column is 1. |
|
713 | + * @param index_number integer column number in table_array from which the matching value must be returned. The first column is 1. |
|
714 | 714 | * @param not_exact_match determines if you are looking for an exact match based on lookup_value |
715 | 715 | * @param mixed $lookup_value |
716 | 716 | * @param mixed $lookup_array |
717 | - * @param mixed $index_number |
|
717 | + * @param integer $index_number |
|
718 | 718 | * @param mixed $not_exact_match |
719 | 719 | * |
720 | 720 | * @return mixed The value of the found cell |
@@ -34,13 +34,13 @@ |
||
34 | 34 | echo 'Reading the number of Worksheets in the WorkBook<br />'; |
35 | 35 | /* Use the PhpSpreadsheet object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ |
36 | 36 | $sheetCount = $spreadsheet->getSheetCount(); |
37 | -echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />'; |
|
37 | +echo 'There ', (($sheetCount == 1) ? 'is' : 'are'), ' ', $sheetCount, ' WorkSheet', (($sheetCount == 1) ? '' : 's'), ' in the WorkBook<br /><br />'; |
|
38 | 38 | |
39 | 39 | echo 'Reading the names of Worksheets in the WorkBook<br />'; |
40 | 40 | /* Use the PhpSpreadsheet object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ |
41 | 41 | $sheetNames = $spreadsheet->getSheetNames(); |
42 | 42 | foreach ($sheetNames as $sheetIndex => $sheetName) { |
43 | - echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />'; |
|
43 | + echo 'WorkSheet #', $sheetIndex, ' is named "', $sheetName, '"<br />'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | ?> |
@@ -22,7 +22,7 @@ |
||
22 | 22 | require_once __DIR__ . '/../../../src/Bootstrap.php'; |
23 | 23 | |
24 | 24 | $inputFileName = './sampleData/example_1.xls'; |
25 | -echo 'Loading file ',pathinfo($inputFileName, PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; |
|
25 | +echo 'Loading file ', pathinfo($inputFileName, PATHINFO_BASENAME), ' using IOFactory to identify the format<br />'; |
|
26 | 26 | try { |
27 | 27 | $spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($inputFileName); |
28 | 28 | } catch (\InvalidArgumentException $e) { |