private function filterByLocalMajorVersion(array $versions)
    {
        list($localMajorVersion, ) = explode('.', $this->localVersion, 2);

        return array_filter($versions, function ($version) use ($localMajorVersion) {
            list($majorVersion, ) = explode('.', $version, 2);
            return $majorVersion === $localMajorVersion;
        });
    }
private function filterByLocalMajorVersion(array $versions)
    {
        list($localMajorVersion, ) = explode('.', $this->localVersion, 2);

        return array_filter($versions, function ($version) use ($localMajorVersion) {
            list($majorVersion, ) = explode('.', $version, 2);
            return $majorVersion === $localMajorVersion;
        });
    }
private function filterByLocalMajorVersion ( array $ versions ) { list ( $ localMajorVersion , ) = explode ( '.' , $ this -> localVersion , 2 ) ; return array_filter ( $ versions , function ( $ version ) use ( $ localMajorVersion ) { list ( $ majorVersion , ) = explode ( '.' , $ version , 2 ) ; return $ majorVersion === $ localMajorVersion ; } ) ; }
Filter a list of versions to those that match the current local version.

@param string[] $versions

@return string[]
Filter a list of versions to those that match the current local version .