Helper/Vcl.php
public function getCurrentVersion(array $versions)
    {
        if (!empty($versions)) {
            foreach ($versions as $version) {
                if ($version->active) {
                    return $activeVersion = $version->number;
                }
            }
        }

        throw new LocalizedException(__('Error fetching current version.'));
    }
public function getCurrentVersion(array $versions)
    {
        if (!empty($versions)) {
            foreach ($versions as $version) {
                if ($version->active) {
                    return $activeVersion = $version->number;
                }
            }
        }

        throw new LocalizedException(__('Error fetching current version.'));
    }
Fetch current version

@param array $versions
@return mixed
@throws LocalizedException