Code Duplication    Length = 7-8 lines in 2 locations

src/Comment/CommentController.php 1 location

@@ 228-235 (lines=8) @@
225
    }
226
227
228
    public function returnCatId($category)
229
    {
230
        $cat = new PostCategory();
231
        $cat->setDb($this->di->get("db"));
232
        // var_dump($cat->getId($category));
233
        $id = $cat->getId($category);
234
        return $id;
235
    }
236
}
237

src/Overview/OverviewController.php 1 location

@@ 124-130 (lines=7) @@
121
        return $data;
122
    }
123
124
    public function getCatName($id)
125
    {
126
        $postcat = new PostCategory();
127
        $postcat->setDb($this->di->get("db"));
128
        $res = $postcat->getCatName($id);
129
        return $res;
130
    }
131
}
132