Code Duplication    Length = 9-9 lines in 2 locations

framework/helpers/StringHelper.php 2 locations

@@ 28-36 (lines=9) @@
25
     *
26
     * @return string Returns the resulting string.
27
     */
28
    public static function upperCaseFirst($str, $encoding = 'utf8') {
29
        if ($encoding) {
30
            $firstLetter = mb_substr(mb_strtoupper($str, $encoding), 0, 1, $encoding);
31
32
            return ($firstLetter . mb_substr($str, 1, null, $encoding));
33
        } else {
34
            $firstLetter = mb_substr(mb_strtoupper($str), 0, 1);
35
36
            return ($firstLetter . mb_substr($str, 1));
37
        }
38
    }
39
@@ 51-59 (lines=9) @@
48
     *
49
     * @return string Returns the resulting string.
50
     */
51
    public static function lowerCaseFirst($str, $encoding = 'utf8') {
52
        if ($encoding) {
53
            $firstLetter = mb_substr(mb_strtoupper($str, $encoding), 0, 1, $encoding);
54
55
            return ($firstLetter . mb_substr($str, 1, null, $encoding));
56
        } else {
57
            $firstLetter = mb_substr(mb_strtoupper($str), 0, 1);
58
59
            return ($firstLetter . mb_substr($str, 1));
60
        }
61
    }
62