src/Captioning/Format/SubripFile.php
private function cleanUpTimecode($timecode)
    {
        strpos($timecode, ',') ?: $timecode .= ',000';

        $patternNoLeadingZeroes = '/(?:(?<=\:)|^)\d(?=(:|,))/';

        return preg_replace_callback($patternNoLeadingZeroes, function($matches)
        {
            return sprintf('%02d', $matches[0]);
        }, $timecode);
    }
private function cleanUpTimecode($timecode)
    {
        strpos($timecode, ',') ?: $timecode .= ',000';

        $patternNoLeadingZeroes = '/(?:(?<=\:)|^)\d(?=(:|,))/';

        return preg_replace_callback($patternNoLeadingZeroes, function($matches)
        {
            return sprintf('%02d', $matches[0]);
        }, $timecode);
    }
private function cleanUpTimecode ( $ timecode ) { strpos ( $ timecode , ',' ) ? : $ timecode .= ',000' ; $ patternNoLeadingZeroes = '/(?:(?<=\:)|^)\d(?=(:|,))/' ; return preg_replace_callback ( $ patternNoLeadingZeroes , function ( $ matches ) { return sprintf ( '%02d' , $ matches [ 0 ] ) ; } , $ timecode ) ; }
Add milliseconds and leading zeroes if they are missing

@param $timecode

@return mixed
Add milliseconds and leading zeroes if they are missing