@param \Stagehand\TestRunner\Notification\Notification $notification

@return string
194020
protected function buildNotifyCommand(Notification $notification)
    {
        if ($notification->isPassed()) {
            $title = self::TITLE_PASSED;
            $icon = self::$ICON_PASSED;
            $sound = self::SOUND_PASSED;
        } elseif ($notification->isFailed()) {
            $title = self::TITLE_FAILED;
            $icon = self::$ICON_FAILED;
            $sound = self::SOUND_FAILED;
        } elseif ($notification->isStopped()) {
            $title = self::TITLE_STOPPED;
            $icon = self::$ICON_STOPPED;
            $sound = self::SOUND_STOPPED;
        }

        if ($this->os->isWin()) {
            return sprintf(
                'growlnotify /t:%s /p:-2 /i:%s /a:Stagehand_TestRunner /r:%s,%s,%s /n:%s /silent:true %s',
                escapeshellarg($title),
                escapeshellarg($icon),
                escapeshellarg(self::TITLE_PASSED),
                escapeshellarg(self::TITLE_FAILED),
                escapeshellarg(self::TITLE_STOPPED),
                escapeshellarg($title),
                escapeshellarg($notification->getMessage())
            );
        } elseif ($this->os->isAfterMarvericks() && !$this->hasGrowl('osascript')) {
            return sprintf(
                'osascript -e "display notification \"%s\" subtitle \"%s\" sound name \"%s\""',
                escapeshellarg($notification->getMessage()),
                escapeshellcmd($title),
                escapeshellcmd($sound)
            );
        } elseif ($this->os->isDarwin()) {
            return sprintf(
                'growlnotify --name %s --priority -2 --image %s --title %s --message %s',
                escapeshellarg($title),
                escapeshellarg($icon),
                escapeshellarg($title),
                escapeshellarg($notification->getMessage())
            );
        } elseif ($this->os->isLinux()) {
            return sprintf(
                'notify-send --urgency=low --icon=%s %s %s',
                escapeshellarg($icon),
                escapeshellarg($title),
                escapeshellarg(str_replace('\\', '\\\\', $notification->getMessage()))
            );
        }
    }
284484
private function generateMessage($notification)
    {
        $message = ucfirst($notification['type']) . '\n\n';

        if ( ! is_null($notification['title'])) {
            $message .= $this->escapeTitle($notification['title']) . '\n\n';
        }

        return $this->escapeMessage($message . $notification['message']);
    }
906549
public function notify(NotifyRequest $notification): Response
    {
        if ($this->appID !== null) {
            $notification->setApplicationIdentification($this->appID);
        }

        $response = $this->sendRequest($notification);
        return $response;

    }
1216522
public function augment(SubscriptionNotification $notification)
	{
		$this->in  = $notification->in;
		$this->out = $notification->out;
	}
600024
public function notify(NotificationInterface $notification, $level = self::INFO)
    {
        if (!$this->handlers)
        {
            $this->addHandler(new NullHandler());
        }

        foreach ($this->getHandlers() as $handler)
        {
            if ($handler->shouldHandle($notification, $level))
            {
                if (false === $handler->handle($notification, $level))
                {
                    return false;
                }
            }
        }

        return true;
    }
354790
public function parseNotification($notification = [], $authenticate = true)
    {
        $notificationWalk = [];

        array_walk($notification, function ($val, $key) use (&$notificationWalk) {
            $key = trim(rawurldecode($key));
            $val = trim(rawurldecode($val));

            $notificationWalk[$key] = $val;
        });

        $notification = $notificationWalk;

        $this->notificationObj = \Genesis\Utils\Common::createArrayObject($notification);

        if ($this->isAPINotification()) {
            $this->unique_id = (string)$this->notificationObj->unique_id;
        }

        if ($this->isWPFNotification()) {
            $this->unique_id = (string)$this->notificationObj->wpf_unique_id;
        }

        if ($authenticate && !$this->isAuthentic()) {
            throw new \Genesis\Exceptions\InvalidArgument('Invalid Genesis Notification!');
        }
    }
351873
public function render(array $notifications)
    {
        $alerts = '';

        foreach ($notifications as $notification) {
            $message = $this->generateMessage($notification);

            $alerts .= "alert('{$message}');\n";
        }

        return $this->renderOutput($alerts);
    }
509671
protected function preferredLocale($notifiable, $notification)
    {
        return $notification->locale ?? $this->locale ?? value(function () use ($notifiable) {
            if ($notifiable instanceof HasLocalePreference) {
                return $notifiable->preferredLocale();
            }
        });
    }
374580
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toMessagebird($notifiable);

        if (is_string($message)) {
            $message = MessagebirdMessage::create($message);
        }

        if ($to = $notifiable->routeNotificationFor('messagebird')) {
            $message->setRecipients($to);
        }

        $this->client->send($message);
    }
821563
public function send($notifiables, $notification)
    {
        $notifiables = $this->formatNotifiables($notifiables);

        if ($notification instanceof ShouldQueue) {
            return $this->queueNotification($notifiables, $notification);
        }

        return $this->sendNow($notifiables, $notification);
    }
1051607
public function send(NotifiableInterface $notifiable, Notification $notification)
    {
        /** @var ActiveRecord $modelClass */
        $notifiable = $notifiable->routeNotificationFor('database');

        return DatabaseNotification::create([
            'id' => $notification->id,
            'verb' => $notification->verb,
            'template' => $notification->getTemplate(),
            'notifiable_id' => $notifiable['notifiable_id'],
            'notifiable_class' => $notifiable['notifiable_class'],
            'data' => $notification->getData(),
        ]);
    }
344351
protected function queueNotification($notifiables, $notification)
    {
        $notifiables = $this->formatNotifiables($notifiables);

        $original = clone $notification;

        foreach ($notifiables as $notifiable) {
            $notificationId = Str::uuid()->toString();

            foreach ((array) $original->via($notifiable) as $channel) {
                $notification = clone $original;

                $notification->id = $notificationId;

                if (! is_null($this->locale)) {
                    $notification->locale = $this->locale;
                }

                $this->bus->dispatch(
                    (new SendQueuedNotifications($notifiable, $notification, [$channel]))
                            ->onConnection($notification->connection)
                            ->onQueue($notification->queue)
                            ->delay($notification->delay)
                );
            }
        }
    }
221316
public function deleteNotification(NotificationInterface $notification, $flush = false)
    {
        $this->om->remove($notification);
        $this->flush($flush);

        $event = new NotificationEvent($notification);
        $this->dispatcher->dispatch(MgiletNotificationEvents::DELETED, $event);
    }
382932
public function send($notifiable, Notification $notification)
    {
        $message = $notification->toSlack();

        $this->http->post($notifiable, $this->buildJsonPayload($message));
    }
13202
private function getHandlersFor(NotificationInterface $notification): array
    {
        $handlers = [];
        foreach ($this->notificationHandlers as $notificationHandler) {
            if ($notificationHandler->supports($notification)) {
                $handlers[] = $notificationHandler;
            }
        }

        return $handlers;
    }
525275
public function read(User $user, Notification $notification)
    {
        $notification->markAsRead();

        return $this->index($user, 'unread');
    }
1318957
public function render(array $notifications)
    {
        $sweetAlerts = '';

        foreach ($notifications as $notification) {
            $message = $this->escapeMessage($notification['message']);
            $type    = $notification['type'];
            $title   = is_null($notification['title']) ? ucfirst($type) : $this->escapeTitle($notification['title']);

            $sweetAlerts = <<<TAG
    swal({
        title: '{$title}',
        text: '{$message}',
        type: '{$type}'
    });\n
TAG;
        }

        return $this->renderOutput($sweetAlerts);
    }