src/Domain/Value/DateTime/Timezone.php
protected function compareParts(array $thisParts, array $thatParts): int
    {
        $compMajor = strnatcmp($thisParts[0], $thatParts[0]);
        if ($compMajor > 0) {
            return 1;
        }
        if ($compMajor < 0) {
            return -1;
        }
        $compMinor = strnatcmp($thisParts[1], $thatParts[1]);
        if ($compMinor > 0) {
            return 1;
        }
        if ($compMinor < 0) {
            return -1;
        }
        if (isset($thisParts[2]) && isset($thatParts[2])) {
            $compSub = strnatcmp($thisParts[2], $thatParts[2]);

            return $compSub <=> 0;
        }

        return 0;
    }
protected function compareParts(array $thisParts, array $thatParts): int
    {
        $compMajor = strnatcmp($thisParts[0], $thatParts[0]);
        if ($compMajor > 0) {
            return 1;
        }
        if ($compMajor < 0) {
            return -1;
        }
        $compMinor = strnatcmp($thisParts[1], $thatParts[1]);
        if ($compMinor > 0) {
            return 1;
        }
        if ($compMinor < 0) {
            return -1;
        }
        if (isset($thisParts[2]) && isset($thatParts[2])) {
            $compSub = strnatcmp($thisParts[2], $thatParts[2]);

            return $compSub <=> 0;
        }

        return 0;
    }
protected function compareParts ( array $ thisParts , array $ thatParts ) : int { $ compMajor = strnatcmp ( $ thisParts [ 0 ] , $ thatParts [ 0 ] ) ; if ( $ compMajor > 0 ) { return 1 ; } if ( $ compMajor < 0 ) { return - 1 ; } $ compMinor = strnatcmp ( $ thisParts [ 1 ] , $ thatParts [ 1 ] ) ; if ( $ compMinor > 0 ) { return 1 ; } if ( $ compMinor < 0 ) { return - 1 ; } if ( isset ( $ thisParts [ 2 ] ) && isset ( $ thatParts [ 2 ] ) ) { $ compSub = strnatcmp ( $ thisParts [ 2 ] , $ thatParts [ 2 ] ) ; return $ compSub <=> 0 ; } return 0 ; }
Compares two timezones by segments

@param array $thisParts This parts
@param array $thatParts Other parts

@return int
Compares two timezones by segments