From 4fb0e4506f33c0417e3a4ffa6b0494e1a71758ac Mon Sep 17 00:00:00 2001 From: Prokyonn Date: Wed, 3 Jun 2020 08:54:37 +0200 Subject: [PATCH] Fix getMediaId return type (#152) * Fix getMediaId return type * fix lint error * ignore phpstan error --- Content/Infrastructure/Sulu/Teaser/ContentTeaserProvider.php | 2 +- .../Sulu/SmartContent/DataItem/ContentDataItemTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Content/Infrastructure/Sulu/Teaser/ContentTeaserProvider.php b/Content/Infrastructure/Sulu/Teaser/ContentTeaserProvider.php index 340107c7..9030a56f 100644 --- a/Content/Infrastructure/Sulu/Teaser/ContentTeaserProvider.php +++ b/Content/Infrastructure/Sulu/Teaser/ContentTeaserProvider.php @@ -227,7 +227,7 @@ protected function getMoreText(ContentProjectionInterface $contentProjection, ar /** * @param mixed[] $data */ - protected function getMediaId(ContentProjectionInterface $contentProjection, array $data): ?string + protected function getMediaId(ContentProjectionInterface $contentProjection, array $data): ?int { if ($contentProjection instanceof ExcerptInterface) { if ($excerptImage = $contentProjection->getExcerptImage()) { diff --git a/Tests/Unit/Content/Infrastructure/Sulu/SmartContent/DataItem/ContentDataItemTest.php b/Tests/Unit/Content/Infrastructure/Sulu/SmartContent/DataItem/ContentDataItemTest.php index 6a0ae457..9a9d329a 100644 --- a/Tests/Unit/Content/Infrastructure/Sulu/SmartContent/DataItem/ContentDataItemTest.php +++ b/Tests/Unit/Content/Infrastructure/Sulu/SmartContent/DataItem/ContentDataItemTest.php @@ -95,6 +95,7 @@ public function testGetPublished(): void $dataItem = $this->getContentDataItem($contentProjection->reveal(), []); + /* @phpstan-ignore-next-line */ $this->assertSame($published, $dataItem->getPublished()); }