Code Duplication    Length = 7-8 lines in 2 locations

src/Relations/HasOneOrMany.php 1 location

@@ 83-89 (lines=7) @@
80
     * @param RecordCollection $collection
81
     * @return Query
82
     */
83
    public function getEagerQuery(RecordCollection $collection)
84
    {
85
        $fkList = $this->getEagerFkList($collection);
86
        $query = $this->newQuery();
87
        $query->where($this->getFK() . ' IN ?', $fkList);
88
        return $query;
89
    }
90
91
    /** @noinspection PhpMissingParentCallCommonInspection
92
     * @param RecordCollection $collection

src/Relations/Relation.php 1 location

@@ 436-443 (lines=8) @@
433
     * @return Query
434
     * @throws Exception
435
     */
436
    public function getEagerQuery(RecordCollection $collection)
437
    {
438
        $fkList = $this->getEagerFkList($collection);
439
        $query = $this->newQuery();
440
        $query->where($this->getWithPK() . ' IN ?', $fkList);
441
442
        return $query;
443
    }
444
445
    /**
446
     * @param RecordCollection $collection