public static function getDifference(Release $release1, Release $release2 = null)
    {
        if ($release2 === null) {
            return self::MAJOR;
        }

        $version1 = explode('.', $release1->getVersion());
        $version2 = explode('.', $release2->getVersion());
        if (isset($version1[0]) === false || isset($version2[0]) === false || $version1[0] != $version2[0]) {
            return self::MAJOR;
        } elseif (isset($version1[1]) === false || isset($version2[1]) === false || $version1[1] != $version2[1]) {
            return self::MINOR;
        } elseif (isset($version1[2]) === false || isset($version2[2]) === false || $version1[2] != $version2[2]) {
            return self::PATCH;
        }
    }
public static function getDifference(Release $release1, Release $release2 = null)
    {
        if ($release2 === null) {
            return self::MAJOR;
        }

        $version1 = explode('.', $release1->getVersion());
        $version2 = explode('.', $release2->getVersion());
        if (isset($version1[0]) === false || isset($version2[0]) === false || $version1[0] != $version2[0]) {
            return self::MAJOR;
        } elseif (isset($version1[1]) === false || isset($version2[1]) === false || $version1[1] != $version2[1]) {
            return self::MINOR;
        } elseif (isset($version1[2]) === false || isset($version2[2]) === false || $version1[2] != $version2[2]) {
            return self::PATCH;
        }
    }
public static function getDifference ( Release $ release1 , Release $ release2 = null ) { if ( $ release2 === null ) { return self :: MAJOR ; } $ version1 = explode ( '.' , $ release1 -> getVersion ( ) ) ; $ version2 = explode ( '.' , $ release2 -> getVersion ( ) ) ; if ( isset ( $ version1 [ 0 ] ) === false || isset ( $ version2 [ 0 ] ) === false || $ version1 [ 0 ] != $ version2 [ 0 ] ) { return self :: MAJOR ; } elseif ( isset ( $ version1 [ 1 ] ) === false || isset ( $ version2 [ 1 ] ) === false || $ version1 [ 1 ] != $ version2 [ 1 ] ) { return self :: MINOR ; } elseif ( isset ( $ version1 [ 2 ] ) === false || isset ( $ version2 [ 2 ] ) === false || $ version1 [ 2 ] != $ version2 [ 2 ] ) { return self :: PATCH ; } }
Returns the highest version category difference between two Release instances.

@param Release      $release1
@param Release|null $release2

@return string|null
Returns the highest version category difference between two Release instances .