Code Duplication    Length = 10-10 lines in 2 locations

src/Helpers/String.php 2 locations

@@ 863-872 (lines=10) @@
860
     *
861
     * @return bool true if first string starts with second one
862
     */
863
    public static function startsWith($uString, $uNeedle)
864
    {
865
        // $tLength = mb_strlen($uNeedle);
866
        $tLength = strlen(utf8_decode($uNeedle));
867
        if ($tLength === 0) {
868
            return true;
869
        }
870
871
        return (mb_substr($uString, 0, $tLength) === $uNeedle);
872
    }
873
874
    /**
875
     * Checks the string if it ends with another string
@@ 882-891 (lines=10) @@
879
     *
880
     * @return bool true if first string ends with second one
881
     */
882
    public static function endsWith($uString, $uNeedle)
883
    {
884
        // $tLength = mb_strlen($uNeedle);
885
        $tLength = strlen(utf8_decode($uNeedle));
886
        if ($tLength === 0) {
887
            return true;
888
        }
889
890
        return (mb_substr($uString, -$tLength) === $uNeedle);
891
    }
892
893
    /**
894
     * Returns part of the string