@@ -99,12 +99,12 @@ discard block |
||
99 | 99 | $slope = $this->getSlope($dp); |
100 | 100 | $intersect = $this->getIntersect($dp); |
101 | 101 | |
102 | - $equation = 'Y = '.$intersect; |
|
102 | + $equation = 'Y = ' . $intersect; |
|
103 | 103 | foreach ($slope as $key => $value) { |
104 | 104 | if ($value != 0.0) { |
105 | - $equation .= ' + '.$value.' * X'; |
|
105 | + $equation .= ' + ' . $value . ' * X'; |
|
106 | 106 | if ($key > 0) { |
107 | - $equation .= '^'.($key + 1); |
|
107 | + $equation .= '^' . ($key + 1); |
|
108 | 108 | } |
109 | 109 | } |
110 | 110 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | { |
208 | 208 | if (parent::__construct($yValues, $xValues) !== false) { |
209 | 209 | if ($order < $this->valueCount) { |
210 | - $this->bestFitType .= '_'.$order; |
|
210 | + $this->bestFitType .= '_' . $order; |
|
211 | 211 | $this->order = $order; |
212 | 212 | $this->polynomialRegression($order, $yValues, $xValues, $const); |
213 | 213 | if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) { |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $slope = $this->getSlope($dp); |
73 | 73 | $intersect = $this->getIntersect($dp); |
74 | 74 | |
75 | - return 'Y = '.$intersect.' + '.$slope.' * log(X)'; |
|
75 | + return 'Y = ' . $intersect . ' + ' . $slope . ' * log(X)'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $slope = $this->getSlope($dp); |
73 | 73 | $intersect = $this->getIntersect($dp); |
74 | 74 | |
75 | - return 'Y = '.$intersect.' * '.$slope.'^X'; |
|
75 | + return 'Y = ' . $intersect . ' * ' . $slope . '^X'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -154,6 +154,6 @@ |
||
154 | 154 | case 65001: |
155 | 155 | return 'UTF-8'; // Unicode (UTF-8) |
156 | 156 | } |
157 | - throw new \PhpOffice\PhpSpreadsheet\Exception('Unknown codepage: '.$codePage); |
|
157 | + throw new \PhpOffice\PhpSpreadsheet\Exception('Unknown codepage: ' . $codePage); |
|
158 | 158 | } |
159 | 159 | } |
@@ -177,21 +177,21 @@ |
||
177 | 177 | $ret = str_pad($this->Name, 64, "\x00"); |
178 | 178 | |
179 | 179 | $ret .= pack('v', strlen($this->Name) + 2) // 66 |
180 | - .pack('c', $this->Type) // 67 |
|
181 | - .pack('c', 0x00) //UK // 68 |
|
182 | - .pack('V', $this->PrevPps) //Prev // 72 |
|
183 | - .pack('V', $this->NextPps) //Next // 76 |
|
184 | - .pack('V', $this->DirPps) //Dir // 80 |
|
185 | - ."\x00\x09\x02\x00" // 84 |
|
186 | - ."\x00\x00\x00\x00" // 88 |
|
187 | - ."\xc0\x00\x00\x00" // 92 |
|
188 | - ."\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | - ."\x00\x00\x00\x00" // 100 |
|
190 | - .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
191 | - .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
192 | - .pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
193 | - .pack('V', $this->Size) // 124 |
|
194 | - .pack('V', 0); // 128 |
|
180 | + .pack('c', $this->Type) // 67 |
|
181 | + .pack('c', 0x00) //UK // 68 |
|
182 | + .pack('V', $this->PrevPps) //Prev // 72 |
|
183 | + .pack('V', $this->NextPps) //Next // 76 |
|
184 | + .pack('V', $this->DirPps) //Dir // 80 |
|
185 | + ."\x00\x09\x02\x00" // 84 |
|
186 | + ."\x00\x00\x00\x00" // 88 |
|
187 | + ."\xc0\x00\x00\x00" // 92 |
|
188 | + ."\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
189 | + ."\x00\x00\x00\x00" // 100 |
|
190 | + .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
191 | + .\PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
192 | + .pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
193 | + .pack('V', $this->Size) // 124 |
|
194 | + .pack('V', 0); // 128 |
|
195 | 195 | return $ret; |
196 | 196 | } |
197 | 197 |
@@ -219,12 +219,12 @@ |
||
219 | 219 | $GLOBALS['_OLE_INSTANCES'][] = $this; |
220 | 220 | $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES'])); |
221 | 221 | |
222 | - $path = 'ole-chainedblockstream://oleInstanceId='.$instanceId; |
|
222 | + $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId; |
|
223 | 223 | if ($blockIdOrPps instanceof OLE\PPS) { |
224 | - $path .= '&blockId='.$blockIdOrPps->startBlock; |
|
225 | - $path .= '&size='.$blockIdOrPps->Size; |
|
224 | + $path .= '&blockId=' . $blockIdOrPps->startBlock; |
|
225 | + $path .= '&size=' . $blockIdOrPps->Size; |
|
226 | 226 | } else { |
227 | - $path .= '&blockId='.$blockIdOrPps; |
|
227 | + $path .= '&blockId=' . $blockIdOrPps; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | return fopen($path, 'r'); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | for ($i = 0; $i <= 31; ++$i) { |
91 | 91 | if ($i != 9 && $i != 10 && $i != 13) { |
92 | - $find = '_x'.sprintf('%04s', strtoupper(dechex($i))).'_'; |
|
92 | + $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_'; |
|
93 | 93 | $replace = chr($i); |
94 | 94 | self::$controlCharacters[$find] = $replace; |
95 | 95 | } |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | // characters |
489 | 489 | $chars = self::convertEncoding($value, 'UTF-16LE', 'UTF-8'); |
490 | 490 | |
491 | - $data = pack('vC', $ln, $opt).$chars; |
|
491 | + $data = pack('vC', $ln, $opt) . $chars; |
|
492 | 492 | |
493 | 493 | return $data; |
494 | 494 | } |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | public static function convertEncoding($value, $to, $from) |
506 | 506 | { |
507 | 507 | if (self::getIsIconvEnabled()) { |
508 | - return iconv($from, $to.'//IGNORE//TRANSLIT', $value); |
|
508 | + return iconv($from, $to . '//IGNORE//TRANSLIT', $value); |
|
509 | 509 | } |
510 | 510 | |
511 | 511 | if (self::getIsMbstringEnabled()) { |
@@ -709,9 +709,9 @@ discard block |
||
709 | 709 | */ |
710 | 710 | public static function convertToNumberIfFraction(&$operand) |
711 | 711 | { |
712 | - if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) { |
|
712 | + if (preg_match('/^' . self::STRING_REGEXP_FRACTION . '$/i', $operand, $match)) { |
|
713 | 713 | $sign = ($match[1] == '-') ? '-' : '+'; |
714 | - $fractionFormula = '='.$sign.$match[2].$sign.$match[3]; |
|
714 | + $fractionFormula = '=' . $sign . $match[2] . $sign . $match[3]; |
|
715 | 715 | $operand = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->_calculateFormulaValue($fractionFormula); |
716 | 716 | |
717 | 717 | return true; |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | |
223 | 223 | // ----- Tests the zlib |
224 | 224 | if (!function_exists('gzopen')) { |
225 | - die('Abort '.basename(__FILE__).' : Missing zlib extensions'); |
|
225 | + die('Abort ' . basename(__FILE__) . ' : Missing zlib extensions'); |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | // ----- Set the attributes |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); |
530 | 530 | } else { |
531 | 531 | // ----- Invalid variable type for $p_filelist |
532 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); |
|
532 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '" . gettype($p_filelist) . "' for p_filelist"); |
|
533 | 533 | |
534 | 534 | return 0; |
535 | 535 | } |
@@ -1077,7 +1077,7 @@ discard block |
||
1077 | 1077 | $this->privSwapBackMagicQuotes(); |
1078 | 1078 | |
1079 | 1079 | // ----- Error log |
1080 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); |
|
1080 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode'); |
|
1081 | 1081 | |
1082 | 1082 | // ----- Return |
1083 | 1083 | return 0; |
@@ -1137,7 +1137,7 @@ discard block |
||
1137 | 1137 | // TBC : Should also check the archive format |
1138 | 1138 | if (!is_file($p_archive)) { |
1139 | 1139 | // ----- Error log |
1140 | - self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); |
|
1140 | + self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '" . $p_archive . "'"); |
|
1141 | 1141 | $v_result = PCLZIP_ERR_MISSING_FILE; |
1142 | 1142 | } else { |
1143 | 1143 | // ----- Duplicate the archive |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | } |
1258 | 1258 | |
1259 | 1259 | if ($p_with_code) { |
1260 | - return $v_value.' ('.$this->error_code.')'; |
|
1260 | + return $v_value . ' (' . $this->error_code . ')'; |
|
1261 | 1261 | } else { |
1262 | 1262 | return $v_value; |
1263 | 1263 | } |
@@ -1275,9 +1275,9 @@ discard block |
||
1275 | 1275 | return PclErrorString(); |
1276 | 1276 | } else { |
1277 | 1277 | if ($p_full) { |
1278 | - return $this->errorName(true).' : '.$this->error_string; |
|
1278 | + return $this->errorName(true) . ' : ' . $this->error_string; |
|
1279 | 1279 | } else { |
1280 | - return $this->error_string.' [code '.$this->error_code.']'; |
|
1280 | + return $this->error_string . ' [code ' . $this->error_code . ']'; |
|
1281 | 1281 | } |
1282 | 1282 | } |
1283 | 1283 | } |
@@ -1316,7 +1316,7 @@ discard block |
||
1316 | 1316 | // ----- Look if the file exits |
1317 | 1317 | if (!is_file($this->zipname)) { |
1318 | 1318 | // ----- Error log |
1319 | - self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); |
|
1319 | + self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '" . $this->zipname . "'"); |
|
1320 | 1320 | |
1321 | 1321 | return false; |
1322 | 1322 | } |
@@ -1324,7 +1324,7 @@ discard block |
||
1324 | 1324 | // ----- Check that the file is readeable |
1325 | 1325 | if (!is_readable($this->zipname)) { |
1326 | 1326 | // ----- Error log |
1327 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); |
|
1327 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '" . $this->zipname . "'"); |
|
1328 | 1328 | |
1329 | 1329 | return false; |
1330 | 1330 | } |
@@ -1368,7 +1368,7 @@ discard block |
||
1368 | 1368 | // ----- Check if the option is supported |
1369 | 1369 | if (!isset($v_requested_options[$p_options_list[$i]])) { |
1370 | 1370 | // ----- Error log |
1371 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); |
|
1371 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '" . $p_options_list[$i] . "' for this method"); |
|
1372 | 1372 | |
1373 | 1373 | // ----- Return |
1374 | 1374 | return self::errorCode(); |
@@ -1383,7 +1383,7 @@ discard block |
||
1383 | 1383 | // ----- Check the number of parameters |
1384 | 1384 | if (($i + 1) >= $p_size) { |
1385 | 1385 | // ----- Error log |
1386 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1386 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1387 | 1387 | |
1388 | 1388 | // ----- Return |
1389 | 1389 | return self::errorCode(); |
@@ -1397,14 +1397,14 @@ discard block |
||
1397 | 1397 | case PCLZIP_OPT_TEMP_FILE_THRESHOLD: |
1398 | 1398 | // ----- Check the number of parameters |
1399 | 1399 | if (($i + 1) >= $p_size) { |
1400 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1400 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1401 | 1401 | |
1402 | 1402 | return self::errorCode(); |
1403 | 1403 | } |
1404 | 1404 | |
1405 | 1405 | // ----- Check for incompatible options |
1406 | 1406 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { |
1407 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1407 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1408 | 1408 | |
1409 | 1409 | return self::errorCode(); |
1410 | 1410 | } |
@@ -1412,7 +1412,7 @@ discard block |
||
1412 | 1412 | // ----- Check the value |
1413 | 1413 | $v_value = $p_options_list[$i + 1]; |
1414 | 1414 | if ((!is_integer($v_value)) || ($v_value < 0)) { |
1415 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1415 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1416 | 1416 | |
1417 | 1417 | return self::errorCode(); |
1418 | 1418 | } |
@@ -1425,7 +1425,7 @@ discard block |
||
1425 | 1425 | case PCLZIP_OPT_TEMP_FILE_ON: |
1426 | 1426 | // ----- Check for incompatible options |
1427 | 1427 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { |
1428 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1428 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); |
|
1429 | 1429 | |
1430 | 1430 | return self::errorCode(); |
1431 | 1431 | } |
@@ -1436,13 +1436,13 @@ discard block |
||
1436 | 1436 | case PCLZIP_OPT_TEMP_FILE_OFF: |
1437 | 1437 | // ----- Check for incompatible options |
1438 | 1438 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { |
1439 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); |
|
1439 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); |
|
1440 | 1440 | |
1441 | 1441 | return self::errorCode(); |
1442 | 1442 | } |
1443 | 1443 | // ----- Check for incompatible options |
1444 | 1444 | if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { |
1445 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); |
|
1445 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '" . PclZipUtilOptionText($p_options_list[$i]) . "' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); |
|
1446 | 1446 | |
1447 | 1447 | return self::errorCode(); |
1448 | 1448 | } |
@@ -1453,7 +1453,7 @@ discard block |
||
1453 | 1453 | // ----- Check the number of parameters |
1454 | 1454 | if (($i + 1) >= $p_size) { |
1455 | 1455 | // ----- Error log |
1456 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1456 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1457 | 1457 | // ----- Return |
1458 | 1458 | return self::errorCode(); |
1459 | 1459 | } |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | // ----- Check the number of parameters |
1471 | 1471 | if (($i + 1) >= $p_size) { |
1472 | 1472 | // ----- Error log |
1473 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1473 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1474 | 1474 | // ----- Return |
1475 | 1475 | return self::errorCode(); |
1476 | 1476 | } |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1483 | 1483 | } else { |
1484 | 1484 | // ----- Error log |
1485 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1485 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1486 | 1486 | // ----- Return |
1487 | 1487 | return self::errorCode(); |
1488 | 1488 | } |
@@ -1499,7 +1499,7 @@ discard block |
||
1499 | 1499 | // ----- Check the number of parameters |
1500 | 1500 | if (($i + 1) >= $p_size) { |
1501 | 1501 | // ----- Error log |
1502 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1502 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1503 | 1503 | // ----- Return |
1504 | 1504 | return self::errorCode(); |
1505 | 1505 | } |
@@ -1509,7 +1509,7 @@ discard block |
||
1509 | 1509 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1510 | 1510 | } else { |
1511 | 1511 | // ----- Error log |
1512 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1512 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1513 | 1513 | // ----- Return |
1514 | 1514 | return self::errorCode(); |
1515 | 1515 | } |
@@ -1523,7 +1523,7 @@ discard block |
||
1523 | 1523 | // ----- Check the number of parameters |
1524 | 1524 | if (($i + 1) >= $p_size) { |
1525 | 1525 | // ----- Error log |
1526 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1526 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1527 | 1527 | |
1528 | 1528 | // ----- Return |
1529 | 1529 | return self::errorCode(); |
@@ -1534,7 +1534,7 @@ discard block |
||
1534 | 1534 | $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1]; |
1535 | 1535 | } else { |
1536 | 1536 | // ----- Error log |
1537 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1537 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1538 | 1538 | |
1539 | 1539 | // ----- Return |
1540 | 1540 | return self::errorCode(); |
@@ -1547,7 +1547,7 @@ discard block |
||
1547 | 1547 | // ----- Check the number of parameters |
1548 | 1548 | if (($i + 1) >= $p_size) { |
1549 | 1549 | // ----- Error log |
1550 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1550 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1551 | 1551 | |
1552 | 1552 | // ----- Return |
1553 | 1553 | return self::errorCode(); |
@@ -1562,12 +1562,12 @@ discard block |
||
1562 | 1562 | // ----- Parse items |
1563 | 1563 | $v_work_list = explode(',', $p_options_list[$i + 1]); |
1564 | 1564 | } elseif (is_integer($p_options_list[$i + 1])) { |
1565 | - $v_work_list[0] = $p_options_list[$i + 1].'-'.$p_options_list[$i + 1]; |
|
1565 | + $v_work_list[0] = $p_options_list[$i + 1] . '-' . $p_options_list[$i + 1]; |
|
1566 | 1566 | } elseif (is_array($p_options_list[$i + 1])) { |
1567 | 1567 | $v_work_list = $p_options_list[$i + 1]; |
1568 | 1568 | } else { |
1569 | 1569 | // ----- Error log |
1570 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1570 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1571 | 1571 | |
1572 | 1572 | // ----- Return |
1573 | 1573 | return self::errorCode(); |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1]; |
1599 | 1599 | } else { |
1600 | 1600 | // ----- Error log |
1601 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1601 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1602 | 1602 | |
1603 | 1603 | // ----- Return |
1604 | 1604 | return self::errorCode(); |
@@ -1610,7 +1610,7 @@ discard block |
||
1610 | 1610 | |
1611 | 1611 | // ----- TBC : An automatic sort should be writen ... |
1612 | 1612 | // ----- Error log |
1613 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1613 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1614 | 1614 | |
1615 | 1615 | // ----- Return |
1616 | 1616 | return self::errorCode(); |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | // ----- Check the number of parameters |
1640 | 1640 | if (($i + 1) >= $p_size) { |
1641 | 1641 | // ----- Error log |
1642 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1642 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1643 | 1643 | // ----- Return |
1644 | 1644 | return self::errorCode(); |
1645 | 1645 | } |
@@ -1662,7 +1662,7 @@ discard block |
||
1662 | 1662 | // ----- Check the number of parameters |
1663 | 1663 | if (($i + 1) >= $p_size) { |
1664 | 1664 | // ----- Error log |
1665 | - self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1665 | + self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1666 | 1666 | // ----- Return |
1667 | 1667 | return self::errorCode(); |
1668 | 1668 | } |
@@ -1673,7 +1673,7 @@ discard block |
||
1673 | 1673 | // ----- Check that the value is a valid existing function |
1674 | 1674 | if (!function_exists($v_function_name)) { |
1675 | 1675 | // ----- Error log |
1676 | - self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); |
|
1676 | + self::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '" . $v_function_name . "()' is not an existing function for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'"); |
|
1677 | 1677 | // ----- Return |
1678 | 1678 | return self::errorCode(); |
1679 | 1679 | } |
@@ -1684,7 +1684,7 @@ discard block |
||
1684 | 1684 | break; |
1685 | 1685 | default: |
1686 | 1686 | // ----- Error log |
1687 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '".$p_options_list[$i]."'"); |
|
1687 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" . $p_options_list[$i] . "'"); |
|
1688 | 1688 | |
1689 | 1689 | // ----- Return |
1690 | 1690 | return self::errorCode(); |
@@ -1702,7 +1702,7 @@ discard block |
||
1702 | 1702 | // ----- Look if present |
1703 | 1703 | if (!isset($v_result_list[$key])) { |
1704 | 1704 | // ----- Error log |
1705 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, 'Missing mandatory parameter '.PclZipUtilOptionText($key).'('.$key.')'); |
|
1705 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, 'Missing mandatory parameter ' . PclZipUtilOptionText($key) . '(' . $key . ')'); |
|
1706 | 1706 | |
1707 | 1707 | // ----- Return |
1708 | 1708 | return self::errorCode(); |
@@ -1780,7 +1780,7 @@ discard block |
||
1780 | 1780 | // ----- Check if the option is supported |
1781 | 1781 | if (!isset($v_requested_options[$v_key])) { |
1782 | 1782 | // ----- Error log |
1783 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); |
|
1783 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '" . $v_key . "' for this file"); |
|
1784 | 1784 | |
1785 | 1785 | // ----- Return |
1786 | 1786 | return self::errorCode(); |
@@ -1790,7 +1790,7 @@ discard block |
||
1790 | 1790 | switch ($v_key) { |
1791 | 1791 | case PCLZIP_ATT_FILE_NAME: |
1792 | 1792 | if (!is_string($v_value)) { |
1793 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type '.gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1793 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type ' . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1794 | 1794 | |
1795 | 1795 | return self::errorCode(); |
1796 | 1796 | } |
@@ -1798,14 +1798,14 @@ discard block |
||
1798 | 1798 | $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); |
1799 | 1799 | |
1800 | 1800 | if ($p_filedescr['filename'] == '') { |
1801 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1801 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1802 | 1802 | |
1803 | 1803 | return self::errorCode(); |
1804 | 1804 | } |
1805 | 1805 | break; |
1806 | 1806 | case PCLZIP_ATT_FILE_NEW_SHORT_NAME: |
1807 | 1807 | if (!is_string($v_value)) { |
1808 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type '.gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1808 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type ' . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1809 | 1809 | |
1810 | 1810 | return self::errorCode(); |
1811 | 1811 | } |
@@ -1813,14 +1813,14 @@ discard block |
||
1813 | 1813 | $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); |
1814 | 1814 | |
1815 | 1815 | if ($p_filedescr['new_short_name'] == '') { |
1816 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1816 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1817 | 1817 | |
1818 | 1818 | return self::errorCode(); |
1819 | 1819 | } |
1820 | 1820 | break; |
1821 | 1821 | case PCLZIP_ATT_FILE_NEW_FULL_NAME: |
1822 | 1822 | if (!is_string($v_value)) { |
1823 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type '.gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1823 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type ' . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1824 | 1824 | |
1825 | 1825 | return self::errorCode(); |
1826 | 1826 | } |
@@ -1828,7 +1828,7 @@ discard block |
||
1828 | 1828 | $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); |
1829 | 1829 | |
1830 | 1830 | if ($p_filedescr['new_full_name'] == '') { |
1831 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1831 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1832 | 1832 | |
1833 | 1833 | return self::errorCode(); |
1834 | 1834 | } |
@@ -1836,7 +1836,7 @@ discard block |
||
1836 | 1836 | // ----- Look for options that takes a string |
1837 | 1837 | case PCLZIP_ATT_FILE_COMMENT: |
1838 | 1838 | if (!is_string($v_value)) { |
1839 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type '.gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1839 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type ' . gettype($v_value) . ". String expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1840 | 1840 | |
1841 | 1841 | return self::errorCode(); |
1842 | 1842 | } |
@@ -1844,7 +1844,7 @@ discard block |
||
1844 | 1844 | break; |
1845 | 1845 | case PCLZIP_ATT_FILE_MTIME: |
1846 | 1846 | if (!is_integer($v_value)) { |
1847 | - self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type '.gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); |
|
1847 | + self::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, 'Invalid type ' . gettype($v_value) . ". Integer expected for attribute '" . PclZipUtilOptionText($v_key) . "'"); |
|
1848 | 1848 | |
1849 | 1849 | return self::errorCode(); |
1850 | 1850 | } |
@@ -1855,7 +1855,7 @@ discard block |
||
1855 | 1855 | break; |
1856 | 1856 | default: |
1857 | 1857 | // ----- Error log |
1858 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '".$v_key."'"); |
|
1858 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" . $v_key . "'"); |
|
1859 | 1859 | |
1860 | 1860 | // ----- Return |
1861 | 1861 | return self::errorCode(); |
@@ -1868,7 +1868,7 @@ discard block |
||
1868 | 1868 | if ($v_requested_options[$key] == 'mandatory') { |
1869 | 1869 | // ----- Look if present |
1870 | 1870 | if (!isset($p_file_list[$key])) { |
1871 | - self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, 'Missing mandatory parameter '.PclZipUtilOptionText($key).'('.$key.')'); |
|
1871 | + self::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, 'Missing mandatory parameter ' . PclZipUtilOptionText($key) . '(' . $key . ')'); |
|
1872 | 1872 | |
1873 | 1873 | return self::errorCode(); |
1874 | 1874 | } |
@@ -1931,7 +1931,7 @@ discard block |
||
1931 | 1931 | } else { |
1932 | 1932 | // ----- Missing file |
1933 | 1933 | // ----- Error log |
1934 | - self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exist"); |
|
1934 | + self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '" . $v_descr['filename'] . "' does not exist"); |
|
1935 | 1935 | |
1936 | 1936 | // ----- Return |
1937 | 1937 | return self::errorCode(); |
@@ -1956,7 +1956,7 @@ discard block |
||
1956 | 1956 | } |
1957 | 1957 | |
1958 | 1958 | // ----- Compose the full filename |
1959 | - $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; |
|
1959 | + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'] . '/' . $v_item_handler; |
|
1960 | 1960 | |
1961 | 1961 | // ----- Look for different stored filename |
1962 | 1962 | // Because the name of the folder was changed, the name of the |
@@ -1964,7 +1964,7 @@ discard block |
||
1964 | 1964 | if (($v_descr['stored_filename'] != $v_descr['filename']) |
1965 | 1965 | && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { |
1966 | 1966 | if ($v_descr['stored_filename'] != '') { |
1967 | - $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; |
|
1967 | + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'] . '/' . $v_item_handler; |
|
1968 | 1968 | } else { |
1969 | 1969 | $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; |
1970 | 1970 | } |
@@ -2079,14 +2079,14 @@ discard block |
||
2079 | 2079 | @rewind($this->zip_fd); |
2080 | 2080 | |
2081 | 2081 | // ----- Creates a temporay file |
2082 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
2082 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
2083 | 2083 | |
2084 | 2084 | // ----- Open the temporary file in write mode |
2085 | 2085 | if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { |
2086 | 2086 | $this->privCloseFd(); |
2087 | 2087 | $this->privSwapBackMagicQuotes(); |
2088 | 2088 | |
2089 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
2089 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
2090 | 2090 | |
2091 | 2091 | // ----- Return |
2092 | 2092 | return self::errorCode(); |
@@ -2159,10 +2159,10 @@ discard block |
||
2159 | 2159 | $v_comment = $p_options[PCLZIP_OPT_COMMENT]; |
2160 | 2160 | } |
2161 | 2161 | if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { |
2162 | - $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; |
|
2162 | + $v_comment = $v_comment . $p_options[PCLZIP_OPT_ADD_COMMENT]; |
|
2163 | 2163 | } |
2164 | 2164 | if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { |
2165 | - $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; |
|
2165 | + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT] . $v_comment; |
|
2166 | 2166 | } |
2167 | 2167 | |
2168 | 2168 | // ----- Calculate the size of the central header |
@@ -2218,7 +2218,7 @@ discard block |
||
2218 | 2218 | // ----- Look if already open |
2219 | 2219 | if ($this->zip_fd != 0) { |
2220 | 2220 | // ----- Error log |
2221 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); |
|
2221 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \'' . $this->zipname . '\' already open'); |
|
2222 | 2222 | |
2223 | 2223 | // ----- Return |
2224 | 2224 | return self::errorCode(); |
@@ -2227,7 +2227,7 @@ discard block |
||
2227 | 2227 | // ----- Open the zip file |
2228 | 2228 | if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) { |
2229 | 2229 | // ----- Error log |
2230 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); |
|
2230 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in ' . $p_mode . ' mode'); |
|
2231 | 2231 | |
2232 | 2232 | // ----- Return |
2233 | 2233 | return self::errorCode(); |
@@ -2353,7 +2353,7 @@ discard block |
||
2353 | 2353 | |
2354 | 2354 | // ----- Check the filename |
2355 | 2355 | if (($p_filedescr_list[$j]['type'] != 'virtual_file') && (!file_exists($p_filedescr_list[$j]['filename']))) { |
2356 | - self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exist"); |
|
2356 | + self::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '" . $p_filedescr_list[$j]['filename'] . "' does not exist"); |
|
2357 | 2357 | |
2358 | 2358 | return self::errorCode(); |
2359 | 2359 | } |
@@ -2647,10 +2647,10 @@ discard block |
||
2647 | 2647 | } |
2648 | 2648 | |
2649 | 2649 | // ----- Creates a compressed temporary file |
2650 | - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; |
|
2650 | + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.gz'; |
|
2651 | 2651 | if (($v_file_compressed = @gzopen($v_gzip_temp_name, 'wb')) == 0) { |
2652 | 2652 | fclose($v_file); |
2653 | - self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); |
|
2653 | + self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary write mode'); |
|
2654 | 2654 | |
2655 | 2655 | return self::errorCode(); |
2656 | 2656 | } |
@@ -2671,14 +2671,14 @@ discard block |
||
2671 | 2671 | |
2672 | 2672 | // ----- Check the minimum file size |
2673 | 2673 | if (filesize($v_gzip_temp_name) < 18) { |
2674 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); |
|
2674 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \'' . $v_gzip_temp_name . '\' has invalid filesize - should be minimum 18 bytes'); |
|
2675 | 2675 | |
2676 | 2676 | return self::errorCode(); |
2677 | 2677 | } |
2678 | 2678 | |
2679 | 2679 | // ----- Extract the compressed attributes |
2680 | 2680 | if (($v_file_compressed = @fopen($v_gzip_temp_name, 'rb')) == 0) { |
2681 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
2681 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
2682 | 2682 | |
2683 | 2683 | return self::errorCode(); |
2684 | 2684 | } |
@@ -2711,7 +2711,7 @@ discard block |
||
2711 | 2711 | |
2712 | 2712 | // ----- Add the compressed data |
2713 | 2713 | if (($v_file_compressed = @fopen($v_gzip_temp_name, 'rb')) == 0) { |
2714 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
2714 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
2715 | 2715 | |
2716 | 2716 | return self::errorCode(); |
2717 | 2717 | } |
@@ -2779,9 +2779,9 @@ discard block |
||
2779 | 2779 | $v_path_info = pathinfo($p_filename); |
2780 | 2780 | $v_dir = ''; |
2781 | 2781 | if ($v_path_info['dirname'] != '') { |
2782 | - $v_dir = $v_path_info['dirname'].'/'; |
|
2782 | + $v_dir = $v_path_info['dirname'] . '/'; |
|
2783 | 2783 | } |
2784 | - $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; |
|
2784 | + $v_stored_filename = $v_dir . $p_filedescr['new_short_name']; |
|
2785 | 2785 | } else { |
2786 | 2786 | // ----- Calculate the stored filename |
2787 | 2787 | $v_stored_filename = $p_filename; |
@@ -2798,7 +2798,7 @@ discard block |
||
2798 | 2798 | |
2799 | 2799 | if ((substr($p_filename, 0, 2) == './') || (substr($p_remove_dir, 0, 2) == './')) { |
2800 | 2800 | if ((substr($p_filename, 0, 2) == './') && (substr($p_remove_dir, 0, 2) != './')) { |
2801 | - $p_remove_dir = './'.$p_remove_dir; |
|
2801 | + $p_remove_dir = './' . $p_remove_dir; |
|
2802 | 2802 | } |
2803 | 2803 | if ((substr($p_filename, 0, 2) != './') && (substr($p_remove_dir, 0, 2) == './')) { |
2804 | 2804 | $p_remove_dir = substr($p_remove_dir, 2); |
@@ -2821,9 +2821,9 @@ discard block |
||
2821 | 2821 | // ----- Look for path to add |
2822 | 2822 | if ($p_add_dir != '') { |
2823 | 2823 | if (substr($p_add_dir, -1) == '/') { |
2824 | - $v_stored_filename = $p_add_dir.$v_stored_filename; |
|
2824 | + $v_stored_filename = $p_add_dir . $v_stored_filename; |
|
2825 | 2825 | } else { |
2826 | - $v_stored_filename = $p_add_dir.'/'.$v_stored_filename; |
|
2826 | + $v_stored_filename = $p_add_dir . '/' . $v_stored_filename; |
|
2827 | 2827 | } |
2828 | 2828 | } |
2829 | 2829 | } |
@@ -2960,7 +2960,7 @@ discard block |
||
2960 | 2960 | $this->privSwapBackMagicQuotes(); |
2961 | 2961 | |
2962 | 2962 | // ----- Error log |
2963 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); |
|
2963 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode'); |
|
2964 | 2964 | |
2965 | 2965 | // ----- Return |
2966 | 2966 | return self::errorCode(); |
@@ -3079,7 +3079,7 @@ discard block |
||
3079 | 3079 | |
3080 | 3080 | // ----- Check the path |
3081 | 3081 | if (($p_path == '') || ((substr($p_path, 0, 1) != '/') && (substr($p_path, 0, 3) != '../') && (substr($p_path, 1, 2) != ':/'))) { |
3082 | - $p_path = './'.$p_path; |
|
3082 | + $p_path = './' . $p_path; |
|
3083 | 3083 | } |
3084 | 3084 | |
3085 | 3085 | // ----- Reduce the path last (and duplicated) '/' |
@@ -3200,7 +3200,7 @@ discard block |
||
3200 | 3200 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3201 | 3201 | $this->privSwapBackMagicQuotes(); |
3202 | 3202 | |
3203 | - self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '".$v_header['stored_filename']."' is compressed by an unsupported compression method (".$v_header['compression'].') '); |
|
3203 | + self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '" . $v_header['stored_filename'] . "' is compressed by an unsupported compression method (" . $v_header['compression'] . ') '); |
|
3204 | 3204 | |
3205 | 3205 | return self::errorCode(); |
3206 | 3206 | } |
@@ -3213,7 +3213,7 @@ discard block |
||
3213 | 3213 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3214 | 3214 | $this->privSwapBackMagicQuotes(); |
3215 | 3215 | |
3216 | - self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, "Unsupported encryption for filename '".$v_header['stored_filename']."'"); |
|
3216 | + self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, "Unsupported encryption for filename '" . $v_header['stored_filename'] . "'"); |
|
3217 | 3217 | |
3218 | 3218 | return self::errorCode(); |
3219 | 3219 | } |
@@ -3395,14 +3395,14 @@ discard block |
||
3395 | 3395 | |
3396 | 3396 | // ----- Add the path |
3397 | 3397 | if ($p_path != '') { |
3398 | - $p_entry['filename'] = $p_path.'/'.$p_entry['filename']; |
|
3398 | + $p_entry['filename'] = $p_path . '/' . $p_entry['filename']; |
|
3399 | 3399 | } |
3400 | 3400 | |
3401 | 3401 | // ----- Check a base_dir_restriction |
3402 | 3402 | if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { |
3403 | 3403 | $v_inclusion = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], $p_entry['filename']); |
3404 | 3404 | if ($v_inclusion == 0) { |
3405 | - self::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '".$p_entry['filename']."' is outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); |
|
3405 | + self::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '" . $p_entry['filename'] . "' is outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); |
|
3406 | 3406 | |
3407 | 3407 | return self::errorCode(); |
3408 | 3408 | } |
@@ -3450,7 +3450,7 @@ discard block |
||
3450 | 3450 | // For historical reason first PclZip implementation does not stop |
3451 | 3451 | // when this kind of error occurs. |
3452 | 3452 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3453 | - self::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '".$p_entry['filename']."' is already used by an existing directory"); |
|
3453 | + self::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '" . $p_entry['filename'] . "' is already used by an existing directory"); |
|
3454 | 3454 | |
3455 | 3455 | return self::errorCode(); |
3456 | 3456 | } |
@@ -3463,7 +3463,7 @@ discard block |
||
3463 | 3463 | // For historical reason first PclZip implementation does not stop |
3464 | 3464 | // when this kind of error occurs. |
3465 | 3465 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3466 | - self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '".$p_entry['filename']."' exists and is write protected"); |
|
3466 | + self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '" . $p_entry['filename'] . "' exists and is write protected"); |
|
3467 | 3467 | |
3468 | 3468 | return self::errorCode(); |
3469 | 3469 | } |
@@ -3478,7 +3478,7 @@ discard block |
||
3478 | 3478 | // For historical reason first PclZip implementation does not stop |
3479 | 3479 | // when this kind of error occurs. |
3480 | 3480 | if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { |
3481 | - self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '".$p_entry['filename']."' exists and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
|
3481 | + self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '" . $p_entry['filename'] . "' exists and option PCLZIP_OPT_REPLACE_NEWER is not selected"); |
|
3482 | 3482 | |
3483 | 3483 | return self::errorCode(); |
3484 | 3484 | } |
@@ -3543,7 +3543,7 @@ discard block |
||
3543 | 3543 | // ----- TBC |
3544 | 3544 | // Need to be finished |
3545 | 3545 | if (($p_entry['flag'] & 1) == 1) { |
3546 | - self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); |
|
3546 | + self::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \'' . $p_entry['filename'] . '\' is encrypted. Encrypted files are not supported.'); |
|
3547 | 3547 | |
3548 | 3548 | return self::errorCode(); |
3549 | 3549 | } |
@@ -3635,10 +3635,10 @@ discard block |
||
3635 | 3635 | $v_result = 1; |
3636 | 3636 | |
3637 | 3637 | // ----- Creates a temporary file |
3638 | - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; |
|
3638 | + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.gz'; |
|
3639 | 3639 | if (($v_dest_file = @fopen($v_gzip_temp_name, 'wb')) == 0) { |
3640 | 3640 | fclose($v_file); |
3641 | - self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); |
|
3641 | + self::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary write mode'); |
|
3642 | 3642 | |
3643 | 3643 | return self::errorCode(); |
3644 | 3644 | } |
@@ -3675,7 +3675,7 @@ discard block |
||
3675 | 3675 | if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { |
3676 | 3676 | @fclose($v_dest_file); |
3677 | 3677 | $p_entry['status'] = 'read_error'; |
3678 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); |
|
3678 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_gzip_temp_name . '\' in binary read mode'); |
|
3679 | 3679 | |
3680 | 3680 | return self::errorCode(); |
3681 | 3681 | } |
@@ -3944,7 +3944,7 @@ discard block |
||
3944 | 3944 | $p_header['status'] = 'invalid_header'; |
3945 | 3945 | |
3946 | 3946 | // ----- Error log |
3947 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid block size : '.strlen($v_binary_data)); |
|
3947 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . strlen($v_binary_data)); |
|
3948 | 3948 | |
3949 | 3949 | // ----- Return |
3950 | 3950 | return self::errorCode(); |
@@ -4039,7 +4039,7 @@ discard block |
||
4039 | 4039 | $p_header['status'] = 'invalid_header'; |
4040 | 4040 | |
4041 | 4041 | // ----- Error log |
4042 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid block size : '.strlen($v_binary_data)); |
|
4042 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid block size : ' . strlen($v_binary_data)); |
|
4043 | 4043 | |
4044 | 4044 | // ----- Return |
4045 | 4045 | return self::errorCode(); |
@@ -4162,7 +4162,7 @@ discard block |
||
4162 | 4162 | @fseek($this->zip_fd, $v_size); |
4163 | 4163 | if (@ftell($this->zip_fd) != $v_size) { |
4164 | 4164 | // ----- Error log |
4165 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); |
|
4165 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->zipname . '\''); |
|
4166 | 4166 | |
4167 | 4167 | // ----- Return |
4168 | 4168 | return self::errorCode(); |
@@ -4175,7 +4175,7 @@ discard block |
||
4175 | 4175 | @fseek($this->zip_fd, $v_size - 22); |
4176 | 4176 | if (($v_pos = @ftell($this->zip_fd)) != ($v_size - 22)) { |
4177 | 4177 | // ----- Error log |
4178 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); |
|
4178 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\''); |
|
4179 | 4179 | |
4180 | 4180 | // ----- Return |
4181 | 4181 | return self::errorCode(); |
@@ -4202,7 +4202,7 @@ discard block |
||
4202 | 4202 | @fseek($this->zip_fd, $v_size - $v_maximum_size); |
4203 | 4203 | if (@ftell($this->zip_fd) != ($v_size - $v_maximum_size)) { |
4204 | 4204 | // ----- Error log |
4205 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); |
|
4205 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\''); |
|
4206 | 4206 | |
4207 | 4207 | // ----- Return |
4208 | 4208 | return self::errorCode(); |
@@ -4246,7 +4246,7 @@ discard block |
||
4246 | 4246 | // ----- Look for invalid block size |
4247 | 4247 | if (strlen($v_binary_data) != 18) { |
4248 | 4248 | // ----- Error log |
4249 | - self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : '.strlen($v_binary_data)); |
|
4249 | + self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid End of Central Dir Record size : ' . strlen($v_binary_data)); |
|
4250 | 4250 | |
4251 | 4251 | // ----- Return |
4252 | 4252 | return self::errorCode(); |
@@ -4364,7 +4364,7 @@ discard block |
||
4364 | 4364 | // ----- Look if the directory is in the filename path |
4365 | 4365 | if ((strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
4366 | 4366 | $v_found = true; |
4367 | - } elseif ((($v_header_list[$v_nb_extracted]['external'] & 0x00000010) == 0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
|
4367 | + } elseif ((($v_header_list[$v_nb_extracted]['external'] & 0x00000010) == 0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'] . '/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { |
|
4368 | 4368 | $v_found = true; |
4369 | 4369 | } |
4370 | 4370 | } elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { |
@@ -4406,7 +4406,7 @@ discard block |
||
4406 | 4406 | // ----- Look if something need to be deleted |
4407 | 4407 | if ($v_nb_extracted > 0) { |
4408 | 4408 | // ----- Creates a temporay file |
4409 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
4409 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
4410 | 4410 | |
4411 | 4411 | // ----- Creates a temporary zip archive |
4412 | 4412 | $v_temp_zip = new self($v_zip_temp_name); |
@@ -4671,14 +4671,14 @@ discard block |
||
4671 | 4671 | @rewind($p_archive_to_add->zip_fd); |
4672 | 4672 | |
4673 | 4673 | // ----- Creates a temporay file |
4674 | - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; |
|
4674 | + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR . uniqid('pclzip-') . '.tmp'; |
|
4675 | 4675 | |
4676 | 4676 | // ----- Open the temporary file in write mode |
4677 | 4677 | if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { |
4678 | 4678 | $this->privCloseFd(); |
4679 | 4679 | $p_archive_to_add->privCloseFd(); |
4680 | 4680 | |
4681 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); |
|
4681 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \'' . $v_zip_temp_name . '\' in binary write mode'); |
|
4682 | 4682 | |
4683 | 4683 | // ----- Return |
4684 | 4684 | return self::errorCode(); |
@@ -4725,7 +4725,7 @@ discard block |
||
4725 | 4725 | } |
4726 | 4726 | |
4727 | 4727 | // ----- Merge the file comments |
4728 | - $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; |
|
4728 | + $v_comment = $v_central_dir['comment'] . ' ' . $v_central_dir_to_add['comment']; |
|
4729 | 4729 | |
4730 | 4730 | // ----- Calculate the size of the (new) central header |
4731 | 4731 | $v_size = @ftell($v_zip_temp_fd) - $v_offset; |
@@ -4806,7 +4806,7 @@ discard block |
||
4806 | 4806 | if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) { |
4807 | 4807 | $this->privCloseFd(); |
4808 | 4808 | |
4809 | - self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); |
|
4809 | + self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \'' . $p_archive_filename . '\' in binary write mode'); |
|
4810 | 4810 | |
4811 | 4811 | // ----- Return |
4812 | 4812 | return self::errorCode(); |
@@ -4958,7 +4958,7 @@ discard block |
||
4958 | 4958 | } elseif ($v_list[$i] == '') { |
4959 | 4959 | // ----- First '/' i.e. root slash |
4960 | 4960 | if ($i == 0) { |
4961 | - $v_result = '/'.$v_result; |
|
4961 | + $v_result = '/' . $v_result; |
|
4962 | 4962 | if ($v_skip > 0) { |
4963 | 4963 | // ----- It is an invalid path, so the path is not modified |
4964 | 4964 | // TBC |
@@ -4978,7 +4978,7 @@ discard block |
||
4978 | 4978 | if ($v_skip > 0) { |
4979 | 4979 | --$v_skip; |
4980 | 4980 | } else { |
4981 | - $v_result = $v_list[$i].($i != (sizeof($v_list) - 1) ? '/'.$v_result : ''); |
|
4981 | + $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/' . $v_result : ''); |
|
4982 | 4982 | } |
4983 | 4983 | } |
4984 | 4984 | } |
@@ -4986,7 +4986,7 @@ discard block |
||
4986 | 4986 | // ----- Look for skip |
4987 | 4987 | if ($v_skip > 0) { |
4988 | 4988 | while ($v_skip > 0) { |
4989 | - $v_result = '../'.$v_result; |
|
4989 | + $v_result = '../' . $v_result; |
|
4990 | 4990 | --$v_skip; |
4991 | 4991 | } |
4992 | 4992 | } |
@@ -5018,10 +5018,10 @@ discard block |
||
5018 | 5018 | |
5019 | 5019 | // ----- Look for path beginning by ./ |
5020 | 5020 | if (($p_dir == '.') || ((strlen($p_dir) >= 2) && (substr($p_dir, 0, 2) == './'))) { |
5021 | - $p_dir = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_dir, 1); |
|
5021 | + $p_dir = PclZipUtilTranslateWinPath(getcwd(), false) . '/' . substr($p_dir, 1); |
|
5022 | 5022 | } |
5023 | 5023 | if (($p_path == '.') || ((strlen($p_path) >= 2) && (substr($p_path, 0, 2) == './'))) { |
5024 | - $p_path = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_path, 1); |
|
5024 | + $p_path = PclZipUtilTranslateWinPath(getcwd(), false) . '/' . substr($p_path, 1); |
|
5025 | 5025 | } |
5026 | 5026 | |
5027 | 5027 | // ----- Explode dir and path by directory separator |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | } |
426 | 426 | } else { |
427 | 427 | // String values are always tested for equality, factoring in for wildcards (hence a regexp test) |
428 | - $retVal = preg_match('/^'.$rule['value'].'$/i', $cellValue); |
|
428 | + $retVal = preg_match('/^' . $rule['value'] . '$/i', $cellValue); |
|
429 | 429 | } |
430 | 430 | // If there are multiple conditions, then we need to test both using the appropriate join operator |
431 | 431 | switch ($join) { |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | |
592 | 592 | private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) |
593 | 593 | { |
594 | - $range = $columnID.$startRow.':'.$columnID.$endRow; |
|
594 | + $range = $columnID . $startRow . ':' . $columnID . $endRow; |
|
595 | 595 | $dataValues = \PhpOffice\PhpSpreadsheet\Calculation\Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false)); |
596 | 596 | |
597 | 597 | $dataValues = array_filter($dataValues); |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | ($ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND] !== '')) { |
675 | 675 | $time .= sprintf('%02d', $ruleValue[AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]); |
676 | 676 | } |
677 | - $dateTime = $date.$time; |
|
677 | + $dateTime = $date . $time; |
|
678 | 678 | $arguments['date'][] = $date; |
679 | 679 | $arguments['time'][] = $time; |
680 | 680 | $arguments['dateTime'][] = $dateTime; |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | ($dynamicRuleType == AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)) { |
723 | 723 | // Number (Average) based |
724 | 724 | // Calculate the average |
725 | - $averageFormula = '=AVERAGE('.$columnID.($rangeStart[1] + 1).':'.$columnID.$rangeEnd[1].')'; |
|
725 | + $averageFormula = '=AVERAGE(' . $columnID . ($rangeStart[1] + 1) . ':' . $columnID . $rangeEnd[1] . ')'; |
|
726 | 726 | $average = \PhpOffice\PhpSpreadsheet\Calculation::getInstance()->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1')); |
727 | 727 | // Set above/below rule based on greaterThan or LessTan |
728 | 728 | $operator = ($dynamicRuleType === AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | for ($row = $rangeStart[1] + 1; $row <= $rangeEnd[1]; ++$row) { |
801 | 801 | $result = true; |
802 | 802 | foreach ($columnFilterTests as $columnID => $columnFilterTest) { |
803 | - $cellValue = $this->workSheet->getCell($columnID.$row)->getCalculatedValue(); |
|
803 | + $cellValue = $this->workSheet->getCell($columnID . $row)->getCalculatedValue(); |
|
804 | 804 | // Execute the filter test |
805 | 805 | $result = $result && |
806 | 806 | call_user_func_array( |