Code Duplication    Length = 14-14 lines in 3 locations

src/Notifications/Logs/LogWritten.php 1 location

@@ 63-76 (lines=14) @@
60
     * @param  mixed $notifiable
61
     * @return array
62
     */
63
    public function via($notifiable)
64
    {
65
        switch($notifiable->notify_by) {
66
        case 'email':
67
            return ['mail'];
68
            break;
69
        case 'slack':
70
            return ['slack'];
71
            break;
72
        case 'email_slack':
73
            return ['mail', 'slack'];
74
            break;
75
        }
76
    }
77
78
    /**
79
     * Get the mail representation of the notification.

src/Notifications/Logs/ModelChanged.php 1 location

@@ 34-47 (lines=14) @@
31
     * @param  mixed $notifiable
32
     * @return array
33
     */
34
    public function via($notifiable)
35
    {
36
        switch($notifiable->notify_by) {
37
        case 'email':
38
            return ['mail'];
39
            break;
40
        case 'slack':
41
            return ['slack'];
42
            break;
43
        case 'email_slack':
44
            return ['mail', 'slack'];
45
            break;
46
        }
47
    }
48
49
    /**
50
     * Get the mail representation of the notification.

src/Notifications/Logs/RouteRequested.php 1 location

@@ 44-57 (lines=14) @@
41
     * @param  mixed $notifiable
42
     * @return array
43
     */
44
    public function via($notifiable)
45
    {
46
        switch($notifiable->notify_by) {
47
        case 'email':
48
            return ['mail'];
49
            break;
50
        case 'slack':
51
            return ['slack'];
52
            break;
53
        case 'email_slack':
54
            return ['mail', 'slack'];
55
            break;
56
        }
57
    }
58
59
    /**
60
     * Get the mail representation of the notification.