Skip to content

Commit de85aa2

Browse files
committed
Rector ReturnTypeFromStrictNativeCallRector
1 parent b7d5160 commit de85aa2

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/PhpSpreadsheet/Style/Color.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function getRGB(): string
276276
*
277277
* @return $this
278278
*/
279-
public function setRGB(?string $colorValue = self::COLOR_BLACK)
279+
public function setRGB(?string $colorValue = self::COLOR_BLACK): static
280280
{
281281
return $this->setARGB($colorValue);
282282
}

src/PhpSpreadsheet/Worksheet/PageSetup.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_O
770770
*
771771
* @return $this
772772
*/
773-
public function addPrintArea($value, $index = -1)
773+
public function addPrintArea($value, $index = -1): static
774774
{
775775
return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT);
776776
}
@@ -798,7 +798,7 @@ public function addPrintArea($value, $index = -1)
798798
*
799799
* @return $this
800800
*/
801-
public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE)
801+
public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE): static
802802
{
803803
return $this->setPrintArea(
804804
Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2,
@@ -823,7 +823,7 @@ public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $in
823823
*
824824
* @return $this
825825
*/
826-
public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1)
826+
public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1): static
827827
{
828828
return $this->setPrintArea(
829829
Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2,
@@ -861,7 +861,7 @@ public function setFirstPageNumber($value): static
861861
*
862862
* @return $this
863863
*/
864-
public function resetFirstPageNumber()
864+
public function resetFirstPageNumber(): static
865865
{
866866
return $this->setFirstPageNumber(null);
867867
}

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ public function setBreak($coordinate, $break, int $max = -1): static
18281828
*
18291829
* @return $this
18301830
*/
1831-
public function setBreakByColumnAndRow($columnIndex, $row, $break)
1831+
public function setBreakByColumnAndRow($columnIndex, $row, $break): static
18321832
{
18331833
return $this->setBreak(Coordinate::stringFromColumnIndex($columnIndex) . $row, $break);
18341834
}
@@ -2047,7 +2047,7 @@ public function mergeCellBehaviour(Cell $cell, string $upperLeft, string $behavi
20472047
*
20482048
* @return $this
20492049
*/
2050-
public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $behaviour = self::MERGE_CELL_CONTENT_EMPTY)
2050+
public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $behaviour = self::MERGE_CELL_CONTENT_EMPTY): static
20512051
{
20522052
$cellRange = new CellRange(
20532053
CellAddress::fromColumnAndRow($columnIndex1, $row1),
@@ -2099,7 +2099,7 @@ public function unmergeCells($range): static
20992099
*
21002100
* @return $this
21012101
*/
2102-
public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2)
2102+
public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2): static
21032103
{
21042104
$cellRange = new CellRange(
21052105
CellAddress::fromColumnAndRow($columnIndex1, $row1),
@@ -2175,7 +2175,7 @@ public function protectCells($range, $password, $alreadyHashed = false): static
21752175
*
21762176
* @return $this
21772177
*/
2178-
public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false)
2178+
public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false): static
21792179
{
21802180
$cellRange = new CellRange(
21812181
CellAddress::fromColumnAndRow($columnIndex1, $row1),
@@ -2223,7 +2223,7 @@ public function unprotectCells($range): static
22232223
*
22242224
* @return $this
22252225
*/
2226-
public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2)
2226+
public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2): static
22272227
{
22282228
$cellRange = new CellRange(
22292229
CellAddress::fromColumnAndRow($columnIndex1, $row1),
@@ -2292,7 +2292,7 @@ public function setAutoFilter($autoFilterOrRange): static
22922292
*
22932293
* @return $this
22942294
*/
2295-
public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2)
2295+
public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2): static
22962296
{
22972297
$cellRange = new CellRange(
22982298
CellAddress::fromColumnAndRow($columnIndex1, $row1),
@@ -2511,7 +2511,7 @@ public function setTopLeftCell(string $topLeftCell): self
25112511
*
25122512
* @return $this
25132513
*/
2514-
public function freezePaneByColumnAndRow($columnIndex, $row)
2514+
public function freezePaneByColumnAndRow($columnIndex, $row): static
25152515
{
25162516
return $this->freezePane(Coordinate::stringFromColumnIndex($columnIndex) . $row);
25172517
}
@@ -2521,7 +2521,7 @@ public function freezePaneByColumnAndRow($columnIndex, $row)
25212521
*
25222522
* @return $this
25232523
*/
2524-
public function unfreezePane()
2524+
public function unfreezePane(): static
25252525
{
25262526
return $this->freezePane(null);
25272527
}
@@ -2686,7 +2686,7 @@ public function insertNewColumnBefore(string $before, int $numberOfColumns = 1):
26862686
*
26872687
* @return $this
26882688
*/
2689-
public function insertNewColumnBeforeByIndex(int $beforeColumnIndex, int $numberOfColumns = 1)
2689+
public function insertNewColumnBeforeByIndex(int $beforeColumnIndex, int $numberOfColumns = 1): static
26902690
{
26912691
if ($beforeColumnIndex >= 1) {
26922692
return $this->insertNewColumnBefore(Coordinate::stringFromColumnIndex($beforeColumnIndex), $numberOfColumns);
@@ -2821,7 +2821,7 @@ private function removeColumnDimensions(int $pColumnIndex, int $numberOfColumns)
28212821
*
28222822
* @return $this
28232823
*/
2824-
public function removeColumnByIndex(int $columnIndex, int $numColumns = 1)
2824+
public function removeColumnByIndex(int $columnIndex, int $numColumns = 1): static
28252825
{
28262826
if ($columnIndex >= 1) {
28272827
return $this->removeColumn(Coordinate::stringFromColumnIndex($columnIndex), $numColumns);
@@ -3064,7 +3064,7 @@ public function getSelectedCells()
30643064
*
30653065
* @return $this
30663066
*/
3067-
public function setSelectedCell($coordinate)
3067+
public function setSelectedCell($coordinate): static
30683068
{
30693069
return $this->setSelectedCells($coordinate);
30703070
}
@@ -3129,7 +3129,7 @@ private function setSelectedCellsActivePane(): void
31293129
*
31303130
* @return $this
31313131
*/
3132-
public function setSelectedCellByColumnAndRow($columnIndex, $row)
3132+
public function setSelectedCellByColumnAndRow($columnIndex, $row): static
31333133
{
31343134
return $this->setSelectedCells(Coordinate::stringFromColumnIndex($columnIndex) . $row);
31353135
}

0 commit comments

Comments
 (0)