Repository: doctrine/data-fixtures (language: php)

Issue:
phpspec/prophecy is now explicitely needed for tests
Hi,

Since PHPUnit dropped phpspec/prophecy from its dependencies (https://github.com/sebastianbergmann/phpunit/issues/5033), the following error is triggered when running the testsuite with latest PHPUnit.

~~~
There was 1 error:

1) Doctrine\Tests\Common\DataFixtures\ReferenceRepositoryTest::testGetIdentifierWhenHasNotBeenManagedYetByUnitOfWork
PHPUnit\Framework\Exception: This test uses TestCase::prophesize(), but phpspec/prophecy is not installed. Please run "composer require --dev phpspec/prophecy".
~~~

Regards

David


Discussion / hints:

Fix patch:
diff --git a/composer.json b/composer.json
index 78b40d31..015fec82 100644
--- a/composer.json
+++ b/composer.json
@@ -24,11 +24,10 @@
     },
     "require-dev": {
         "ext-sqlite3": "*",
-        "doctrine/coding-standard": "^9.0",
+        "doctrine/coding-standard": "^10.0",
         "doctrine/dbal": "^2.13 || ^3.0",
         "doctrine/mongodb-odm": "^1.3.0 || ^2.0.0",
         "doctrine/orm": "^2.12",
-        "jangregor/phpstan-prophecy": "^1",
         "phpstan/phpstan": "^1.5",
         "phpunit/phpunit": "^8.5 || ^9.5",
         "symfony/cache": "^5.0 || ^6.0",
diff --git a/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php b/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php
index 921d3fef..b1b3f2f6 100644
--- a/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php
+++ b/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php
@@ -47,9 +47,7 @@ public function __construct(ObjectManager $manager)
         $this->referenceRepository = new ReferenceRepository($manager);
     }
 
-    /**
-     * @return ReferenceRepository
-     */
+    /** @return ReferenceRepository */
     public function getReferenceRepository()
     {
         return $this->referenceRepository;
@@ -70,9 +68,7 @@ public function setPurger(PurgerInterface $purger)
         $this->purger = $purger;
     }
 
-    /**
-     * @return PurgerInterface
-     */
+    /** @return PurgerInterface */
     public function getPurger()
     {
         return $this->purger;
diff --git a/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutorCommon.php b/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutorCommon.php
index 541c6d46..6852845c 100644
--- a/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutorCommon.php
+++ b/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutorCommon.php
@@ -11,9 +11,7 @@
 use Doctrine\ORM\EntityManager;
 use Doctrine\ORM\EntityManagerInterface;
 
-/**
- * @internal
- */
+/** @internal */
 trait ORMExecutorCommon
 {
     /** @var EntityManager|EntityManagerDecorator */
diff --git a/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php b/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
index f923cc9c..09185605 100644
--- a/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
+++ b/lib/Doctrine/Common/DataFixtures/Executor/PHPCRExecutor.php
@@ -34,9 +34,7 @@ public function __construct(DocumentManagerInterface $dm, ?PHPCRPurger $purger =
         $this->setPurger($purger);
     }
 
-    /**
-     * @return DocumentManagerInterface
-     */
+    /** @return DocumentManagerInterface */
     public function getObjectManager()
     {
         return $this->dm;
diff --git a/lib/Doctrine/Common/DataFixtures/Loader.php b/lib/Doctrine/Common/DataFixtures/Loader.php
index 668eef2b..3918ec26 100644
--- a/lib/Doctrine/Common/DataFixtures/Loader.php
+++ b/lib/Doctrine/Common/DataFixtures/Loader.php
@@ -371,9 +371,7 @@ private function orderFixturesByDependencies()
         $this->orderedFixtures = array_merge($this->orderedFixtures, $orderedFixtures);
     }
 
-    /**
-     * @psalm-param iterable<class-string> $dependenciesClasses
-     */
+    /** @psalm-param iterable<class-string> $dependenciesClasses */
     private function validateDependencies(iterable $dependenciesClasses): bool
     {
         $loadedFixtureClasses = array_keys($this->fixtures);
diff --git a/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php b/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php
index 32c46606..f6346a92 100644
--- a/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php
+++ b/lib/Doctrine/Common/DataFixtures/Purger/ORMPurger.php
@@ -258,9 +258,7 @@ private function getTableName(ClassMetadata $class, AbstractPlatform $platform):
         return $this->em->getConfiguration()->getQuoteStrategy()->getTableName($class, $platform);
     }
 
-    /**
-     * @param mixed[] $assoc
-     */
+    /** @param mixed[] $assoc */
     private function getJoinTableName(
         array $assoc,
         ClassMetadata $class,
diff --git a/lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php b/lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
index def40ed3..70e9b0f9 100644
--- a/lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
+++ b/lib/Doctrine/Common/DataFixtures/Purger/PHPCRPurger.php
@@ -26,17 +26,13 @@ public function setDocumentManager(DocumentManager $dm)
         $this->dm = $dm;
     }
 
-    /**
-     * @return DocumentManagerInterface|null
-     */
+    /** @return DocumentManagerInterface|null */
     public function getObjectManager()
     {
         return $this->dm;
     }
 
-    /**
-     * @inheritDoc
-     */
+    /** @inheritDoc */
     public function purge()
     {
         $session = $this->dm->getPhpcrSession();
diff --git a/lib/Doctrine/Common/DataFixtures/Sorter/TopologicalSorter.php b/lib/Doctrine/Common/DataFixtures/Sorter/TopologicalSorter.php
index e1321a70..19f0b803 100644
--- a/lib/Doctrine/Common/DataFixtures/Sorter/TopologicalSorter.php
+++ b/lib/Doctrine/Common/DataFixtures/Sorter/TopologicalSorter.php
@@ -45,9 +45,7 @@ class TopologicalSorter
      */
     private $allowCyclicDependencies;
 
-    /**
-     * @param bool $allowCyclicDependencies
-     */
+    /** @param bool $allowCyclicDependencies */
     public function __construct($allowCyclicDependencies = true)
     {
         $this->allowCyclicDependencies = $allowCyclicDependencies;
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 2c2aa3d9..cc184272 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -7,4 +7,3 @@ parameters:
 
 includes:
     - phpstan-baseline.neon
-    - vendor/jangregor/phpstan-prophecy/extension.neon


Test patch:
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorSharedFixtureTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorSharedFixtureTest.php
index e7281780..a27457dd 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorSharedFixtureTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorSharedFixtureTest.php
@@ -75,9 +75,7 @@ public function testSharedFixtures(): void
         $this->assertEquals('admin@example.com', $userReference->getEmail());
     }
 
-    /**
-     * @return SharedFixtureInterface&MockObject
-     */
+    /** @return SharedFixtureInterface&MockObject */
     private function getMockFixture(): SharedFixtureInterface
     {
         return $this->createMock(SharedFixtureInterface::class);
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php
index 8b779d4b..764c67fb 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/Executor/ORMExecutorTest.php
@@ -124,25 +124,19 @@ public function testExecuteMultipleTransactionsCountTransactionalCalls(): void
         @$executor->execute([$fixture, $fixture]);
     }
 
-    /**
-     * @return EntityManagerInterface&MockObject
-     */
+    /** @return EntityManagerInterface&MockObject */
     private function getMockEntityManager(): EntityManagerInterface
     {
         return $this->createMock(EntityManagerInterface::class);
     }
 
-    /**
-     * @return FixtureInterface&MockObject
-     */
+    /** @return FixtureInterface&MockObject */
     private function getMockFixture(): FixtureInterface
     {
         return $this->createMock(FixtureInterface::class);
     }
 
-    /**
-     * @return ORMPurger&MockObject
-     */
+    /** @return ORMPurger&MockObject */
     private function getMockPurger(): ORMPurger
     {
         return $this->createMock(ORMPurger::class);
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php
index d8f6c9e3..3367a6dd 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/Executor/PHPCRExecutorTest.php
@@ -119,17 +119,13 @@ public function testFailedTransactionalStopsPurgingAndFixtureLoading(): void
         }
     }
 
-    /**
-     * @return PHPCRPurger&MockObject
-     */
+    /** @return PHPCRPurger&MockObject */
     private function getPurger()
     {
         return $this->createMock(PHPCRPurger::class);
     }
 
-    /**
-     * @return DocumentManager&MockObject
-     */
+    /** @return DocumentManager&MockObject */
     private function getDocumentManager()
     {
         if (! class_exists(DocumentManager::class)) {
@@ -147,9 +143,7 @@ private function getDocumentManager()
             ->getMock();
     }
 
-    /**
-     * @return FixtureInterface&MockObject
-     */
+    /** @return FixtureInterface&MockObject */
     private function getMockFixture()
     {
         return $this->createMock(FixtureInterface::class);
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Purger/MongoDBPurgerTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Purger/MongoDBPurgerTest.php
index b53f2d18..26a4a7a3 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/Purger/MongoDBPurgerTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/Purger/MongoDBPurgerTest.php
@@ -74,9 +74,7 @@ public function testPurgeKeepsIndices(): void
         $this->assertIndexCount(2, $collection);
     }
 
-    /**
-     * @param Collection|MongoCollection $collection
-     */
+    /** @param Collection|MongoCollection $collection */
     private function assertIndexCount(int $expectedCount, $collection): void
     {
         if ($collection instanceof Collection) {
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/ReferenceRepositoryTest.php b/tests/Doctrine/Tests/Common/DataFixtures/ReferenceRepositoryTest.php
index 26228eba..72da987c 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/ReferenceRepositoryTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/ReferenceRepositoryTest.php
@@ -14,11 +14,8 @@
 use Doctrine\Persistence\Proxy;
 use Doctrine\Tests\Common\DataFixtures\TestEntity\Role;
 use OutOfBoundsException;
-use Prophecy\Prophecy\ProphecyInterface;
 use stdClass;
 
-use function assert;
-
 class ReferenceRepositoryTest extends BaseTest
 {
     public function testReferenceEntry(): void
@@ -189,19 +186,27 @@ public function testGetIdentifierWhenHasNotBeenManagedYetByUnitOfWork(): void
         $role               = new Role();
         $identitiesExpected = ['id' => 1];
 
-        $uow = $this->prophesize(UnitOfWork::class);
-        assert($uow instanceof UnitOfWork || $uow instanceof ProphecyInterface);
-        $uow->isInIdentityMap($role)->shouldBeCalledTimes(2)->willReturn(true, false);
-
-        $classMetadata = $this->prophesize(ClassMetadata::class);
-        $classMetadata->getIdentifierValues($role)->shouldBeCalled()->willReturn($identitiesExpected);
+        $uow = $this->createMock(UnitOfWork::class);
+        $uow->expects($this->exactly(2))
+            ->method('isInIdentityMap')
+            ->with($role)
+            ->willReturn(true, false);
+
+        $classMetadata = $this->createMock(ClassMetadata::class);
+        $classMetadata->expects($this->once())
+            ->method('getIdentifierValues')
+            ->with($role)
+            ->willReturn($identitiesExpected);
+
+        $em = $this->createMock(EntityManagerInterface::class);
+        $em->method('getUnitOfWork')
+           ->willReturn($uow);
+        $em->expects($this->once())
+            ->method('getClassMetadata')
+            ->with(Role::class)
+            ->willReturn($classMetadata);
 
-        $em = $this->prophesize(EntityManagerInterface::class);
-        assert($em instanceof EntityManagerInterface || $em instanceof ProphecyInterface);
-        $em->getUnitOfWork()->shouldBeCalled()->willReturn($uow);
-        $em->getClassMetadata(Role::class)->shouldBeCalled()->willReturn($classMetadata);
-
-        $referenceRepository = new ReferenceRepository($em->reveal());
+        $referenceRepository = new ReferenceRepository($em);
         $referenceRepository->setReference('entity', $role);
         $identities = $referenceRepository->getIdentities();
 
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/Sorter/VertexTest.php b/tests/Doctrine/Tests/Common/DataFixtures/Sorter/VertexTest.php
index c2d2b87e..8be83350 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/Sorter/VertexTest.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/Sorter/VertexTest.php
@@ -8,9 +8,7 @@
 use Doctrine\ORM\Mapping\ClassMetadata;
 use Doctrine\Tests\Common\DataFixtures\BaseTest;
 
-/**
- * @covers \Doctrine\Common\DataFixtures\Sorter\Vertex
- */
+/** @covers \Doctrine\Common\DataFixtures\Sorter\Vertex */
 class VertexTest extends BaseTest
 {
     public function testNode(): void
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestDocument/Role.php b/tests/Doctrine/Tests/Common/DataFixtures/TestDocument/Role.php
index 11299556..f98fb386 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestDocument/Role.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestDocument/Role.php
@@ -6,9 +6,7 @@
 
 use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
 
-/**
- * @ODM\Document
- */
+/** @ODM\Document */
 class Role
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Group.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Group.php
index a4e9fa4a..fd094ffe 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Group.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Group.php
@@ -6,9 +6,7 @@
 
 use Doctrine\ORM\Mapping as ORM;
 
-/**
- * @ORM\Entity()
- */
+/** @ORM\Entity() */
 class Group
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Link.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Link.php
index 7a95d159..32964a16 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Link.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Link.php
@@ -7,9 +7,7 @@
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Tests\Common\DataFixtures\TestValueObjects\Uuid;
 
-/**
- * @ORM\Entity
- */
+/** @ORM\Entity */
 class Link
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Quoted.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Quoted.php
index 4ffe30c0..1e8c76fa 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Quoted.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Quoted.php
@@ -60,17 +60,13 @@ public function setSelect(?string $select): void
         $this->select = $select;
     }
 
-    /**
-     * @return Collection|null
-     */
+    /** @return Collection|null */
     public function getSelects(): ?Collection
     {
         return $this->selects;
     }
 
-    /**
-     * @param Collection|null $selects
-     */
+    /** @param Collection|null $selects */
     public function setSelects(?Collection $selects): void
     {
         $this->selects = $selects;
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Role.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Role.php
index b9717e6d..cc087a14 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Role.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/Role.php
@@ -6,9 +6,7 @@
 
 use Doctrine\ORM\Mapping as ORM;
 
-/**
- * @ORM\Entity
- */
+/** @ORM\Entity */
 class Role
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/User.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/User.php
index 08e3bbd4..dc7ade72 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/User.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/User.php
@@ -9,9 +9,7 @@
 
 use function md5;
 
-/**
- * @ORM\Entity
- */
+/** @ORM\Entity */
 class User
 {
     /**
@@ -119,9 +117,7 @@ public function getRole(): ?Role
         return $this->role;
     }
 
-    /**
-     * @return User[]|Collection
-     */
+    /** @return User[]|Collection */
     public function getReaders()
     {
         return $this->readers;
@@ -139,9 +135,7 @@ public function setReaders($readers)
         return $this;
     }
 
-    /**
-     * @return User[]|Collection
-     */
+    /** @return User[]|Collection */
     public function getAuthors()
     {
         return $this->authors;
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/UserWithSchema.php b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/UserWithSchema.php
index 13515719..92ff5fd6 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/UserWithSchema.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestEntity/UserWithSchema.php
@@ -120,17 +120,13 @@ public function getRole(): ?Role
         return $this->role;
     }
 
-    /**
-     * @psalm-return Collection<int, self>
-     */
+    /** @psalm-return Collection<int, self> */
     public function getReaders(): Collection
     {
         return $this->readers;
     }
 
-    /**
-     * @psalm-param Collection<int, self> $readers
-     */
+    /** @psalm-param Collection<int, self> $readers */
     public function setReaders($readers): self
     {
         $this->readers = $readers;
@@ -138,17 +134,13 @@ public function setReaders($readers): self
         return $this;
     }
 
-    /**
-     * @psalm-return Collection<int, self>
-     */
+    /** @psalm-return Collection<int, self> */
     public function getAuthors()
     {
         return $this->authors;
     }
 
-    /**
-     * @param Collection<int, self> $authors
-     */
+    /** @param Collection<int, self> $authors */
     public function setAuthors($authors): self
     {
         $this->authors = $authors;
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/ExcludedEntity.php b/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/ExcludedEntity.php
index 19402540..14e240b9 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/ExcludedEntity.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/ExcludedEntity.php
@@ -6,9 +6,7 @@
 
 use Doctrine\ORM\Mapping as ORM;
 
-/**
- * @ORM\Entity
- */
+/** @ORM\Entity */
 class ExcludedEntity
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/IncludedEntity.php b/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/IncludedEntity.php
index 9bfbf1d1..8561b29a 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/IncludedEntity.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestPurgeEntity/IncludedEntity.php
@@ -6,9 +6,7 @@
 
 use Doctrine\ORM\Mapping as ORM;
 
-/**
- * @ORM\Entity
- */
+/** @ORM\Entity */
 class IncludedEntity
 {
     /**
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestTypes/UuidType.php b/tests/Doctrine/Tests/Common/DataFixtures/TestTypes/UuidType.php
index e32f946c..5a5d8ae9 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestTypes/UuidType.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestTypes/UuidType.php
@@ -12,9 +12,7 @@ class UuidType extends Type
 {
     public const NAME = 'uuid';
 
-    /**
-     * @param mixed[] $fieldDeclaration
-     */
+    /** @param mixed[] $fieldDeclaration */
     public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
     {
         $fieldDeclaration['length'] = 36;
@@ -23,17 +21,13 @@ public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pla
         return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
     }
 
-    /**
-     * @param ?string $value
-     */
+    /** @param ?string $value */
     public function convertToPHPValue($value, AbstractPlatform $platform): ?Uuid
     {
         return $value === null ? null : new Uuid($value);
     }
 
-    /**
-     * @param ?Uuid $value
-     */
+    /** @param ?Uuid $value */
     public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
     {
         return $value === null ? null : (string) $value;
diff --git a/tests/Doctrine/Tests/Common/DataFixtures/TestValueObjects/Uuid.php b/tests/Doctrine/Tests/Common/DataFixtures/TestValueObjects/Uuid.php
index 43be709a..7a075194 100644
--- a/tests/Doctrine/Tests/Common/DataFixtures/TestValueObjects/Uuid.php
+++ b/tests/Doctrine/Tests/Common/DataFixtures/TestValueObjects/Uuid.php
@@ -32,9 +32,7 @@ public function serialize(): string
         return $this->id;
     }
 
-    /**
-     * @param string $serialized
-     */
+    /** @param string $serialized */
     public function unserialize($serialized): void
     {
         $this->id = $serialized;
diff --git a/tests/Doctrine/Tests/Mock/Node.php b/tests/Doctrine/Tests/Mock/Node.php
index 64fbdc4a..933d18e0 100644
--- a/tests/Doctrine/Tests/Mock/Node.php
+++ b/tests/Doctrine/Tests/Mock/Node.php
@@ -12,9 +12,7 @@ class Node
     /** @var mixed */
     public $value;
 
-    /**
-     * @param mixed $value
-     */
+    /** @param mixed $value */
     public function __construct($value)
     {
         $this->value = $value;