public function getMinStartTime(string $listID = ''): ?int
    {
        $list = $this->getListData($listID);
        if (empty($list)) {
            return null;
        }
        $minStartTime = null;
        $hasTaskWithoutStartDate = false;
        foreach ($list as $taskListData) {
            if ($taskListData[0] === 1) { // version check
                if ($taskListData[1] === null) { // does not have start time
                    $hasTaskWithoutStartDate = true;
                } else { // has start time
                    if ($minStartTime === null || $taskListData[1] < $minStartTime) {
                        $minStartTime = $taskListData[1];
                    }
                }
            }
        }
        $currentTime = time();
        if ($minStartTime === null) {
            return $currentTime;
        }
        if ($hasTaskWithoutStartDate) {
            return $minStartTime < $currentTime ? $minStartTime : $currentTime;
        } else {
            return $minStartTime;
        }
    }
public function getMinStartTime(string $listID = ''): ?int
    {
        $list = $this->getListData($listID);
        if (empty($list)) {
            return null;
        }
        $minStartTime = null;
        $hasTaskWithoutStartDate = false;
        foreach ($list as $taskListData) {
            if ($taskListData[0] === 1) { // version check
                if ($taskListData[1] === null) { // does not have start time
                    $hasTaskWithoutStartDate = true;
                } else { // has start time
                    if ($minStartTime === null || $taskListData[1] < $minStartTime) {
                        $minStartTime = $taskListData[1];
                    }
                }
            }
        }
        $currentTime = time();
        if ($minStartTime === null) {
            return $currentTime;
        }
        if ($hasTaskWithoutStartDate) {
            return $minStartTime < $currentTime ? $minStartTime : $currentTime;
        } else {
            return $minStartTime;
        }
    }
public function getMinStartTime ( string $ listID = '' ) : ? int { $ list = $ this -> getListData ( $ listID ) ; if ( empty ( $ list ) ) { return null ; } $ minStartTime = null ; $ hasTaskWithoutStartDate = false ; foreach ( $ list as $ taskListData ) { if ( $ taskListData [ 0 ] === 1 ) { // version check if ( $ taskListData [ 1 ] === null ) { // does not have start time $ hasTaskWithoutStartDate = true ; } else { // has start time if ( $ minStartTime === null || $ taskListData [ 1 ] < $ minStartTime ) { $ minStartTime = $ taskListData [ 1 ] ; } } } } $ currentTime = time ( ) ; if ( $ minStartTime === null ) { return $ currentTime ; } if ( $ hasTaskWithoutStartDate ) { return $ minStartTime < $ currentTime ? $ minStartTime : $ currentTime ; } else { return $ minStartTime ; } }
Returns the minimum start time of the tasks in the list specified.

@param string $listID The list ID.
@return int|null The minimum start time of the tasks in the list specified. Returns NULL if no tasks exists.
Returns the minimum start time of the tasks in the list specified .