Skip to content

Commit 4cc90c3

Browse files
authored
Merge pull request #2417 from franmomu/fix_phpstan
Fix PHPStan build
2 parents d15c857 + f64145a commit 4cc90c3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/Doctrine/ODM/MongoDB/Tests/Functional/AtomicSetTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ public function testAtomicCollectionReplacedAndUpdated(): void
162162
$this->assertCount(1, $this->logger, 'Inserting a document with an embed-many collection requires one query');
163163
$this->dm->clear();
164164

165-
$user = $this->dm->getRepository(get_class($user))->find($user->id);
166-
$user->phonenumbers = new ArrayCollection();
167-
$user->phonenumbers[] = new Phonenumber('87654321');
165+
$user = $this->dm->getRepository(get_class($user))->find($user->id);
166+
$user->phonenumbers = new ArrayCollection([new Phonenumber('87654321')]);
168167
$this->logger->clear();
169168
$this->dm->flush();
170169
$this->assertCount(1, $this->logger, 'Updating emptied collection requires one query');

0 commit comments

Comments
 (0)