protected renderMajorVersion ( string $version ) : string | ||
$version | string | For example "2.3.7" |
Résultat | string | For example "2" |
protected function renderMajorVersion($version)
{
preg_match('/^(\\d+)/', $version, $versionMatches);
return isset($versionMatches[1]) ? $versionMatches[1] : '';
}