Code Duplication    Length = 10-11 lines in 2 locations

src/models/CommentsQuery.php 2 locations

@@ 44-54 (lines=11) @@
41
     * @param $params
42
     * @return $this
43
     */
44
    public function byModel($params)
45
    {
46
        $commentClass = CommentsModule::getInstance()->commentModelClass;
47
48
        return $this->andWhere([
49
            'model' => $params['model'],
50
            'model_key' => $params['model_key'],
51
            'language' => Yii::$app->language,
52
            'status' => $commentClass::STATUS_PUBLISHED,
53
        ]);
54
    }
55
56
    /**
57
     * Select by url
@@ 61-70 (lines=10) @@
58
     * @param $params
59
     * @return $this
60
     */
61
    public function byUrl($params)
62
    {
63
        $commentClass = CommentsModule::getInstance()->commentModelClass;
64
65
        return $this->andWhere([
66
            'url' => $params['url'],
67
            'language' => Yii::$app->language,
68
            'status' => $commentClass::STATUS_PUBLISHED,
69
        ]);
70
    }
71
72
    /**
73
     * Select without children