final public static function memberByPredicateWithDefault(
        $predicate,
        MultitonInterface $default = null
    ) {
        foreach (static::members() as $member) {
            if ($predicate($member)) {
                return $member;
            }
        }

        return $default;
    }
final public static function memberByPredicateWithDefault(
        $predicate,
        MultitonInterface $default = null
    ) {
        foreach (static::members() as $member) {
            if ($predicate($member)) {
                return $member;
            }
        }

        return $default;
    }
final public static function memberByPredicateWithDefault ( $ predicate , MultitonInterface $ default = null ) { foreach ( static :: members ( ) as $ member ) { if ( $ predicate ( $ member ) ) { return $ member ; } } return $ default ; }
Returns a single member by predicate callback. Additionally returns a
default if no associated member is found.

@api

@param callable               $predicate The predicate applied to the member to find a match.
@param MultitonInterface|null $default   The default value to return.

@return static The first member for which $predicate($member) evaluates to boolean true, or the default value.
Returns a single member by predicate callback . Additionally returns a default if no associated member is found .