Code Duplication    Length = 5-5 lines in 3 locations

core/services/cache/TransientCacheStorage.php 3 locations

@@ 134-138 (lines=5) @@
131
        $minutes = '00';
132
        $hours = 'H';
133
        switch ($cleanup_frequency) {
134
            case '5-minutes' :
135
                $minutes = floor((int)date('i', $timestamp) / 5) * 5;
136
                $minutes = str_pad($minutes, 2, '0', STR_PAD_LEFT);
137
                $offset = MINUTE_IN_SECONDS * 5;
138
                break;
139
            case '15-minutes' :
140
                $minutes = floor((int)date('i', $timestamp) / 15) * 15;
141
                $minutes = str_pad($minutes, 2, '0', STR_PAD_LEFT);
@@ 139-143 (lines=5) @@
136
                $minutes = str_pad($minutes, 2, '0', STR_PAD_LEFT);
137
                $offset = MINUTE_IN_SECONDS * 5;
138
                break;
139
            case '15-minutes' :
140
                $minutes = floor((int)date('i', $timestamp) / 15) * 15;
141
                $minutes = str_pad($minutes, 2, '0', STR_PAD_LEFT);
142
                $offset = MINUTE_IN_SECONDS * 15;
143
                break;
144
            case '12-hours' :
145
                $hours = floor((int)date('H', $timestamp) / 12) * 12;
146
                $hours = str_pad($hours, 2, '0', STR_PAD_LEFT);
@@ 144-148 (lines=5) @@
141
                $minutes = str_pad($minutes, 2, '0', STR_PAD_LEFT);
142
                $offset = MINUTE_IN_SECONDS * 15;
143
                break;
144
            case '12-hours' :
145
                $hours = floor((int)date('H', $timestamp) / 12) * 12;
146
                $hours = str_pad($hours, 2, '0', STR_PAD_LEFT);
147
                $offset = HOUR_IN_SECONDS * 12;
148
                break;
149
            case 'day' :
150
                $hours = '03'; // run cleanup at 3:00 am (or first site hit after that)
151
                $offset = DAY_IN_SECONDS;