Code Duplication    Length = 13-13 lines in 2 locations

application/modules/mod_link/models/Base/PageLinkProduct.php 1 location

@@ 808-820 (lines=13) @@
805
     * @param  mixed $value field value
806
     * @return $this|\mod_link\models\PageLinkProduct
807
     */
808
    public function setByPosition($pos, $value)
809
    {
810
        switch ($pos) {
811
            case 0:
812
                $this->setLinkId($value);
813
                break;
814
            case 1:
815
                $this->setProductId($value);
816
                break;
817
        } // switch()
818
819
        return $this;
820
    }
821
822
    /**
823
     * Populates the object using an array.

application/modules/mod_link/models/Base/PageLinkProducts.php 1 location

@@ 808-820 (lines=13) @@
805
     * @param  mixed $value field value
806
     * @return $this|\mod_link\models\PageLinkProducts
807
     */
808
    public function setByPosition($pos, $value)
809
    {
810
        switch ($pos) {
811
            case 0:
812
                $this->setLinkId($value);
813
                break;
814
            case 1:
815
                $this->setProductId($value);
816
                break;
817
        } // switch()
818
819
        return $this;
820
    }
821
822
    /**
823
     * Populates the object using an array.