Skip to content

Commit f13a8da

Browse files
committed
Rector ReturnTypeFromStrictParamRector
1 parent 129871c commit f13a8da

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

src/PhpSpreadsheet/Calculation/Calculation.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5669,10 +5669,8 @@ private function getArgumentDefaultValue(ReflectionParameter $methodArgument)
56695669
* Add cell reference if needed while making sure that it is the last argument.
56705670
*
56715671
* @param array|string $functionCall
5672-
*
5673-
* @return array
56745672
*/
5675-
private function addCellReference(array $args, bool $passCellReference, $functionCall, ?Cell $cell = null)
5673+
private function addCellReference(array $args, bool $passCellReference, $functionCall, ?Cell $cell = null): array
56765674
{
56775675
if ($passCellReference) {
56785676
if (is_array($functionCall)) {

src/PhpSpreadsheet/Collection/Cells.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,8 @@ private function destructIfNeeded(self $cells, string $message): void
379379
*
380380
* @param string $cellCoordinate Coordinate of the cell to update
381381
* @param Cell $cell Cell to update
382-
*
383-
* @return Cell
384382
*/
385-
public function add($cellCoordinate, Cell $cell)
383+
public function add($cellCoordinate, Cell $cell): Cell
386384
{
387385
if ($cellCoordinate !== $this->currentCoordinate) {
388386
$this->storeCurrentCell();

src/PhpSpreadsheet/Reader/Ods.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,8 @@ protected function loadSpreadsheetFromFile(string $filename): Spreadsheet
241241

242242
/**
243243
* Loads PhpSpreadsheet from file into PhpSpreadsheet instance.
244-
*
245-
* @return Spreadsheet
246244
*/
247-
public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet)
245+
public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet): Spreadsheet
248246
{
249247
File::assertFile($filename, self::INITIAL_FILE);
250248

src/PhpSpreadsheet/Spreadsheet.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,8 @@ public function sheetNameExists($worksheetName): bool
610610
*
611611
* @param Worksheet $worksheet The worksheet to add
612612
* @param null|int $sheetIndex Index where sheet should go (0,1,..., or null for last)
613-
*
614-
* @return Worksheet
615613
*/
616-
public function addSheet(Worksheet $worksheet, $sheetIndex = null)
614+
public function addSheet(Worksheet $worksheet, $sheetIndex = null): Worksheet
617615
{
618616
if ($this->sheetNameExists($worksheet->getTitle())) {
619617
throw new Exception(

src/PhpSpreadsheet/Worksheet/Worksheet.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,8 @@ public function getChartCollection()
612612
* Add chart.
613613
*
614614
* @param null|int $chartIndex Index where chart should go (0,1,..., or null for last)
615-
*
616-
* @return Chart
617615
*/
618-
public function addChart(Chart $chart, $chartIndex = null)
616+
public function addChart(Chart $chart, $chartIndex = null): Chart
619617
{
620618
$chart->setWorksheet($this);
621619
if ($chartIndex === null) {

0 commit comments

Comments
 (0)