Code Duplication    Length = 10-10 lines in 2 locations

htdocs/xoops_lib/Xoops.php 2 locations

@@ 1706-1715 (lines=10) @@
1703
     *
1704
     * @return void
1705
     */
1706
    public function addConfigs($configs, $dirname = 'system')
1707
    {
1708
        $dirname = trim(strtolower($dirname));
1709
        if (empty($dirname)) {
1710
            $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1711
        }
1712
        if (!empty($dirname)) {
1713
            $this->moduleConfigs[$dirname] = array_merge($this->moduleConfigs[$dirname], (array)$configs);
1714
        }
1715
    }
1716
1717
    /**
1718
     * Set Config Value
@@ 1726-1735 (lines=10) @@
1723
     *
1724
     * @return void
1725
     */
1726
    public function setConfig($key, $value = null, $dirname = 'system')
1727
    {
1728
        if (!is_null($value)) {
1729
            $dirname = trim(strtolower($dirname));
1730
            if (empty($dirname)) {
1731
                $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1732
            }
1733
            $this->moduleConfigs[$dirname][$key] =& $value;
1734
        }
1735
    }
1736
1737
    /**
1738
     * Unset Config Value