Code Duplication    Length = 12-12 lines in 2 locations

src/Builders/Traits/Relations.php 2 locations

@@ 98-109 (lines=12) @@
95
     *
96
     * @return OneToMany
97
     */
98
    public function oneToMany($entity, $field = null, callable $callback = null)
99
    {
100
        return $this->addRelation(
101
            new OneToMany(
102
                $this->getBuilder(),
103
                $this->getNamingStrategy(),
104
                $this->guessPluralField($entity, $field),
105
                $entity
106
            ),
107
            $callback
108
        );
109
    }
110
111
    /**
112
     * @param string        $entity
@@ 130-141 (lines=12) @@
127
     *
128
     * @return ManyToMany
129
     */
130
    public function manyToMany($entity, $field = null, callable $callback = null)
131
    {
132
        return $this->addRelation(
133
            new ManyToMany(
134
                $this->getBuilder(),
135
                $this->getNamingStrategy(),
136
                $this->guessPluralField($entity, $field),
137
                $entity
138
            ),
139
            $callback
140
        );
141
    }
142
143
    /**
144
     * Adds a custom relation to the entity.