src/precore/util/Ordering.php
public function compound(Comparator $secondaryComparator) : Ordering
    {
        return Ordering::from(Collections::comparatorFrom(
            function ($object1, $object2) use ($secondaryComparator) {
                $res = $this->compare($object1, $object2);
                return $res !== 0 ? $res : $secondaryComparator->compare($object1, $object2);
            }
        ));
    }
public function compound(Comparator $secondaryComparator) : Ordering
    {
        return Ordering::from(Collections::comparatorFrom(
            function ($object1, $object2) use ($secondaryComparator) {
                $res = $this->compare($object1, $object2);
                return $res !== 0 ? $res : $secondaryComparator->compare($object1, $object2);
            }
        ));
    }
Returns an ordering which first uses the ordering this, but which in the event of a "tie",
then delegates to secondaryComparator.

@param Comparator $secondaryComparator
@return Ordering