Code Duplication    Length = 11-11 lines in 2 locations

src/models/query/PlanQuery.php 2 locations

@@ 41-51 (lines=11) @@
38
        return parent::all($db);
39
    }
40
41
    public function withPrices()
42
    {
43
        return $this->with([
44
            'prices' => function (ActiveQuery $query) {
45
                $query
46
                    ->addSelect('main_object_id')
47
                    ->joinWith('object')
48
                    ->limit(-1);
49
            },
50
        ]);
51
    }
52
53
    public function joinWithPrices()
54
    {
@@ 53-63 (lines=11) @@
50
        ]);
51
    }
52
53
    public function joinWithPrices()
54
    {
55
        return $this->joinWith([
56
            'prices' => function (ActiveQuery $query) {
57
                $query
58
                    ->addSelect('main_object_id')
59
                    ->joinWith('object')
60
                    ->limit(-1);
61
            },
62
        ]);
63
    }
64
65
    /**
66
     * @return $this