src/MessageResolver.php
public static function findOneUsingMixin($mixin): Schema
    {
        $schemas = self::findAllUsingMixin($mixin);
        if (1 !== count($schemas)) {
            throw new MoreThanOneMessageForMixin($mixin, $schemas);
        }

        return current($schemas);
    }
public static function findOneUsingMixin($mixin): Schema
    {
        $schemas = self::findAllUsingMixin($mixin);
        if (1 !== count($schemas)) {
            throw new MoreThanOneMessageForMixin($mixin, $schemas);
        }

        return current($schemas);
    }
public static function findOneUsingMixin ( $ mixin ) : Schema { $ schemas = self :: findAllUsingMixin ( $ mixin ) ; if ( 1 !== count ( $ schemas ) ) { throw new MoreThanOneMessageForMixin ( $ mixin , $ schemas ) ; } return current ( $ schemas ) ; }
Return the one schema expected to be using the provided mixin.

@param Mixin|string $mixin Mixin or curie major

@return Schema

@throws MoreThanOneMessageForMixin
@throws NoMessageForMixin
Return the one schema expected to be using the provided mixin .