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

conedevelopment / root / 10654558523

01 Sep 2024 01:44PM UTC coverage: 76.11% (-0.2%) from 76.271%
10654558523

push

github

iamgergo
wip

20 of 32 new or added lines in 14 files covered. (62.5%)

1 existing line in 1 file now uncovered.

2485 of 3265 relevant lines covered (76.11%)

30.15 hits per line

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

28.57
/src/Notifications/AuthCodeNotification.php
1
<?php
2

3
namespace Cone\Root\Notifications;
4

5
use Cone\Root\Models\AuthCode;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Notifications\Messages\MailMessage;
9
use Illuminate\Notifications\Notification;
10
use Illuminate\Support\Facades\Config;
11
use Illuminate\Support\Facades\URL;
12

13
class AuthCodeNotification extends Notification implements ShouldQueue
14
{
15
    use Queueable;
16

17
    /**
18
     * The auth code instance.
19
     */
20
    protected AuthCode $code;
21

22
    /**
23
     * Create a new notification instance.
24
     */
25
    public function __construct(AuthCode $code)
26
    {
27
        $this->code = $code;
2✔
28
    }
29

30
    /**
31
     * Get the notification's delivery channels.
32
     *
33
     * @return array<int, string>
34
     */
35
    public function via(object $notifiable): array
36
    {
37
        return ['mail'];
2✔
38
    }
39

40
    /**
41
     * Get the mail representation of the notification.
42
     */
43
    public function toMail(object $notifiable): MailMessage
44
    {
NEW
45
        return (new MailMessage)
×
46
            ->subject(sprintf('%s - %s', Config::get('app.name'), __('Two Factor Code')))
×
47
            ->line(__('Your verification code is: :code.', ['code' => $this->code->code]))
×
48
            ->action(__('Verify Authentication'), URL::route('root.auth.two-factor.show', ['code' => $this->code->code]))
×
49
            ->line(__('The code expires at :date.', ['date' => $this->code->expires_at->format('Y-m-d H:i:s')]));
×
50
    }
51
}
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