From 8eaceb0f9246233e0dd84df78bdaa23eb5f1d872 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Sun, 17 May 2020 19:42:28 +0900 Subject: [PATCH] Fix return type docblock for the Cells::get() PHPStorm inspections and PHPStan display an incorrect hint or error if the special type `null` is not specified. Closes #1398 --- CHANGELOG.md | 1 + src/PhpSpreadsheet/Collection/Cells.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index deeb00a6..3eeeed15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). ### Fixed - Fix Chart samples by updating chart parameter from 0 to DataSeries::EMPTY_AS_GAP [#1448](https://github.com/PHPOffice/PhpSpreadsheet/pull/1448) +- Fix return type in docblock for the Cells::get() [#1398](https://github.com/PHPOffice/PhpSpreadsheet/pull/1398) ### Changed diff --git a/src/PhpSpreadsheet/Collection/Cells.php b/src/PhpSpreadsheet/Collection/Cells.php index 127403d9..b9017e0e 100644 --- a/src/PhpSpreadsheet/Collection/Cells.php +++ b/src/PhpSpreadsheet/Collection/Cells.php @@ -426,7 +426,7 @@ class Cells * * @param string $pCoord Coordinate of the cell * - * @return \PhpOffice\PhpSpreadsheet\Cell\Cell Cell that was found, or null if not found + * @return null|\PhpOffice\PhpSpreadsheet\Cell\Cell Cell that was found, or null if not found */ public function get($pCoord) {