From 352b3ba6f6dad03863a8ef2696a1097146551699 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Fri, 11 Aug 2017 21:28:18 +0200 Subject: [PATCH] #6613 #6614 #6616 adding `void` return type to newly introduced test methods --- .../Doctrine/Tests/ORM/PersistentCollectionTest.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php index c7b68fe52..38be94522 100644 --- a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php @@ -3,7 +3,6 @@ namespace Doctrine\Tests\ORM; use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; use Doctrine\ORM\PersistentCollection; use Doctrine\ORM\UnitOfWork; use Doctrine\Tests\Mocks\ConnectionMock; @@ -150,7 +149,7 @@ class PersistentCollectionTest extends OrmTestCase * @group 6614 * @group 6616 */ - public function testWillKeepNewItemsInDirtyCollectionAfterInitialization() + public function testWillKeepNewItemsInDirtyCollectionAfterInitialization() : void { /* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */ $unitOfWork = $this->createMock(UnitOfWork::class); @@ -169,7 +168,7 @@ class PersistentCollectionTest extends OrmTestCase ->expects(self::once()) ->method('loadCollection') ->with($this->collection) - ->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) { + ->willReturnCallback(function (PersistentCollection $persistentCollection) use ($persistedElement) : void { $persistentCollection->unwrap()->add($persistedElement); }); @@ -185,7 +184,7 @@ class PersistentCollectionTest extends OrmTestCase * @group 6614 * @group 6616 */ - public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization() + public function testWillDeDuplicateNewItemsThatWerePreviouslyPersistedInDirtyCollectionAfterInitialization() : void { /* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */ $unitOfWork = $this->createMock(UnitOfWork::class); @@ -209,7 +208,7 @@ class PersistentCollectionTest extends OrmTestCase ->willReturnCallback(function (PersistentCollection $persistentCollection) use ( $persistedElement, $newElementThatIsAlsoPersisted - ) { + ) : void { $persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted); $persistentCollection->unwrap()->add($persistedElement); }); @@ -229,7 +228,7 @@ class PersistentCollectionTest extends OrmTestCase * @group 6614 * @group 6616 */ - public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded() + public function testWillNotMarkCollectionAsDirtyAfterInitializationIfNoElementsWereAdded() : void { /* @var $unitOfWork UnitOfWork|\PHPUnit_Framework_MockObject_MockObject */ $unitOfWork = $this->createMock(UnitOfWork::class); @@ -251,7 +250,7 @@ class PersistentCollectionTest extends OrmTestCase ->willReturnCallback(function (PersistentCollection $persistentCollection) use ( $persistedElement, $newElementThatIsAlsoPersisted - ) { + ) : void { $persistentCollection->unwrap()->add($newElementThatIsAlsoPersisted); $persistentCollection->unwrap()->add($persistedElement); });