• 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/BackupHasFailedNotification.php
1
<?php
2

3
namespace App\Components\Backup\Notifications;
4

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

11
class BackupHasFailedNotification extends BaseNotification implements NtfyNotification
12
{
13
    use PullsNotificationConfiguration;
14

15
    public function toNtfy($notifiable): NtfyMessage
16
    {
UNCOV
17
        $message = [
×
UNCOV
18
            __('The backup process has failed.'),
×
19

UNCOV
20
            __('Exception details:'),
×
UNCOV
21
            json_encode([
×
UNCOV
22
                'message' => $this->event->exception->getMessage(),
×
UNCOV
23
                'type' => get_class($this->event->exception),
×
UNCOV
24
                'trace' => $this->event->exception->getTrace(),
×
UNCOV
25
            ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES),
×
26

UNCOV
27
            __('Backup Destination Properties:'),
×
UNCOV
28
            json_encode($this->backupDestinationProperties()->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES),
×
UNCOV
29
        ];
×
30

UNCOV
31
        return MessageBuilder::make()
×
UNCOV
32
            ->title(__('Backup Has Failed'))
×
UNCOV
33
            ->body(implode("\n", $message))
×
UNCOV
34
            ->build();
×
35
    }
36
}
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