Code Duplication    Length = 9-9 lines in 2 locations

htdocs/xoops_lib/Xoops.php 2 locations

@@ 1170-1178 (lines=9) @@
1167
     *
1168
     * @return bool|XoopsModule
1169
     */
1170
    public function getModuleByDirname($dirname)
1171
    {
1172
        $key = "system/module/dirname/{$dirname}";
1173
        if (!$module = $this->cache()->read($key)) {
1174
            $module = $this->getHandlerModule()->getByDirname($dirname);
1175
            $this->cache()->write($key, $module);
1176
        }
1177
        return $module;
1178
    }
1179
1180
    /**
1181
     * Get Module By Id
@@ 1187-1195 (lines=9) @@
1184
     *
1185
     * @return bool|XoopsModule
1186
     */
1187
    public function getModuleById($id)
1188
    {
1189
        $key = "system/module/id/{$id}";
1190
        if (!$module = $this->cache()->read($key)) {
1191
            $module = $this->getHandlerModule()->getById($id);
1192
            $this->cache()->write($key, $module);
1193
        }
1194
        return $module;
1195
    }
1196
1197
    /**
1198
     * Render Simple Header