• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SameOldNick / SameOldWebsite / 20218987083

15 Dec 2025 02:57AM UTC coverage: 87.51% (-0.2%) from 87.681%
20218987083

push

github

SameOldNick
Set default value for topic in fromArray method

The fromArray method now assigns an empty string as the default value for 'topic' if it is not present in the input array. This prevents potential undefined index errors.

1 of 1 new or added line in 1 file covered. (100.0%)

117 existing lines in 10 files now uncovered.

28509 of 32578 relevant lines covered (87.51%)

696.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/app/Components/Backup/Notifications/BackupWasSuccessfulNotification.php
1
<?php
2

3
namespace App\Components\Backup\Notifications;
4

5
use App\Components\Backup\Concerns\PullsNotificationConfiguration;
6
use App\Components\Ntfy\Services\MessageBuilder;
7
use Ntfy\Message as NtfyMessage;
8
use Spatie\Backup\Notifications\Notifications\BackupWasSuccessfulNotification as BaseNotification;
9

10
class BackupWasSuccessfulNotification extends BaseNotification
11
{
12
    use PullsNotificationConfiguration;
13

14
    /**
15
     * Create an ntfy message representation of the notification.
16
     */
17
    public function toNtfy($notifiable): NtfyMessage
18
    {
UNCOV
19
        $message = [
×
UNCOV
20
            __('The backup process completed successfully.'),
×
UNCOV
21
            __('Backup Destination Properties:'),
×
UNCOV
22
            json_encode($this->backupDestinationProperties()->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES),
×
UNCOV
23
        ];
×
24

UNCOV
25
        return MessageBuilder::make()
×
UNCOV
26
            ->title(__('Backup Was Successful'))
×
UNCOV
27
            ->body(implode("\n", $message))
×
UNCOV
28
            ->build();
×
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc