Code Duplication    Length = 25-25 lines in 2 locations

classes/external/php/yui-php-cssmin-2.4.8-p10/cssmin.php 1 location

@@ 1087-1111 (lines=25) @@
1084
     * @param int|bool $end index (optional)
1085
     * @return string
1086
     */
1087
    private function strSlice($str, $start = 0, $end = false)
1088
    {
1089
        if ($end !== false && ($start < 0 || $end <= 0)) {
1090
            $max = strlen($str);
1091
1092
            if ($start < 0) {
1093
                if (($start = $max + $start) < 0) {
1094
                    return '';
1095
                }
1096
            }
1097
1098
            if ($end < 0) {
1099
                if (($end = $max + $end) < 0) {
1100
                    return '';
1101
                }
1102
            }
1103
1104
            if ($end <= $start) {
1105
                return '';
1106
            }
1107
        }
1108
1109
        $slice = ($end === false) ? substr($str, $start) : substr($str, $start, $end - $start);
1110
        return ($slice === false) ? '' : $slice;
1111
    }
1112
}
1113

classes/external/php/yui-php-cssmin-2.4.8-4_fgo.php 1 location

@@ 747-771 (lines=25) @@
744
     * @param int|bool $end index (optional)
745
     * @return string
746
     */
747
    private function str_slice($str, $start = 0, $end = FALSE)
748
    {
749
        if ($end !== FALSE && ($start < 0 || $end <= 0)) {
750
            $max = strlen($str);
751
752
            if ($start < 0) {
753
                if (($start = $max + $start) < 0) {
754
                    return '';
755
                }
756
            }
757
758
            if ($end < 0) {
759
                if (($end = $max + $end) < 0) {
760
                    return '';
761
                }
762
            }
763
764
            if ($end <= $start) {
765
                return '';
766
            }
767
        }
768
769
        $slice = ($end === FALSE) ? substr($str, $start) : substr($str, $start, $end - $start);
770
        return ($slice === FALSE) ? '' : $slice;
771
    }
772
773
    /**
774
     * Convert strings like "64M" or "30" to int values