src/Notify/NotifyFactory.php
public static function create($notify)
    {
        switch (true) {
            case $notify === NotifyInterface::STDOUT:
                return new NotifyStdout();
            case $notify === NotifyInterface::LOGGER:
                return new NotifyLogger(PrettyLogger::create());
            case $notify === NotifyInterface::BLACKHOLE:
                return new NotifyBlackhole();
            case $notify instanceof Output:
                return new NotifyConsole($notify);
            case $notify instanceof LoggerInterface:
                return new NotifyLogger($notify);
            default:
                throw InvalidArgumentException::forNotSupportedNotifier();
        }
    }
public static function create($notify)
    {
        switch (true) {
            case $notify === NotifyInterface::STDOUT:
                return new NotifyStdout();
            case $notify === NotifyInterface::LOGGER:
                return new NotifyLogger(PrettyLogger::create());
            case $notify === NotifyInterface::BLACKHOLE:
                return new NotifyBlackhole();
            case $notify instanceof Output:
                return new NotifyConsole($notify);
            case $notify instanceof LoggerInterface:
                return new NotifyLogger($notify);
            default:
                throw InvalidArgumentException::forNotSupportedNotifier();
        }
    }
Create a notify object.

@param $notify
@return NotifyConsole|NotifyLogger|NotifyStdout|NotifyBlackhole
@throws \Roquie\Database\Exception\InvalidArgumentException