Code Duplication    Length = 9-14 lines in 2 locations

manager/includes/src/Core.php 2 locations

@@ 3872-3885 (lines=14) @@
3869
     * @return bool {array; false} - Result array with fields or false.
3870
     * - Result array with fields or false.
3871
     */
3872
    public function getDocument($id = 0, $fields = '*', $published = 1, $deleted = 0)
3873
    {
3874
        if ($id == 0) {
3875
            return false;
3876
        } else {
3877
            $docs = $this->getDocuments(array($id), $published, $deleted, $fields, '', '', '', 1);
3878
3879
            if ($docs != false) {
3880
                return $docs[0];
3881
            } else {
3882
                return false;
3883
            }
3884
        }
3885
    }
3886
3887
    /**
3888
     * @param string $field
@@ 4694-4702 (lines=9) @@
4691
     *                        Default: 1
4692
     * @return bool
4693
     */
4694
    public function getTemplateVar($idname = "", $fields = "*", $docid = "", $published = 1)
4695
    {
4696
        if ($idname == "") {
4697
            return false;
4698
        } else {
4699
            $result = $this->getTemplateVars(array($idname), $fields, $docid, $published, "", ""); //remove sorting for speed
4700
            return ($result != false) ? $result[0] : false;
4701
        }
4702
    }
4703
4704
    /**
4705
     * getTemplateVars