Code Duplication    Length = 9-9 lines in 2 locations

htdocs/xoops_lib/Xoops.php 2 locations

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