diff --git a/src/PhpSpreadsheet/CachedObjectStorageFactory.php b/src/PhpSpreadsheet/CachedObjectStorageFactory.php index c92228a4..ab83153e 100644 --- a/src/PhpSpreadsheet/CachedObjectStorageFactory.php +++ b/src/PhpSpreadsheet/CachedObjectStorageFactory.php @@ -122,7 +122,7 @@ class CachedObjectStorageFactory /** * Return the current cache storage class * - * @return \CachedObjectStorage\ICache|null + * @return string **/ public static function getCacheStorageClass() { diff --git a/src/PhpSpreadsheet/Calculation.php b/src/PhpSpreadsheet/Calculation.php index 4660aa9a..2923164c 100644 --- a/src/PhpSpreadsheet/Calculation.php +++ b/src/PhpSpreadsheet/Calculation.php @@ -2350,6 +2350,10 @@ class Calculation return $formula; } + /** + * @param string $fromSeparator + * @param string $toSeparator + */ private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator) { // Convert any Excel function names to the required language @@ -2670,6 +2674,9 @@ class Calculation return false; } + /** + * @param string $cellReference + */ public function saveValueToCache($cellReference, $cellValue) { if ($this->calculationCacheEnabled) { @@ -2790,7 +2797,7 @@ class Calculation * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0 * * @param mixed &$matrix matrix operand - * @return array An array comprising the number of rows, and number of columns + * @return int[] An array comprising the number of rows, and number of columns */ private static function getMatrixDimensions(&$matrix) { @@ -2940,7 +2947,7 @@ class Calculation * Format type and details of an operand for display in the log (based on operand type) * * @param mixed $value First matrix operand - * @return mixed + * @return string|null */ private function showTypeDetails($value) { @@ -3430,6 +3437,10 @@ class Calculation } // evaluate postfix notation + + /** + * @param string $cellID + */ private function processTokenStack($tokens, $cellID = null, Cell $pCell = null) { if ($tokens == false) { @@ -4016,6 +4027,9 @@ class Calculation return strcmp($inversedStr1, $inversedStr2); } + /** + * @param string $matrixFunction + */ private function executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, &$stack) { // Validate the two operands diff --git a/src/PhpSpreadsheet/Calculation/DateTime.php b/src/PhpSpreadsheet/Calculation/DateTime.php index d0b9d698..2efb017d 100644 --- a/src/PhpSpreadsheet/Calculation/DateTime.php +++ b/src/PhpSpreadsheet/Calculation/DateTime.php @@ -918,10 +918,6 @@ class DateTime * PHP DateTime object, or a standard date string * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), * PHP DateTime object, or a standard date string - * @param mixed $holidays,... Optional series of Excel date serial value (float), PHP date - * timestamp (integer), PHP DateTime object, or a standard date - * strings that will be excluded from the working calendar, such - * as state and federal holidays and floating holidays. * @return int Interval between the dates */ public static function NETWORKDAYS($startDate, $endDate) @@ -1003,10 +999,6 @@ class DateTime * @param int $endDays The number of nonweekend and nonholiday days before or after * startDate. A positive value for days yields a future date; a * negative value yields a past date. - * @param mixed $holidays,... Optional series of Excel date serial value (float), PHP date - * timestamp (integer), PHP DateTime object, or a standard date - * strings that will be excluded from the working calendar, such - * as state and federal holidays and floating holidays. * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, * depending on the value of the ReturnDateType flag */ @@ -1143,7 +1135,7 @@ class DateTime * Excel Function: * WEEKDAY(dateValue[,style]) * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), + * @param int $dateValue Excel date serial value (float), PHP date timestamp (integer), * PHP DateTime object, or a standard date string * @param int $style A number that determines the type of return value * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). @@ -1221,7 +1213,7 @@ class DateTime * * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), * PHP DateTime object, or a standard date string - * @param bool $method Week begins on Sunday or Monday + * @param int $method Week begins on Sunday or Monday * 1 or omitted Week begins on Sunday. * 2 Week begins on Monday. * @return int Week Number diff --git a/src/PhpSpreadsheet/Calculation/Financial.php b/src/PhpSpreadsheet/Calculation/Financial.php index 033695b1..37fcc2ad 100644 --- a/src/PhpSpreadsheet/Calculation/Financial.php +++ b/src/PhpSpreadsheet/Calculation/Financial.php @@ -406,7 +406,7 @@ class Financial * date when the security is traded to the buyer. * @param mixed maturity The security's maturity date. * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. + * @param int frequency the number of coupon payments per year. * Valid frequency values are: * 1 Annual * 2 Semi-Annual @@ -478,6 +478,7 @@ class Financial * 2 Actual/360 * 3 Actual/365 * 4 European 30/360 + * @param int $frequency * @return float */ public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0) diff --git a/src/PhpSpreadsheet/Calculation/FormulaParser.php b/src/PhpSpreadsheet/Calculation/FormulaParser.php index f045d27f..c2a364f3 100644 --- a/src/PhpSpreadsheet/Calculation/FormulaParser.php +++ b/src/PhpSpreadsheet/Calculation/FormulaParser.php @@ -128,7 +128,7 @@ class FormulaParser /** * Get Token count * - * @return string + * @return int */ public function getTokenCount() { diff --git a/src/PhpSpreadsheet/Calculation/Functions.php b/src/PhpSpreadsheet/Calculation/Functions.php index 9cc4f3c0..4f3ed583 100644 --- a/src/PhpSpreadsheet/Calculation/Functions.php +++ b/src/PhpSpreadsheet/Calculation/Functions.php @@ -384,7 +384,7 @@ class Functions * IS_EVEN * * @param mixed $value Value to check - * @return bool + * @return string|bool */ public static function isEven($value = null) { @@ -403,7 +403,7 @@ class Functions * IS_ODD * * @param mixed $value Value to check - * @return bool + * @return string|bool */ public static function isOdd($value = null) { diff --git a/src/PhpSpreadsheet/Calculation/Logical.php b/src/PhpSpreadsheet/Calculation/Logical.php index 7fb896ae..d99eefd1 100644 --- a/src/PhpSpreadsheet/Calculation/Logical.php +++ b/src/PhpSpreadsheet/Calculation/Logical.php @@ -76,7 +76,7 @@ class Logical * * @category Logical Functions * @param mixed $arg,... Data values - * @return bool The logical AND of the arguments. + * @return string|bool The logical AND of the arguments. */ public static function logicalAnd() { @@ -131,7 +131,7 @@ class Logical * * @category Logical Functions * @param mixed $arg,... Data values - * @return bool The logical OR of the arguments. + * @return string|bool The logical OR of the arguments. */ public static function logicalOr() { @@ -185,7 +185,7 @@ class Logical * * @category Logical Functions * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE - * @return bool The boolean inverse of the argument. + * @return bool|string The boolean inverse of the argument. */ public static function NOT($logical = false) { diff --git a/src/PhpSpreadsheet/Calculation/Statistical.php b/src/PhpSpreadsheet/Calculation/Statistical.php index 83bdb77f..c469cc3e 100644 --- a/src/PhpSpreadsheet/Calculation/Statistical.php +++ b/src/PhpSpreadsheet/Calculation/Statistical.php @@ -882,7 +882,6 @@ class Statistical * @param float $value Value at which you want to evaluate the distribution * @param float $alpha Parameter to the distribution * @param float $beta Parameter to the distribution - * @param bool $cumulative * @return float */ public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) @@ -921,7 +920,6 @@ class Statistical * @param float $beta Parameter to the distribution * @param float $rMin Minimum value * @param float $rMax Maximum value - * @param bool $cumulative * @return float */ public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) @@ -2569,7 +2567,7 @@ class Statistical * * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. * - * @param float $value + * @param float $probability * @param float $mean Mean Value * @param float $stdDev Standard Deviation * @return float @@ -3668,7 +3666,6 @@ class Statistical * @param float $dataSet * @param float $m0 Alpha Parameter * @param float $sigma Beta Parameter - * @param bool $cumulative * @return float */ public static function ZTEST($dataSet, $m0, $sigma = null) diff --git a/src/PhpSpreadsheet/Calculation/TextData.php b/src/PhpSpreadsheet/Calculation/TextData.php index 9aa7f13d..0b446fee 100644 --- a/src/PhpSpreadsheet/Calculation/TextData.php +++ b/src/PhpSpreadsheet/Calculation/TextData.php @@ -54,7 +54,7 @@ class TextData * CHARACTER * * @param string $character Value - * @return int + * @return string */ public static function CHARACTER($character) { @@ -294,7 +294,7 @@ class TextData * @param mixed $value Value to check * @param int $decimals * @param bool $no_commas - * @return bool + * @return string */ public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false) { @@ -409,7 +409,7 @@ class TextData * STRINGLENGTH * * @param string $value Value - * @return string + * @return int */ public static function STRINGLENGTH($value = '') { @@ -556,7 +556,7 @@ class TextData * RETURNSTRING * * @param mixed $testValue Value to check - * @return bool + * @return string|null */ public static function RETURNSTRING($testValue = '') { @@ -574,7 +574,7 @@ class TextData * * @param mixed $value Value to check * @param string $format Format mask to use - * @return bool + * @return string */ public static function TEXTFORMAT($value, $format) { diff --git a/src/PhpSpreadsheet/Cell.php b/src/PhpSpreadsheet/Cell.php index 66569903..0e29cf7d 100644 --- a/src/PhpSpreadsheet/Cell.php +++ b/src/PhpSpreadsheet/Cell.php @@ -575,7 +575,7 @@ class Cell * * @param string $pCoordinateString * @throws Exception - * @return array Array containing column and row (indexes 0 and 1) + * @return string[] Array containing column and row (indexes 0 and 1) */ public static function coordinateFromString($pCoordinateString = 'A1') { diff --git a/src/PhpSpreadsheet/Chart/Axis.php b/src/PhpSpreadsheet/Chart/Axis.php index 53fc3919..3c59cb90 100644 --- a/src/PhpSpreadsheet/Chart/Axis.php +++ b/src/PhpSpreadsheet/Chart/Axis.php @@ -326,7 +326,7 @@ class Axis extends Properties /** * Set Shadow Properties * - * @param int $shadow_presets + * @param int $sh_presets * @param string $sh_color_value * @param string $sh_color_type * @param string $sh_color_alpha @@ -458,12 +458,7 @@ class Axis extends Properties } /** - * Get Glow Property - * - * @param float $size - * @param string $color_value - * @param int $color_alpha - * @param string $color_type + * Get Shadow Property */ public function getShadowProperty($elements) { diff --git a/src/PhpSpreadsheet/Chart/DataSeries.php b/src/PhpSpreadsheet/Chart/DataSeries.php index 39b3a395..3f335afc 100644 --- a/src/PhpSpreadsheet/Chart/DataSeries.php +++ b/src/PhpSpreadsheet/Chart/DataSeries.php @@ -70,14 +70,14 @@ class DataSeries /** * Plot Grouping Type * - * @var bool + * @var string */ private $plotGrouping; /** * Plot Direction * - * @var bool + * @var string */ private $plotDirection; @@ -112,7 +112,7 @@ class DataSeries /** * Smooth Line * - * @var string + * @var bool */ private $smoothLine; diff --git a/src/PhpSpreadsheet/Chart/DataSeriesValues.php b/src/PhpSpreadsheet/Chart/DataSeriesValues.php index be4140a8..cb615624 100644 --- a/src/PhpSpreadsheet/Chart/DataSeriesValues.php +++ b/src/PhpSpreadsheet/Chart/DataSeriesValues.php @@ -80,6 +80,7 @@ class DataSeriesValues /** * Create a new DataSeriesValues object + * @param string $dataSource */ public function __construct($dataType = self::DATASERIES_TYPE_NUMBER, $dataSource = null, $formatCode = null, $pointCount = 0, $dataValues = [], $marker = null) { @@ -209,7 +210,7 @@ class DataSeriesValues /** * Identify if the Data Series is a multi-level or a simple series * - * @return bool + * @return bool|null */ public function isMultiLevelSeries() { @@ -223,7 +224,7 @@ class DataSeriesValues /** * Return the level count of a multi-level Data Series * - * @return bool + * @return int */ public function multiLevelCount() { diff --git a/src/PhpSpreadsheet/Chart/Layout.php b/src/PhpSpreadsheet/Chart/Layout.php index d33b861f..530f17f8 100644 --- a/src/PhpSpreadsheet/Chart/Layout.php +++ b/src/PhpSpreadsheet/Chart/Layout.php @@ -174,6 +174,7 @@ class Layout * Set Layout Target * * @param Layout Target $value + * @param string $value * @return Layout */ public function setLayoutTarget($value) diff --git a/src/PhpSpreadsheet/Chart/Properties.php b/src/PhpSpreadsheet/Chart/Properties.php index a93f3df2..0e2c3f3b 100644 --- a/src/PhpSpreadsheet/Chart/Properties.php +++ b/src/PhpSpreadsheet/Chart/Properties.php @@ -115,11 +115,17 @@ abstract class Properties SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22, SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23; + /** + * @param float $width + */ protected function getExcelPointsWidth($width) { return $width * 12700; } + /** + * @param float $angle + */ protected function getExcelPointsAngle($angle) { return $angle * 60000; diff --git a/src/PhpSpreadsheet/Document/Properties.php b/src/PhpSpreadsheet/Document/Properties.php index 615e5821..c4d2c0aa 100644 --- a/src/PhpSpreadsheet/Document/Properties.php +++ b/src/PhpSpreadsheet/Document/Properties.php @@ -51,14 +51,14 @@ class Properties /** * Created * - * @var datetime + * @var int */ private $created; /** * Modified * - * @var datetime + * @var int */ private $modified; @@ -178,7 +178,7 @@ class Properties /** * Get Created * - * @return datetime + * @return int */ public function getCreated() { @@ -211,7 +211,7 @@ class Properties /** * Get Modified * - * @return datetime + * @return int */ public function getModified() { diff --git a/src/PhpSpreadsheet/Helper/HTML.php b/src/PhpSpreadsheet/Helper/HTML.php index 0e3de1d4..ed7bcb96 100644 --- a/src/PhpSpreadsheet/Helper/HTML.php +++ b/src/PhpSpreadsheet/Helper/HTML.php @@ -802,7 +802,12 @@ class HTML $this->buildTextRun(); } - protected function handleCallback($element, $callbackTag, $callbacks) + /** + * @param DOMElement $element + * @param string $callbackTag + * @param array $callbacks + */ + protected function handleCallback(DOMElement $element, $callbackTag, array $callbacks) { if (isset($callbacks[$callbackTag])) { $elementHandler = $callbacks[$callbackTag]; diff --git a/src/PhpSpreadsheet/NamedRange.php b/src/PhpSpreadsheet/NamedRange.php index 08742670..07aa7b3c 100644 --- a/src/PhpSpreadsheet/NamedRange.php +++ b/src/PhpSpreadsheet/NamedRange.php @@ -233,7 +233,7 @@ class NamedRange * @param Worksheet|null $pSheet Scope. Use null for global scope * @return NamedRange */ - public static function resolveRange($pNamedRange, Worksheet $pSheet) + public static function resolveRange($pNamedRange, Worksheet $pSheet = null) { return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); } diff --git a/src/PhpSpreadsheet/Reader/CSV.php b/src/PhpSpreadsheet/Reader/CSV.php index 0bb70c1b..31c7dea5 100644 --- a/src/PhpSpreadsheet/Reader/CSV.php +++ b/src/PhpSpreadsheet/Reader/CSV.php @@ -59,7 +59,7 @@ class CSV extends BaseReader implements IReader /** * Load rows contiguously * - * @var int + * @var bool */ private $contiguous = false; diff --git a/src/PhpSpreadsheet/Reader/Excel2007.php b/src/PhpSpreadsheet/Reader/Excel2007.php index 0642ca00..5687ad57 100644 --- a/src/PhpSpreadsheet/Reader/Excel2007.php +++ b/src/PhpSpreadsheet/Reader/Excel2007.php @@ -1920,7 +1920,10 @@ class Excel2007 extends BaseReader implements IReader return 'FF000000'; } - private static function readStyle($docStyle, $style) + /** + * @param \PhpSpreadsheet\Style $docStyle + */ + private static function readStyle($docStyle, \PhpSpreadsheet\Style $style) { // format code // if (isset($style->numFmt)) { @@ -2119,7 +2122,10 @@ class Excel2007 extends BaseReader implements IReader return $value; } - private function readRibbon($excel, $customUITarget, $zip) + /** + * @param \PhpSpreadsheet\Spreadsheet $excel + */ + private function readRibbon(\PhpSpreadsheet\Spreadsheet $excel, $customUITarget, $zip) { $baseDir = dirname($customUITarget); $nameCustomUI = basename($customUITarget); diff --git a/src/PhpSpreadsheet/Reader/Excel2007/Chart.php b/src/PhpSpreadsheet/Reader/Excel2007/Chart.php index f75472e5..ccb7ca5a 100644 --- a/src/PhpSpreadsheet/Reader/Excel2007/Chart.php +++ b/src/PhpSpreadsheet/Reader/Excel2007/Chart.php @@ -26,7 +26,12 @@ namespace PhpSpreadsheet\Reader\Excel2007; */ class Chart { - private static function getAttribute($component, $name, $format) + /** + * @param \SimpleXMLElement $component + * @param string $name + * @param string $format + */ + private static function getAttribute(\SimpleXMLElement $component, $name, $format) { $attributes = $component->attributes(); if (isset($attributes[$name])) { @@ -53,7 +58,11 @@ class Chart } } - public static function readChart($chartElements, $chartName) + /** + * @param \SimpleXMLElement $chartElements + * @param string $chartName + */ + public static function readChart(\SimpleXMLElement $chartElements, $chartName) { $namespacesChartMeta = $chartElements->getNamespaces(true); $chartElementsC = $chartElements->children($namespacesChartMeta['c']); @@ -482,7 +491,10 @@ class Chart return $plotAttributes; } - private static function setChartAttributes($plotArea, $plotAttributes) + /** + * @param \PhpSpreadsheet\Chart\Layout $plotArea + */ + private static function setChartAttributes(\PhpSpreadsheet\Chart\Layout $plotArea, $plotAttributes) { foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) { switch ($plotAttributeKey) { diff --git a/src/PhpSpreadsheet/Reader/Excel5.php b/src/PhpSpreadsheet/Reader/Excel5.php index f6aa8b19..bc169dab 100644 --- a/src/PhpSpreadsheet/Reader/Excel5.php +++ b/src/PhpSpreadsheet/Reader/Excel5.php @@ -1207,7 +1207,7 @@ class Excel5 extends BaseReader implements IReader * * @param string $data Data stream to read from * @param int $pos Position to start reading from - * @param int $length Record data length + * @param int $len Record data length * * @return string Record data */ @@ -1740,8 +1740,8 @@ class Excel5 extends BaseReader implements IReader /** * Make an RC4 decryptor for the given block * - * @var int Block for which to create decrypto - * @var string $valContext MD5 context state + * @param int Block for which to create decrypto + * @param string $valContext MD5 context state * * @return Excel5\RC4 */ @@ -1772,11 +1772,11 @@ class Excel5 extends BaseReader implements IReader /** * Verify RC4 file password * - * @var string Password to check - * @var string $docid Document id - * @var string $salt_data Salt data - * @var string $hashedsalt_data Hashed salt data - * @var string &$valContext Set to the MD5 context of the value + * @param string $password Password to check + * @param string $docid Document id + * @param string $salt_data Salt data + * @param string $hashedsalt_data Hashed salt data + * @param string $valContext Set to the MD5 context of the value * * @return bool Success */ @@ -5257,8 +5257,7 @@ class Excel5 extends BaseReader implements IReader * Take array of tokens together with additional data for formula and return human readable formula * * @param array $tokens - * @param array $additionalData Additional binary data going with the formula - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas + * @param string $additionalData Additional binary data going with the formula * @return string Human readable formula */ private function createFormulaFromTokens($tokens, $additionalData) @@ -5374,7 +5373,7 @@ class Excel5 extends BaseReader implements IReader unset($space2, $space3, $space4, $space5); break; case 'tArray': // array constant - $constantArray = self::_readBIFF8ConstantArray($additionalData); + $constantArray = self::readBIFF8ConstantArray($additionalData); $formulaStrings[] = $space1 . $space0 . $constantArray['value']; $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data unset($space0, $space1); @@ -5419,7 +5418,7 @@ class Excel5 extends BaseReader implements IReader /** * Fetch next token from binary formula data * - * @param string Formula data + * @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 @@ -7118,7 +7117,7 @@ class Excel5 extends BaseReader implements IReader for ($r = 1; $r <= $nr + 1; ++$r) { $items = []; for ($c = 1; $c <= $nc + 1; ++$c) { - $constant = self::_readBIFF8Constant($arrayData); + $constant = self::readBIFF8Constant($arrayData); $items[] = $constant['value']; $arrayData = substr($arrayData, $constant['size']); $size += $constant['size']; @@ -7372,6 +7371,9 @@ class Excel5 extends BaseReader implements IReader return $value; } + /** + * @param int $rknum + */ private static function getIEEE754($rknum) { if (($rknum & 0x02) != 0) { @@ -7405,7 +7407,7 @@ class Excel5 extends BaseReader implements IReader * @param bool $compressed * @return string */ - private static function encodeUTF16($string, $compressed = '') + private static function encodeUTF16($string, $compressed = false) { if ($compressed) { $string = self::uncompressByteString($string); diff --git a/src/PhpSpreadsheet/Reader/Excel5/Color.php b/src/PhpSpreadsheet/Reader/Excel5/Color.php index 7b042c4b..18656a8d 100644 --- a/src/PhpSpreadsheet/Reader/Excel5/Color.php +++ b/src/PhpSpreadsheet/Reader/Excel5/Color.php @@ -9,6 +9,7 @@ class Color * * @param int $color Indexed color * @param array $palette Color palette + * @param int $version * @return array RGB color value, example: array('rgb' => 'FF0000') */ public static function map($color, $palette, $version) diff --git a/src/PhpSpreadsheet/Reader/Gnumeric.php b/src/PhpSpreadsheet/Reader/Gnumeric.php index 0de29851..c5df14f2 100644 --- a/src/PhpSpreadsheet/Reader/Gnumeric.php +++ b/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -165,6 +165,9 @@ class Gnumeric extends BaseReader implements IReader return $worksheetInfo; } + /** + * @param string $filename + */ private function gzfileGetContents($filename) { $file = @gzopen($filename, 'rb'); @@ -201,7 +204,7 @@ class Gnumeric extends BaseReader implements IReader * @param string $pFilename * @param Spreadsheet $spreadsheet * @throws Exception - * @return PhpSpreadsheet + * @return Spreadsheet */ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) { diff --git a/src/PhpSpreadsheet/Reader/HTML.php b/src/PhpSpreadsheet/Reader/HTML.php index 668af2b5..de49a858 100644 --- a/src/PhpSpreadsheet/Reader/HTML.php +++ b/src/PhpSpreadsheet/Reader/HTML.php @@ -222,7 +222,14 @@ class HTML extends BaseReader implements IReader $cellContent = (string) ''; } - protected function processDomElement(DOMNode $element, $sheet, &$row, &$column, &$cellContent, $format = null) + /** + * @param DOMNode $element + * @param \PhpSpreadsheet\Worksheet $sheet + * @param int $row + * @param string $column + * @param string $cellContent + */ + protected function processDomElement(DOMNode $element, \PhpSpreadsheet\Worksheet $sheet, &$row, &$column, &$cellContent) { foreach ($element->childNodes as $child) { if ($child instanceof DOMText) { diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php index 1998c8ac..1a6858ff 100644 --- a/src/PhpSpreadsheet/Shared/Date.php +++ b/src/PhpSpreadsheet/Shared/Date.php @@ -278,7 +278,7 @@ class Date * @param int $hours * @param int $minutes * @param int $seconds - * @return int Excel date/time value + * @return float Excel date/time value */ public static function formattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0) { diff --git a/src/PhpSpreadsheet/Shared/Drawing.php b/src/PhpSpreadsheet/Shared/Drawing.php index 597f9ddc..6afbdf89 100644 --- a/src/PhpSpreadsheet/Shared/Drawing.php +++ b/src/PhpSpreadsheet/Shared/Drawing.php @@ -111,7 +111,7 @@ class Drawing * Convert pixels to points * * @param int $pValue Value in pixels - * @return int Value in points + * @return float Value in points */ public static function pixelsToPoints($pValue = 0) { @@ -163,7 +163,7 @@ class Drawing * Create a new image from file. By alexander at alexauto dot nl * * @link http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214 - * @param string $filename Path to Windows DIB (BMP) image + * @param string $p_sFile Path to Windows DIB (BMP) image * @return resource */ public static function imagecreatefrombmp($p_sFile) diff --git a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php index e773d24f..bd1e396c 100644 --- a/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php +++ b/src/PhpSpreadsheet/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php @@ -57,7 +57,7 @@ class SpContainer /** * Shape index (usually group shape has index 0, and the rest: 1,2,3...) * - * @var bool + * @var int */ private $spId; @@ -329,7 +329,7 @@ class SpContainer /** * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width * - * @param int $startOffsetX + * @param int $endOffsetX */ public function setEndOffsetX($endOffsetX = 0) { diff --git a/src/PhpSpreadsheet/Shared/Font.php b/src/PhpSpreadsheet/Shared/Font.php index 363dc806..8c690066 100644 --- a/src/PhpSpreadsheet/Shared/Font.php +++ b/src/PhpSpreadsheet/Shared/Font.php @@ -407,7 +407,7 @@ class Font * Calculate an (approximate) pixel size, based on centimeter size * * @param int $sizeInCm Font size (in centimeters) - * @return int Size (in pixels) + * @return float Size (in pixels) */ public static function centimeterSizeToPixels($sizeInCm = 1) { @@ -417,7 +417,7 @@ class Font /** * Returns the font path given the font * - * @param \PhpSpreadsheet\Style\Font + * @param \PhpSpreadsheet\Style\Font $font * @return string Path to TrueType font file */ public static function getTrueTypeFontFileFromFont($font) diff --git a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php index bff3c6f9..d5cbf950 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php +++ b/src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php @@ -57,7 +57,7 @@ class LUDecomposition /** * LU Decomposition constructor. * - * @param $A Rectangular matrix + * @param Matrix $A Rectangular matrix * @return Structure to access L, U and piv. */ public function __construct($A) @@ -123,7 +123,7 @@ class LUDecomposition /** * Get lower triangular factor. * - * @return array Lower triangular factor + * @return Matrix Lower triangular factor */ public function getL() { @@ -145,7 +145,7 @@ class LUDecomposition /** * Get upper triangular factor. * - * @return array Upper triangular factor + * @return Matrix Upper triangular factor */ public function getU() { @@ -185,7 +185,7 @@ class LUDecomposition /** * Is the matrix nonsingular? * - * @return true if U, and hence A, is nonsingular. + * @return bool true if U, and hence A, is nonsingular. */ public function isNonsingular() { diff --git a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php index 028be1a3..ab1c5157 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/Matrix.php +++ b/src/PhpSpreadsheet/Shared/JAMA/Matrix.php @@ -392,8 +392,8 @@ class Matrix * getMatrixByCol * * Get a submatrix by column index/range - * @param int $i0 Initial column index - * @param int $iF Final column index + * @param int $j0 Initial column index + * @param int $jF Final column index * @return Matrix Submatrix */ public function getMatrixByCol($j0 = null, $jF = null) diff --git a/src/PhpSpreadsheet/Shared/JAMA/utils/Error.php b/src/PhpSpreadsheet/Shared/JAMA/utils/Error.php index 37440487..3ea82186 100644 --- a/src/PhpSpreadsheet/Shared/JAMA/utils/Error.php +++ b/src/PhpSpreadsheet/Shared/JAMA/utils/Error.php @@ -62,7 +62,7 @@ $error['EN'][ROW_LENGTH_EXCEPTION] = 'All rows must have the same length.'; /** * Custom error handler - * @param int $num Error number + * @param int $errorNumber Error number */ function JAMAError($errorNumber = null) { diff --git a/src/PhpSpreadsheet/Shared/OLE.php b/src/PhpSpreadsheet/Shared/OLE.php index 7f28c730..6ab91c62 100644 --- a/src/PhpSpreadsheet/Shared/OLE.php +++ b/src/PhpSpreadsheet/Shared/OLE.php @@ -93,7 +93,7 @@ class OLE * @acces public * @param string $file * @throws \PhpSpreadsheet\Reader\Exception - * @return mixed true on success, PEAR_Error on failure + * @return bool true on success, PEAR_Error on failure */ public function read($file) { @@ -222,7 +222,7 @@ class OLE /** * Reads a signed char. - * @param resource file handle + * @param resource $fh file handle * @return int */ private static function _readInt1($fh) @@ -234,7 +234,7 @@ class OLE /** * Reads an unsigned short (2 octets). - * @param resource file handle + * @param resource $fh file handle * @return int */ private static function _readInt2($fh) @@ -246,7 +246,7 @@ class OLE /** * Reads an unsigned long (4 octets). - * @param resource file handle + * @param resource $fh file handle * @return int */ private static function _readInt4($fh) @@ -260,8 +260,8 @@ class OLE * Gets information about all PPS's on the OLE container from the PPS WK's * creates an OLE_PPS object for each one. * - * @param int the block id of the first block - * @return mixed true on success, PEAR_Error on failure + * @param int $blockId the block id of the first block + * @return bool true on success, PEAR_Error on failure */ public function _readPpsWks($blockId) { diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php index eddbcacc..793d3101 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS/Root.php @@ -39,6 +39,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS /** * @param int $time_1st A timestamp * @param int $time_2nd A timestamp + * @param File[] $raChild */ public function __construct($time_1st, $time_2nd, $raChild) { @@ -56,7 +57,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS * * @param string|resource $filename The name of the file or stream where to save the OLE container. * @throws \PhpSpreadsheet\Writer\Exception - * @return mixed true on success + * @return bool true on success */ public function save($filename) { @@ -116,7 +117,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS * Calculate some numbers * * @param array $raList Reference to an array of PPS's - * @return array The array of numbers + * @return float[] The array of numbers */ public function _calcSize(&$raList) { @@ -154,7 +155,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS * * @param int $i2 The argument * @see save() - * @return int + * @return float */ private static function adjust2($i2) { diff --git a/src/PhpSpreadsheet/Shared/OLERead.php b/src/PhpSpreadsheet/Shared/OLERead.php index d46ddf91..a9d468eb 100644 --- a/src/PhpSpreadsheet/Shared/OLERead.php +++ b/src/PhpSpreadsheet/Shared/OLERead.php @@ -168,6 +168,7 @@ class OLERead /** * Extract binary stream data * + * @param int $stream * @return string */ public function getStream($stream) diff --git a/src/PhpSpreadsheet/Shared/PCLZip/PclZip.php b/src/PhpSpreadsheet/Shared/PCLZip/PclZip.php index 5d8b2534..33f70dfc 100644 --- a/src/PhpSpreadsheet/Shared/PCLZip/PclZip.php +++ b/src/PhpSpreadsheet/Shared/PCLZip/PclZip.php @@ -215,6 +215,10 @@ class PclZip // Note that no real action is taken, if the archive does not exist it is not // created. Use create() for that. // -------------------------------------------------------------------------------- + + /** + * @param string $p_zipname + */ public function __construct($p_zipname) { diff --git a/src/PhpSpreadsheet/Shared/Trend/BestFit.php b/src/PhpSpreadsheet/Shared/Trend/BestFit.php index 07fc444f..892c2800 100644 --- a/src/PhpSpreadsheet/Shared/Trend/BestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/BestFit.php @@ -119,7 +119,7 @@ class BestFit * Return the Y-Value for a specified value of X * * @param float $xValue X-Value - * @return float Y-Value + * @return bool Y-Value */ public function getValueOfYForX($xValue) { @@ -130,7 +130,7 @@ class BestFit * Return the X-Value for a specified value of Y * * @param float $yValue Y-Value - * @return float X-Value + * @return bool X-Value */ public function getValueOfXForY($yValue) { @@ -151,7 +151,7 @@ class BestFit * Return the Equation of the best-fit line * * @param int $dp Number of places of decimal precision to display - * @return string + * @return bool */ public function getEquation($dp = 0) { @@ -370,7 +370,12 @@ class BestFit } } - protected function leastSquareFit($yValues, $xValues, $const) + /** + * @param float[] $yValues + * @param float[] $xValues + * @param bool $const + */ + protected function leastSquareFit(array $yValues, array $xValues, $const) { // calculate sums $x_sum = array_sum($xValues); diff --git a/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php b/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php index 281e0b93..313c321f 100644 --- a/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php @@ -74,7 +74,7 @@ class ExponentialBestFit extends BestFit * Return the Slope of the line * * @param int $dp Number of places of decimal precision to display - * @return string + * @return float **/ public function getSlope($dp = 0) { @@ -89,7 +89,7 @@ class ExponentialBestFit extends BestFit * Return the Value of X where it intersects Y = 0 * * @param int $dp Number of places of decimal precision to display - * @return string + * @return float **/ public function getIntersect($dp = 0) { diff --git a/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php b/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php index b6be976e..42f25a0f 100644 --- a/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php +++ b/src/PhpSpreadsheet/Shared/Trend/PowerBestFit.php @@ -76,7 +76,7 @@ class PowerBestFit extends BestFit * Return the Value of X where it intersects Y = 0 * * @param int $dp Number of places of decimal precision to display - * @return string + * @return float **/ public function getIntersect($dp = 0) { diff --git a/src/PhpSpreadsheet/Shared/XMLWriter.php b/src/PhpSpreadsheet/Shared/XMLWriter.php index f0568809..bf3ee5df 100644 --- a/src/PhpSpreadsheet/Shared/XMLWriter.php +++ b/src/PhpSpreadsheet/Shared/XMLWriter.php @@ -107,7 +107,7 @@ class XMLWriter extends \XMLWriter * Fallback method for writeRaw, introduced in PHP 5.2 * * @param string $text - * @return string + * @return bool */ public function writeRawData($text) { diff --git a/src/PhpSpreadsheet/Shared/ZipArchive.php b/src/PhpSpreadsheet/Shared/ZipArchive.php index 4ea74071..ea77d255 100644 --- a/src/PhpSpreadsheet/Shared/ZipArchive.php +++ b/src/PhpSpreadsheet/Shared/ZipArchive.php @@ -147,6 +147,9 @@ class ZipArchive return $contents; } + /** + * @param int $index + */ public function getFromIndex($index) { $extracted = $this->zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING); diff --git a/src/PhpSpreadsheet/Shared/ZipStreamWrapper.php b/src/PhpSpreadsheet/Shared/ZipStreamWrapper.php index 7d4fb7aa..b20412a7 100644 --- a/src/PhpSpreadsheet/Shared/ZipStreamWrapper.php +++ b/src/PhpSpreadsheet/Shared/ZipStreamWrapper.php @@ -99,7 +99,7 @@ class ZipStreamWrapper /** * Implements support for fstat(). * - * @return bool + * @return string */ public function statName() { @@ -109,7 +109,7 @@ class ZipStreamWrapper /** * Implements support for fstat(). * - * @return bool + * @return string */ public function url_stat() // @codingStandardsIgnoreLine { diff --git a/src/PhpSpreadsheet/Spreadsheet.php b/src/PhpSpreadsheet/Spreadsheet.php index afe7597d..583be0c5 100644 --- a/src/PhpSpreadsheet/Spreadsheet.php +++ b/src/PhpSpreadsheet/Spreadsheet.php @@ -136,7 +136,7 @@ class Spreadsheet /** * The workbook has macros ? * - * @return true if workbook has macros, false if not + * @return bool */ public function hasMacros() { @@ -177,7 +177,7 @@ class Spreadsheet /** * Set the macros certificate * - * @param string|null $Certificate + * @param string|null $certificate */ public function setMacrosCertificate($certificate = null) { @@ -230,6 +230,7 @@ class Spreadsheet * retrieve ribbon XML Data * * return string|null|array + * @return string */ public function getRibbonXMLData($what = 'all') //we need some constants here... { @@ -303,7 +304,7 @@ class Spreadsheet /** * This workbook have a custom UI ? * - * @return true|false + * @return bool */ public function hasRibbon() { @@ -313,7 +314,7 @@ class Spreadsheet /** * This workbook have additionnal object for the ribbon ? * - * @return true|false + * @return bool */ public function hasRibbonBinObjects() { @@ -609,7 +610,7 @@ class Spreadsheet * * @param Worksheet $pSheet * @throws Exception - * @return Sheet index + * @return int index */ public function getIndex(Worksheet $pSheet) { @@ -628,7 +629,7 @@ class Spreadsheet * @param string $sheetName Sheet name to modify index for * @param int $newIndex New index for the sheet * @throws Exception - * @return New sheet index + * @return int New sheet index */ public function setIndexByName($sheetName, $newIndex) { @@ -772,7 +773,7 @@ class Spreadsheet * Add named range * * @param NamedRange $namedRange - * @return PhpSpreadsheet + * @return bool */ public function addNamedRange(NamedRange $namedRange) { @@ -818,7 +819,7 @@ class Spreadsheet * * @param string $namedRange * @param Worksheet|null $pSheet Scope: use null for global scope. - * @return PhpSpreadsheet + * @return Spreadsheet */ public function removeNamedRange($namedRange, Worksheet $pSheet = null) { @@ -838,7 +839,7 @@ class Spreadsheet /** * Get worksheet iterator * - * @return WorksheetIterator + * @return Worksheet\Iterator */ public function getWorksheetIterator() { @@ -848,7 +849,7 @@ class Spreadsheet /** * Copy workbook (!= clone!) * - * @return PhpSpreadsheet + * @return Spreadsheet */ public function copy() { diff --git a/src/PhpSpreadsheet/Style.php b/src/PhpSpreadsheet/Style.php index db57e1cf..5dd7fce2 100644 --- a/src/PhpSpreadsheet/Style.php +++ b/src/PhpSpreadsheet/Style.php @@ -147,7 +147,7 @@ class Style extends Style\Supervisor implements IComparable /** * Get parent. Only used for style supervisor * - * @return PhpSpreadsheet + * @return Spreadsheet */ public function getParent() { diff --git a/src/PhpSpreadsheet/Style/Conditional.php b/src/PhpSpreadsheet/Style/Conditional.php index d1523720..03c213e7 100644 --- a/src/PhpSpreadsheet/Style/Conditional.php +++ b/src/PhpSpreadsheet/Style/Conditional.php @@ -49,14 +49,14 @@ class Conditional implements \PhpSpreadsheet\IComparable /** * Condition type * - * @var int + * @var string */ private $conditionType; /** * Operator type * - * @var int + * @var string */ private $operatorType; diff --git a/src/PhpSpreadsheet/Worksheet.php b/src/PhpSpreadsheet/Worksheet.php index 9d391ac4..27d2f108 100644 --- a/src/PhpSpreadsheet/Worksheet.php +++ b/src/PhpSpreadsheet/Worksheet.php @@ -328,7 +328,7 @@ class Worksheet implements IComparable /** * Create a new worksheet * - * @param Spreadsheet $Parent + * @param Spreadsheet $parent * @param string $pTitle */ public function __construct(Spreadsheet $parent = null, $pTitle = 'Worksheet') @@ -767,7 +767,7 @@ class Worksheet implements IComparable /** * Get parent * - * @return PhpSpreadsheet + * @return Spreadsheet */ public function getParent() { @@ -1099,8 +1099,8 @@ class Worksheet implements IComparable /** * Set a cell value by using numeric cell coordinates * - * @param string $pColumn Numeric column coordinate of the cell (A = 0) - * @param string $pRow Numeric row coordinate of the cell + * @param int $pColumn Numeric column coordinate of the cell (A = 0) + * @param int $pRow Numeric row coordinate of the cell * @param mixed $pValue Value of the cell * @param bool $returnCell Return the worksheet (false, default) or the cell (true) * @return Worksheet|Cell Depending on the last parameter being specified @@ -1132,8 +1132,8 @@ class Worksheet implements IComparable /** * Set a cell value by using numeric cell coordinates * - * @param string $pColumn Numeric column coordinate of the cell - * @param string $pRow Numeric row coordinate of the cell + * @param int $pColumn Numeric column coordinate of the cell + * @param int $pRow Numeric row coordinate of the cell * @param mixed $pValue Value of the cell * @param string $pDataType Explicit data type * @param bool $returnCell Return the worksheet (false, default) or the cell (true) @@ -1367,7 +1367,7 @@ class Worksheet implements IComparable /** * Get column dimension at a specific column by using numeric cell coordinates * - * @param string $pColumn Numeric column coordinate of the cell + * @param int $pColumn Numeric column coordinate of the cell * @return Worksheet\ColumnDimension */ public function getColumnDimensionByColumn($pColumn = 0) @@ -1492,7 +1492,7 @@ class Worksheet implements IComparable /** * Set conditional styles * - * @param $pCoordinate string E.g. 'A1' + * @param string $pCoordinate eg: 'A1' * @param $pValue Style\Conditional[] * @return Worksheet */ diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/src/PhpSpreadsheet/Worksheet/AutoFilter.php index 7aae925c..41ba5225 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -462,7 +462,7 @@ class AutoFilter * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation * * @param string $dynamicRuleType - * @param AutoFilter\Column &$filterColumn + * @param AutoFilter\Column $filterColumn * @return mixed[] */ private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) diff --git a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php index b0c8c49f..8dd5a682 100644 --- a/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php +++ b/src/PhpSpreadsheet/Worksheet/AutoFilter/Column/Rule.php @@ -281,7 +281,7 @@ class Rule * * @param string $pRuleType * @throws \PhpSpreadsheet\Exception - * @return \PhpSpreadsheet\Worksheet\AutoFilter\Column + * @return Rule */ public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER) { diff --git a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php index a6a4714f..8ce90f3c 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnCellIterator.php @@ -135,7 +135,7 @@ class ColumnCellIterator extends CellIterator implements \Iterator /** * Return the current cell in this worksheet column * - * @return Row + * @return null|\PhpSpreadsheet\Cell */ public function current() { diff --git a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php index 4f7bc3c7..93000628 100644 --- a/src/PhpSpreadsheet/Worksheet/ColumnDimension.php +++ b/src/PhpSpreadsheet/Worksheet/ColumnDimension.php @@ -31,7 +31,7 @@ class ColumnDimension extends Dimension /** * Column index * - * @var int + * @var string */ private $columnIndex; diff --git a/src/PhpSpreadsheet/Worksheet/Dimension.php b/src/PhpSpreadsheet/Worksheet/Dimension.php index d5b638e6..aaca274a 100644 --- a/src/PhpSpreadsheet/Worksheet/Dimension.php +++ b/src/PhpSpreadsheet/Worksheet/Dimension.php @@ -59,7 +59,7 @@ abstract class Dimension /** * Create a new Dimension * - * @param int $pIndex Numeric row index + * @param int $initialValue Numeric row index */ public function __construct($initialValue = null) { diff --git a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php index 037eee47..cda60fc5 100644 --- a/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php +++ b/src/PhpSpreadsheet/Worksheet/Drawing/Shadow.php @@ -234,7 +234,7 @@ class Shadow implements \PhpSpreadsheet\IComparable /** * Set Color * - * @param \PhpSpreadsheet\Style_Color $pValue + * @param \PhpSpreadsheet\Style\Color $pValue * @throws \PhpSpreadsheet\Exception * @return Shadow */ diff --git a/src/PhpSpreadsheet/Worksheet/PageSetup.php b/src/PhpSpreadsheet/Worksheet/PageSetup.php index 47da4257..8ddd1fa4 100644 --- a/src/PhpSpreadsheet/Worksheet/PageSetup.php +++ b/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -812,7 +812,7 @@ class PageSetup * Set first page number * * @param int $value - * @return HeaderFooter + * @return PageSetup */ public function setFirstPageNumber($value = null) { @@ -824,7 +824,7 @@ class PageSetup /** * Reset first page number * - * @return HeaderFooter + * @return PageSetup */ public function resetFirstPageNumber() { diff --git a/src/PhpSpreadsheet/Writer/CSV.php b/src/PhpSpreadsheet/Writer/CSV.php index c304d564..20ebdc17 100644 --- a/src/PhpSpreadsheet/Writer/CSV.php +++ b/src/PhpSpreadsheet/Writer/CSV.php @@ -318,7 +318,7 @@ class CSV extends BaseWriter implements IWriter /** * Write line to CSV file * - * @param mixed $pFileHandle PHP filehandle + * @param resource $pFileHandle PHP filehandle * @param array $pValues Array containing values in a row * @throws Exception */ diff --git a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php index add25449..fd25afbf 100644 --- a/src/PhpSpreadsheet/Writer/Excel2007/Chart.php +++ b/src/PhpSpreadsheet/Writer/Excel2007/Chart.php @@ -1260,11 +1260,10 @@ class Chart extends WriterPart * @param \PhpSpreadsheet\Shared\XMLWriter $objWriter XML Writer * @param string $groupType Type of plot for dataseries * @param string $dataType Datatype of series values - * @param \PhpSpreadsheet\Worksheet $pSheet * * @throws \PhpSpreadsheet\Writer\Exception */ - private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType = 'str') + private function writePlotSeriesValues($plotSeriesValues, \PhpSpreadsheet\Shared\XMLWriter $objWriter, $groupType, $dataType = 'str') { if (is_null($plotSeriesValues)) { return; diff --git a/src/PhpSpreadsheet/Writer/Excel5/Escher.php b/src/PhpSpreadsheet/Writer/Excel5/Escher.php index 7ee4d930..2a147add 100644 --- a/src/PhpSpreadsheet/Writer/Excel5/Escher.php +++ b/src/PhpSpreadsheet/Writer/Excel5/Escher.php @@ -64,6 +64,7 @@ class Escher /** * Process the object to be written + * @return string */ public function close() { diff --git a/src/PhpSpreadsheet/Writer/Excel5/Workbook.php b/src/PhpSpreadsheet/Writer/Excel5/Workbook.php index c4b10382..3b360d58 100644 --- a/src/PhpSpreadsheet/Writer/Excel5/Workbook.php +++ b/src/PhpSpreadsheet/Writer/Excel5/Workbook.php @@ -186,13 +186,13 @@ class Workbook extends BIFFwriter * Class constructor * * @param \PhpSpreadsheet\Spreadsheet $spreadsheet The Workbook - * @param int &$str_total Total number of strings - * @param int &$str_unique Total number of unique strings - * @param array &$str_table String Table - * @param array &$colors Colour Table - * @param mixed $parser The formula parser created for the Workbook + * @param int $str_total Total number of strings + * @param int $str_unique Total number of unique strings + * @param array $str_table String Table + * @param array $colors Colour Table + * @param Parser $parser The formula parser created for the Workbook */ - public function __construct(\PhpSpreadsheet\Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, $parser) + public function __construct(\PhpSpreadsheet\Spreadsheet $spreadsheet, &$str_total, &$str_unique, &$str_table, &$colors, Parser $parser) { // It needs to call its parent's constructor explicitly parent::__construct(); diff --git a/src/PhpSpreadsheet/Writer/Excel5/Worksheet.php b/src/PhpSpreadsheet/Writer/Excel5/Worksheet.php index 1ba09865..754a02ff 100644 --- a/src/PhpSpreadsheet/Writer/Excel5/Worksheet.php +++ b/src/PhpSpreadsheet/Writer/Excel5/Worksheet.php @@ -650,7 +650,7 @@ class Worksheet extends BIFFwriter * @param int $row Row index (0-based) * @param int $col Column index (0-based) * @param string $str The string - * @param mixed $xfIndex The XF format index for the cell + * @param int $xfIndex The XF format index for the cell * @param array $arrcRun Index to Font record and characters beginning */ private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) diff --git a/src/PhpSpreadsheet/Writer/HTML.php b/src/PhpSpreadsheet/Writer/HTML.php index 57cfb58b..3fa888b2 100644 --- a/src/PhpSpreadsheet/Writer/HTML.php +++ b/src/PhpSpreadsheet/Writer/HTML.php @@ -132,7 +132,7 @@ class HTML extends BaseWriter implements IWriter /** * Create a new HTML * - * @param Spreadsheet $spreadsheet + * @param \PhpSpreadsheet\Spreadsheet $spreadsheet */ public function __construct(Spreadsheet $spreadsheet) { @@ -1443,7 +1443,7 @@ class HTML extends BaseWriter implements IWriter * @param bool $pValue * @return HTML */ - public function setEmbedImages($pValue = '.') + public function setEmbedImages($pValue = true) { $this->embedImages = $pValue; diff --git a/src/PhpSpreadsheet/Writer/OpenDocument.php b/src/PhpSpreadsheet/Writer/OpenDocument.php index 7f1bdc71..57c2821e 100644 --- a/src/PhpSpreadsheet/Writer/OpenDocument.php +++ b/src/PhpSpreadsheet/Writer/OpenDocument.php @@ -70,7 +70,7 @@ class OpenDocument extends BaseWriter implements IWriter * Get writer part * * @param string $pPartName Writer part name - * @return \PhpSpreadsheet\Writer\Excel2007\WriterPart + * @return OpenDocument\WriterPart|null */ public function getWriterPart($pPartName = '') {