From 6627c20895b26883a4e194d151437fa1ca667287 Mon Sep 17 00:00:00 2001 From: Nattfarinn Date: Wed, 29 May 2024 11:34:22 +0200 Subject: [PATCH] fix: Code review --- phpstan-baseline.neon | 10 ---------- .../Event/Mapper/ResolveMissingFieldEvent.php | 2 ++ .../Persistence/Legacy/Content/StorageHandlerTest.php | 6 ++++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bdab3e2af6..2274e7a371 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -52965,16 +52965,6 @@ parameters: count: 1 path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - message: "#^Call to an undefined method Ibexa\\\\Contracts\\\\Core\\\\FieldType\\\\FieldStorage\\:\\:expects\\(\\)\\.$#" - count: 8 - path: tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php - - - - message: "#^Call to an undefined method Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\StorageRegistry\\:\\:expects\\(\\)\\.$#" - count: 5 - path: tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php - - message: "#^Method Ibexa\\\\Tests\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\StorageRegistryTest\\:\\:testGetNotFound\\(\\) has no return type specified\\.$#" count: 1 diff --git a/src/contracts/Event/Mapper/ResolveMissingFieldEvent.php b/src/contracts/Event/Mapper/ResolveMissingFieldEvent.php index 01f4a23d3b..df579341c1 100644 --- a/src/contracts/Event/Mapper/ResolveMissingFieldEvent.php +++ b/src/contracts/Event/Mapper/ResolveMissingFieldEvent.php @@ -4,6 +4,8 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); + namespace Ibexa\Contracts\Core\Event\Mapper; use Ibexa\Contracts\Core\Persistence\Content; diff --git a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php index 0d75164ee6..2ef2185b43 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageHandlerTest.php @@ -19,10 +19,12 @@ */ class StorageHandlerTest extends TestCase { + /** @var \Ibexa\Core\Persistence\Legacy\Content\StorageRegistry&\PHPUnit\Framework\MockObject\MockObject */ protected StorageRegistry $storageRegistryMock; protected StorageHandler $storageHandler; + /** @var \Ibexa\Contracts\Core\FieldType\FieldStorage&\PHPUnit\Framework\MockObject\MockObject */ protected FieldStorage $storageMock; protected VersionInfo $versionInfoMock; @@ -184,7 +186,7 @@ protected function getContextMock(): array /** * Returns a StorageRegistry mock. * - * @return \Ibexa\Core\Persistence\Legacy\Content\StorageRegistry + * @return \Ibexa\Core\Persistence\Legacy\Content\StorageRegistry&\PHPUnit\Framework\MockObject\MockObject */ protected function getStorageRegistryMock(): StorageRegistry { @@ -201,7 +203,7 @@ protected function getStorageRegistryMock(): StorageRegistry /** * Returns a Storage mock. * - * @return \Ibexa\Contracts\Core\FieldType\FieldStorage + * @return \Ibexa\Contracts\Core\FieldType\FieldStorage&\PHPUnit\Framework\MockObject\MockObject */ protected function getStorageMock(): FieldStorage {