From 1f45c9e84f29f351fcb84f7b73f433a4d62419b3 Mon Sep 17 00:00:00 2001 From: Nattfarinn Date: Wed, 7 Aug 2024 09:45:04 +0200 Subject: [PATCH] fix: Code review --- eZ/Publish/Core/Persistence/Legacy/Content/Handler.php | 2 ++ .../Persistence/Legacy/Tests/Content/ContentHandlerTest.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php index 66b81eeeef..430f3b7b8a 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php @@ -263,6 +263,8 @@ public function publish($contentId, $versionNo, MetadataUpdateStruct $metaDataUp * @param string|null $languageCode * * @return \eZ\Publish\SPI\Persistence\Content + * + * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException */ public function createDraftFromVersion($contentId, $srcVersion, $userId, ?string $languageCode = null) { diff --git a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php index d815e4c2ee..133e8904f5 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php +++ b/eZ/Publish/Core/Persistence/Legacy/Tests/Content/ContentHandlerTest.php @@ -110,9 +110,9 @@ class ContentHandlerTest extends TestCase protected $contentTypeHandlerMock; /** - * @var \eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler + * @var \PHPUnit\Framework\MockObject\MockObject&\eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler */ - protected $languageHandlerMock; + private $languageHandlerMock; /** * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::create @@ -1617,7 +1617,7 @@ protected function getContentTypeHandlerMock() } /** - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler + * @return \PHPUnit\Framework\MockObject\MockObject&\eZ\Publish\Core\Persistence\Legacy\Content\Language\Handler */ protected function getLanguageHandlerMock(): LanguageHandler {