src/AbstractProcessor.php
protected static function validateFormatter($formatter)
    {
        if (is_subclass_of($formatter, Formatter::class)) {
            return [is_string($formatter) ? new $formatter() : $formatter, 'format'];
        }
        if (is_callable($formatter)) {
            return $formatter;
        }
        throw new InvalidArgumentException('Formatter must be an instanceof ' . Formatter::class . ' or callable.');
    }
protected static function validateFormatter($formatter)
    {
        if (is_subclass_of($formatter, Formatter::class)) {
            return [is_string($formatter) ? new $formatter() : $formatter, 'format'];
        }
        if (is_callable($formatter)) {
            return $formatter;
        }
        throw new InvalidArgumentException('Formatter must be an instanceof ' . Formatter::class . ' or callable.');
    }
protected static function validateFormatter ( $ formatter ) { if ( is_subclass_of ( $ formatter , Formatter :: class ) ) { return [ is_string ( $ formatter ) ? new $ formatter ( ) : $ formatter , 'format' ] ; } if ( is_callable ( $ formatter ) ) { return $ formatter ; } throw new InvalidArgumentException ( 'Formatter must be an instanceof ' . Formatter :: class . ' or callable.' ) ; }
Validate formatter and return in normalized form.

@param  mixed    $formatter
@return callable
Validate formatter and return in normalized form .