protected function getNextVersion($resourceId) {
        $candidate = 0;
        foreach ($this->getRevisions($resourceId) as $revision) {
            $version = $revision->getVersion();
            if (is_numeric($version) && $version > $candidate) {
                $candidate = $version;
            }
        }
        return $candidate + 1;
    }
protected function getNextVersion($resourceId) {
        $candidate = 0;
        foreach ($this->getRevisions($resourceId) as $revision) {
            $version = $revision->getVersion();
            if (is_numeric($version) && $version > $candidate) {
                $candidate = $version;
            }
        }
        return $candidate + 1;
    }
protected function getNextVersion ( $ resourceId ) { $ candidate = 0 ; foreach ( $ this -> getRevisions ( $ resourceId ) as $ revision ) { $ version = $ revision -> getVersion ( ) ; if ( is_numeric ( $ version ) && $ version > $ candidate ) { $ candidate = $ version ; } } return $ candidate + 1 ; }
Helper to determin suitable next version nr

@param string $resourceId
@return number
Helper to determin suitable next version nr