Code Duplication    Length = 12-14 lines in 2 locations

benchmark/Document/StoreDocumentBench.php 2 locations

@@ 54-65 (lines=12) @@
51
    /**
52
     * @Warmup(2)
53
     */
54
    public function benchStoreDocumentWithEmbedMany()
55
    {
56
        $user = new User();
57
        $user->setUsername('alcaeus');
58
        $user->setCreatedAt(new DateTimeImmutable());
59
        $user->addPhonenumber(new Phonenumber('12345678'));
60
        $user->addPhonenumber(new Phonenumber('12345678'));
61
62
        $this->getDocumentManager()->persist($user);
63
        $this->getDocumentManager()->flush();
64
        $this->getDocumentManager()->clear();
65
    }
66
67
    /**
68
     * @Warmup(2)
@@ 70-83 (lines=14) @@
67
    /**
68
     * @Warmup(2)
69
     */
70
    public function benchStoreDocumentWithReferenceOne()
71
    {
72
        $account = new Account();
73
        $account->setName('alcaeus');
74
75
        $user = new User();
76
        $user->setUsername('alcaeus');
77
        $user->setCreatedAt(new DateTimeImmutable());
78
        $user->setAccount($account);
79
80
        $this->getDocumentManager()->persist($user);
81
        $this->getDocumentManager()->flush();
82
        $this->getDocumentManager()->clear();
83
    }
84
85
    /**
86
     * @Warmup(2)