diff --git a/samples/Basic/16_Csv.php b/samples/Basic/16_Csv.php index ceb8b2f5..de753d56 100644 --- a/samples/Basic/16_Csv.php +++ b/samples/Basic/16_Csv.php @@ -6,6 +6,7 @@ require __DIR__ . '/../Header.php'; $spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php'; $helper->log('Write to CSV format'); +/** @var \PhpOffice\PhpSpreadsheet\Writer\Csv $writer */ $writer = IOFactory::createWriter($spreadsheet, 'Csv')->setDelimiter(',') ->setEnclosure('"') ->setSheetIndex(0); @@ -17,6 +18,7 @@ $helper->logWrite($writer, $filename, $callStartTime); $helper->log('Read from CSV format'); +/** @var \PhpOffice\PhpSpreadsheet\Reader\Csv $reader */ $reader = IOFactory::createReader('Csv')->setDelimiter(',') ->setEnclosure('"') ->setSheetIndex(0); @@ -30,6 +32,7 @@ $helper->write($spreadsheetFromCSV, __FILE__, ['Xlsx']); // Write CSV $filenameCSV = $helper->getFilename(__FILE__, 'csv'); +/** @var \PhpOffice\PhpSpreadsheet\Writer\Csv $writerCSV */ $writerCSV = IOFactory::createWriter($spreadsheetFromCSV, 'Csv'); $writerCSV->setExcelCompatibility(true); diff --git a/samples/Basic/26_Utf8.php b/samples/Basic/26_Utf8.php index af048246..52a64509 100644 --- a/samples/Basic/26_Utf8.php +++ b/samples/Basic/26_Utf8.php @@ -24,6 +24,7 @@ $worksheet->removeRow(1, 2); // Export to CSV (.csv) $helper->log('Write to CSV format'); +/** @var \PhpOffice\PhpSpreadsheet\Writer\Csv $writer */ $writer = IOFactory::createWriter($spreadsheet, 'Csv'); $filename = $helper->getFilename(__FILE__, 'csv'); $callStartTime = microtime(true); diff --git a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index c4ad0358..cc90ece9 100644 --- a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -7,13 +7,6 @@ use PhpOffice\PhpSpreadsheet\Settings; class XmlScanner { - /** - * Identifies whether the thread-safe libxmlDisableEntityLoader() function is available. - * - * @var bool - */ - private $libxmlDisableEntityLoader = false; - /** * String used to identify risky xml elements. * diff --git a/src/PhpSpreadsheet/Reader/Xlsx.php b/src/PhpSpreadsheet/Reader/Xlsx.php index 9cb287ef..5372fef9 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx.php +++ b/src/PhpSpreadsheet/Reader/Xlsx.php @@ -32,7 +32,6 @@ use PhpOffice\PhpSpreadsheet\Style\Color; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; use PhpOffice\PhpSpreadsheet\Style\Protection; use PhpOffice\PhpSpreadsheet\Style\Style; -use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; use PhpOffice\PhpSpreadsheet\Worksheet\HeaderFooterDrawing; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use SimpleXMLElement; diff --git a/src/PhpSpreadsheet/Reader/Xlsx/Styles.php b/src/PhpSpreadsheet/Reader/Xlsx/Styles.php index 3cc4054d..c06564a3 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/Styles.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -31,7 +31,7 @@ class Styles extends BaseParserClass $this->styleXml = $styleXml; } - public function setStyleBaseData(Theme $theme, $styles, $cellStyles) + public function setStyleBaseData(Theme $theme = null, $styles = [], $cellStyles = []) { self::$theme = $theme; $this->styles = $styles;