src/Collection/SortedTable.php
public static function comparable(?string $keyType = null, ?string $valueType = null): SortedTable
    {
        assert(
            Validate::isNull($keyType) || Validate::implementsInterface($keyType, Comparable::class),
            sprintf('%s expects $keyType to implement %s', __METHOD__, Comparable::class)
        );

        return new static(new ComparableComparator(), $keyType, $valueType);
    }
public static function comparable(?string $keyType = null, ?string $valueType = null): SortedTable
    {
        assert(
            Validate::isNull($keyType) || Validate::implementsInterface($keyType, Comparable::class),
            sprintf('%s expects $keyType to implement %s', __METHOD__, Comparable::class)
        );

        return new static(new ComparableComparator(), $keyType, $valueType);
    }
public static function comparable ( ? string $ keyType = null , ? string $ valueType = null ) : SortedTable { assert ( Validate :: isNull ( $ keyType ) || Validate :: implementsInterface ( $ keyType , Comparable :: class ) , sprintf ( '%s expects $keyType to implement %s' , __METHOD__ , Comparable :: class ) ) ; return new static ( new ComparableComparator ( ) , $ keyType , $ valueType ) ; }
Creates collection with comparable keys

If types are not provided, the types are dynamic.

The key type must be a fully-qualified class name that implements:
`Novuso\System\Type\Comparable`

The value type can be any fully-qualified class or interface name,
or one of the following type strings:
[array, object, bool, int, float, string, callable]

@param string|null $keyType   The key type
@param string|null $valueType The value type

@return SortedTable
Creates collection with comparable keys