Code Duplication    Length = 12-12 lines in 2 locations

src/Builders/Traits/Relations.php 2 locations

@@ 36-47 (lines=12) @@
33
     *
34
     * @return OneToOne
35
     */
36
    public function oneToOne($entity, $field = null, callable $callback = null)
37
    {
38
        return $this->addRelation(
39
            new OneToOne(
40
                $this->getBuilder(),
41
                $this->getNamingStrategy(),
42
                $this->guessSingularField($entity, $field),
43
                $entity
44
            ),
45
            $callback
46
        );
47
    }
48
49
    /**
50
     * @param string        $entity
@@ 68-79 (lines=12) @@
65
     *
66
     * @return ManyToOne
67
     */
68
    public function manyToOne($entity, $field = null, callable $callback = null)
69
    {
70
        return $this->addRelation(
71
            new ManyToOne(
72
                $this->getBuilder(),
73
                $this->getNamingStrategy(),
74
                $this->guessSingularField($entity, $field),
75
                $entity
76
            ),
77
            $callback
78
        );
79
    }
80
81
    /**
82
     * @param string        $entity