NotificationFailed   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 47
loc 47
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 7 7 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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
}