NotificationFailed::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 7
loc 7
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 2
1
<?php
2
3
namespace Illuminate\Notifications\Events;
4
5 View Code Duplication
class NotificationFailed
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    /**
8
     * The notifiable entity who received the notification.
9
     *
10
     * @var mixed
11
     */
12
    public $notifiable;
13
14
    /**
15
     * The notification instance.
16
     *
17
     * @var \Illuminate\Notifications\Notification
18
     */
19
    public $notification;
20
21
    /**
22
     * The channel name.
23
     *
24
     * @var string
25
     */
26
    public $channel;
27
28
    /**
29
     * The data needed to process this failure.
30
     *
31
     * @var array
32
     */
33
    public $data = [];
34
35
    /**
36
     * Create a new event instance.
37
     *
38
     * @param  mixed  $notifiable
39
     * @param  \Illuminate\Notifications\Notification  $notification
40
     * @param  string  $channel
41
     * @param  array  $data
42
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
43
     */
44
    public function __construct($notifiable, $notification, $channel, $data = [])
45
    {
46
        $this->channel = $channel;
47
        $this->notifiable = $notifiable;
48
        $this->notification = $notification;
49
        $this->data = $data;
50
    }
51
}