Code Duplication    Length = 12-12 lines in 2 locations

htdocs/modules/publisher/class/item.php 2 locations

@@ 106-117 (lines=12) @@
103
     *
104
     * @return string
105
     */
106
    public function title($maxLength = 0, $format = "S")
107
    {
108
        $ret = $this->getVar("title", $format);
109
        if ($maxLength != 0) {
110
            if (!XoopsLocale::isMultiByte()) {
111
                if (strlen($ret) >= $maxLength) {
112
                    $ret = PublisherUtils::substr($ret, 0, $maxLength);
113
                }
114
            }
115
        }
116
        return $ret;
117
    }
118
119
    /**
120
     * @param int    $maxLength
@@ 125-136 (lines=12) @@
122
     *
123
     * @return mixed|string
124
     */
125
    public function subtitle($maxLength = 0, $format = "S")
126
    {
127
        $ret = $this->getVar("subtitle", $format);
128
        if ($maxLength != 0) {
129
            if (!XoopsLocale::isMultiByte()) {
130
                if (strlen($ret) >= $maxLength) {
131
                    $ret = PublisherUtils::substr($ret, 0, $maxLength);
132
                }
133
            }
134
        }
135
        return $ret;
136
    }
137
138
    /**
139
     * @param int    $maxLength