Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPDoc: use @return $this for fluent methods #1362

Merged
merged 1 commit into from
Mar 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
- Fix for Xls writer wrong selected cells and active sheet [#1256](https://github.com/PHPOffice/PhpSpreadsheet/pull/1256)
- Fix active cell when freeze pane is used [#1323](https://github.com/PHPOffice/PhpSpreadsheet/pull/1323)
- Fix XLSX file loading with autofilter containing '$' [#1326](https://github.com/PHPOffice/PhpSpreadsheet/pull/1326)
- PHPDoc - Use `@return $this` for fluent methods [#1362](https://github.com/PHPOffice/PhpSpreadsheet/pull/1362)

## [1.10.1] - 2019-12-02

Expand Down
6 changes: 3 additions & 3 deletions src/PhpSpreadsheet/Cell/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Cell
/**
* Update the cell into the cell collection.
*
* @return self
* @return $this
*/
public function updateInCollection()
{
Expand Down Expand Up @@ -177,7 +177,7 @@ public function getFormattedValue()
*
* @throws Exception
*
* @return Cell
* @return $this
*/
public function setValue($pValue)
{
Expand Down Expand Up @@ -672,7 +672,7 @@ public function setXfIndex($pValue)
*
* @param mixed $pAttributes
*
* @return Cell
* @return $this
*/
public function setFormulaAttributes($pAttributes)
{
Expand Down
26 changes: 13 additions & 13 deletions src/PhpSpreadsheet/Cell/DataValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getFormula1()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setFormula1($value)
{
Expand All @@ -166,7 +166,7 @@ public function getFormula2()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setFormula2($value)
{
Expand All @@ -190,7 +190,7 @@ public function getType()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setType($value)
{
Expand All @@ -214,7 +214,7 @@ public function getErrorStyle()
*
* @param string $value see self::STYLE_*
*
* @return DataValidation
* @return $this
*/
public function setErrorStyle($value)
{
Expand All @@ -238,7 +238,7 @@ public function getOperator()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setOperator($value)
{
Expand All @@ -262,7 +262,7 @@ public function getAllowBlank()
*
* @param bool $value
*
* @return DataValidation
* @return $this
*/
public function setAllowBlank($value)
{
Expand All @@ -286,7 +286,7 @@ public function getShowDropDown()
*
* @param bool $value
*
* @return DataValidation
* @return $this
*/
public function setShowDropDown($value)
{
Expand All @@ -310,7 +310,7 @@ public function getShowInputMessage()
*
* @param bool $value
*
* @return DataValidation
* @return $this
*/
public function setShowInputMessage($value)
{
Expand All @@ -334,7 +334,7 @@ public function getShowErrorMessage()
*
* @param bool $value
*
* @return DataValidation
* @return $this
*/
public function setShowErrorMessage($value)
{
Expand All @@ -358,7 +358,7 @@ public function getErrorTitle()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setErrorTitle($value)
{
Expand All @@ -382,7 +382,7 @@ public function getError()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setError($value)
{
Expand All @@ -406,7 +406,7 @@ public function getPromptTitle()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setPromptTitle($value)
{
Expand All @@ -430,7 +430,7 @@ public function getPrompt()
*
* @param string $value
*
* @return DataValidation
* @return $this
*/
public function setPrompt($value)
{
Expand Down
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/Cell/Hyperlink.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getUrl()
*
* @param string $value
*
* @return Hyperlink
* @return $this
*/
public function setUrl($value)
{
Expand All @@ -70,7 +70,7 @@ public function getTooltip()
*
* @param string $value
*
* @return Hyperlink
* @return $this
*/
public function setTooltip($value)
{
Expand Down
16 changes: 8 additions & 8 deletions src/PhpSpreadsheet/Chart/Axis.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_col
*
* @param int $shadow_presets
*
* @return Axis
* @return $this
*/
private function setShadowPresetsProperties($shadow_presets)
{
Expand All @@ -370,7 +370,7 @@ private function setShadowPresetsProperties($shadow_presets)
* @param array $properties_map
* @param mixed &$reference
*
* @return Axis
* @return $this
*/
private function setShadowProperiesMapValues(array $properties_map, &$reference = null)
{
Expand Down Expand Up @@ -402,7 +402,7 @@ private function setShadowProperiesMapValues(array $properties_map, &$reference
* @param int $alpha
* @param string $type
*
* @return Axis
* @return $this
*/
private function setShadowColor($color, $alpha, $type)
{
Expand All @@ -416,7 +416,7 @@ private function setShadowColor($color, $alpha, $type)
*
* @param float $blur
*
* @return Axis
* @return $this
*/
private function setShadowBlur($blur)
{
Expand All @@ -432,7 +432,7 @@ private function setShadowBlur($blur)
*
* @param int $angle
*
* @return Axis
* @return $this
*/
private function setShadowAngle($angle)
{
Expand All @@ -448,7 +448,7 @@ private function setShadowAngle($angle)
*
* @param float $distance
*
* @return Axis
* @return $this
*/
private function setShadowDistance($distance)
{
Expand Down Expand Up @@ -506,7 +506,7 @@ public function getGlowProperty($property)
*
* @param float $size
*
* @return Axis
* @return $this
*/
private function setGlowSize($size)
{
Expand All @@ -524,7 +524,7 @@ private function setGlowSize($size)
* @param int $alpha
* @param string $type
*
* @return Axis
* @return $this
*/
private function setGlowColor($color, $alpha, $type)
{
Expand Down
24 changes: 12 additions & 12 deletions src/PhpSpreadsheet/Chart/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function getWorksheet()
*
* @param Worksheet $pValue
*
* @return Chart
* @return $this
*/
public function setWorksheet(Worksheet $pValue = null)
{
Expand All @@ -221,7 +221,7 @@ public function getTitle()
*
* @param Title $title
*
* @return Chart
* @return $this
*/
public function setTitle(Title $title)
{
Expand All @@ -245,7 +245,7 @@ public function getLegend()
*
* @param Legend $legend
*
* @return Chart
* @return $this
*/
public function setLegend(Legend $legend)
{
Expand All @@ -269,7 +269,7 @@ public function getXAxisLabel()
*
* @param Title $label
*
* @return Chart
* @return $this
*/
public function setXAxisLabel(Title $label)
{
Expand All @@ -293,7 +293,7 @@ public function getYAxisLabel()
*
* @param Title $label
*
* @return Chart
* @return $this
*/
public function setYAxisLabel(Title $label)
{
Expand Down Expand Up @@ -327,7 +327,7 @@ public function getPlotVisibleOnly()
*
* @param bool $plotVisibleOnly
*
* @return Chart
* @return $this
*/
public function setPlotVisibleOnly($plotVisibleOnly)
{
Expand All @@ -351,7 +351,7 @@ public function getDisplayBlanksAs()
*
* @param string $displayBlanksAs
*
* @return Chart
* @return $this
*/
public function setDisplayBlanksAs($displayBlanksAs)
{
Expand Down Expand Up @@ -423,7 +423,7 @@ public function getMinorGridlines()
* @param int $xOffset
* @param int $yOffset
*
* @return Chart
* @return $this
*/
public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null)
{
Expand Down Expand Up @@ -467,7 +467,7 @@ public function getTopLeftCell()
*
* @param string $cell
*
* @return Chart
* @return $this
*/
public function setTopLeftCell($cell)
{
Expand All @@ -482,7 +482,7 @@ public function setTopLeftCell($cell)
* @param int $xOffset
* @param int $yOffset
*
* @return Chart
* @return $this
*/
public function setTopLeftOffset($xOffset, $yOffset)
{
Expand Down Expand Up @@ -541,7 +541,7 @@ public function getTopLeftYOffset()
* @param int $xOffset
* @param int $yOffset
*
* @return Chart
* @return $this
*/
public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null)
{
Expand Down Expand Up @@ -593,7 +593,7 @@ public function getBottomRightCell()
* @param int $xOffset
* @param int $yOffset
*
* @return Chart
* @return $this
*/
public function setBottomRightOffset($xOffset, $yOffset)
{
Expand Down
10 changes: 5 additions & 5 deletions src/PhpSpreadsheet/Chart/DataSeries.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function getPlotType()
*
* @param string $plotType
*
* @return DataSeries
* @return $this
*/
public function setPlotType($plotType)
{
Expand All @@ -181,7 +181,7 @@ public function getPlotGrouping()
*
* @param string $groupingType
*
* @return DataSeries
* @return $this
*/
public function setPlotGrouping($groupingType)
{
Expand All @@ -205,7 +205,7 @@ public function getPlotDirection()
*
* @param string $plotDirection
*
* @return DataSeries
* @return $this
*/
public function setPlotDirection($plotDirection)
{
Expand Down Expand Up @@ -297,7 +297,7 @@ public function getPlotStyle()
*
* @param null|string $plotStyle
*
* @return DataSeries
* @return $this
*/
public function setPlotStyle($plotStyle)
{
Expand Down Expand Up @@ -360,7 +360,7 @@ public function getSmoothLine()
*
* @param bool $smoothLine
*
* @return DataSeries
* @return $this
*/
public function setSmoothLine($smoothLine)
{
Expand Down
Loading