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;
}