DeviceRegister::toNexmo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Notifications\Notification;
7
use Illuminate\Notifications\Messages\NexmoMessage;
8
9
class DeviceRegister extends Notification
10
{
11
    use Queueable;
12
13
    /**
14
     * Create a new notification instance.
15
     *
16
     * @return void
17
     */
18
    public function __construct()
19
    {
20
        //
21
    }
22
23
    /**
24
     * Get the notification's delivery channels.
25
     *
26
     * @param  mixed  $notifiable
27
     * @return string[]
28
     */
29
    public function via($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function via(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        return [ 'nexmo' ];
32
    }
33
34
    /**
35
     * Get the SMS representation of the notification.
36
     *
37
     * @param  mixed  $notifiable
38
     * @return \Illuminate\Notifications\Messages\NexmoMessage
39
     */
40
    public function toNexmo($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

40
    public function toNexmo(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
41
    {
42
        return (new NexmoMessage)
43
                    ->content('SmartSettia SMS: New device registered '.$this->device->uuid)
0 ignored issues
show
Bug Best Practice introduced by
The property device does not exist on App\Notifications\DeviceRegister. Did you maybe forget to declare it?
Loading history...
44
                    ->from('12088851101');
45
    }
46
47
    /**
48
     * Get the array representation of the notification.
49
     *
50
     * @param  mixed  $notifiable
51
     * @return array
52
     */
53
    public function toArray($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

53
    public function toArray(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
54
    {
55
        return [
56
            //
57
        ];
58
    }
59
}
60