Themosis\Asset\Asset::parseVersion PHP Method

parseVersion() protected method

Parse the version number.
protected parseVersion ( string | boolean | null $version ) : mixed
$version string | boolean | null
return mixed
    protected function parseVersion($version)
    {
        if (is_string($version)) {
            if (empty($version)) {
                // Passing empty string is equivalent to set it to null.
                return;
            }
            // Return the defined string version.
            return $version;
        } elseif (is_null($version)) {
            // Return null.
            return;
        }
        // Version can only be a string or null. If anything else, return false.
        return false;
    }