src/Constraint.php
public static function merge($a, $b)
    {
        $acon = static::parse($a);
        $bcon = static::parse($b);

        if ($acon instanceof EmptyConstraint) {
            return $b;
        } elseif ($bcon instanceof EmptyConstraint) {
            return $a;
        } elseif ($acon->matches($bcon) || $bcon->matches($acon)) {
            return strlen($a) > strlen($b) ? $b : $a;
        } else {
            return $a . ' ' . $b;
        }
    }
public static function merge($a, $b)
    {
        $acon = static::parse($a);
        $bcon = static::parse($b);

        if ($acon instanceof EmptyConstraint) {
            return $b;
        } elseif ($bcon instanceof EmptyConstraint) {
            return $a;
        } elseif ($acon->matches($bcon) || $bcon->matches($acon)) {
            return strlen($a) > strlen($b) ? $b : $a;
        } else {
            return $a . ' ' . $b;
        }
    }
public static function merge ( $ a , $ b ) { $ acon = static :: parse ( $ a ) ; $ bcon = static :: parse ( $ b ) ; if ( $ acon instanceof EmptyConstraint ) { return $ b ; } elseif ( $ bcon instanceof EmptyConstraint ) { return $ a ; } elseif ( $ acon -> matches ( $ bcon ) || $ bcon -> matches ( $ acon ) ) { return strlen ( $ a ) > strlen ( $ b ) ? $ b : $ a ; } else { return $ a . ' ' . $ b ; } }
Merges two constraints.
Doesn't resolve version conflicts.
@param string $a
@param string $b
@return string
Merges two constraints . Doesn t resolve version conflicts .