1 | <?php |
||
8 | class ExcelHelper |
||
9 | { |
||
10 | /** |
||
11 | * @link http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx |
||
12 | * XFE1048577 |
||
13 | */ |
||
14 | const EXCEL_MAX_ROW = 1048576; |
||
15 | const EXCEL_MAX_RANGE = 2147483647; |
||
16 | const EXCEL_MAX_COL = 16384; |
||
17 | |||
18 | /** |
||
19 | * @param string $dateInput |
||
20 | * |
||
21 | * @return mixed |
||
22 | */ |
||
23 | public static function convertDateTime($dateInput) |
||
57 | |||
58 | /** |
||
59 | * @param $val |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | public static function xmlspecialchars($val) |
||
67 | |||
68 | /** |
||
69 | * @param int $rowNumber |
||
70 | * @param int $columnNumber |
||
71 | * |
||
72 | * @return string Cell label/coordinates (A1, C3, AA42) |
||
73 | */ |
||
74 | public static function xlsCell($rowNumber, $columnNumber) |
||
83 | |||
84 | /** |
||
85 | * @link https://msdn.microsoft.com/ru-RU/library/aa365247%28VS.85%29.aspx |
||
86 | * |
||
87 | * @param string $filename |
||
88 | * |
||
89 | * @return mixed |
||
90 | */ |
||
91 | public static function checkFilename($filename) |
||
100 | |||
101 | /** |
||
102 | * @todo check escaping |
||
103 | * |
||
104 | * @param string $cellFormat |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public static function escapeCellFormat($cellFormat) |
||
137 | |||
138 | /** |
||
139 | * @param $dateTime |
||
140 | * |
||
141 | * @return float|int |
||
142 | */ |
||
143 | private function getSeconds($dateTime) |
||
153 | } |
||
154 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.