@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $this->dumper->dump( |
| 40 | 40 | $this->cloner->cloneVar($data), |
| 41 | - function ($line, $depth) use (&$output) { |
|
| 41 | + function($line, $depth) use (&$output) { |
|
| 42 | 42 | // A negative depth means "end of dump" |
| 43 | 43 | if ($depth >= 0) { |
| 44 | 44 | // Adds a two spaces indentation to the line |
@@ -57,13 +57,13 @@ discard block |
||
| 57 | 57 | public function formatDuration($seconds) |
| 58 | 58 | { |
| 59 | 59 | if ($seconds < 0.001) { |
| 60 | - return round($seconds * 1000000) . 'μs'; |
|
| 60 | + return round($seconds * 1000000).'μs'; |
|
| 61 | 61 | } elseif ($seconds < 0.1) { |
| 62 | - return round($seconds * 1000, 2) . 'ms'; |
|
| 62 | + return round($seconds * 1000, 2).'ms'; |
|
| 63 | 63 | } elseif ($seconds < 1) { |
| 64 | - return round($seconds * 1000) . 'ms'; |
|
| 64 | + return round($seconds * 1000).'ms'; |
|
| 65 | 65 | } |
| 66 | - return round($seconds, 2) . 's'; |
|
| 66 | + return round($seconds, 2).'s'; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -82,6 +82,6 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $base = log($size) / log(1024); |
| 84 | 84 | $suffixes = array('B', 'KB', 'MB', 'GB', 'TB'); |
| 85 | - return $sign . round(pow(1024, $base - floor($base)), $precision) . $suffixes[(int) floor($base)]; |
|
| 85 | + return $sign.round(pow(1024, $base - floor($base)), $precision).$suffixes[(int) floor($base)]; |
|
| 86 | 86 | } |
| 87 | 87 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function __construct($dirname) |
| 24 | 24 | { |
| 25 | - $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
| 25 | + $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | //Sort the files, newest first |
| 64 | - usort($files, function ($a, $b) { |
|
| 64 | + usort($files, function($a, $b) { |
|
| 65 | 65 | return $a['time'] <=> $b['time']; |
| 66 | 66 | }); |
| 67 | 67 | |
@@ -123,6 +123,6 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function makeFilename($id) |
| 125 | 125 | { |
| 126 | - return $this->dirname . basename($id). ".json"; |
|
| 126 | + return $this->dirname.basename($id).".json"; |
|
| 127 | 127 | } |
| 128 | 128 | } |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | $params[] = $value; |
| 88 | 88 | } |
| 89 | 89 | if (count($where)) { |
| 90 | - $where = " WHERE " . implode(' AND ', $where); |
|
| 90 | + $where = " WHERE ".implode(' AND ', $where); |
|
| 91 | 91 | } else { |
| 92 | 92 | $where = ''; |
| 93 | 93 | } |
@@ -73,9 +73,9 @@ |
||
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | - } while($cursor); |
|
| 76 | + } while ($cursor); |
|
| 77 | 77 | |
| 78 | - usort($results, static function ($a, $b) { |
|
| 78 | + usort($results, static function($a, $b) { |
|
| 79 | 79 | return $b['utime'] <=> $a['utime']; |
| 80 | 80 | }); |
| 81 | 81 | |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | -spl_autoload_register(function ($class_name) { |
|
| 2 | +spl_autoload_register(function($class_name) { |
|
| 3 | 3 | $preg_match = preg_match('/^Psr\\\SimpleCache/', $class_name); |
| 4 | 4 | |
| 5 | 5 | if (1 === $preg_match) { |
| 6 | 6 | $class_name = preg_replace('/\\\/', '/', $class_name); |
| 7 | 7 | $class_name = preg_replace('/^Psr\\/SimpleCache\\//', '', $class_name); |
| 8 | - require_once(__DIR__ . '/simple-cache/src/' . $class_name . '.php'); |
|
| 8 | + require_once(__DIR__.'/simple-cache/src/'.$class_name.'.php'); |
|
| 9 | 9 | } |
| 10 | 10 | }); |
| 11 | 11 | \ No newline at end of file |
@@ -179,6 +179,6 @@ |
||
| 179 | 179 | { |
| 180 | 180 | $binary = str_pad(decbin($decimal), 32, '0', STR_PAD_LEFT); |
| 181 | 181 | |
| 182 | - return bindec(substr($binary, $bits) . substr($binary, 0, $bits)); |
|
| 182 | + return bindec(substr($binary, $bits).substr($binary, 0, $bits)); |
|
| 183 | 183 | } |
| 184 | 184 | } |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | $endOffsetY = Xls::getUInt2d($recordData, 16); |
| 601 | 601 | |
| 602 | 602 | // set the start coordinates |
| 603 | - $this->object->setStartCoordinates(Coordinate::stringFromColumnIndex($c1 + 1) . ($r1 + 1)); |
|
| 603 | + $this->object->setStartCoordinates(Coordinate::stringFromColumnIndex($c1 + 1).($r1 + 1)); |
|
| 604 | 604 | |
| 605 | 605 | // set the start offsetX |
| 606 | 606 | $this->object->setStartOffsetX($startOffsetX); |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | $this->object->setStartOffsetY($startOffsetY); |
| 610 | 610 | |
| 611 | 611 | // set the end coordinates |
| 612 | - $this->object->setEndCoordinates(Coordinate::stringFromColumnIndex($c2 + 1) . ($r2 + 1)); |
|
| 612 | + $this->object->setEndCoordinates(Coordinate::stringFromColumnIndex($c2 + 1).($r2 + 1)); |
|
| 613 | 613 | |
| 614 | 614 | // set the end offsetX |
| 615 | 615 | $this->object->setEndOffsetX($endOffsetX); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | Settings::getLibXmlLoaderOptions() |
| 117 | 117 | ); |
| 118 | 118 | } catch (\Exception $e) { |
| 119 | - throw new Exception('Cannot load invalid XML file: ' . $pFilename, 0, $e); |
|
| 119 | + throw new Exception('Cannot load invalid XML file: '.$pFilename, 0, $e); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | return $xml; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | File::assertFile($pFilename); |
| 137 | 137 | if (!$this->canRead($pFilename)) { |
| 138 | - throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
| 138 | + throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $worksheetNames = []; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | { |
| 309 | 309 | File::assertFile($pFilename); |
| 310 | 310 | if (!$this->canRead($pFilename)) { |
| 311 | - throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
| 311 | + throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
| 312 | 312 | } |
| 313 | 313 | |
| 314 | 314 | $xml = $this->trySimpleXMLLoadString($pFilename); |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | if (isset($cell_ss['Index'])) { |
| 460 | 460 | $columnID = Coordinate::stringFromColumnIndex((int) $cell_ss['Index']); |
| 461 | 461 | } |
| 462 | - $cellRange = $columnID . $rowID; |
|
| 462 | + $cellRange = $columnID.$rowID; |
|
| 463 | 463 | |
| 464 | 464 | if ($this->getReadFilter() !== null) { |
| 465 | 465 | if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | if (isset($cell_ss['MergeDown'])) { |
| 484 | 484 | $rowTo = $rowTo + $cell_ss['MergeDown']; |
| 485 | 485 | } |
| 486 | - $cellRange .= ':' . $columnTo . $rowTo; |
|
| 486 | + $cellRange .= ':'.$columnTo.$rowTo; |
|
| 487 | 487 | $spreadsheet->getActiveSheet()->mergeCells($cellRange); |
| 488 | 488 | } |
| 489 | 489 | |
@@ -585,7 +585,7 @@ discard block |
||
| 585 | 585 | if ($columnReference[0] == '[') { |
| 586 | 586 | $columnReference = $columnNumber + trim($columnReference, '[]'); |
| 587 | 587 | } |
| 588 | - $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; |
|
| 588 | + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference).$rowReference; |
|
| 589 | 589 | $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); |
| 590 | 590 | } |
| 591 | 591 | } |
@@ -596,9 +596,9 @@ discard block |
||
| 596 | 596 | $cellDataFormula = implode('"', $temp); |
| 597 | 597 | } |
| 598 | 598 | |
| 599 | - $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type); |
|
| 599 | + $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type); |
|
| 600 | 600 | if ($hasCalculatedValue) { |
| 601 | - $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue); |
|
| 601 | + $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setCalculatedValue($cellValue); |
|
| 602 | 602 | } |
| 603 | 603 | $cellIsSet = $rowHasData = true; |
| 604 | 604 | } |
@@ -611,14 +611,14 @@ discard block |
||
| 611 | 611 | } |
| 612 | 612 | $node = $cell->Comment->Data->asXML(); |
| 613 | 613 | $annotation = strip_tags($node); |
| 614 | - $spreadsheet->getActiveSheet()->getComment($columnID . $rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation)); |
|
| 614 | + $spreadsheet->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation)); |
|
| 615 | 615 | } |
| 616 | 616 | |
| 617 | 617 | if (($cellIsSet) && (isset($cell_ss['StyleID']))) { |
| 618 | 618 | $style = (string) $cell_ss['StyleID']; |
| 619 | 619 | if ((isset($this->styles[$style])) && (!empty($this->styles[$style]))) { |
| 620 | - if (!$spreadsheet->getActiveSheet()->cellExists($columnID . $rowID)) { |
|
| 621 | - $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValue(null); |
|
| 620 | + if (!$spreadsheet->getActiveSheet()->cellExists($columnID.$rowID)) { |
|
| 621 | + $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setValue(null); |
|
| 622 | 622 | } |
| 623 | 623 | $spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]); |
| 624 | 624 | } |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | $this->worksheet->freezePane( |
| 124 | - Coordinate::stringFromColumnIndex($xSplit + 1) . ($ySplit + 1), |
|
| 124 | + Coordinate::stringFromColumnIndex($xSplit + 1).($ySplit + 1), |
|
| 125 | 125 | $topLeftCell |
| 126 | 126 | ); |
| 127 | 127 | } |