From a504a394748668fd28771bb3f708484a7a6dd102 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 4 Jan 2018 02:01:05 +0900 Subject: [PATCH] Fix PHPDoc blocks Closes #314 --- src/PhpSpreadsheet/Calculation/Financial.php | 21 ++--- src/PhpSpreadsheet/Calculation/Functions.php | 6 +- src/PhpSpreadsheet/Calculation/LookupRef.php | 93 +++++++------------ .../Calculation/Statistical.php | 23 ++--- src/PhpSpreadsheet/Chart/Layout.php | 4 +- src/PhpSpreadsheet/Document/Properties.php | 36 +++---- src/PhpSpreadsheet/Reader/Xml.php | 10 +- .../Shared/JAMA/EigenvalueDecomposition.php | 13 +-- .../Shared/JAMA/LUDecomposition.php | 6 +- .../Shared/JAMA/QRDecomposition.php | 2 - .../JAMA/SingularValueDecomposition.php | 19 ++-- src/PhpSpreadsheet/Shared/OLE.php | 8 +- .../Shared/OLE/ChainedBlockStream.php | 2 + src/PhpSpreadsheet/Spreadsheet.php | 8 +- src/PhpSpreadsheet/Style/Style.php | 2 - src/PhpSpreadsheet/Writer/Xlsx/Style.php | 27 +----- 16 files changed, 102 insertions(+), 178 deletions(-) diff --git a/src/PhpSpreadsheet/Calculation/Financial.php b/src/PhpSpreadsheet/Calculation/Financial.php index 59bd334f..12904b3b 100644 --- a/src/PhpSpreadsheet/Calculation/Financial.php +++ b/src/PhpSpreadsheet/Calculation/Financial.php @@ -2018,12 +2018,9 @@ class Financial * * Returns the straight-line depreciation of an asset for one period * - * @param cost Initial cost of the asset - * @param salvage Value at the end of the depreciation - * @param life Number of periods over which the asset is depreciated - * @param mixed $cost - * @param mixed $salvage - * @param mixed $life + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated * * @return float */ @@ -2050,14 +2047,10 @@ class Financial * * Returns the sum-of-years' digits depreciation of an asset for a specified period. * - * @param cost Initial cost of the asset - * @param salvage Value at the end of the depreciation - * @param life Number of periods over which the asset is depreciated - * @param period Period - * @param mixed $cost - * @param mixed $salvage - * @param mixed $life - * @param mixed $period + * @param mixed $cost Initial cost of the asset + * @param mixed $salvage Value at the end of the depreciation + * @param mixed $life Number of periods over which the asset is depreciated + * @param mixed $period Period * * @return float */ diff --git a/src/PhpSpreadsheet/Calculation/Functions.php b/src/PhpSpreadsheet/Calculation/Functions.php index 80391ef6..bca48f60 100644 --- a/src/PhpSpreadsheet/Calculation/Functions.php +++ b/src/PhpSpreadsheet/Calculation/Functions.php @@ -473,8 +473,7 @@ class Functions * * Returns a value converted to a number * - * @param value The value you want converted - * @param null|mixed $value + * @param null|mixed $value The value you want converted * * @return number N converts values listed in the following table * If value is or refers to N returns @@ -515,8 +514,7 @@ class Functions * * Returns a number that identifies the type of a value * - * @param value The value you want tested - * @param null|mixed $value + * @param null|mixed $value The value you want tested * * @return number N converts values listed in the following table * If value is or refers to N returns diff --git a/src/PhpSpreadsheet/Calculation/LookupRef.php b/src/PhpSpreadsheet/Calculation/LookupRef.php index 32ca7c59..6c1a71a7 100644 --- a/src/PhpSpreadsheet/Calculation/LookupRef.php +++ b/src/PhpSpreadsheet/Calculation/LookupRef.php @@ -15,22 +15,17 @@ class LookupRef * Excel Function: * =ADDRESS(row, column, [relativity], [referenceStyle], [sheetText]) * - * @param row Row number to use in the cell reference - * @param column Column number to use in the cell reference - * @param relativity Flag indicating the type of reference to return + * @param mixed $row Row number to use in the cell reference + * @param mixed $column Column number to use in the cell reference + * @param int $relativity Flag indicating the type of reference to return * 1 or omitted Absolute * 2 Absolute row; relative column * 3 Relative row; absolute column * 4 Relative - * @param referenceStyle A logical value that specifies the A1 or R1C1 reference style. + * @param bool $referenceStyle A logical value that specifies the A1 or R1C1 reference style. * TRUE or omitted CELL_ADDRESS returns an A1-style reference * FALSE CELL_ADDRESS returns an R1C1-style reference - * @param sheetText Optional Name of worksheet to use - * @param mixed $row - * @param mixed $column - * @param mixed $relativity - * @param mixed $referenceStyle - * @param mixed $sheetText + * @param string $sheetText Optional Name of worksheet to use * * @return string */ @@ -84,10 +79,9 @@ class LookupRef * Excel Function: * =COLUMN([cellAddress]) * - * @param cellAddress A reference to a range of cells for which you want the column numbers - * @param null|mixed $cellAddress + * @param null|array|string $cellAddress A reference to a range of cells for which you want the column numbers * - * @return int or array of integer + * @return int|int[] */ public static function COLUMN($cellAddress = null) { @@ -130,8 +124,7 @@ class LookupRef * Excel Function: * =COLUMNS(cellAddress) * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns - * @param null|mixed $cellAddress + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns * * @return int The number of columns in cellAddress */ @@ -165,8 +158,7 @@ class LookupRef * Excel Function: * =ROW([cellAddress]) * - * @param cellAddress A reference to a range of cells for which you want the row numbers - * @param null|mixed $cellAddress + * @param null|array|string $cellAddress A reference to a range of cells for which you want the row numbers * * @return int or array of integer */ @@ -211,7 +203,7 @@ class LookupRef * Excel Function: * =ROWS(cellAddress) * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows + * @param null|array|string $cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows * @param null|mixed $cellAddress * * @return int The number of rows in cellAddress @@ -279,7 +271,7 @@ class LookupRef * * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 * - * @param cellAddress $cellAddress The cell address of the current cell (containing this formula) + * @param null|array|string $cellAddress $cellAddress The cell address of the current cell (containing this formula) * @param Cell $pCell The current cell (containing this formula) * * @return mixed The cells referenced by cellAddress @@ -337,25 +329,20 @@ class LookupRef * Excel Function: * =OFFSET(cellAddress, rows, cols, [height], [width]) * - * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or + * @param null|array|string $cellAddress The reference from which you want to base the offset. Reference must refer to a cell or * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. - * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. + * @param mixed $rows The number of rows, up or down, that you want the upper-left cell to refer to. * Using 5 as the rows argument specifies that the upper-left cell in the reference is * five rows below reference. Rows can be positive (which means below the starting reference) * or negative (which means above the starting reference). - * @param cols The number of columns, to the left or right, that you want the upper-left cell of the result + * @param mixed $columns The number of columns, to the left or right, that you want the upper-left cell of the result * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the * reference is five columns to the right of reference. Cols can be positive (which means * to the right of the starting reference) or negative (which means to the left of the * starting reference). - * @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. - * @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. - * @param null|mixed $cellAddress - * @param mixed $rows - * @param mixed $columns - * @param null|mixed $height - * @param null|mixed $width - * @param Cell $pCell + * @param mixed $height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. + * @param mixed $width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. + * @param null|Cell $pCell * * @return string A reference to a cell or range of cells */ @@ -435,10 +422,10 @@ class LookupRef * Excel Function: * =CHOOSE(index_num, value1, [value2], ...) * - * @param index_num Specifies which value argument is selected. + * @param mixed $index_num Specifies which value argument is selected. * Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number * between 1 and 254. - * @param value1... Value1 is required, subsequent values are optional. + * @param mixed $value1... Value1 is required, subsequent values are optional. * Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on * index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or * text. @@ -590,12 +577,9 @@ class LookupRef * Excel Function: * =INDEX(range_array, row_num, [column_num]) * - * @param range_array A range of cells or an array constant - * @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required. - * @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required. - * @param mixed $arrayValues - * @param mixed $rowNum - * @param mixed $columnNum + * @param mixed $arrayValues A range of cells or an array constant + * @param mixed $rowNum The row in array from which to return a value. If row_num is omitted, column_num is required. + * @param mixed $columnNum The column in array from which to return a value. If column_num is omitted, row_num is required. * * @return mixed the value of a specified cell or array of cells */ @@ -692,14 +676,10 @@ class LookupRef * VLOOKUP * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. * - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param index_number The column number in table_array from which the matching value must be returned. The first column is 1. - * @param not_exact_match determines if you are looking for an exact match based on lookup_value - * @param mixed $lookup_value - * @param mixed $lookup_array - * @param mixed $index_number - * @param mixed $not_exact_match + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The column number in table_array from which the matching value must be returned. The first column is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value * * @return mixed The value of the found cell */ @@ -761,14 +741,10 @@ class LookupRef * HLOOKUP * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number. * - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param index_number The row number in table_array from which the matching value must be returned. The first row is 1. - * @param not_exact_match determines if you are looking for an exact match based on lookup_value - * @param mixed $lookup_value - * @param mixed $lookup_array - * @param mixed $index_number - * @param mixed $not_exact_match + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_array The range of cells being searched + * @param mixed $index_number The row number in table_array from which the matching value must be returned. The first row is 1. + * @param mixed $not_exact_match determines if you are looking for an exact match based on lookup_value * * @return mixed The value of the found cell */ @@ -826,12 +802,9 @@ class LookupRef * LOOKUP * The LOOKUP function searches for value either from a one-row or one-column range or from an array. * - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_vector The range of cells being searched - * @param result_vector The column from which the matching value must be returned - * @param mixed $lookup_value - * @param mixed $lookup_vector - * @param null|mixed $result_vector + * @param mixed $lookup_value The value that you want to match in lookup_array + * @param mixed $lookup_vector The range of cells being searched + * @param null|mixed $result_vector The column from which the matching value must be returned * * @return mixed The value of the found cell */ diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index a851eeee..dbab767e 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -48,14 +48,11 @@ class Statistical * * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992). * - * @param x require 0<=x<=1 - * @param p require p>0 - * @param q require q>0 - * @param mixed $x - * @param mixed $p - * @param mixed $q + * @param mixed $x require 0<=x<=1 + * @param mixed $p require p>0 + * @param mixed $q require q>0 * - * @return 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow + * @return float 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow */ private static function incompleteBeta($x, $p, $q) { @@ -82,12 +79,10 @@ class Statistical /** * The natural logarithm of the beta function. * - * @param p require p>0 - * @param q require q>0 - * @param mixed $p - * @param mixed $q + * @param mixed $p require p>0 + * @param mixed $q require q>0 * - * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow + * @return float 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow * * @author Jaco van Kooten */ @@ -115,6 +110,8 @@ class Statistical * @param mixed $x * @param mixed $p * @param mixed $q + * + * @return float */ private static function betaFraction($x, $p, $q) { @@ -205,7 +202,7 @@ class Statistical * The computation is believed to be free of underflow and overflow. *

* - * @return MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305 + * @return float MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305 */ // Function cache for logGamma diff --git a/src/PhpSpreadsheet/Chart/Layout.php b/src/PhpSpreadsheet/Chart/Layout.php index 7c1b56db..ca322511 100644 --- a/src/PhpSpreadsheet/Chart/Layout.php +++ b/src/PhpSpreadsheet/Chart/Layout.php @@ -272,7 +272,7 @@ class Layout /** * Set Width. * - * @param Width $value + * @param float $value * * @return Layout */ @@ -296,7 +296,7 @@ class Layout /** * Set Height. * - * @param Height $value + * @param float $value * * @return Layout */ diff --git a/src/PhpSpreadsheet/Document/Properties.php b/src/PhpSpreadsheet/Document/Properties.php index 333c448b..1d635e33 100644 --- a/src/PhpSpreadsheet/Document/Properties.php +++ b/src/PhpSpreadsheet/Document/Properties.php @@ -168,23 +168,23 @@ class Properties /** * Set Created. * - * @param datetime $pValue + * @param int|string $time * * @return Properties */ - public function setCreated($pValue) + public function setCreated($time) { - if ($pValue === null) { - $pValue = time(); - } elseif (is_string($pValue)) { - if (is_numeric($pValue)) { - $pValue = (int) $pValue; + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; } else { - $pValue = strtotime($pValue); + $time = strtotime($time); } } - $this->created = $pValue; + $this->created = $time; return $this; } @@ -202,23 +202,23 @@ class Properties /** * Set Modified. * - * @param datetime $pValue + * @param int|string $time * * @return Properties */ - public function setModified($pValue) + public function setModified($time) { - if ($pValue === null) { - $pValue = time(); - } elseif (is_string($pValue)) { - if (is_numeric($pValue)) { - $pValue = (int) $pValue; + if ($time === null) { + $time = time(); + } elseif (is_string($time)) { + if (is_numeric($time)) { + $time = (int) $time; } else { - $pValue = strtotime($pValue); + $time = strtotime($time); } } - $this->modified = $pValue; + $this->modified = $time; return $this; } diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index b0173836..65b81824 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -253,10 +253,9 @@ class Xml extends BaseReader /** * pixel units to excel width units(units of 1/256th of a character width). * - * @param pxs - * @param mixed $pxs + * @param float $pxs * - * @return + * @return float */ protected static function pixel2WidthUnits($pxs) { @@ -271,10 +270,9 @@ class Xml extends BaseReader /** * excel width units(units of 1/256th of a character width) to pixel units. * - * @param widthUnits - * @param mixed $widthUnits + * @param float $widthUnits * - * @return + * @return float */ protected static function widthUnits2Pixel($widthUnits) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php index 604c8e3e..b2d5bcc4 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/EigenvalueDecomposition.php @@ -777,10 +777,7 @@ class EigenvalueDecomposition /** * Constructor: Check for symmetry, then construct the eigenvalue decomposition. * - * @param A Square matrix - * @param mixed $Arg - * - * @return Structure to access D and V + * @param mixed $Arg A Square matrix */ public function __construct($Arg) { @@ -813,7 +810,7 @@ class EigenvalueDecomposition /** * Return the eigenvector matrix. * - * @return V + * @return Matrix V */ public function getV() { @@ -823,7 +820,7 @@ class EigenvalueDecomposition /** * Return the real parts of the eigenvalues. * - * @return real(diag(D)) + * @return array real(diag(D)) */ public function getRealEigenvalues() { @@ -833,7 +830,7 @@ class EigenvalueDecomposition /** * Return the imaginary parts of the eigenvalues. * - * @return imag(diag(D)) + * @return array imag(diag(D)) */ public function getImagEigenvalues() { @@ -843,7 +840,7 @@ class EigenvalueDecomposition /** * Return the block diagonal eigenvalue matrix. * - * @return D + * @return Matrix D */ public function getD() { diff --git a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php index e275fcc4..bb2b4b04 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php @@ -65,8 +65,6 @@ class LUDecomposition * LU Decomposition constructor. * * @param Matrix $A Rectangular matrix - * - * @return Structure to access L, U and piv */ public function __construct($A) { @@ -242,12 +240,12 @@ class LUDecomposition /** * Solve A*X = B. * - * @param $B a Matrix with as many rows as A and any number of columns + * @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 X so that L*U*X = B(piv,:) + * @return Matrix X so that L*U*X = B(piv,:) */ public function solve($B) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php index 328d4fac..a123f48d 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/QRDecomposition.php @@ -55,8 +55,6 @@ class QRDecomposition * QR Decomposition computed by Householder reflections. * * @param matrix $A Rectangular matrix - * - * @return Structure to access R and the Householder vectors and compute Q */ public function __construct($A) { diff --git a/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php index 238c24fc..3ca95619 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/SingularValueDecomposition.php @@ -60,10 +60,7 @@ class SingularValueDecomposition * * Derived from LINPACK code. * - * @param $A Rectangular matrix - * @param mixed $Arg - * - * @return Structure to access U, S and V + * @param mixed $Arg Rectangular matrix */ public function __construct($Arg) { @@ -445,7 +442,7 @@ class SingularValueDecomposition /** * Return the left singular vectors. * - * @return U + * @return Matrix U */ public function getU() { @@ -455,7 +452,7 @@ class SingularValueDecomposition /** * Return the right singular vectors. * - * @return V + * @return Matrix V */ public function getV() { @@ -465,7 +462,7 @@ class SingularValueDecomposition /** * Return the one-dimensional array of singular values. * - * @return diagonal of S + * @return array diagonal of S */ public function getSingularValues() { @@ -475,7 +472,7 @@ class SingularValueDecomposition /** * Return the diagonal matrix of singular values. * - * @return S + * @return Matrix S */ public function getS() { @@ -492,7 +489,7 @@ class SingularValueDecomposition /** * Two norm. * - * @return max(S) + * @return float max(S) */ public function norm2() { @@ -502,7 +499,7 @@ class SingularValueDecomposition /** * Two norm condition number. * - * @return max(S)/min(S) + * @return float max(S)/min(S) */ public function cond() { @@ -512,7 +509,7 @@ class SingularValueDecomposition /** * Effective numerical matrix rank. * - * @return Number of nonnegligible singular values + * @return int Number of nonnegligible singular values */ public function rank() { diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index 0320849a..b99b8910 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -23,6 +23,7 @@ namespace PhpOffice\PhpSpreadsheet\Shared; use PhpOffice\PhpSpreadsheet\Reader\Exception as ReaderException; use PhpOffice\PhpSpreadsheet\Shared\OLE\ChainedBlockStream; +use PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\Root; /* * Array for storing OLE instances that are accessed from @@ -66,7 +67,7 @@ class OLE /** * Root directory of OLE container. * - * @var OLE_PPS_Root + * @var Root */ public $root; @@ -103,7 +104,7 @@ class OLE * * @var int */ - private $bigBlockThreshold; + public $bigBlockThreshold; /** * Reads an OLE container from the contents of the file given. @@ -214,8 +215,7 @@ class OLE * Returns a stream for use with fread() etc. External callers should * use \PhpOffice\PhpSpreadsheet\Shared\OLE\PPS\File::getStream(). * - * @param int|PPS block id or PPS - * @param mixed $blockIdOrPps + * @param int|OLE\PPS $blockIdOrPps block id or PPS * * @return resource read-only stream */ diff --git a/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php index 261548ba..e6ba7242 100644 --- a/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php +++ b/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php @@ -2,6 +2,8 @@ namespace PhpOffice\PhpSpreadsheet\Shared\OLE; +use PhpOffice\PhpSpreadsheet\Shared\OLE; + class ChainedBlockStream { /** diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php index 62987a4f..348fe896 100644 --- a/src/PhpSpreadsheet/Spreadsheet.php +++ b/src/PhpSpreadsheet/Spreadsheet.php @@ -87,15 +87,15 @@ class Spreadsheet private $hasMacros = false; /** - * macrosCode : all macros code (the vbaProject.bin file, this include form, code, etc.), null if no macro. + * macrosCode : all macros code as binary data (the vbaProject.bin file, this include form, code, etc.), null if no macro. * - * @var binary + * @var string */ private $macrosCode; /** - * macrosCertificate : if macros are signed, contains vbaProjectSignature.bin file, null if not signed. + * macrosCertificate : if macros are signed, contains binary data vbaProjectSignature.bin file, null if not signed. * - * @var binary + * @var string */ private $macrosCertificate; diff --git a/src/PhpSpreadsheet/Style/Style.php b/src/PhpSpreadsheet/Style/Style.php index 247aed0f..aaca8dc7 100644 --- a/src/PhpSpreadsheet/Style/Style.php +++ b/src/PhpSpreadsheet/Style/Style.php @@ -184,8 +184,6 @@ class Style extends Supervisor * @param array $pStyles Array containing style information * @param bool $pAdvanced advanced mode for setting borders * - * @throws Exception - * * @return Style */ public function applyFromArray(array $pStyles, $pAdvanced = true) diff --git a/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/src/PhpSpreadsheet/Writer/Xlsx/Style.php index eb04601f..d85086bb 100644 --- a/src/PhpSpreadsheet/Writer/Xlsx/Style.php +++ b/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -7,6 +7,7 @@ use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Style\Border; use PhpOffice\PhpSpreadsheet\Style\Borders; +use PhpOffice\PhpSpreadsheet\Style\Conditional; use PhpOffice\PhpSpreadsheet\Style\Fill; use PhpOffice\PhpSpreadsheet\Style\Font; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; @@ -151,8 +152,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Fill $pFill Fill style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeFill(XMLWriter $objWriter, Fill $pFill) { @@ -172,8 +171,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Fill $pFill Fill style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeGradientFill(XMLWriter $objWriter, Fill $pFill) { @@ -217,8 +214,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Fill $pFill Fill style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writePatternFill(XMLWriter $objWriter, Fill $pFill) { @@ -256,8 +251,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Font $pFont Font style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeFont(XMLWriter $objWriter, Font $pFont) { @@ -337,8 +330,6 @@ class Style extends WriterPart * * @param XMLWriter $objWriter XML Writer * @param Borders $pBorders Borders style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeBorder(XMLWriter $objWriter, Borders $pBorders) { @@ -520,8 +511,6 @@ class Style extends WriterPart * @param XMLWriter $objWriter XML Writer * @param string $pName Element name * @param Border $pBorder Border style - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeBorderPr(XMLWriter $objWriter, $pName, Border $pBorder) { @@ -545,8 +534,6 @@ class Style extends WriterPart * @param XMLWriter $objWriter XML Writer * @param NumberFormat $pNumberFormat Number Format * @param int $pId Number Format identifier - * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception */ private function writeNumFmt(XMLWriter $objWriter, NumberFormat $pNumberFormat, $pId = 0) { @@ -567,8 +554,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return \PhpOffice\PhpSpreadsheet\Style\Style[] All styles in PhpSpreadsheet */ public function allStyles(Spreadsheet $spreadsheet) @@ -581,8 +566,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Conditional[] All conditional styles in PhpSpreadsheet */ public function allConditionalStyles(Spreadsheet $spreadsheet) @@ -607,8 +590,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Fill[] All fills in PhpSpreadsheet */ public function allFills(Spreadsheet $spreadsheet) @@ -641,8 +622,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Font[] All fonts in PhpSpreadsheet */ public function allFonts(Spreadsheet $spreadsheet) @@ -666,8 +645,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return Borders[] All borders in PhpSpreadsheet */ public function allBorders(Spreadsheet $spreadsheet) @@ -691,8 +668,6 @@ class Style extends WriterPart * * @param Spreadsheet $spreadsheet * - * @throws \PhpOffice\PhpSpreadsheet\Writer\Exception - * * @return NumberFormat[] All number formats in PhpSpreadsheet */ public function allNumberFormats(Spreadsheet $spreadsheet)