Apply Scrutinizer patches for doc comments

This commit is contained in:
Adrien Crivelli 2016-08-26 13:40:01 +09:00
parent cb0930c016
commit b42bafcfe7
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
60 changed files with 203 additions and 145 deletions

View File

@ -122,7 +122,7 @@ class CachedObjectStorageFactory
/** /**
* Return the current cache storage class * Return the current cache storage class
* *
* @return \CachedObjectStorage\ICache|null * @return string
**/ **/
public static function getCacheStorageClass() public static function getCacheStorageClass()
{ {

View File

@ -2350,6 +2350,10 @@ class Calculation
return $formula; return $formula;
} }
/**
* @param string $fromSeparator
* @param string $toSeparator
*/
private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator) private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator)
{ {
// Convert any Excel function names to the required language // Convert any Excel function names to the required language
@ -2670,6 +2674,9 @@ class Calculation
return false; return false;
} }
/**
* @param string $cellReference
*/
public function saveValueToCache($cellReference, $cellValue) public function saveValueToCache($cellReference, $cellValue)
{ {
if ($this->calculationCacheEnabled) { 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 * 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 * @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) 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) * Format type and details of an operand for display in the log (based on operand type)
* *
* @param mixed $value First matrix operand * @param mixed $value First matrix operand
* @return mixed * @return string|null
*/ */
private function showTypeDetails($value) private function showTypeDetails($value)
{ {
@ -3430,6 +3437,10 @@ class Calculation
} }
// evaluate postfix notation // evaluate postfix notation
/**
* @param string $cellID
*/
private function processTokenStack($tokens, $cellID = null, Cell $pCell = null) private function processTokenStack($tokens, $cellID = null, Cell $pCell = null)
{ {
if ($tokens == false) { if ($tokens == false) {
@ -4016,6 +4027,9 @@ class Calculation
return strcmp($inversedStr1, $inversedStr2); return strcmp($inversedStr1, $inversedStr2);
} }
/**
* @param string $matrixFunction
*/
private function executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, &$stack) private function executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, &$stack)
{ {
// Validate the two operands // Validate the two operands

View File

@ -918,10 +918,6 @@ class DateTime
* PHP DateTime object, or a standard date string * PHP DateTime object, or a standard date string
* @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string * 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 * @return int Interval between the dates
*/ */
public static function NETWORKDAYS($startDate, $endDate) 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 * @param int $endDays The number of nonweekend and nonholiday days before or after
* startDate. A positive value for days yields a future date; a * startDate. A positive value for days yields a future date; a
* negative value yields a past date. * 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, * @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 * depending on the value of the ReturnDateType flag
*/ */
@ -1143,7 +1135,7 @@ class DateTime
* Excel Function: * Excel Function:
* WEEKDAY(dateValue[,style]) * 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 * PHP DateTime object, or a standard date string
* @param int $style A number that determines the type of return value * @param int $style A number that determines the type of return value
* 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). * 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), * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer),
* PHP DateTime object, or a standard date string * 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. * 1 or omitted Week begins on Sunday.
* 2 Week begins on Monday. * 2 Week begins on Monday.
* @return int Week Number * @return int Week Number

View File

@ -406,7 +406,7 @@ class Financial
* date when the security is traded to the buyer. * date when the security is traded to the buyer.
* @param mixed maturity The security's maturity date. * @param mixed maturity The security's maturity date.
* The maturity date is the date when the security expires. * 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: * Valid frequency values are:
* 1 Annual * 1 Annual
* 2 Semi-Annual * 2 Semi-Annual
@ -478,6 +478,7 @@ class Financial
* 2 Actual/360 * 2 Actual/360
* 3 Actual/365 * 3 Actual/365
* 4 European 30/360 * 4 European 30/360
* @param int $frequency
* @return float * @return float
*/ */
public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0) public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0)

View File

@ -128,7 +128,7 @@ class FormulaParser
/** /**
* Get Token count * Get Token count
* *
* @return string * @return int
*/ */
public function getTokenCount() public function getTokenCount()
{ {

View File

@ -384,7 +384,7 @@ class Functions
* IS_EVEN * IS_EVEN
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return bool * @return string|bool
*/ */
public static function isEven($value = null) public static function isEven($value = null)
{ {
@ -403,7 +403,7 @@ class Functions
* IS_ODD * IS_ODD
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @return bool * @return string|bool
*/ */
public static function isOdd($value = null) public static function isOdd($value = null)
{ {

View File

@ -76,7 +76,7 @@ class Logical
* *
* @category Logical Functions * @category Logical Functions
* @param mixed $arg,... Data values * @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() public static function logicalAnd()
{ {
@ -131,7 +131,7 @@ class Logical
* *
* @category Logical Functions * @category Logical Functions
* @param mixed $arg,... Data values * @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() public static function logicalOr()
{ {
@ -185,7 +185,7 @@ class Logical
* *
* @category Logical Functions * @category Logical Functions
* @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE * @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) public static function NOT($logical = false)
{ {

View File

@ -882,7 +882,6 @@ class Statistical
* @param float $value Value at which you want to evaluate the distribution * @param float $value Value at which you want to evaluate the distribution
* @param float $alpha Parameter to the distribution * @param float $alpha Parameter to the distribution
* @param float $beta Parameter to the distribution * @param float $beta Parameter to the distribution
* @param bool $cumulative
* @return float * @return float
*/ */
public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) 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 $beta Parameter to the distribution
* @param float $rMin Minimum value * @param float $rMin Minimum value
* @param float $rMax Maximum value * @param float $rMax Maximum value
* @param bool $cumulative
* @return float * @return float
*/ */
public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) 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. * 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 $mean Mean Value
* @param float $stdDev Standard Deviation * @param float $stdDev Standard Deviation
* @return float * @return float
@ -3668,7 +3666,6 @@ class Statistical
* @param float $dataSet * @param float $dataSet
* @param float $m0 Alpha Parameter * @param float $m0 Alpha Parameter
* @param float $sigma Beta Parameter * @param float $sigma Beta Parameter
* @param bool $cumulative
* @return float * @return float
*/ */
public static function ZTEST($dataSet, $m0, $sigma = null) public static function ZTEST($dataSet, $m0, $sigma = null)

View File

@ -54,7 +54,7 @@ class TextData
* CHARACTER * CHARACTER
* *
* @param string $character Value * @param string $character Value
* @return int * @return string
*/ */
public static function CHARACTER($character) public static function CHARACTER($character)
{ {
@ -294,7 +294,7 @@ class TextData
* @param mixed $value Value to check * @param mixed $value Value to check
* @param int $decimals * @param int $decimals
* @param bool $no_commas * @param bool $no_commas
* @return bool * @return string
*/ */
public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false) public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false)
{ {
@ -409,7 +409,7 @@ class TextData
* STRINGLENGTH * STRINGLENGTH
* *
* @param string $value Value * @param string $value Value
* @return string * @return int
*/ */
public static function STRINGLENGTH($value = '') public static function STRINGLENGTH($value = '')
{ {
@ -556,7 +556,7 @@ class TextData
* RETURNSTRING * RETURNSTRING
* *
* @param mixed $testValue Value to check * @param mixed $testValue Value to check
* @return bool * @return string|null
*/ */
public static function RETURNSTRING($testValue = '') public static function RETURNSTRING($testValue = '')
{ {
@ -574,7 +574,7 @@ class TextData
* *
* @param mixed $value Value to check * @param mixed $value Value to check
* @param string $format Format mask to use * @param string $format Format mask to use
* @return bool * @return string
*/ */
public static function TEXTFORMAT($value, $format) public static function TEXTFORMAT($value, $format)
{ {

View File

@ -575,7 +575,7 @@ class Cell
* *
* @param string $pCoordinateString * @param string $pCoordinateString
* @throws Exception * @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') public static function coordinateFromString($pCoordinateString = 'A1')
{ {

View File

@ -326,7 +326,7 @@ class Axis extends Properties
/** /**
* Set Shadow Properties * Set Shadow Properties
* *
* @param int $shadow_presets * @param int $sh_presets
* @param string $sh_color_value * @param string $sh_color_value
* @param string $sh_color_type * @param string $sh_color_type
* @param string $sh_color_alpha * @param string $sh_color_alpha
@ -458,12 +458,7 @@ class Axis extends Properties
} }
/** /**
* Get Glow Property * Get Shadow Property
*
* @param float $size
* @param string $color_value
* @param int $color_alpha
* @param string $color_type
*/ */
public function getShadowProperty($elements) public function getShadowProperty($elements)
{ {

View File

@ -70,14 +70,14 @@ class DataSeries
/** /**
* Plot Grouping Type * Plot Grouping Type
* *
* @var bool * @var string
*/ */
private $plotGrouping; private $plotGrouping;
/** /**
* Plot Direction * Plot Direction
* *
* @var bool * @var string
*/ */
private $plotDirection; private $plotDirection;
@ -112,7 +112,7 @@ class DataSeries
/** /**
* Smooth Line * Smooth Line
* *
* @var string * @var bool
*/ */
private $smoothLine; private $smoothLine;

View File

@ -80,6 +80,7 @@ class DataSeriesValues
/** /**
* Create a new DataSeriesValues object * 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) 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 * Identify if the Data Series is a multi-level or a simple series
* *
* @return bool * @return bool|null
*/ */
public function isMultiLevelSeries() public function isMultiLevelSeries()
{ {
@ -223,7 +224,7 @@ class DataSeriesValues
/** /**
* Return the level count of a multi-level Data Series * Return the level count of a multi-level Data Series
* *
* @return bool * @return int
*/ */
public function multiLevelCount() public function multiLevelCount()
{ {

View File

@ -174,6 +174,7 @@ class Layout
* Set Layout Target * Set Layout Target
* *
* @param Layout Target $value * @param Layout Target $value
* @param string $value
* @return Layout * @return Layout
*/ */
public function setLayoutTarget($value) public function setLayoutTarget($value)

View File

@ -115,11 +115,17 @@ abstract class Properties
SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22, SHADOW_PRESETS_PERSPECTIVE_LOWER_RIGHT = 22,
SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23; SHADOW_PRESETS_PERSPECTIVE_LOWER_LEFT = 23;
/**
* @param float $width
*/
protected function getExcelPointsWidth($width) protected function getExcelPointsWidth($width)
{ {
return $width * 12700; return $width * 12700;
} }
/**
* @param float $angle
*/
protected function getExcelPointsAngle($angle) protected function getExcelPointsAngle($angle)
{ {
return $angle * 60000; return $angle * 60000;

View File

@ -51,14 +51,14 @@ class Properties
/** /**
* Created * Created
* *
* @var datetime * @var int
*/ */
private $created; private $created;
/** /**
* Modified * Modified
* *
* @var datetime * @var int
*/ */
private $modified; private $modified;
@ -178,7 +178,7 @@ class Properties
/** /**
* Get Created * Get Created
* *
* @return datetime * @return int
*/ */
public function getCreated() public function getCreated()
{ {
@ -211,7 +211,7 @@ class Properties
/** /**
* Get Modified * Get Modified
* *
* @return datetime * @return int
*/ */
public function getModified() public function getModified()
{ {

View File

@ -802,7 +802,12 @@ class HTML
$this->buildTextRun(); $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])) { if (isset($callbacks[$callbackTag])) {
$elementHandler = $callbacks[$callbackTag]; $elementHandler = $callbacks[$callbackTag];

View File

@ -233,7 +233,7 @@ class NamedRange
* @param Worksheet|null $pSheet Scope. Use null for global scope * @param Worksheet|null $pSheet Scope. Use null for global scope
* @return NamedRange * @return NamedRange
*/ */
public static function resolveRange($pNamedRange, Worksheet $pSheet) public static function resolveRange($pNamedRange, Worksheet $pSheet = null)
{ {
return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet);
} }

View File

@ -59,7 +59,7 @@ class CSV extends BaseReader implements IReader
/** /**
* Load rows contiguously * Load rows contiguously
* *
* @var int * @var bool
*/ */
private $contiguous = false; private $contiguous = false;

View File

@ -1920,7 +1920,10 @@ class Excel2007 extends BaseReader implements IReader
return 'FF000000'; return 'FF000000';
} }
private static function readStyle($docStyle, $style) /**
* @param \PhpSpreadsheet\Style $docStyle
*/
private static function readStyle($docStyle, \PhpSpreadsheet\Style $style)
{ {
// format code // format code
// if (isset($style->numFmt)) { // if (isset($style->numFmt)) {
@ -2119,7 +2122,10 @@ class Excel2007 extends BaseReader implements IReader
return $value; return $value;
} }
private function readRibbon($excel, $customUITarget, $zip) /**
* @param \PhpSpreadsheet\Spreadsheet $excel
*/
private function readRibbon(\PhpSpreadsheet\Spreadsheet $excel, $customUITarget, $zip)
{ {
$baseDir = dirname($customUITarget); $baseDir = dirname($customUITarget);
$nameCustomUI = basename($customUITarget); $nameCustomUI = basename($customUITarget);

View File

@ -26,7 +26,12 @@ namespace PhpSpreadsheet\Reader\Excel2007;
*/ */
class Chart 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(); $attributes = $component->attributes();
if (isset($attributes[$name])) { 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); $namespacesChartMeta = $chartElements->getNamespaces(true);
$chartElementsC = $chartElements->children($namespacesChartMeta['c']); $chartElementsC = $chartElements->children($namespacesChartMeta['c']);
@ -482,7 +491,10 @@ class Chart
return $plotAttributes; 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) { foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) {
switch ($plotAttributeKey) { switch ($plotAttributeKey) {

View File

@ -1207,7 +1207,7 @@ class Excel5 extends BaseReader implements IReader
* *
* @param string $data Data stream to read from * @param string $data Data stream to read from
* @param int $pos Position to start reading 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 * @return string Record data
*/ */
@ -1740,8 +1740,8 @@ class Excel5 extends BaseReader implements IReader
/** /**
* Make an RC4 decryptor for the given block * Make an RC4 decryptor for the given block
* *
* @var int Block for which to create decrypto * @param int Block for which to create decrypto
* @var string $valContext MD5 context state * @param string $valContext MD5 context state
* *
* @return Excel5\RC4 * @return Excel5\RC4
*/ */
@ -1772,11 +1772,11 @@ class Excel5 extends BaseReader implements IReader
/** /**
* Verify RC4 file password * Verify RC4 file password
* *
* @var string Password to check * @param string $password Password to check
* @var string $docid Document id * @param string $docid Document id
* @var string $salt_data Salt data * @param string $salt_data Salt data
* @var string $hashedsalt_data Hashed salt data * @param string $hashedsalt_data Hashed salt data
* @var string &$valContext Set to the MD5 context of the value * @param string $valContext Set to the MD5 context of the value
* *
* @return bool Success * @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 * Take array of tokens together with additional data for formula and return human readable formula
* *
* @param array $tokens * @param array $tokens
* @param array $additionalData Additional binary data going with the formula * @param string $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
* @return string Human readable formula * @return string Human readable formula
*/ */
private function createFormulaFromTokens($tokens, $additionalData) private function createFormulaFromTokens($tokens, $additionalData)
@ -5374,7 +5373,7 @@ class Excel5 extends BaseReader implements IReader
unset($space2, $space3, $space4, $space5); unset($space2, $space3, $space4, $space5);
break; break;
case 'tArray': // array constant case 'tArray': // array constant
$constantArray = self::_readBIFF8ConstantArray($additionalData); $constantArray = self::readBIFF8ConstantArray($additionalData);
$formulaStrings[] = $space1 . $space0 . $constantArray['value']; $formulaStrings[] = $space1 . $space0 . $constantArray['value'];
$additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data
unset($space0, $space1); unset($space0, $space1);
@ -5419,7 +5418,7 @@ class Excel5 extends BaseReader implements IReader
/** /**
* Fetch next token from binary formula data * 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 * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas
* @throws Exception * @throws Exception
* @return array * @return array
@ -7118,7 +7117,7 @@ class Excel5 extends BaseReader implements IReader
for ($r = 1; $r <= $nr + 1; ++$r) { for ($r = 1; $r <= $nr + 1; ++$r) {
$items = []; $items = [];
for ($c = 1; $c <= $nc + 1; ++$c) { for ($c = 1; $c <= $nc + 1; ++$c) {
$constant = self::_readBIFF8Constant($arrayData); $constant = self::readBIFF8Constant($arrayData);
$items[] = $constant['value']; $items[] = $constant['value'];
$arrayData = substr($arrayData, $constant['size']); $arrayData = substr($arrayData, $constant['size']);
$size += $constant['size']; $size += $constant['size'];
@ -7372,6 +7371,9 @@ class Excel5 extends BaseReader implements IReader
return $value; return $value;
} }
/**
* @param int $rknum
*/
private static function getIEEE754($rknum) private static function getIEEE754($rknum)
{ {
if (($rknum & 0x02) != 0) { if (($rknum & 0x02) != 0) {
@ -7405,7 +7407,7 @@ class Excel5 extends BaseReader implements IReader
* @param bool $compressed * @param bool $compressed
* @return string * @return string
*/ */
private static function encodeUTF16($string, $compressed = '') private static function encodeUTF16($string, $compressed = false)
{ {
if ($compressed) { if ($compressed) {
$string = self::uncompressByteString($string); $string = self::uncompressByteString($string);

View File

@ -9,6 +9,7 @@ class Color
* *
* @param int $color Indexed color * @param int $color Indexed color
* @param array $palette Color palette * @param array $palette Color palette
* @param int $version
* @return array RGB color value, example: array('rgb' => 'FF0000') * @return array RGB color value, example: array('rgb' => 'FF0000')
*/ */
public static function map($color, $palette, $version) public static function map($color, $palette, $version)

View File

@ -165,6 +165,9 @@ class Gnumeric extends BaseReader implements IReader
return $worksheetInfo; return $worksheetInfo;
} }
/**
* @param string $filename
*/
private function gzfileGetContents($filename) private function gzfileGetContents($filename)
{ {
$file = @gzopen($filename, 'rb'); $file = @gzopen($filename, 'rb');
@ -201,7 +204,7 @@ class Gnumeric extends BaseReader implements IReader
* @param string $pFilename * @param string $pFilename
* @param Spreadsheet $spreadsheet * @param Spreadsheet $spreadsheet
* @throws Exception * @throws Exception
* @return PhpSpreadsheet * @return Spreadsheet
*/ */
public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet) public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet)
{ {

View File

@ -222,7 +222,14 @@ class HTML extends BaseReader implements IReader
$cellContent = (string) ''; $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) { foreach ($element->childNodes as $child) {
if ($child instanceof DOMText) { if ($child instanceof DOMText) {

View File

@ -278,7 +278,7 @@ class Date
* @param int $hours * @param int $hours
* @param int $minutes * @param int $minutes
* @param int $seconds * @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) public static function formattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0)
{ {

View File

@ -111,7 +111,7 @@ class Drawing
* Convert pixels to points * Convert pixels to points
* *
* @param int $pValue Value in pixels * @param int $pValue Value in pixels
* @return int Value in points * @return float Value in points
*/ */
public static function pixelsToPoints($pValue = 0) public static function pixelsToPoints($pValue = 0)
{ {
@ -163,7 +163,7 @@ class Drawing
* Create a new image from file. By alexander at alexauto dot nl * Create a new image from file. By alexander at alexauto dot nl
* *
* @link http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214 * @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 * @return resource
*/ */
public static function imagecreatefrombmp($p_sFile) public static function imagecreatefrombmp($p_sFile)

View File

@ -57,7 +57,7 @@ class SpContainer
/** /**
* Shape index (usually group shape has index 0, and the rest: 1,2,3...) * Shape index (usually group shape has index 0, and the rest: 1,2,3...)
* *
* @var bool * @var int
*/ */
private $spId; 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 * 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) public function setEndOffsetX($endOffsetX = 0)
{ {

View File

@ -407,7 +407,7 @@ class Font
* Calculate an (approximate) pixel size, based on centimeter size * Calculate an (approximate) pixel size, based on centimeter size
* *
* @param int $sizeInCm Font size (in centimeters) * @param int $sizeInCm Font size (in centimeters)
* @return int Size (in pixels) * @return float Size (in pixels)
*/ */
public static function centimeterSizeToPixels($sizeInCm = 1) public static function centimeterSizeToPixels($sizeInCm = 1)
{ {
@ -417,7 +417,7 @@ class Font
/** /**
* Returns the font path given the font * Returns the font path given the font
* *
* @param \PhpSpreadsheet\Style\Font * @param \PhpSpreadsheet\Style\Font $font
* @return string Path to TrueType font file * @return string Path to TrueType font file
*/ */
public static function getTrueTypeFontFileFromFont($font) public static function getTrueTypeFontFileFromFont($font)

View File

@ -57,7 +57,7 @@ class LUDecomposition
/** /**
* LU Decomposition constructor. * LU Decomposition constructor.
* *
* @param $A Rectangular matrix * @param Matrix $A Rectangular matrix
* @return Structure to access L, U and piv. * @return Structure to access L, U and piv.
*/ */
public function __construct($A) public function __construct($A)
@ -123,7 +123,7 @@ class LUDecomposition
/** /**
* Get lower triangular factor. * Get lower triangular factor.
* *
* @return array Lower triangular factor * @return Matrix Lower triangular factor
*/ */
public function getL() public function getL()
{ {
@ -145,7 +145,7 @@ class LUDecomposition
/** /**
* Get upper triangular factor. * Get upper triangular factor.
* *
* @return array Upper triangular factor * @return Matrix Upper triangular factor
*/ */
public function getU() public function getU()
{ {
@ -185,7 +185,7 @@ class LUDecomposition
/** /**
* Is the matrix nonsingular? * 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() public function isNonsingular()
{ {

View File

@ -392,8 +392,8 @@ class Matrix
* getMatrixByCol * getMatrixByCol
* *
* Get a submatrix by column index/range * Get a submatrix by column index/range
* @param int $i0 Initial column index * @param int $j0 Initial column index
* @param int $iF Final column index * @param int $jF Final column index
* @return Matrix Submatrix * @return Matrix Submatrix
*/ */
public function getMatrixByCol($j0 = null, $jF = null) public function getMatrixByCol($j0 = null, $jF = null)

View File

@ -62,7 +62,7 @@ $error['EN'][ROW_LENGTH_EXCEPTION] = 'All rows must have the same length.';
/** /**
* Custom error handler * Custom error handler
* @param int $num Error number * @param int $errorNumber Error number
*/ */
function JAMAError($errorNumber = null) function JAMAError($errorNumber = null)
{ {

View File

@ -93,7 +93,7 @@ class OLE
* @acces public * @acces public
* @param string $file * @param string $file
* @throws \PhpSpreadsheet\Reader\Exception * @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) public function read($file)
{ {
@ -222,7 +222,7 @@ class OLE
/** /**
* Reads a signed char. * Reads a signed char.
* @param resource file handle * @param resource $fh file handle
* @return int * @return int
*/ */
private static function _readInt1($fh) private static function _readInt1($fh)
@ -234,7 +234,7 @@ class OLE
/** /**
* Reads an unsigned short (2 octets). * Reads an unsigned short (2 octets).
* @param resource file handle * @param resource $fh file handle
* @return int * @return int
*/ */
private static function _readInt2($fh) private static function _readInt2($fh)
@ -246,7 +246,7 @@ class OLE
/** /**
* Reads an unsigned long (4 octets). * Reads an unsigned long (4 octets).
* @param resource file handle * @param resource $fh file handle
* @return int * @return int
*/ */
private static function _readInt4($fh) 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 * Gets information about all PPS's on the OLE container from the PPS WK's
* creates an OLE_PPS object for each one. * creates an OLE_PPS object for each one.
* *
* @param int the block id of the first block * @param int $blockId the block id of the first block
* @return mixed true on success, PEAR_Error on failure * @return bool true on success, PEAR_Error on failure
*/ */
public function _readPpsWks($blockId) public function _readPpsWks($blockId)
{ {

View File

@ -39,6 +39,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS
/** /**
* @param int $time_1st A timestamp * @param int $time_1st A timestamp
* @param int $time_2nd A timestamp * @param int $time_2nd A timestamp
* @param File[] $raChild
*/ */
public function __construct($time_1st, $time_2nd, $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. * @param string|resource $filename The name of the file or stream where to save the OLE container.
* @throws \PhpSpreadsheet\Writer\Exception * @throws \PhpSpreadsheet\Writer\Exception
* @return mixed true on success * @return bool true on success
*/ */
public function save($filename) public function save($filename)
{ {
@ -116,7 +117,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS
* Calculate some numbers * Calculate some numbers
* *
* @param array $raList Reference to an array of PPS's * @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) public function _calcSize(&$raList)
{ {
@ -154,7 +155,7 @@ class Root extends \PhpSpreadsheet\Shared\OLE\PPS
* *
* @param int $i2 The argument * @param int $i2 The argument
* @see save() * @see save()
* @return int * @return float
*/ */
private static function adjust2($i2) private static function adjust2($i2)
{ {

View File

@ -168,6 +168,7 @@ class OLERead
/** /**
* Extract binary stream data * Extract binary stream data
* *
* @param int $stream
* @return string * @return string
*/ */
public function getStream($stream) public function getStream($stream)

View File

@ -215,6 +215,10 @@ class PclZip
// Note that no real action is taken, if the archive does not exist it is not // Note that no real action is taken, if the archive does not exist it is not
// created. Use create() for that. // created. Use create() for that.
// -------------------------------------------------------------------------------- // --------------------------------------------------------------------------------
/**
* @param string $p_zipname
*/
public function __construct($p_zipname) public function __construct($p_zipname)
{ {

View File

@ -119,7 +119,7 @@ class BestFit
* Return the Y-Value for a specified value of X * Return the Y-Value for a specified value of X
* *
* @param float $xValue X-Value * @param float $xValue X-Value
* @return float Y-Value * @return bool Y-Value
*/ */
public function getValueOfYForX($xValue) public function getValueOfYForX($xValue)
{ {
@ -130,7 +130,7 @@ class BestFit
* Return the X-Value for a specified value of Y * Return the X-Value for a specified value of Y
* *
* @param float $yValue Y-Value * @param float $yValue Y-Value
* @return float X-Value * @return bool X-Value
*/ */
public function getValueOfXForY($yValue) public function getValueOfXForY($yValue)
{ {
@ -151,7 +151,7 @@ class BestFit
* Return the Equation of the best-fit line * Return the Equation of the best-fit line
* *
* @param int $dp Number of places of decimal precision to display * @param int $dp Number of places of decimal precision to display
* @return string * @return bool
*/ */
public function getEquation($dp = 0) 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 // calculate sums
$x_sum = array_sum($xValues); $x_sum = array_sum($xValues);

View File

@ -74,7 +74,7 @@ class ExponentialBestFit extends BestFit
* Return the Slope of the line * Return the Slope of the line
* *
* @param int $dp Number of places of decimal precision to display * @param int $dp Number of places of decimal precision to display
* @return string * @return float
**/ **/
public function getSlope($dp = 0) public function getSlope($dp = 0)
{ {
@ -89,7 +89,7 @@ class ExponentialBestFit extends BestFit
* Return the Value of X where it intersects Y = 0 * Return the Value of X where it intersects Y = 0
* *
* @param int $dp Number of places of decimal precision to display * @param int $dp Number of places of decimal precision to display
* @return string * @return float
**/ **/
public function getIntersect($dp = 0) public function getIntersect($dp = 0)
{ {

View File

@ -76,7 +76,7 @@ class PowerBestFit extends BestFit
* Return the Value of X where it intersects Y = 0 * Return the Value of X where it intersects Y = 0
* *
* @param int $dp Number of places of decimal precision to display * @param int $dp Number of places of decimal precision to display
* @return string * @return float
**/ **/
public function getIntersect($dp = 0) public function getIntersect($dp = 0)
{ {

View File

@ -107,7 +107,7 @@ class XMLWriter extends \XMLWriter
* Fallback method for writeRaw, introduced in PHP 5.2 * Fallback method for writeRaw, introduced in PHP 5.2
* *
* @param string $text * @param string $text
* @return string * @return bool
*/ */
public function writeRawData($text) public function writeRawData($text)
{ {

View File

@ -147,6 +147,9 @@ class ZipArchive
return $contents; return $contents;
} }
/**
* @param int $index
*/
public function getFromIndex($index) public function getFromIndex($index)
{ {
$extracted = $this->zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING); $extracted = $this->zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING);

View File

@ -99,7 +99,7 @@ class ZipStreamWrapper
/** /**
* Implements support for fstat(). * Implements support for fstat().
* *
* @return bool * @return string
*/ */
public function statName() public function statName()
{ {
@ -109,7 +109,7 @@ class ZipStreamWrapper
/** /**
* Implements support for fstat(). * Implements support for fstat().
* *
* @return bool * @return string
*/ */
public function url_stat() // @codingStandardsIgnoreLine public function url_stat() // @codingStandardsIgnoreLine
{ {

View File

@ -136,7 +136,7 @@ class Spreadsheet
/** /**
* The workbook has macros ? * The workbook has macros ?
* *
* @return true if workbook has macros, false if not * @return bool
*/ */
public function hasMacros() public function hasMacros()
{ {
@ -177,7 +177,7 @@ class Spreadsheet
/** /**
* Set the macros certificate * Set the macros certificate
* *
* @param string|null $Certificate * @param string|null $certificate
*/ */
public function setMacrosCertificate($certificate = null) public function setMacrosCertificate($certificate = null)
{ {
@ -230,6 +230,7 @@ class Spreadsheet
* retrieve ribbon XML Data * retrieve ribbon XML Data
* *
* return string|null|array * return string|null|array
* @return string
*/ */
public function getRibbonXMLData($what = 'all') //we need some constants here... public function getRibbonXMLData($what = 'all') //we need some constants here...
{ {
@ -303,7 +304,7 @@ class Spreadsheet
/** /**
* This workbook have a custom UI ? * This workbook have a custom UI ?
* *
* @return true|false * @return bool
*/ */
public function hasRibbon() public function hasRibbon()
{ {
@ -313,7 +314,7 @@ class Spreadsheet
/** /**
* This workbook have additionnal object for the ribbon ? * This workbook have additionnal object for the ribbon ?
* *
* @return true|false * @return bool
*/ */
public function hasRibbonBinObjects() public function hasRibbonBinObjects()
{ {
@ -609,7 +610,7 @@ class Spreadsheet
* *
* @param Worksheet $pSheet * @param Worksheet $pSheet
* @throws Exception * @throws Exception
* @return Sheet index * @return int index
*/ */
public function getIndex(Worksheet $pSheet) public function getIndex(Worksheet $pSheet)
{ {
@ -628,7 +629,7 @@ class Spreadsheet
* @param string $sheetName Sheet name to modify index for * @param string $sheetName Sheet name to modify index for
* @param int $newIndex New index for the sheet * @param int $newIndex New index for the sheet
* @throws Exception * @throws Exception
* @return New sheet index * @return int New sheet index
*/ */
public function setIndexByName($sheetName, $newIndex) public function setIndexByName($sheetName, $newIndex)
{ {
@ -772,7 +773,7 @@ class Spreadsheet
* Add named range * Add named range
* *
* @param NamedRange $namedRange * @param NamedRange $namedRange
* @return PhpSpreadsheet * @return bool
*/ */
public function addNamedRange(NamedRange $namedRange) public function addNamedRange(NamedRange $namedRange)
{ {
@ -818,7 +819,7 @@ class Spreadsheet
* *
* @param string $namedRange * @param string $namedRange
* @param Worksheet|null $pSheet Scope: use null for global scope. * @param Worksheet|null $pSheet Scope: use null for global scope.
* @return PhpSpreadsheet * @return Spreadsheet
*/ */
public function removeNamedRange($namedRange, Worksheet $pSheet = null) public function removeNamedRange($namedRange, Worksheet $pSheet = null)
{ {
@ -838,7 +839,7 @@ class Spreadsheet
/** /**
* Get worksheet iterator * Get worksheet iterator
* *
* @return WorksheetIterator * @return Worksheet\Iterator
*/ */
public function getWorksheetIterator() public function getWorksheetIterator()
{ {
@ -848,7 +849,7 @@ class Spreadsheet
/** /**
* Copy workbook (!= clone!) * Copy workbook (!= clone!)
* *
* @return PhpSpreadsheet * @return Spreadsheet
*/ */
public function copy() public function copy()
{ {

View File

@ -147,7 +147,7 @@ class Style extends Style\Supervisor implements IComparable
/** /**
* Get parent. Only used for style supervisor * Get parent. Only used for style supervisor
* *
* @return PhpSpreadsheet * @return Spreadsheet
*/ */
public function getParent() public function getParent()
{ {

View File

@ -49,14 +49,14 @@ class Conditional implements \PhpSpreadsheet\IComparable
/** /**
* Condition type * Condition type
* *
* @var int * @var string
*/ */
private $conditionType; private $conditionType;
/** /**
* Operator type * Operator type
* *
* @var int * @var string
*/ */
private $operatorType; private $operatorType;

View File

@ -328,7 +328,7 @@ class Worksheet implements IComparable
/** /**
* Create a new worksheet * Create a new worksheet
* *
* @param Spreadsheet $Parent * @param Spreadsheet $parent
* @param string $pTitle * @param string $pTitle
*/ */
public function __construct(Spreadsheet $parent = null, $pTitle = 'Worksheet') public function __construct(Spreadsheet $parent = null, $pTitle = 'Worksheet')
@ -767,7 +767,7 @@ class Worksheet implements IComparable
/** /**
* Get parent * Get parent
* *
* @return PhpSpreadsheet * @return Spreadsheet
*/ */
public function getParent() public function getParent()
{ {
@ -1099,8 +1099,8 @@ class Worksheet implements IComparable
/** /**
* Set a cell value by using numeric cell coordinates * Set a cell value by using numeric cell coordinates
* *
* @param string $pColumn Numeric column coordinate of the cell (A = 0) * @param int $pColumn Numeric column coordinate of the cell (A = 0)
* @param string $pRow Numeric row coordinate of the cell * @param int $pRow Numeric row coordinate of the cell
* @param mixed $pValue Value of the cell * @param mixed $pValue Value of the cell
* @param bool $returnCell Return the worksheet (false, default) or the cell (true) * @param bool $returnCell Return the worksheet (false, default) or the cell (true)
* @return Worksheet|Cell Depending on the last parameter being specified * @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 * Set a cell value by using numeric cell coordinates
* *
* @param string $pColumn Numeric column coordinate of the cell * @param int $pColumn Numeric column coordinate of the cell
* @param string $pRow Numeric row coordinate of the cell * @param int $pRow Numeric row coordinate of the cell
* @param mixed $pValue Value of the cell * @param mixed $pValue Value of the cell
* @param string $pDataType Explicit data type * @param string $pDataType Explicit data type
* @param bool $returnCell Return the worksheet (false, default) or the cell (true) * @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 * 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 * @return Worksheet\ColumnDimension
*/ */
public function getColumnDimensionByColumn($pColumn = 0) public function getColumnDimensionByColumn($pColumn = 0)
@ -1492,7 +1492,7 @@ class Worksheet implements IComparable
/** /**
* Set conditional styles * Set conditional styles
* *
* @param $pCoordinate string E.g. 'A1' * @param string $pCoordinate eg: 'A1'
* @param $pValue Style\Conditional[] * @param $pValue Style\Conditional[]
* @return Worksheet * @return Worksheet
*/ */

View File

@ -462,7 +462,7 @@ class AutoFilter
* Convert a dynamic rule daterange to a custom filter range expression for ease of calculation * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation
* *
* @param string $dynamicRuleType * @param string $dynamicRuleType
* @param AutoFilter\Column &$filterColumn * @param AutoFilter\Column $filterColumn
* @return mixed[] * @return mixed[]
*/ */
private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn)

View File

@ -281,7 +281,7 @@ class Rule
* *
* @param string $pRuleType * @param string $pRuleType
* @throws \PhpSpreadsheet\Exception * @throws \PhpSpreadsheet\Exception
* @return \PhpSpreadsheet\Worksheet\AutoFilter\Column * @return Rule
*/ */
public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER) public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER)
{ {

View File

@ -135,7 +135,7 @@ class ColumnCellIterator extends CellIterator implements \Iterator
/** /**
* Return the current cell in this worksheet column * Return the current cell in this worksheet column
* *
* @return Row * @return null|\PhpSpreadsheet\Cell
*/ */
public function current() public function current()
{ {

View File

@ -31,7 +31,7 @@ class ColumnDimension extends Dimension
/** /**
* Column index * Column index
* *
* @var int * @var string
*/ */
private $columnIndex; private $columnIndex;

View File

@ -59,7 +59,7 @@ abstract class Dimension
/** /**
* Create a new Dimension * Create a new Dimension
* *
* @param int $pIndex Numeric row index * @param int $initialValue Numeric row index
*/ */
public function __construct($initialValue = null) public function __construct($initialValue = null)
{ {

View File

@ -234,7 +234,7 @@ class Shadow implements \PhpSpreadsheet\IComparable
/** /**
* Set Color * Set Color
* *
* @param \PhpSpreadsheet\Style_Color $pValue * @param \PhpSpreadsheet\Style\Color $pValue
* @throws \PhpSpreadsheet\Exception * @throws \PhpSpreadsheet\Exception
* @return Shadow * @return Shadow
*/ */

View File

@ -812,7 +812,7 @@ class PageSetup
* Set first page number * Set first page number
* *
* @param int $value * @param int $value
* @return HeaderFooter * @return PageSetup
*/ */
public function setFirstPageNumber($value = null) public function setFirstPageNumber($value = null)
{ {
@ -824,7 +824,7 @@ class PageSetup
/** /**
* Reset first page number * Reset first page number
* *
* @return HeaderFooter * @return PageSetup
*/ */
public function resetFirstPageNumber() public function resetFirstPageNumber()
{ {

View File

@ -318,7 +318,7 @@ class CSV extends BaseWriter implements IWriter
/** /**
* Write line to CSV file * Write line to CSV file
* *
* @param mixed $pFileHandle PHP filehandle * @param resource $pFileHandle PHP filehandle
* @param array $pValues Array containing values in a row * @param array $pValues Array containing values in a row
* @throws Exception * @throws Exception
*/ */

View File

@ -1260,11 +1260,10 @@ class Chart extends WriterPart
* @param \PhpSpreadsheet\Shared\XMLWriter $objWriter XML Writer * @param \PhpSpreadsheet\Shared\XMLWriter $objWriter XML Writer
* @param string $groupType Type of plot for dataseries * @param string $groupType Type of plot for dataseries
* @param string $dataType Datatype of series values * @param string $dataType Datatype of series values
* @param \PhpSpreadsheet\Worksheet $pSheet
* *
* @throws \PhpSpreadsheet\Writer\Exception * @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)) { if (is_null($plotSeriesValues)) {
return; return;

View File

@ -64,6 +64,7 @@ class Escher
/** /**
* Process the object to be written * Process the object to be written
* @return string
*/ */
public function close() public function close()
{ {

View File

@ -186,13 +186,13 @@ class Workbook extends BIFFwriter
* Class constructor * Class constructor
* *
* @param \PhpSpreadsheet\Spreadsheet $spreadsheet The Workbook * @param \PhpSpreadsheet\Spreadsheet $spreadsheet The Workbook
* @param int &$str_total Total number of strings * @param int $str_total Total number of strings
* @param int &$str_unique Total number of unique strings * @param int $str_unique Total number of unique strings
* @param array &$str_table String Table * @param array $str_table String Table
* @param array &$colors Colour Table * @param array $colors Colour Table
* @param mixed $parser The formula parser created for the Workbook * @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 // It needs to call its parent's constructor explicitly
parent::__construct(); parent::__construct();

View File

@ -650,7 +650,7 @@ class Worksheet extends BIFFwriter
* @param int $row Row index (0-based) * @param int $row Row index (0-based)
* @param int $col Column index (0-based) * @param int $col Column index (0-based)
* @param string $str The string * @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 * @param array $arrcRun Index to Font record and characters beginning
*/ */
private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun)

View File

@ -132,7 +132,7 @@ class HTML extends BaseWriter implements IWriter
/** /**
* Create a new HTML * Create a new HTML
* *
* @param Spreadsheet $spreadsheet * @param \PhpSpreadsheet\Spreadsheet $spreadsheet
*/ */
public function __construct(Spreadsheet $spreadsheet) public function __construct(Spreadsheet $spreadsheet)
{ {
@ -1443,7 +1443,7 @@ class HTML extends BaseWriter implements IWriter
* @param bool $pValue * @param bool $pValue
* @return HTML * @return HTML
*/ */
public function setEmbedImages($pValue = '.') public function setEmbedImages($pValue = true)
{ {
$this->embedImages = $pValue; $this->embedImages = $pValue;

View File

@ -70,7 +70,7 @@ class OpenDocument extends BaseWriter implements IWriter
* Get writer part * Get writer part
* *
* @param string $pPartName Writer part name * @param string $pPartName Writer part name
* @return \PhpSpreadsheet\Writer\Excel2007\WriterPart * @return OpenDocument\WriterPart|null
*/ */
public function getWriterPart($pPartName = '') public function getWriterPart($pPartName = '')
{ {