From 7e79782dae60edeea90040bf9abec25c8befaea7 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sat, 16 May 2020 20:33:25 +0900 Subject: [PATCH] Remove @throws comment Those are extremely hard to maintain properly and bring almost no value, especially if they are outdated --- .../Calculation/Calculation.php | 10 ---- .../Calculation/Engineering.php | 2 - .../Calculation/FormulaParser.php | 4 -- .../Cell/AdvancedValueBinder.php | 2 - src/PhpSpreadsheet/Cell/Cell.php | 20 ------- src/PhpSpreadsheet/Cell/Coordinate.php | 8 --- .../Cell/DefaultValueBinder.php | 2 - src/PhpSpreadsheet/Cell/StringValueBinder.php | 2 - src/PhpSpreadsheet/Chart/DataSeriesValues.php | 4 -- src/PhpSpreadsheet/Collection/Cells.php | 8 --- src/PhpSpreadsheet/DocumentGenerator.php | 10 ---- src/PhpSpreadsheet/HashTable.php | 4 -- src/PhpSpreadsheet/IOFactory.php | 10 ---- src/PhpSpreadsheet/NamedRange.php | 2 - src/PhpSpreadsheet/Reader/BaseReader.php | 2 - src/PhpSpreadsheet/Reader/Csv.php | 6 -- src/PhpSpreadsheet/Reader/Gnumeric.php | 6 -- src/PhpSpreadsheet/Reader/Html.php | 8 --- src/PhpSpreadsheet/Reader/IReader.php | 2 - src/PhpSpreadsheet/Reader/Ods.php | 10 ---- .../Reader/Security/XmlScanner.php | 4 -- src/PhpSpreadsheet/Reader/Slk.php | 6 -- src/PhpSpreadsheet/Reader/Xls.php | 14 ----- src/PhpSpreadsheet/Reader/Xlsx.php | 8 --- src/PhpSpreadsheet/Reader/Xml.php | 12 ---- src/PhpSpreadsheet/ReferenceHelper.php | 12 ---- src/PhpSpreadsheet/RichText/RichText.php | 7 --- src/PhpSpreadsheet/Settings.php | 2 - src/PhpSpreadsheet/Shared/CodePage.php | 2 - src/PhpSpreadsheet/Shared/Date.php | 8 --- src/PhpSpreadsheet/Shared/File.php | 2 - src/PhpSpreadsheet/Shared/Font.php | 2 - .../Shared/JAMA/LUDecomposition.php | 3 - src/PhpSpreadsheet/Shared/OLE.php | 4 -- src/PhpSpreadsheet/Shared/OLERead.php | 2 - src/PhpSpreadsheet/Shared/TimeZone.php | 2 - src/PhpSpreadsheet/Spreadsheet.php | 32 ----------- src/PhpSpreadsheet/Style/Alignment.php | 4 -- src/PhpSpreadsheet/Style/Border.php | 6 -- src/PhpSpreadsheet/Style/Borders.php | 12 ---- src/PhpSpreadsheet/Style/Color.php | 4 -- src/PhpSpreadsheet/Style/Fill.php | 8 --- src/PhpSpreadsheet/Style/Font.php | 6 -- src/PhpSpreadsheet/Style/NumberFormat.php | 3 - src/PhpSpreadsheet/Style/Protection.php | 4 -- src/PhpSpreadsheet/Worksheet/AutoFilter.php | 16 ------ .../Worksheet/AutoFilter/Column.php | 6 -- .../Worksheet/AutoFilter/Column/Rule.php | 10 ---- src/PhpSpreadsheet/Worksheet/BaseDrawing.php | 2 - src/PhpSpreadsheet/Worksheet/CellIterator.php | 6 -- .../Worksheet/ColumnCellIterator.php | 8 --- .../Worksheet/ColumnIterator.php | 4 -- src/PhpSpreadsheet/Worksheet/Dimension.php | 2 - src/PhpSpreadsheet/Worksheet/Drawing.php | 2 - src/PhpSpreadsheet/Worksheet/PageSetup.php | 12 ---- .../Worksheet/RowCellIterator.php | 10 ---- src/PhpSpreadsheet/Worksheet/RowIterator.php | 4 -- src/PhpSpreadsheet/Worksheet/SheetView.php | 6 -- src/PhpSpreadsheet/Worksheet/Worksheet.php | 56 ------------------- src/PhpSpreadsheet/Writer/Csv.php | 2 - src/PhpSpreadsheet/Writer/Html.php | 15 ----- src/PhpSpreadsheet/Writer/IWriter.php | 4 -- src/PhpSpreadsheet/Writer/Ods.php | 6 -- src/PhpSpreadsheet/Writer/Ods/Content.php | 6 -- src/PhpSpreadsheet/Writer/Ods/Meta.php | 2 - src/PhpSpreadsheet/Writer/Ods/MetaInf.php | 2 - src/PhpSpreadsheet/Writer/Ods/Settings.php | 2 - src/PhpSpreadsheet/Writer/Ods/Styles.php | 2 - src/PhpSpreadsheet/Writer/Pdf.php | 4 -- src/PhpSpreadsheet/Writer/Pdf/Dompdf.php | 2 - src/PhpSpreadsheet/Writer/Pdf/Mpdf.php | 4 -- src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php | 2 - src/PhpSpreadsheet/Writer/Xls.php | 2 - src/PhpSpreadsheet/Writer/Xlsx.php | 4 -- src/PhpSpreadsheet/Writer/Xlsx/Chart.php | 16 ------ src/PhpSpreadsheet/Writer/Xlsx/Comments.php | 6 -- .../Writer/Xlsx/ContentTypes.php | 8 --- src/PhpSpreadsheet/Writer/Xlsx/DocProps.php | 6 -- src/PhpSpreadsheet/Writer/Xlsx/Drawing.php | 6 -- src/PhpSpreadsheet/Writer/Xlsx/Rels.php | 14 ----- src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php | 2 - src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php | 2 - .../Writer/Xlsx/StringTable.php | 3 - src/PhpSpreadsheet/Writer/Xlsx/Style.php | 4 -- src/PhpSpreadsheet/Writer/Xlsx/Theme.php | 2 - src/PhpSpreadsheet/Writer/Xlsx/Workbook.php | 10 ---- src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php | 11 ---- .../Calculation/CalculationTest.php | 2 - .../DocumentGeneratorTest.php | 4 -- 89 files changed, 590 deletions(-) diff --git a/src/PhpSpreadsheet/Calculation/Calculation.php b/src/PhpSpreadsheet/Calculation/Calculation.php index 69f72033..e1469b1f 100644 --- a/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/src/PhpSpreadsheet/Calculation/Calculation.php @@ -2315,8 +2315,6 @@ class Calculation /** * __clone implementation. Cloning should not be allowed in a Singleton! - * - * @throws Exception */ final public function __clone() { @@ -2765,8 +2763,6 @@ class Calculation * * @param Cell $pCell Cell to calculate * - * @throws Exception - * * @return mixed */ public function calculate(Cell $pCell = null) @@ -2784,8 +2780,6 @@ class Calculation * @param Cell $pCell Cell to calculate * @param bool $resetLog Flag indicating whether the debug log should be reset or not * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return mixed */ public function calculateCellValue(Cell $pCell = null, $resetLog = true) @@ -2888,8 +2882,6 @@ class Calculation * @param string $cellID Address of the cell to calculate * @param Cell $pCell Cell to calculate * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return mixed */ public function calculateFormula($formula, $cellID = null, Cell $pCell = null) @@ -2965,8 +2957,6 @@ class Calculation * @param string $cellID The ID (e.g. A3) of the cell that we are calculating * @param Cell $pCell Cell to calculate * - * @throws Exception - * * @return mixed */ public function _calculateFormulaValue($formula, $cellID = null, Cell $pCell = null) diff --git a/src/PhpSpreadsheet/Calculation/Engineering.php b/src/PhpSpreadsheet/Calculation/Engineering.php index c3942b2b..1a79ff71 100644 --- a/src/PhpSpreadsheet/Calculation/Engineering.php +++ b/src/PhpSpreadsheet/Calculation/Engineering.php @@ -2346,8 +2346,6 @@ class Engineering * * @param mixed $value * - * @throws Exception - * * @return int */ private static function validateBitwiseArgument($value) diff --git a/src/PhpSpreadsheet/Calculation/FormulaParser.php b/src/PhpSpreadsheet/Calculation/FormulaParser.php index 9b3c66e9..38c725c2 100644 --- a/src/PhpSpreadsheet/Calculation/FormulaParser.php +++ b/src/PhpSpreadsheet/Calculation/FormulaParser.php @@ -62,8 +62,6 @@ class FormulaParser * Create a new FormulaParser. * * @param string $pFormula Formula to parse - * - * @throws Exception */ public function __construct($pFormula = '') { @@ -93,8 +91,6 @@ class FormulaParser * * @param int $pId Token id * - * @throws Exception - * * @return string */ public function getToken($pId = 0) diff --git a/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php b/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php index 1d28f247..cf638d05 100644 --- a/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php +++ b/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php @@ -16,8 +16,6 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder * @param Cell $cell Cell to bind value to * @param mixed $value Value to bind in cell * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return bool */ public function bindValue(Cell $cell, $value = null) diff --git a/src/PhpSpreadsheet/Cell/Cell.php b/src/PhpSpreadsheet/Cell/Cell.php index e618436e..30be3353 100644 --- a/src/PhpSpreadsheet/Cell/Cell.php +++ b/src/PhpSpreadsheet/Cell/Cell.php @@ -92,8 +92,6 @@ class Cell * @param mixed $pValue * @param string $pDataType * @param Worksheet $pSheet - * - * @throws Exception */ public function __construct($pValue, $pDataType, Worksheet $pSheet) { @@ -175,8 +173,6 @@ class Cell * * @param mixed $pValue Value * - * @throws Exception - * * @return $this */ public function setValue($pValue) @@ -194,8 +190,6 @@ class Cell * @param mixed $pValue Value * @param string $pDataType Explicit data type, see DataType::TYPE_* * - * @throws Exception - * * @return Cell */ public function setValueExplicit($pValue, $pDataType) @@ -252,8 +246,6 @@ class Cell * * @param bool $resetLog Whether the calculation engine logger should be reset or not * - * @throws Exception - * * @return mixed */ public function getCalculatedValue($resetLog = true) @@ -362,8 +354,6 @@ class Cell /** * Does this cell contain Data validation rules? * - * @throws Exception - * * @return bool */ public function hasDataValidation() @@ -378,8 +368,6 @@ class Cell /** * Get Data validation rules. * - * @throws Exception - * * @return DataValidation */ public function getDataValidation() @@ -396,8 +384,6 @@ class Cell * * @param DataValidation $pDataValidation * - * @throws Exception - * * @return Cell */ public function setDataValidation(DataValidation $pDataValidation = null) @@ -426,8 +412,6 @@ class Cell /** * Does this cell contain a Hyperlink? * - * @throws Exception - * * @return bool */ public function hasHyperlink() @@ -442,8 +426,6 @@ class Cell /** * Get Hyperlink. * - * @throws Exception - * * @return Hyperlink */ public function getHyperlink() @@ -460,8 +442,6 @@ class Cell * * @param Hyperlink $pHyperlink * - * @throws Exception - * * @return Cell */ public function setHyperlink(Hyperlink $pHyperlink = null) diff --git a/src/PhpSpreadsheet/Cell/Coordinate.php b/src/PhpSpreadsheet/Cell/Coordinate.php index cc0543f6..70fed25a 100644 --- a/src/PhpSpreadsheet/Cell/Coordinate.php +++ b/src/PhpSpreadsheet/Cell/Coordinate.php @@ -25,8 +25,6 @@ abstract class Coordinate * * @param string $pCoordinateString eg: 'A1' * - * @throws Exception - * * @return string[] Array containing column and row (indexes 0 and 1) */ public static function coordinateFromString($pCoordinateString) @@ -60,8 +58,6 @@ abstract class Coordinate * @param string $pCoordinateString e.g. 'A' or '1' or 'A1' * Note that this value can be a row or column reference as well as a cell reference * - * @throws Exception - * * @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1' */ public static function absoluteReference($pCoordinateString) @@ -91,8 +87,6 @@ abstract class Coordinate * * @param string $pCoordinateString e.g. 'A1' * - * @throws Exception - * * @return string Absolute coordinate e.g. '$A$1' */ public static function absoluteCoordinate($pCoordinateString) @@ -145,8 +139,6 @@ abstract class Coordinate * * @param array $pRange Array containg one or more arrays containing one or two coordinate strings * - * @throws Exception - * * @return string String representation of $pRange */ public static function buildRange(array $pRange) diff --git a/src/PhpSpreadsheet/Cell/DefaultValueBinder.php b/src/PhpSpreadsheet/Cell/DefaultValueBinder.php index cd05cf8b..3a676c4f 100644 --- a/src/PhpSpreadsheet/Cell/DefaultValueBinder.php +++ b/src/PhpSpreadsheet/Cell/DefaultValueBinder.php @@ -14,8 +14,6 @@ class DefaultValueBinder implements IValueBinder * @param Cell $cell Cell to bind value to * @param mixed $value Value to bind in cell * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return bool */ public function bindValue(Cell $cell, $value) diff --git a/src/PhpSpreadsheet/Cell/StringValueBinder.php b/src/PhpSpreadsheet/Cell/StringValueBinder.php index 0552677f..346d0253 100644 --- a/src/PhpSpreadsheet/Cell/StringValueBinder.php +++ b/src/PhpSpreadsheet/Cell/StringValueBinder.php @@ -12,8 +12,6 @@ class StringValueBinder implements IValueBinder * @param Cell $cell Cell to bind value to * @param mixed $value Value to bind in cell * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return bool */ public function bindValue(Cell $cell, $value) diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php index ec40cb84..e15f5da5 100644 --- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php +++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -115,8 +115,6 @@ class DataSeriesValues * DataSeriesValues::DATASERIES_TYPE_NUMBER * Normally used for chart data values * - * @throws Exception - * * @return $this */ public function setDataType($dataType) @@ -247,8 +245,6 @@ class DataSeriesValues * * @param string $color value for color * - * @throws \Exception thrown if color is invalid - * * @return bool true if validation was successful */ private function validateColor($color) diff --git a/src/PhpSpreadsheet/Collection/Cells.php b/src/PhpSpreadsheet/Collection/Cells.php index 84c3d300..127403d9 100644 --- a/src/PhpSpreadsheet/Collection/Cells.php +++ b/src/PhpSpreadsheet/Collection/Cells.php @@ -105,8 +105,6 @@ class Cells * * @param Cell $cell Cell to update * - * @throws PhpSpreadsheetException - * * @return Cell */ public function update(Cell $cell) @@ -382,8 +380,6 @@ class Cells /** * Store cell data in cache for the current cell object if it's "dirty", * and the 'nullify' the current cell object. - * - * @throws PhpSpreadsheetException */ private function storeCurrentCell() { @@ -409,8 +405,6 @@ class Cells * @param string $pCoord Coordinate of the cell to update * @param Cell $cell Cell to update * - * @throws PhpSpreadsheetException - * * @return \PhpOffice\PhpSpreadsheet\Cell\Cell */ public function add($pCoord, Cell $cell) @@ -432,8 +426,6 @@ class Cells * * @param string $pCoord Coordinate of the cell * - * @throws PhpSpreadsheetException - * * @return \PhpOffice\PhpSpreadsheet\Cell\Cell Cell that was found, or null if not found */ public function get($pCoord) diff --git a/src/PhpSpreadsheet/DocumentGenerator.php b/src/PhpSpreadsheet/DocumentGenerator.php index de6f313f..8baba6e5 100644 --- a/src/PhpSpreadsheet/DocumentGenerator.php +++ b/src/PhpSpreadsheet/DocumentGenerator.php @@ -5,7 +5,6 @@ namespace PhpOffice\PhpSpreadsheet; use PhpOffice\PhpSpreadsheet\Calculation\Category; use PhpOffice\PhpSpreadsheet\Calculation\Functions; use ReflectionClass; -use ReflectionException; use UnexpectedValueException; class DocumentGenerator @@ -13,8 +12,6 @@ class DocumentGenerator /** * @param array[] $phpSpreadsheetFunctions * - * @throws ReflectionException - * * @return string */ public static function generateFunctionListByCategory(array $phpSpreadsheetFunctions): string @@ -38,11 +35,6 @@ class DocumentGenerator return $result; } - /** - * @throws ReflectionException - * - * @return array - */ private static function getCategories(): array { return (new ReflectionClass(Category::class))->getConstants(); @@ -82,8 +74,6 @@ class DocumentGenerator /** * @param array[] $phpSpreadsheetFunctions * - * @throws ReflectionException - * * @return string */ public static function generateFunctionListByName(array $phpSpreadsheetFunctions): string diff --git a/src/PhpSpreadsheet/HashTable.php b/src/PhpSpreadsheet/HashTable.php index 4e8f0a5c..4d1e7b4d 100644 --- a/src/PhpSpreadsheet/HashTable.php +++ b/src/PhpSpreadsheet/HashTable.php @@ -22,8 +22,6 @@ class HashTable * Create a new \PhpOffice\PhpSpreadsheet\HashTable. * * @param IComparable[] $pSource Optional source array to create HashTable from - * - * @throws Exception */ public function __construct($pSource = null) { @@ -37,8 +35,6 @@ class HashTable * Add HashTable items from source. * * @param IComparable[] $pSource Source array to create HashTable from - * - * @throws Exception */ public function addFromSource(array $pSource = null) { diff --git a/src/PhpSpreadsheet/IOFactory.php b/src/PhpSpreadsheet/IOFactory.php index 4266ea54..38c0f221 100644 --- a/src/PhpSpreadsheet/IOFactory.php +++ b/src/PhpSpreadsheet/IOFactory.php @@ -40,8 +40,6 @@ abstract class IOFactory * @param Spreadsheet $spreadsheet * @param string $writerType Example: Xlsx * - * @throws Writer\Exception - * * @return Writer\IWriter */ public static function createWriter(Spreadsheet $spreadsheet, $writerType) @@ -61,8 +59,6 @@ abstract class IOFactory * * @param string $readerType Example: Xlsx * - * @throws Reader\Exception - * * @return Reader\IReader */ public static function createReader($readerType) @@ -82,8 +78,6 @@ abstract class IOFactory * * @param string $pFilename The name of the spreadsheet file * - * @throws Reader\Exception - * * @return Spreadsheet */ public static function load($pFilename) @@ -98,8 +92,6 @@ abstract class IOFactory * * @param string $pFilename The name of the spreadsheet file to identify * - * @throws Reader\Exception - * * @return string */ public static function identify($pFilename) @@ -117,8 +109,6 @@ abstract class IOFactory * * @param string $filename The name of the spreadsheet file * - * @throws Reader\Exception - * * @return Reader\IReader */ public static function createReaderForFile($filename) diff --git a/src/PhpSpreadsheet/NamedRange.php b/src/PhpSpreadsheet/NamedRange.php index e539b7c5..576f17d7 100644 --- a/src/PhpSpreadsheet/NamedRange.php +++ b/src/PhpSpreadsheet/NamedRange.php @@ -49,8 +49,6 @@ class NamedRange * @param string $pRange * @param bool $pLocalOnly * @param null|Worksheet $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope. - * - * @throws Exception */ public function __construct($pName, Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null) { diff --git a/src/PhpSpreadsheet/Reader/BaseReader.php b/src/PhpSpreadsheet/Reader/BaseReader.php index f7af1557..35466e73 100644 --- a/src/PhpSpreadsheet/Reader/BaseReader.php +++ b/src/PhpSpreadsheet/Reader/BaseReader.php @@ -144,8 +144,6 @@ abstract class BaseReader implements IReader * Open file for reading. * * @param string $pFilename - * - * @throws Exception */ protected function openFile($pFilename) { diff --git a/src/PhpSpreadsheet/Reader/Csv.php b/src/PhpSpreadsheet/Reader/Csv.php index 47134098..ed3b70f1 100644 --- a/src/PhpSpreadsheet/Reader/Csv.php +++ b/src/PhpSpreadsheet/Reader/Csv.php @@ -272,8 +272,6 @@ class Csv extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -317,8 +315,6 @@ class Csv extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -336,8 +332,6 @@ class Csv extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Reader/Gnumeric.php b/src/PhpSpreadsheet/Reader/Gnumeric.php index 44ab701d..83ff293c 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -46,8 +46,6 @@ class Gnumeric extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -169,8 +167,6 @@ class Gnumeric extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -188,8 +184,6 @@ class Gnumeric extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index a255cfd9..86263a20 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -205,8 +205,6 @@ class Html extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -581,8 +579,6 @@ class Html extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) @@ -630,8 +626,6 @@ class Html extends BaseReader * @param DOMDocument $document * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Exception - * * @return Spreadsheet */ private function loadDocument(DOMDocument $document, Spreadsheet $spreadsheet): Spreadsheet @@ -862,8 +856,6 @@ class Html extends BaseReader * @param string $column * @param int $row * @param array $attributes - * - * @throws \PhpOffice\PhpSpreadsheet\Exception */ private function insertImage(Worksheet $sheet, $column, $row, array $attributes) { diff --git a/src/PhpSpreadsheet/Reader/IReader.php b/src/PhpSpreadsheet/Reader/IReader.php index 70a7a200..3f5a7e49 100644 --- a/src/PhpSpreadsheet/Reader/IReader.php +++ b/src/PhpSpreadsheet/Reader/IReader.php @@ -129,8 +129,6 @@ interface IReader * * @param string $pFilename * - * @throws Exception - * * @return \PhpOffice\PhpSpreadsheet\Spreadsheet */ public function load($pFilename); diff --git a/src/PhpSpreadsheet/Reader/Ods.php b/src/PhpSpreadsheet/Reader/Ods.php index 5fff07aa..41fd34a8 100644 --- a/src/PhpSpreadsheet/Reader/Ods.php +++ b/src/PhpSpreadsheet/Reader/Ods.php @@ -34,8 +34,6 @@ class Ods extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -85,8 +83,6 @@ class Ods extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return string[] */ public function listWorksheetNames($pFilename) @@ -139,8 +135,6 @@ class Ods extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -233,8 +227,6 @@ class Ods extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -252,8 +244,6 @@ class Ods extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index 732f0bf6..33e21f9d 100644 --- a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -114,8 +114,6 @@ class XmlScanner * * @param mixed $xml * - * @throws Reader\Exception - * * @return string */ public function scan($xml) @@ -143,8 +141,6 @@ class XmlScanner * * @param string $filestream * - * @throws Reader\Exception - * * @return string */ public function scanFile($filestream) diff --git a/src/PhpSpreadsheet/Reader/Slk.php b/src/PhpSpreadsheet/Reader/Slk.php index 9912e937..278abd58 100644 --- a/src/PhpSpreadsheet/Reader/Slk.php +++ b/src/PhpSpreadsheet/Reader/Slk.php @@ -107,8 +107,6 @@ class Slk extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -177,8 +175,6 @@ class Slk extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -196,8 +192,6 @@ class Slk extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Reader/Xls.php b/src/PhpSpreadsheet/Reader/Xls.php index 313d7216..ec5879a9 100644 --- a/src/PhpSpreadsheet/Reader/Xls.php +++ b/src/PhpSpreadsheet/Reader/Xls.php @@ -444,8 +444,6 @@ class Xls extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetNames($pFilename) @@ -504,8 +502,6 @@ class Xls extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -618,8 +614,6 @@ class Xls extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -5516,8 +5510,6 @@ class Xls extends BaseReader * @param string $formulaData Formula data * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas * - * @throws Exception - * * @return array */ private function getNextToken($formulaData, $baseCell = 'A1') @@ -7186,8 +7178,6 @@ class Xls extends BaseReader * * @param string $subData * - * @throws Exception - * * @return string */ private function readBIFF5CellRangeAddressFixed($subData) @@ -7227,8 +7217,6 @@ class Xls extends BaseReader * * @param string $subData * - * @throws Exception - * * @return string */ private function readBIFF8CellRangeAddressFixed($subData) @@ -7465,8 +7453,6 @@ class Xls extends BaseReader * * @param int $index * - * @throws Exception - * * @return false|string */ private function readSheetRangeByRefIndex($index) diff --git a/src/PhpSpreadsheet/Reader/Xlsx.php b/src/PhpSpreadsheet/Reader/Xlsx.php index 566e9fbb..40814c64 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx.php +++ b/src/PhpSpreadsheet/Reader/Xlsx.php @@ -69,8 +69,6 @@ class Xlsx extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -95,8 +93,6 @@ class Xlsx extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetNames($pFilename) @@ -140,8 +136,6 @@ class Xlsx extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -318,8 +312,6 @@ class Xlsx extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index b4fffa4f..03099e3e 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -50,8 +50,6 @@ class Xml extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return bool */ public function canRead($pFilename) @@ -103,8 +101,6 @@ class Xml extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return false|\SimpleXMLElement */ public function trySimpleXMLLoadString($pFilename) @@ -127,8 +123,6 @@ class Xml extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetNames($pFilename) @@ -158,8 +152,6 @@ class Xml extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return array */ public function listWorksheetInfo($pFilename) @@ -229,8 +221,6 @@ class Xml extends BaseReader * * @param string $pFilename * - * @throws Exception - * * @return Spreadsheet */ public function load($pFilename) @@ -300,8 +290,6 @@ class Xml extends BaseReader * @param string $pFilename * @param Spreadsheet $spreadsheet * - * @throws Exception - * * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/ReferenceHelper.php b/src/PhpSpreadsheet/ReferenceHelper.php index 143e80d8..6d655730 100644 --- a/src/PhpSpreadsheet/ReferenceHelper.php +++ b/src/PhpSpreadsheet/ReferenceHelper.php @@ -363,8 +363,6 @@ class ReferenceHelper * @param int $pNumCols Number of columns to insert/delete (negative values indicate deletion) * @param int $pNumRows Number of rows to insert/delete (negative values indicate deletion) * @param Worksheet $pSheet The worksheet that we're editing - * - * @throws Exception */ public function insertNewBefore($pBefore, $pNumCols, $pNumRows, Worksheet $pSheet) { @@ -624,8 +622,6 @@ class ReferenceHelper * @param int $pNumRows Number of rows to insert * @param string $sheetName Worksheet name/title * - * @throws Exception - * * @return string Updated formula */ public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') @@ -766,8 +762,6 @@ class ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * - * @throws Exception - * * @return string Updated cell range */ public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) @@ -824,8 +818,6 @@ class ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * - * @throws Exception - * * @return string Updated cell range */ private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) @@ -864,8 +856,6 @@ class ReferenceHelper * @param int $pNumCols Number of columns to increment * @param int $pNumRows Number of rows to increment * - * @throws Exception - * * @return string Updated cell reference */ private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) @@ -900,8 +890,6 @@ class ReferenceHelper /** * __clone implementation. Cloning should not be allowed in a Singleton! - * - * @throws Exception */ final public function __clone() { diff --git a/src/PhpSpreadsheet/RichText/RichText.php b/src/PhpSpreadsheet/RichText/RichText.php index 6e90fa35..4fa5f2bd 100644 --- a/src/PhpSpreadsheet/RichText/RichText.php +++ b/src/PhpSpreadsheet/RichText/RichText.php @@ -4,7 +4,6 @@ namespace PhpOffice\PhpSpreadsheet\RichText; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\Cell\DataType; -use PhpOffice\PhpSpreadsheet\Exception; use PhpOffice\PhpSpreadsheet\IComparable; class RichText implements IComparable @@ -20,8 +19,6 @@ class RichText implements IComparable * Create a new RichText instance. * * @param Cell $pCell - * - * @throws Exception */ public function __construct(Cell $pCell = null) { @@ -61,8 +58,6 @@ class RichText implements IComparable * * @param string $pText Text * - * @throws Exception - * * @return TextElement */ public function createText($pText) @@ -78,8 +73,6 @@ class RichText implements IComparable * * @param string $pText Text * - * @throws Exception - * * @return Run */ public function createTextRun($pText) diff --git a/src/PhpSpreadsheet/Settings.php b/src/PhpSpreadsheet/Settings.php index d9d74cb0..56f778e5 100644 --- a/src/PhpSpreadsheet/Settings.php +++ b/src/PhpSpreadsheet/Settings.php @@ -59,8 +59,6 @@ class Settings * * @param string $rendererClass Class name of the chart renderer * eg: PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph - * - * @throws Exception */ public static function setChartRenderer($rendererClass) { diff --git a/src/PhpSpreadsheet/Shared/CodePage.php b/src/PhpSpreadsheet/Shared/CodePage.php index 4b578242..b395293c 100644 --- a/src/PhpSpreadsheet/Shared/CodePage.php +++ b/src/PhpSpreadsheet/Shared/CodePage.php @@ -12,8 +12,6 @@ class CodePage * * @param int $codePage Microsoft Code Page Indentifier * - * @throws PhpSpreadsheetException - * * @return string Code Page Name */ public static function numberToName($codePage) diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php index 5d2deb32..8be255c5 100644 --- a/src/PhpSpreadsheet/Shared/Date.php +++ b/src/PhpSpreadsheet/Shared/Date.php @@ -95,8 +95,6 @@ class Date * * @param DateTimeZone|string $timeZone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions * - * @throws \Exception - * * @return bool Success or failure * @return bool Success or failure */ @@ -130,8 +128,6 @@ class Date * * @param DateTimeZone|string $timeZone The timezone to validate, either as a timezone string or object * - * @throws \Exception - * * @return DateTimeZone The timezone as a timezone object * @return DateTimeZone The timezone as a timezone object */ @@ -154,8 +150,6 @@ class Date * if you don't want to treat it as a UTC value * Use the default (UST) unless you absolutely need a conversion * - * @throws \Exception - * * @return \DateTime PHP date/time object */ public static function excelToDateTimeObject($excelTimestamp, $timeZone = null) @@ -203,8 +197,6 @@ class Date * if you don't want to treat it as a UTC value * Use the default (UST) unless you absolutely need a conversion * - * @throws \Exception - * * @return int Unix timetamp for this date/time */ public static function excelToTimestamp($excelTimestamp, $timeZone = null) diff --git a/src/PhpSpreadsheet/Shared/File.php b/src/PhpSpreadsheet/Shared/File.php index 239c8375..6b1fe6f5 100644 --- a/src/PhpSpreadsheet/Shared/File.php +++ b/src/PhpSpreadsheet/Shared/File.php @@ -128,8 +128,6 @@ class File * Assert that given path is an existing file and is readable, otherwise throw exception. * * @param string $filename - * - * @throws InvalidArgumentException */ public static function assertFile($filename) { diff --git a/src/PhpSpreadsheet/Shared/Font.php b/src/PhpSpreadsheet/Shared/Font.php index bee13e29..89d91be7 100644 --- a/src/PhpSpreadsheet/Shared/Font.php +++ b/src/PhpSpreadsheet/Shared/Font.php @@ -276,8 +276,6 @@ class Font * @param \PhpOffice\PhpSpreadsheet\Style\Font * @param int $rotation * - * @throws PhpSpreadsheetException - * * @return int */ public static function getTextWidthPixelsExact($text, \PhpOffice\PhpSpreadsheet\Style\Font $font, $rotation = 0) diff --git a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php index bb2b4b04..4aecff73 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php @@ -242,9 +242,6 @@ class LUDecomposition * * @param mixed $B a Matrix with as many rows as A and any number of columns * - * @throws CalculationException illegalArgumentException Matrix row dimensions must agree - * @throws CalculationException runtimeException Matrix is singular - * * @return Matrix X so that L*U*X = B(piv,:) */ public function solve($B) diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index efa7522f..81ebaa34 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -113,8 +113,6 @@ class OLE * * @param string $file * - * @throws ReaderException - * * @return bool true on success, PEAR_Error on failure */ public function read($file) @@ -539,8 +537,6 @@ class OLE * * @param string $oleTimestamp A binary string with the encoded date * - * @throws ReaderException - * * @return int The Unix timestamp corresponding to the string */ public static function OLE2LocalDate($oleTimestamp) diff --git a/src/PhpSpreadsheet/Shared/OLERead.php b/src/PhpSpreadsheet/Shared/OLERead.php index 3af39700..3526c7e6 100644 --- a/src/PhpSpreadsheet/Shared/OLERead.php +++ b/src/PhpSpreadsheet/Shared/OLERead.php @@ -94,8 +94,6 @@ class OLERead * Read the file. * * @param $pFilename string Filename - * - * @throws ReaderException */ public function read($pFilename) { diff --git a/src/PhpSpreadsheet/Shared/TimeZone.php b/src/PhpSpreadsheet/Shared/TimeZone.php index e5a99b9b..a87987df 100644 --- a/src/PhpSpreadsheet/Shared/TimeZone.php +++ b/src/PhpSpreadsheet/Shared/TimeZone.php @@ -61,8 +61,6 @@ class TimeZone * @param string $timezone The timezone for finding the adjustment to UST * @param int $timestamp PHP date/time value * - * @throws PhpSpreadsheetException - * * @return int Number of seconds for timezone adjustment */ public static function getTimeZoneAdjustment($timezone, $timestamp) diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php index d33a9871..6023c616 100644 --- a/src/PhpSpreadsheet/Spreadsheet.php +++ b/src/PhpSpreadsheet/Spreadsheet.php @@ -571,8 +571,6 @@ class Spreadsheet /** * Get active sheet. * - * @throws Exception - * * @return Worksheet */ public function getActiveSheet() @@ -585,8 +583,6 @@ class Spreadsheet * * @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last) * - * @throws Exception - * * @return Worksheet */ public function createSheet($sheetIndex = null) @@ -615,8 +611,6 @@ class Spreadsheet * @param Worksheet $pSheet * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) * - * @throws Exception - * * @return Worksheet */ public function addSheet(Worksheet $pSheet, $iSheetIndex = null) @@ -658,8 +652,6 @@ class Spreadsheet * Remove sheet by index. * * @param int $pIndex Active sheet index - * - * @throws Exception */ public function removeSheetByIndex($pIndex) { @@ -683,8 +675,6 @@ class Spreadsheet * * @param int $pIndex Sheet index * - * @throws Exception - * * @return Worksheet */ public function getSheet($pIndex) @@ -734,8 +724,6 @@ class Spreadsheet * * @param Worksheet $pSheet * - * @throws Exception - * * @return int index */ public function getIndex(Worksheet $pSheet) @@ -755,8 +743,6 @@ class Spreadsheet * @param string $sheetName Sheet name to modify index for * @param int $newIndex New index for the sheet * - * @throws Exception - * * @return int New sheet index */ public function setIndexByName($sheetName, $newIndex) @@ -802,8 +788,6 @@ class Spreadsheet * * @param int $pIndex Active sheet index * - * @throws Exception - * * @return Worksheet */ public function setActiveSheetIndex($pIndex) @@ -825,8 +809,6 @@ class Spreadsheet * * @param string $pValue Sheet title * - * @throws Exception - * * @return Worksheet */ public function setActiveSheetIndexByName($pValue) @@ -862,8 +844,6 @@ class Spreadsheet * @param Worksheet $pSheet External sheet to add * @param null|int $iSheetIndex Index where sheet should go (0,1,..., or null for last) * - * @throws Exception - * * @return Worksheet */ public function addExternalSheet(Worksheet $pSheet, $iSheetIndex = null) @@ -1067,8 +1047,6 @@ class Spreadsheet /** * Get default style. * - * @throws Exception - * * @return Style */ public function getDefaultStyle() @@ -1095,8 +1073,6 @@ class Spreadsheet * Remove cellXf by index. It is ensured that all cells get their xf index updated. * * @param int $pIndex Index to cellXf - * - * @throws Exception */ public function removeCellXfByIndex($pIndex) { @@ -1188,8 +1164,6 @@ class Spreadsheet * Remove cellStyleXf by index. * * @param int $pIndex Index to cellXf - * - * @throws Exception */ public function removeCellStyleXfByIndex($pIndex) { @@ -1405,8 +1379,6 @@ class Spreadsheet * Set the first sheet in the book view. * * @param int $firstSheetIndex First sheet in book view - * - * @throws Exception if the given value is invalid */ public function setFirstSheetIndex($firstSheetIndex) { @@ -1444,8 +1416,6 @@ class Spreadsheet * user interface. * * @param string $visibility visibility status of the workbook - * - * @throws Exception if the given value is invalid */ public function setVisibility($visibility) { @@ -1476,8 +1446,6 @@ class Spreadsheet * TabRatio is assumed to be out of 1000 of the horizontal window width. * * @param int $tabRatio Ratio between the tabs bar and the horizontal scroll bar - * - * @throws Exception if the given value is invalid */ public function setTabRatio($tabRatio) { diff --git a/src/PhpSpreadsheet/Style/Alignment.php b/src/PhpSpreadsheet/Style/Alignment.php index 5eb7c2b0..e54fa2a1 100644 --- a/src/PhpSpreadsheet/Style/Alignment.php +++ b/src/PhpSpreadsheet/Style/Alignment.php @@ -138,8 +138,6 @@ class Alignment extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) @@ -267,8 +265,6 @@ class Alignment extends Supervisor * * @param int $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setTextRotation($pValue) diff --git a/src/PhpSpreadsheet/Style/Border.php b/src/PhpSpreadsheet/Style/Border.php index 5fa0cae7..2e076a92 100644 --- a/src/PhpSpreadsheet/Style/Border.php +++ b/src/PhpSpreadsheet/Style/Border.php @@ -69,8 +69,6 @@ class Border extends Supervisor * Get the shared style component for the currently active cell in currently active sheet. * Only used for style supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getSharedComponent() @@ -125,8 +123,6 @@ class Border extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) @@ -200,8 +196,6 @@ class Border extends Supervisor * * @param Color $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setColor(Color $pValue) diff --git a/src/PhpSpreadsheet/Style/Borders.php b/src/PhpSpreadsheet/Style/Borders.php index 8f005a99..e75d7eeb 100644 --- a/src/PhpSpreadsheet/Style/Borders.php +++ b/src/PhpSpreadsheet/Style/Borders.php @@ -195,8 +195,6 @@ class Borders extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) @@ -286,8 +284,6 @@ class Borders extends Supervisor /** * Get AllBorders (pseudo-border). Only applies to supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getAllBorders() @@ -302,8 +298,6 @@ class Borders extends Supervisor /** * Get Outline (pseudo-border). Only applies to supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getOutline() @@ -318,8 +312,6 @@ class Borders extends Supervisor /** * Get Inside (pseudo-border). Only applies to supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getInside() @@ -334,8 +326,6 @@ class Borders extends Supervisor /** * Get Vertical (pseudo-border). Only applies to supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getVertical() @@ -350,8 +340,6 @@ class Borders extends Supervisor /** * Get Horizontal (pseudo-border). Only applies to supervisor. * - * @throws PhpSpreadsheetException - * * @return Border */ public function getHorizontal() diff --git a/src/PhpSpreadsheet/Style/Color.php b/src/PhpSpreadsheet/Style/Color.php index ab22cbe3..d8ba08b2 100644 --- a/src/PhpSpreadsheet/Style/Color.php +++ b/src/PhpSpreadsheet/Style/Color.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Style; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - class Color extends Supervisor { const NAMED_COLORS = [ @@ -104,8 +102,6 @@ class Color extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) diff --git a/src/PhpSpreadsheet/Style/Fill.php b/src/PhpSpreadsheet/Style/Fill.php index 1d6bace1..789a9801 100644 --- a/src/PhpSpreadsheet/Style/Fill.php +++ b/src/PhpSpreadsheet/Style/Fill.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Style; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - class Fill extends Supervisor { // Fill types @@ -139,8 +137,6 @@ class Fill extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) @@ -250,8 +246,6 @@ class Fill extends Supervisor * * @param Color $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setStartColor(Color $pValue) @@ -284,8 +278,6 @@ class Fill extends Supervisor * * @param Color $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setEndColor(Color $pValue) diff --git a/src/PhpSpreadsheet/Style/Font.php b/src/PhpSpreadsheet/Style/Font.php index 0341cad0..5ab58dca 100644 --- a/src/PhpSpreadsheet/Style/Font.php +++ b/src/PhpSpreadsheet/Style/Font.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Style; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - class Font extends Supervisor { // Underline types @@ -159,8 +157,6 @@ class Font extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) @@ -510,8 +506,6 @@ class Font extends Supervisor * * @param Color $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setColor(Color $pValue) diff --git a/src/PhpSpreadsheet/Style/NumberFormat.php b/src/PhpSpreadsheet/Style/NumberFormat.php index df4ca76f..079e1d20 100644 --- a/src/PhpSpreadsheet/Style/NumberFormat.php +++ b/src/PhpSpreadsheet/Style/NumberFormat.php @@ -3,7 +3,6 @@ namespace PhpOffice\PhpSpreadsheet\Style; use PhpOffice\PhpSpreadsheet\Calculation\MathTrig; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; use PhpOffice\PhpSpreadsheet\Shared\Date; use PhpOffice\PhpSpreadsheet\Shared\StringHelper; @@ -137,8 +136,6 @@ class NumberFormat extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) diff --git a/src/PhpSpreadsheet/Style/Protection.php b/src/PhpSpreadsheet/Style/Protection.php index 8112bc62..f695837d 100644 --- a/src/PhpSpreadsheet/Style/Protection.php +++ b/src/PhpSpreadsheet/Style/Protection.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Style; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - class Protection extends Supervisor { /** Protection styles */ @@ -84,8 +82,6 @@ class Protection extends Supervisor * * @param array $pStyles Array containing style information * - * @throws PhpSpreadsheetException - * * @return $this */ public function applyFromArray(array $pStyles) diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/src/PhpSpreadsheet/Worksheet/AutoFilter.php index dcbc4da5..e6cd40e3 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -83,8 +83,6 @@ class AutoFilter * * @param string $pRange Cell range (i.e. A1:E10) * - * @throws PhpSpreadsheetException - * * @return $this */ public function setRange($pRange) @@ -132,8 +130,6 @@ class AutoFilter * * @param string $column Column name (e.g. A) * - * @throws PhpSpreadsheetException - * * @return int The column offset within the autofilter range */ public function testColumnInRange($column) @@ -156,8 +152,6 @@ class AutoFilter * * @param string $pColumn Column name (e.g. A) * - * @throws PhpSpreadsheetException - * * @return int The offset of the specified column within the autofilter range */ public function getColumnOffset($pColumn) @@ -170,8 +164,6 @@ class AutoFilter * * @param string $pColumn Column name (e.g. A) * - * @throws PhpSpreadsheetException - * * @return AutoFilter\Column */ public function getColumn($pColumn) @@ -190,8 +182,6 @@ class AutoFilter * * @param int $pColumnOffset Column offset within range (starting from 0) * - * @throws PhpSpreadsheetException - * * @return AutoFilter\Column */ public function getColumnByOffset($pColumnOffset) @@ -208,8 +198,6 @@ class AutoFilter * @param AutoFilter\Column|string $pColumn * A simple string containing a Column ID like 'A' is permitted * - * @throws PhpSpreadsheetException - * * @return $this */ public function setColumn($pColumn) @@ -239,8 +227,6 @@ class AutoFilter * * @param string $pColumn Column name (e.g. A) * - * @throws PhpSpreadsheetException - * * @return $this */ public function clearColumn($pColumn) @@ -615,8 +601,6 @@ class AutoFilter /** * Apply the AutoFilter rules to the AutoFilter Range. * - * @throws PhpSpreadsheetException - * * @return $this */ public function showHideRows() diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php index 3ed7270a..a36740a3 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column.php @@ -115,8 +115,6 @@ class Column * * @param string $pColumn Column (e.g. A) * - * @throws PhpSpreadsheetException - * * @return $this */ public function setColumnIndex($pColumn) @@ -171,8 +169,6 @@ class Column * * @param string $pFilterType * - * @throws PhpSpreadsheetException - * * @return $this */ public function setFilterType($pFilterType) @@ -201,8 +197,6 @@ class Column * * @param string $pJoin And/Or * - * @throws PhpSpreadsheetException - * * @return $this */ public function setJoin($pJoin) diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php index 09a2bacd..28286cee 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php @@ -260,8 +260,6 @@ class Rule * * @param string $pRuleType see self::AUTOFILTER_RULETYPE_* * - * @throws PhpSpreadsheetException - * * @return $this */ public function setRuleType($pRuleType) @@ -290,8 +288,6 @@ class Rule * * @param string|string[] $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setValue($pValue) @@ -334,8 +330,6 @@ class Rule * * @param string $pOperator see self::AUTOFILTER_COLUMN_RULE_* * - * @throws PhpSpreadsheetException - * * @return $this */ public function setOperator($pOperator) @@ -367,8 +361,6 @@ class Rule * * @param string $pGrouping * - * @throws PhpSpreadsheetException - * * @return $this */ public function setGrouping($pGrouping) @@ -391,8 +383,6 @@ class Rule * @param string|string[] $pValue * @param string $pGrouping * - * @throws PhpSpreadsheetException - * * @return $this */ public function setRule($pOperator, $pValue, $pGrouping = null) diff --git a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php index 7d24e449..bcea3435 100644 --- a/src/PhpSpreadsheet/Worksheet/BaseDrawing.php +++ b/src/PhpSpreadsheet/Worksheet/BaseDrawing.php @@ -203,8 +203,6 @@ class BaseDrawing implements IComparable * @param Worksheet $pValue * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? * - * @throws PhpSpreadsheetException - * * @return $this */ public function setWorksheet(Worksheet $pValue = null, $pOverrideOld = false) diff --git a/src/PhpSpreadsheet/Worksheet/CellIterator.php b/src/PhpSpreadsheet/Worksheet/CellIterator.php index d97e33f7..472609a3 100644 --- a/src/PhpSpreadsheet/Worksheet/CellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/CellIterator.php @@ -2,8 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Worksheet; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; - abstract class CellIterator implements \Iterator { /** @@ -40,8 +38,6 @@ abstract class CellIterator implements \Iterator /** * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. - * - * @throws PhpSpreadsheetException */ abstract protected function adjustForExistingOnlyRange(); @@ -49,8 +45,6 @@ abstract class CellIterator implements \Iterator * Set the iterator to loop only existing cells. * * @param bool $value - * - * @throws PhpSpreadsheetException */ public function setIterateOnlyExistingCells($value) { diff --git a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php index d75da898..184f4888 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -57,8 +57,6 @@ class ColumnCellIterator extends CellIterator * * @param int $startRow The row number at which to start iterating * - * @throws PhpSpreadsheetException - * * @return $this */ public function resetStart($startRow = 1) @@ -75,8 +73,6 @@ class ColumnCellIterator extends CellIterator * * @param int $endRow The row number at which to stop iterating * - * @throws PhpSpreadsheetException - * * @return $this */ public function resetEnd($endRow = null) @@ -92,8 +88,6 @@ class ColumnCellIterator extends CellIterator * * @param int $row The row number to set the current pointer at * - * @throws PhpSpreadsheetException - * * @return $this */ public function seek($row = 1) @@ -172,8 +166,6 @@ class ColumnCellIterator extends CellIterator /** * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. - * - * @throws PhpSpreadsheetException */ protected function adjustForExistingOnlyRange() { diff --git a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php index c8913cc1..0aff4859 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnIterator.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnIterator.php @@ -64,8 +64,6 @@ class ColumnIterator implements \Iterator * * @param string $startColumn The column address at which to start iterating * - * @throws Exception - * * @return $this */ public function resetStart($startColumn = 'A') @@ -104,8 +102,6 @@ class ColumnIterator implements \Iterator * * @param string $column The column address to set the current pointer at * - * @throws PhpSpreadsheetException - * * @return $this */ public function seek($column = 'A') diff --git a/src/PhpSpreadsheet/Worksheet/Dimension.php b/src/PhpSpreadsheet/Worksheet/Dimension.php index ce40cf57..a27daf09 100644 --- a/src/PhpSpreadsheet/Worksheet/Dimension.php +++ b/src/PhpSpreadsheet/Worksheet/Dimension.php @@ -85,8 +85,6 @@ abstract class Dimension * * @param int $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setOutlineLevel($pValue) diff --git a/src/PhpSpreadsheet/Worksheet/Drawing.php b/src/PhpSpreadsheet/Worksheet/Drawing.php index da492b4c..1f1dae93 100644 --- a/src/PhpSpreadsheet/Worksheet/Drawing.php +++ b/src/PhpSpreadsheet/Worksheet/Drawing.php @@ -76,8 +76,6 @@ class Drawing extends BaseDrawing * @param string $pValue File path * @param bool $pVerifyFile Verify file * - * @throws PhpSpreadsheetException - * * @return $this */ public function setPath($pValue, $pVerifyFile = true) diff --git a/src/PhpSpreadsheet/Worksheet/PageSetup.php b/src/PhpSpreadsheet/Worksheet/PageSetup.php index 38a09736..19eabcf4 100644 --- a/src/PhpSpreadsheet/Worksheet/PageSetup.php +++ b/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -323,8 +323,6 @@ class PageSetup * @param null|int $pValue * @param bool $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth * - * @throws PhpSpreadsheetException - * * @return $this */ public function setScale($pValue, $pUpdate = true) @@ -589,8 +587,6 @@ class PageSetup * Otherwise, the specific range identified by the value of $index will be returned * Print areas are numbered from 1 * - * @throws PhpSpreadsheetException - * * @return string */ public function getPrintArea($index = 0) @@ -669,8 +665,6 @@ class PageSetup * Default behaviour, or the "O" method, overwrites existing print area * The "I" method, inserts the new print area before any specified index, or at the end of the list * - * @throws PhpSpreadsheetException - * * @return $this */ public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) @@ -730,8 +724,6 @@ class PageSetup * list. * Print areas are numbered from 1 * - * @throws PhpSpreadsheetException - * * @return $this */ public function addPrintArea($value, $index = -1) @@ -760,8 +752,6 @@ class PageSetup * Default behaviour, or the "O" method, overwrites existing print area * The "I" method, inserts the new print area before any specified index, or at the end of the list * - * @throws PhpSpreadsheetException - * * @return $this */ public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) @@ -787,8 +777,6 @@ class PageSetup * list. * Print areas are numbered from 1 * - * @throws PhpSpreadsheetException - * * @return $this */ public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) diff --git a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php index 9746d640..09a5b0a1 100644 --- a/src/PhpSpreadsheet/Worksheet/RowCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowCellIterator.php @@ -57,8 +57,6 @@ class RowCellIterator extends CellIterator * * @param string $startColumn The column address at which to start iterating * - * @throws PhpSpreadsheetException - * * @return $this */ public function resetStart($startColumn = 'A') @@ -75,8 +73,6 @@ class RowCellIterator extends CellIterator * * @param string $endColumn The column address at which to stop iterating * - * @throws PhpSpreadsheetException - * * @return $this */ public function resetEnd($endColumn = null) @@ -93,8 +89,6 @@ class RowCellIterator extends CellIterator * * @param string $column The column address to set the current pointer at * - * @throws PhpSpreadsheetException - * * @return $this */ public function seek($column = 'A') @@ -150,8 +144,6 @@ class RowCellIterator extends CellIterator /** * Set the iterator to its previous value. - * - * @throws PhpSpreadsheetException */ public function prev() { @@ -182,8 +174,6 @@ class RowCellIterator extends CellIterator /** * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary. - * - * @throws PhpSpreadsheetException */ protected function adjustForExistingOnlyRange() { diff --git a/src/PhpSpreadsheet/Worksheet/RowIterator.php b/src/PhpSpreadsheet/Worksheet/RowIterator.php index 3b9d0e26..62cede7b 100644 --- a/src/PhpSpreadsheet/Worksheet/RowIterator.php +++ b/src/PhpSpreadsheet/Worksheet/RowIterator.php @@ -62,8 +62,6 @@ class RowIterator implements \Iterator * * @param int $startRow The row number at which to start iterating * - * @throws PhpSpreadsheetException - * * @return $this */ public function resetStart($startRow = 1) @@ -100,8 +98,6 @@ class RowIterator implements \Iterator * * @param int $row The row number to set the current pointer at * - * @throws PhpSpreadsheetException - * * @return $this */ public function seek($row = 1) diff --git a/src/PhpSpreadsheet/Worksheet/SheetView.php b/src/PhpSpreadsheet/Worksheet/SheetView.php index fa85bd27..e19ff808 100644 --- a/src/PhpSpreadsheet/Worksheet/SheetView.php +++ b/src/PhpSpreadsheet/Worksheet/SheetView.php @@ -77,8 +77,6 @@ class SheetView * * @param int $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setZoomScale($pValue) @@ -110,8 +108,6 @@ class SheetView * * @param int $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setZoomScaleNormal($pValue) @@ -163,8 +159,6 @@ class SheetView * * @param string $pValue * - * @throws PhpSpreadsheetException - * * @return $this */ public function setView($pValue) diff --git a/src/PhpSpreadsheet/Worksheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet/Worksheet.php index 9a3f9647..e8a61b78 100644 --- a/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -424,8 +424,6 @@ class Worksheet implements IComparable * * @param string $pValue The string to check * - * @throws Exception - * * @return string The valid string */ private static function checkSheetCodeName($pValue) @@ -454,8 +452,6 @@ class Worksheet implements IComparable * * @param string $pValue The string to check * - * @throws Exception - * * @return string The valid string */ private static function checkSheetTitle($pValue) @@ -1185,8 +1181,6 @@ class Worksheet implements IComparable * @param bool $createIfNotExists Flag indicating whether a new cell should be created if it doesn't * already exist, or a null should be returned instead * - * @throws Exception - * * @return null|Cell Cell that was found/created or null */ public function getCell($pCoordinate, $createIfNotExists = true) @@ -1293,8 +1287,6 @@ class Worksheet implements IComparable * * @param string $pCoordinate Coordinate of the cell eg: 'A1' * - * @throws Exception - * * @return bool */ public function cellExists($pCoordinate) @@ -1431,8 +1423,6 @@ class Worksheet implements IComparable * * @param string $pCellCoordinate Cell coordinate (or range) to get style for, eg: 'A1' * - * @throws Exception - * * @return Style */ public function getStyle($pCellCoordinate) @@ -1543,8 +1533,6 @@ class Worksheet implements IComparable * @param Style $pCellStyle Cell style to duplicate * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") * - * @throws Exception - * * @return $this */ public function duplicateStyle(Style $pCellStyle, $pRange) @@ -1588,8 +1576,6 @@ class Worksheet implements IComparable * @param Conditional[] $pCellStyle Cell style to duplicate * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") * - * @throws Exception - * * @return $this */ public function duplicateConditionalStyle(array $pCellStyle, $pRange = '') @@ -1626,8 +1612,6 @@ class Worksheet implements IComparable * @param string $pCoordinate Cell coordinate (e.g. A1) * @param int $pBreak Break type (type of Worksheet::BREAK_*) * - * @throws Exception - * * @return $this */ public function setBreak($pCoordinate, $pBreak) @@ -1679,8 +1663,6 @@ class Worksheet implements IComparable * * @param string $pRange Cell range (e.g. A1:E1) * - * @throws Exception - * * @return $this */ public function mergeCells($pRange) @@ -1724,8 +1706,6 @@ class Worksheet implements IComparable * @param int $columnIndex2 Numeric column coordinate of the last cell * @param int $row2 Numeric row coordinate of the last cell * - * @throws Exception - * * @return $this */ public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) @@ -1740,8 +1720,6 @@ class Worksheet implements IComparable * * @param string $pRange Cell range (e.g. A1:E1) * - * @throws Exception - * * @return $this */ public function unmergeCells($pRange) @@ -1770,8 +1748,6 @@ class Worksheet implements IComparable * @param int $columnIndex2 Numeric column coordinate of the last cell * @param int $row2 Numeric row coordinate of the last cell * - * @throws Exception - * * @return $this */ public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) @@ -1852,8 +1828,6 @@ class Worksheet implements IComparable * * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) * - * @throws Exception - * * @return $this */ public function unprotectCells($pRange) @@ -1878,8 +1852,6 @@ class Worksheet implements IComparable * @param int $columnIndex2 Numeric column coordinate of the last cell * @param int $row2 Numeric row coordinate of the last cell * - * @throws Exception - * * @return $this */ public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) @@ -1915,8 +1887,6 @@ class Worksheet implements IComparable * @param AutoFilter|string $pValue * A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility * - * @throws Exception - * * @return $this */ public function setAutoFilter($pValue) @@ -1938,8 +1908,6 @@ class Worksheet implements IComparable * @param int $columnIndex2 Numeric column coordinate of the second cell * @param int $row2 Numeric row coordinate of the second cell * - * @throws Exception - * * @return $this */ public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) @@ -1985,8 +1953,6 @@ class Worksheet implements IComparable * @param null|string $cell Position of the split * @param null|string $topLeftCell default position of the right bottom pane * - * @throws Exception - * * @return $this */ public function freezePane($cell, $topLeftCell = null) @@ -2045,8 +2011,6 @@ class Worksheet implements IComparable * @param int $pBefore Insert before this one * @param int $pNumRows Number of rows to insert * - * @throws Exception - * * @return $this */ public function insertNewRowBefore($pBefore, $pNumRows = 1) @@ -2067,8 +2031,6 @@ class Worksheet implements IComparable * @param string $pBefore Insert before this one, eg: 'A' * @param int $pNumCols Number of columns to insert * - * @throws Exception - * * @return $this */ public function insertNewColumnBefore($pBefore, $pNumCols = 1) @@ -2089,8 +2051,6 @@ class Worksheet implements IComparable * @param int $beforeColumnIndex Insert before this one (numeric column coordinate of the cell) * @param int $pNumCols Number of columns to insert * - * @throws Exception - * * @return $this */ public function insertNewColumnBeforeByIndex($beforeColumnIndex, $pNumCols = 1) @@ -2108,8 +2068,6 @@ class Worksheet implements IComparable * @param int $pRow Remove starting with this one * @param int $pNumRows Number of rows to remove * - * @throws Exception - * * @return $this */ public function removeRow($pRow, $pNumRows = 1) @@ -2144,8 +2102,6 @@ class Worksheet implements IComparable * @param string $pColumn Remove starting with this one, eg: 'A' * @param int $pNumCols Number of columns to remove * - * @throws Exception - * * @return $this */ public function removeColumn($pColumn, $pNumCols = 1) @@ -2184,8 +2140,6 @@ class Worksheet implements IComparable * @param int $columnIndex Remove starting with this one (numeric column coordinate of the cell) * @param int $numColumns Number of columns to remove * - * @throws Exception - * * @return $this */ public function removeColumnByIndex($columnIndex, $numColumns = 1) @@ -2346,8 +2300,6 @@ class Worksheet implements IComparable * * @param string $pCellCoordinate Cell coordinate to get comment for, eg: 'A1' * - * @throws Exception - * * @return Comment */ public function getComment($pCellCoordinate) @@ -2461,8 +2413,6 @@ class Worksheet implements IComparable * @param int $columnIndex Numeric column coordinate of the cell * @param int $row Numeric row coordinate of the cell * - * @throws Exception - * * @return $this */ public function setSelectedCellByColumnAndRow($columnIndex, $row) @@ -2502,8 +2452,6 @@ class Worksheet implements IComparable * @param string $startCell Insert array starting from this cell address as the top left coordinate * @param bool $strictNullComparison Apply strict comparison when testing for null values in the array * - * @throws Exception - * * @return $this */ public function fromArray(array $source, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) @@ -2619,8 +2567,6 @@ class Worksheet implements IComparable * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero * True - Return rows and columns indexed by their actual row and column IDs * - * @throws Exception - * * @return array */ public function namedRangeToArray($pNamedRange, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) @@ -3010,8 +2956,6 @@ class Worksheet implements IComparable * @param bool $validate False to skip validation of new title. WARNING: This should only be set * at parse time (by Readers), where titles can be assumed to be valid. * - * @throws Exception - * * @return $this */ public function setCodeName($pValue, $validate = true) diff --git a/src/PhpSpreadsheet/Writer/Csv.php b/src/PhpSpreadsheet/Writer/Csv.php index e5c08c13..142f15b8 100644 --- a/src/PhpSpreadsheet/Writer/Csv.php +++ b/src/PhpSpreadsheet/Writer/Csv.php @@ -79,8 +79,6 @@ class Csv extends BaseWriter * Save PhpSpreadsheet to file. * * @param resource|string $pFilename - * - * @throws Exception */ public function save($pFilename) { diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index ed6db1b7..ec754001 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -23,7 +23,6 @@ use PhpOffice\PhpSpreadsheet\Style\Style; use PhpOffice\PhpSpreadsheet\Worksheet\Drawing; use PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; -use PhpOffice\PhpSpreadsheet\Writer\Exception as WriterException; class Html extends BaseWriter { @@ -147,8 +146,6 @@ class Html extends BaseWriter * Save Spreadsheet to file. * * @param resource|string $pFilename - * - * @throws WriterException */ public function save($pFilename) { @@ -343,8 +340,6 @@ class Html extends BaseWriter * * @param bool $pIncludeStyles Include styles? * - * @throws WriterException - * * @return string */ public function generateHTMLHeader($pIncludeStyles = false) @@ -398,8 +393,6 @@ class Html extends BaseWriter /** * Generate sheet data. * - * @throws WriterException - * * @return string */ public function generateSheetData() @@ -514,8 +507,6 @@ class Html extends BaseWriter /** * Generate sheet tabs. * - * @throws WriterException - * * @return string */ public function generateNavigation() @@ -743,8 +734,6 @@ class Html extends BaseWriter * * @param bool $generateSurroundingHTML Generate surrounding HTML tags? (<style> and </style>) * - * @throws WriterException - * * @return string */ public function generateStyles($generateSurroundingHTML = true) @@ -782,8 +771,6 @@ class Html extends BaseWriter * * @param bool $generateSurroundingHTML Generate surrounding HTML style? (html { }) * - * @throws WriterException - * * @return array */ public function buildCSS($generateSurroundingHTML = true) @@ -1158,8 +1145,6 @@ class Html extends BaseWriter * @param int $pRow Row number (0-based) * @param string $cellType eg: 'td' * - * @throws WriterException - * * @return string */ private function generateRow(Worksheet $pSheet, array $pValues, $pRow, $cellType) diff --git a/src/PhpSpreadsheet/Writer/IWriter.php b/src/PhpSpreadsheet/Writer/IWriter.php index 97b14bef..27329537 100644 --- a/src/PhpSpreadsheet/Writer/IWriter.php +++ b/src/PhpSpreadsheet/Writer/IWriter.php @@ -60,8 +60,6 @@ interface IWriter * Save PhpSpreadsheet to file. * * @param resource|string $pFilename Name of the file to save - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function save($pFilename); @@ -78,8 +76,6 @@ interface IWriter * @param bool $pValue * @param string $pDirectory Disk caching directory * - * @throws Exception when directory does not exist - * * @return IWriter */ public function setUseDiskCaching($pValue, $pDirectory = null); diff --git a/src/PhpSpreadsheet/Writer/Ods.php b/src/PhpSpreadsheet/Writer/Ods.php index bb981d35..e3a0ca98 100644 --- a/src/PhpSpreadsheet/Writer/Ods.php +++ b/src/PhpSpreadsheet/Writer/Ods.php @@ -76,8 +76,6 @@ class Ods extends BaseWriter * Save PhpSpreadsheet to file. * * @param resource|string $pFilename - * - * @throws WriterException */ public function save($pFilename) { @@ -113,8 +111,6 @@ class Ods extends BaseWriter /** * Create zip object. * - * @throws WriterException - * * @return ZipStream */ private function createZip() @@ -135,8 +131,6 @@ class Ods extends BaseWriter /** * Get Spreadsheet object. * - * @throws WriterException - * * @return Spreadsheet */ public function getSpreadsheet() diff --git a/src/PhpSpreadsheet/Writer/Ods/Content.php b/src/PhpSpreadsheet/Writer/Ods/Content.php index dea5100f..cbf303bd 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Content.php +++ b/src/PhpSpreadsheet/Writer/Ods/Content.php @@ -32,8 +32,6 @@ class Content extends WriterPart /** * Write content.xml to XML format. * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function write() @@ -169,8 +167,6 @@ class Content extends WriterPart * * @param XMLWriter $objWriter * @param Row $row - * - * @throws Exception */ private function writeCells(XMLWriter $objWriter, Row $row) { @@ -373,8 +369,6 @@ class Content extends WriterPart * * @param XMLWriter $objWriter * @param Cell $cell - * - * @throws \PhpOffice\PhpSpreadsheet\Exception */ private function writeCellMerge(XMLWriter $objWriter, Cell $cell) { diff --git a/src/PhpSpreadsheet/Writer/Ods/Meta.php b/src/PhpSpreadsheet/Writer/Ods/Meta.php index ffe5eff7..eb2ebf9e 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Meta.php +++ b/src/PhpSpreadsheet/Writer/Ods/Meta.php @@ -12,8 +12,6 @@ class Meta extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function write(Spreadsheet $spreadsheet = null) diff --git a/src/PhpSpreadsheet/Writer/Ods/MetaInf.php b/src/PhpSpreadsheet/Writer/Ods/MetaInf.php index 1ec9d1eb..c9085cf8 100644 --- a/src/PhpSpreadsheet/Writer/Ods/MetaInf.php +++ b/src/PhpSpreadsheet/Writer/Ods/MetaInf.php @@ -9,8 +9,6 @@ class MetaInf extends WriterPart /** * Write META-INF/manifest.xml to XML format. * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeManifest() diff --git a/src/PhpSpreadsheet/Writer/Ods/Settings.php b/src/PhpSpreadsheet/Writer/Ods/Settings.php index 18f7ee6d..11d13341 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Settings.php +++ b/src/PhpSpreadsheet/Writer/Ods/Settings.php @@ -12,8 +12,6 @@ class Settings extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function write(Spreadsheet $spreadsheet = null) diff --git a/src/PhpSpreadsheet/Writer/Ods/Styles.php b/src/PhpSpreadsheet/Writer/Ods/Styles.php index eaf5cad9..cd71566f 100644 --- a/src/PhpSpreadsheet/Writer/Ods/Styles.php +++ b/src/PhpSpreadsheet/Writer/Ods/Styles.php @@ -12,8 +12,6 @@ class Styles extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function write(Spreadsheet $spreadsheet = null) diff --git a/src/PhpSpreadsheet/Writer/Pdf.php b/src/PhpSpreadsheet/Writer/Pdf.php index f0c1798f..bb9f4aef 100644 --- a/src/PhpSpreadsheet/Writer/Pdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf.php @@ -222,8 +222,6 @@ abstract class Pdf extends Html * * @param string $pValue Temporary storage directory * - * @throws WriterException when directory does not exist - * * @return self */ public function setTempDir($pValue) @@ -242,8 +240,6 @@ abstract class Pdf extends Html * * @param string $pFilename Name of the file to save as * - * @throws WriterException - * * @return resource */ protected function prepareForSave($pFilename) diff --git a/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php b/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php index 783bf253..4506468b 100644 --- a/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf/Dompdf.php @@ -21,8 +21,6 @@ class Dompdf extends Pdf * Save Spreadsheet to file. * * @param string $pFilename Name of the file to save as - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function save($pFilename) { diff --git a/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php b/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php index 2922db15..6f3cc57f 100644 --- a/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php @@ -2,7 +2,6 @@ namespace PhpOffice\PhpSpreadsheet\Writer\Pdf; -use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException; use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup; use PhpOffice\PhpSpreadsheet\Writer\Pdf; @@ -24,9 +23,6 @@ class Mpdf extends Pdf * Save Spreadsheet to file. * * @param string $pFilename Name of the file to save as - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * @throws PhpSpreadsheetException */ public function save($pFilename) { diff --git a/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php b/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php index 6ba77c75..5c31af8f 100644 --- a/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php +++ b/src/PhpSpreadsheet/Writer/Pdf/Tcpdf.php @@ -25,8 +25,6 @@ class Tcpdf extends Pdf * Save Spreadsheet to file. * * @param string $pFilename Name of the file to save as - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function save($pFilename) { diff --git a/src/PhpSpreadsheet/Writer/Xls.php b/src/PhpSpreadsheet/Writer/Xls.php index fb42bf9e..06611789 100644 --- a/src/PhpSpreadsheet/Writer/Xls.php +++ b/src/PhpSpreadsheet/Writer/Xls.php @@ -116,8 +116,6 @@ class Xls extends BaseWriter * Save Spreadsheet to file. * * @param resource|string $pFilename - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ public function save($pFilename) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx.php b/src/PhpSpreadsheet/Writer/Xlsx.php index aea6a26c..4d4d79d6 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx.php +++ b/src/PhpSpreadsheet/Writer/Xlsx.php @@ -170,8 +170,6 @@ class Xlsx extends BaseWriter * Save PhpSpreadsheet to file. * * @param resource|string $pFilename - * - * @throws WriterException */ public function save($pFilename) { @@ -411,8 +409,6 @@ class Xlsx extends BaseWriter /** * Get Spreadsheet object. * - * @throws WriterException - * * @return Spreadsheet */ public function getSpreadsheet() diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php index c9c3e055..aeb7a76b 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Chart.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -29,8 +29,6 @@ class Chart extends WriterPart * @param \PhpOffice\PhpSpreadsheet\Chart\Chart $pChart * @param mixed $calculateCellValues * - * @throws WriterException - * * @return string XML Output */ public function writeChart(\PhpOffice\PhpSpreadsheet\Chart\Chart $pChart, $calculateCellValues = true) @@ -109,8 +107,6 @@ class Chart extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Title $title - * - * @throws WriterException */ private function writeTitle(XMLWriter $objWriter, Title $title = null) { @@ -154,8 +150,6 @@ class Chart extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Legend $legend - * - * @throws WriterException */ private function writeLegend(XMLWriter $objWriter, Legend $legend = null) { @@ -212,8 +206,6 @@ class Chart extends WriterPart * @param Axis $yAxis * @param null|GridLines $majorGridlines * @param null|GridLines $minorGridlines - * - * @throws WriterException */ private function writePlotArea(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pSheet, PlotArea $plotArea, Title $xAxisLabel = null, Title $yAxisLabel = null, Axis $xAxis = null, Axis $yAxis = null, GridLines $majorGridlines = null, GridLines $minorGridlines = null) { @@ -395,8 +387,6 @@ class Chart extends WriterPart * @param string $id2 * @param bool $isMultiLevelSeries * @param Axis $yAxis - * - * @throws WriterException */ private function writeCategoryAxis($objWriter, $xAxisLabel, $id1, $id2, $isMultiLevelSeries, Axis $yAxis) { @@ -518,8 +508,6 @@ class Chart extends WriterPart * @param Axis $xAxis * @param GridLines $majorGridlines * @param GridLines $minorGridlines - * - * @throws WriterException */ private function writeValueAxis($objWriter, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, Axis $xAxis, GridLines $majorGridlines, GridLines $minorGridlines) { @@ -999,8 +987,6 @@ class Chart extends WriterPart * * @param PlotArea $plotArea * - * @throws WriterException - * * @return array|string */ private static function getChartType($plotArea) @@ -1064,8 +1050,6 @@ class Chart extends WriterPart * @param bool &$catIsMultiLevelSeries Is category a multi-series category * @param bool &$valIsMultiLevelSeries Is value set a multi-series set * @param string &$plotGroupingType Type of grouping for multi-series values - * - * @throws WriterException */ private function writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Comments.php b/src/PhpSpreadsheet/Writer/Xlsx/Comments.php index a95298af..ee34e318 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Comments.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Comments.php @@ -13,8 +13,6 @@ class Comments extends WriterPart * * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeComments(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) @@ -73,8 +71,6 @@ class Comments extends WriterPart * @param string $pCellReference Cell reference * @param Comment $pComment Comment * @param array $pAuthors Array of authors - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeComment(XMLWriter $objWriter, $pCellReference, Comment $pComment, array $pAuthors) { @@ -96,8 +92,6 @@ class Comments extends WriterPart * * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeVMLComments(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php b/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php index 6b22d713..421f1e73 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php @@ -16,8 +16,6 @@ class ContentTypes extends WriterPart * @param Spreadsheet $spreadsheet * @param bool $includeCharts Flag indicating if we should include drawing details for charts * - * @throws WriterException - * * @return string XML Output */ public function writeContentTypes(Spreadsheet $spreadsheet, $includeCharts = false) @@ -188,8 +186,6 @@ class ContentTypes extends WriterPart * * @param string $pFile Filename * - * @throws WriterException - * * @return string Mime Type */ private function getImageMimeType($pFile) @@ -209,8 +205,6 @@ class ContentTypes extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $pPartname Part name * @param string $pContentType Content type - * - * @throws WriterException */ private function writeDefaultContentType(XMLWriter $objWriter, $pPartname, $pContentType) { @@ -231,8 +225,6 @@ class ContentTypes extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $pPartname Part name * @param string $pContentType Content type - * - * @throws WriterException */ private function writeOverrideContentType(XMLWriter $objWriter, $pPartname, $pContentType) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php b/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php index 2a18d5c7..289d08c7 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php @@ -12,8 +12,6 @@ class DocProps extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeDocPropsApp(Spreadsheet $spreadsheet) @@ -111,8 +109,6 @@ class DocProps extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeDocPropsCore(Spreadsheet $spreadsheet) @@ -180,8 +176,6 @@ class DocProps extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeDocPropsCustom(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php b/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php index 08256a1d..4c5a413e 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php @@ -17,8 +17,6 @@ class Drawing extends WriterPart * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet * @param bool $includeCharts Flag indicating if we should include drawing details for charts * - * @throws WriterException - * * @return string XML Output */ public function writeDrawings(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, $includeCharts = false) @@ -156,8 +154,6 @@ class Drawing extends WriterPart * @param BaseDrawing $pDrawing * @param int $pRelationId * @param null|int $hlinkClickId - * - * @throws WriterException */ public function writeDrawing(XMLWriter $objWriter, BaseDrawing $pDrawing, $pRelationId = -1, $hlinkClickId = null) { @@ -289,8 +285,6 @@ class Drawing extends WriterPart * * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet * - * @throws WriterException - * * @return string XML Output */ public function writeVMLHeaderFooterImages(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Rels.php b/src/PhpSpreadsheet/Writer/Xlsx/Rels.php index 76c196b4..6dc41502 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Rels.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Rels.php @@ -14,8 +14,6 @@ class Rels extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws WriterException - * * @return string XML Output */ public function writeRelationships(Spreadsheet $spreadsheet) @@ -89,8 +87,6 @@ class Rels extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws WriterException - * * @return string XML Output */ public function writeWorkbookRelationships(Spreadsheet $spreadsheet) @@ -172,8 +168,6 @@ class Rels extends WriterPart * @param int $pWorksheetId * @param bool $includeCharts Flag indicating if we should write charts * - * @throws WriterException - * * @return string XML Output */ public function writeWorksheetRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, $pWorksheetId = 1, $includeCharts = false) @@ -301,8 +295,6 @@ class Rels extends WriterPart * @param int &$chartRef Chart ID * @param bool $includeCharts Flag indicating if we should write charts * - * @throws WriterException - * * @return string XML Output */ public function writeDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet, &$chartRef, $includeCharts = false) @@ -370,8 +362,6 @@ class Rels extends WriterPart * * @param \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet * - * @throws WriterException - * * @return string XML Output */ public function writeHeaderFooterDrawingRelationships(\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $pWorksheet) @@ -415,8 +405,6 @@ class Rels extends WriterPart * @param string $pType Relationship type * @param string $pTarget Relationship target * @param string $pTargetMode Relationship target mode - * - * @throws WriterException */ private function writeRelationship(XMLWriter $objWriter, $pId, $pType, $pTarget, $pTargetMode = '') { @@ -442,8 +430,6 @@ class Rels extends WriterPart * @param \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $drawing * @param $i * - * @throws WriterException - * * @return int */ private function writeDrawingHyperLink($objWriter, $drawing, $i) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php b/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php index 8a0cfe34..531111ab 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php @@ -12,8 +12,6 @@ class RelsRibbon extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeRibbonRelationships(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php b/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php index 01ad38de..fb508c6b 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/RelsVBA.php @@ -12,8 +12,6 @@ class RelsVBA extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeVBARelationships(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php index 19604e44..8e18e6f8 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -8,7 +8,6 @@ use PhpOffice\PhpSpreadsheet\RichText\Run; use PhpOffice\PhpSpreadsheet\Shared\StringHelper; use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; -use PhpOffice\PhpSpreadsheet\Writer\Exception as WriterException; class StringTable extends WriterPart { @@ -62,8 +61,6 @@ class StringTable extends WriterPart * * @param string[] $pStringTable * - * @throws WriterException - * * @return string XML Output */ public function writeStringTable(array $pStringTable) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/src/PhpSpreadsheet/Writer/Xlsx/Style.php index 16e800e0..54ec664f 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Style.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -20,8 +20,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeStyles(Spreadsheet $spreadsheet) @@ -369,8 +367,6 @@ class Style extends WriterPart * @param XMLWriter $objWriter XML Writer * @param \PhpOffice\PhpSpreadsheet\Style\Style $pStyle Style * @param Spreadsheet $spreadsheet Workbook - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $pStyle, Spreadsheet $spreadsheet) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Theme.php b/src/PhpSpreadsheet/Writer/Xlsx/Theme.php index f5f8dc07..c6090395 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Theme.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -111,8 +111,6 @@ class Theme extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return string XML Output */ public function writeTheme(Spreadsheet $spreadsheet) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php b/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php index fd936748..a56c5b72 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php @@ -18,8 +18,6 @@ class Workbook extends WriterPart * @param Spreadsheet $spreadsheet * @param bool $recalcRequired Indicate whether formulas should be recalculated before writing * - * @throws WriterException - * * @return string XML Output */ public function writeWorkbook(Spreadsheet $spreadsheet, $recalcRequired = false) @@ -185,8 +183,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Spreadsheet $spreadsheet - * - * @throws WriterException */ private function writeSheets(XMLWriter $objWriter, Spreadsheet $spreadsheet) { @@ -215,8 +211,6 @@ class Workbook extends WriterPart * @param int $pSheetId Sheet id * @param int $pRelId Relationship ID * @param string $sheetState Sheet state (visible, hidden, veryHidden) - * - * @throws WriterException */ private function writeSheet(XMLWriter $objWriter, $pSheetname, $pSheetId = 1, $pRelId = 1, $sheetState = 'visible') { @@ -240,8 +234,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Spreadsheet $spreadsheet - * - * @throws WriterException */ private function writeDefinedNames(XMLWriter $objWriter, Spreadsheet $spreadsheet) { @@ -275,8 +267,6 @@ class Workbook extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Spreadsheet $spreadsheet - * - * @throws WriterException */ private function writeNamedRanges(XMLWriter $objWriter, Spreadsheet $spreadsheet) { diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php index 1d5a995a..0c042fe1 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -12,7 +12,6 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule; use PhpOffice\PhpSpreadsheet\Worksheet\SheetView; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet as PhpspreadsheetWorksheet; -use PhpOffice\PhpSpreadsheet\Writer\Exception as WriterException; /** * @category PhpSpreadsheet @@ -28,8 +27,6 @@ class Worksheet extends WriterPart * @param string[] $pStringTable * @param bool $includeCharts Flag indicating if we should write charts * - * @throws WriterException - * * @return string XML Output */ public function writeWorksheet(PhpspreadsheetWorksheet $pSheet, $pStringTable = null, $includeCharts = false) @@ -194,8 +191,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeSheetViews(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -459,8 +454,6 @@ class Worksheet extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet - * - * @throws WriterException */ private function writeConditionalFormatting(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet) { @@ -956,8 +949,6 @@ class Worksheet extends WriterPart * @param XMLWriter $objWriter XML Writer * @param PhpspreadsheetWorksheet $pSheet Worksheet * @param string[] $pStringTable String table - * - * @throws WriterException */ private function writeSheetData(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, array $pStringTable) { @@ -1044,8 +1035,6 @@ class Worksheet extends WriterPart * @param PhpspreadsheetWorksheet $pSheet Worksheet * @param Cell $pCellAddress Cell Address * @param string[] $pFlippedStringTable String table (flipped), for faster index searching - * - * @throws WriterException */ private function writeCell(XMLWriter $objWriter, PhpspreadsheetWorksheet $pSheet, $pCellAddress, array $pFlippedStringTable) { diff --git a/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php b/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php index 14cd993a..f74d29ef 100644 --- a/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/CalculationTest.php @@ -310,8 +310,6 @@ class CalculationTest extends TestCase * be set in cache * @param string[] $shouldNotBeSetInCacheCells coordinates of cells that must * not be set in cache because of pruning - * - * @throws \PhpOffice\PhpSpreadsheet\Exception * @dataProvider dataProviderBranchPruningFullExecution */ public function testFullExecution( diff --git a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php index b0aed466..214fe593 100644 --- a/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php +++ b/tests/PhpSpreadsheetTests/DocumentGeneratorTest.php @@ -15,8 +15,6 @@ class DocumentGeneratorTest extends TestCase * * @param array $phpSpreadsheetFunctions * @param string $expected - * - * @throws \ReflectionException */ public function testGenerateFunctionListByName(array $phpSpreadsheetFunctions, string $expected): void { @@ -28,8 +26,6 @@ class DocumentGeneratorTest extends TestCase * * @param array $phpSpreadsheetFunctions * @param string $expected - * - * @throws \ReflectionException */ public function testGenerateFunctionListByCategory(array $phpSpreadsheetFunctions, string $expected): void {