Code Duplication    Length = 10-10 lines in 2 locations

htdocs/xoops_lib/Xoops.php 2 locations

@@ 1712-1721 (lines=10) @@
1709
     *
1710
     * @return void
1711
     */
1712
    public function addConfigs($configs, $dirname = 'system')
1713
    {
1714
        $dirname = trim(strtolower($dirname));
1715
        if (empty($dirname)) {
1716
            $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1717
        }
1718
        if (!empty($dirname)) {
1719
            $this->moduleConfigs[$dirname] = array_merge($this->moduleConfigs[$dirname], (array)$configs);
1720
        }
1721
    }
1722
1723
    /**
1724
     * Set Config Value
@@ 1732-1741 (lines=10) @@
1729
     *
1730
     * @return void
1731
     */
1732
    public function setConfig($key, $value = null, $dirname = 'system')
1733
    {
1734
        if (!is_null($value)) {
1735
            $dirname = trim(strtolower($dirname));
1736
            if (empty($dirname)) {
1737
                $dirname = $this->isModule() ? $this->module->getVar('dirname') : 'system';
1738
            }
1739
            $this->moduleConfigs[$dirname][$key] =& $value;
1740
        }
1741
    }
1742
1743
    /**
1744
     * Unset Config Value