Code Duplication    Length = 6-6 lines in 3 locations

manager/includes/src/Core.php 3 locations

@@ 4776-4781 (lines=6) @@
4773
        }
4774
4775
        switch ($this->config['datetime_format']) {
4776
            case 'YYYY/mm/dd':
4777
                if (!preg_match('/^[0-9]{4}\/[0-9]{2}\/[0-9]{2}[0-9 :]*$/', $str)) {
4778
                    return '';
4779
                }
4780
                list ($Y, $m, $d, $H, $M, $S) = sscanf($str, '%4d/%2d/%2d %2d:%2d:%2d');
4781
                break;
4782
            case 'dd-mm-YYYY':
4783
                if (!preg_match('/^[0-9]{2}-[0-9]{2}-[0-9]{4}[0-9 :]*$/', $str)) {
4784
                    return '';
@@ 4782-4787 (lines=6) @@
4779
                }
4780
                list ($Y, $m, $d, $H, $M, $S) = sscanf($str, '%4d/%2d/%2d %2d:%2d:%2d');
4781
                break;
4782
            case 'dd-mm-YYYY':
4783
                if (!preg_match('/^[0-9]{2}-[0-9]{2}-[0-9]{4}[0-9 :]*$/', $str)) {
4784
                    return '';
4785
                }
4786
                list ($d, $m, $Y, $H, $M, $S) = sscanf($str, '%2d-%2d-%4d %2d:%2d:%2d');
4787
                break;
4788
            case 'mm/dd/YYYY':
4789
                if (!preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}[0-9 :]*$/', $str)) {
4790
                    return '';
@@ 4788-4793 (lines=6) @@
4785
                }
4786
                list ($d, $m, $Y, $H, $M, $S) = sscanf($str, '%2d-%2d-%4d %2d:%2d:%2d');
4787
                break;
4788
            case 'mm/dd/YYYY':
4789
                if (!preg_match('/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}[0-9 :]*$/', $str)) {
4790
                    return '';
4791
                }
4792
                list ($m, $d, $Y, $H, $M, $S) = sscanf($str, '%2d/%2d/%4d %2d:%2d:%2d');
4793
                break;
4794
            /*
4795
            case 'dd-mmm-YYYY':
4796
                if (!preg_match('/^[0-9]{2}-[0-9a-z]+-[0-9]{4}[0-9 :]*$/i', $str)) {return '';}