Code Duplication    Length = 14-14 lines in 2 locations

htdocs/xoops_lib/Xoops/Core/Text/Sanitizer/ConfigurationAbstract.php 1 location

@@ 114-127 (lines=14) @@
111
     *
112
     * @return array an array of all attributes with names matching $nameLike
113
     */
114
    public function getAllLike($nameLike = null)
115
    {
116
        if ($nameLike === null) {
117
            return $this->getArrayCopy();
118
        }
119
120
        $likeSet = array();
121
        foreach ($this as $k => $v) {
122
            if (mb_substr($k, 0, mb_strlen($nameLike))==$nameLike) {
123
                $likeSet[$k]=$v;
124
            }
125
        }
126
        return $likeSet;
127
    }
128
}
129

htdocs/xoops_lib/Xoops/Html/Attributes.php 1 location

@@ 304-317 (lines=14) @@
301
     *
302
     * @return array an array of all attributes with names matching $nameLike
303
     */
304
    public function getAllLike($nameLike = null)
305
    {
306
        if ($nameLike === null) {
307
            return $this->getArrayCopy();
308
        }
309
310
        $likeSet = array();
311
        foreach ($this as $k => $v) {
312
            if (substr($k, 0, strlen($nameLike))==$nameLike) {
313
                $likeSet[$k]=$v;
314
            }
315
        }
316
        return $likeSet;
317
    }
318
}
319