1 | <?php |
||
12 | class ExpoChannel |
||
13 | { |
||
14 | /** |
||
15 | * @var Dispatcher |
||
16 | */ |
||
17 | private $events; |
||
18 | |||
19 | /** |
||
20 | * @var Expo |
||
21 | */ |
||
22 | public $expo; |
||
23 | |||
24 | /** |
||
25 | * ExpoChannel constructor. |
||
26 | * |
||
27 | * @param Expo $expo |
||
28 | * @param Dispatcher $events |
||
29 | */ |
||
30 | 2 | public function __construct(Expo $expo, Dispatcher $events) |
|
35 | |||
36 | /** |
||
37 | * Send the given notification |
||
38 | * |
||
39 | * @param mixed $notifiable |
||
40 | * @param \Illuminate\Notifications\Notification $notification |
||
41 | * |
||
42 | * @throws CouldNotSendNotification |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | public function send($notifiable, Notification $notification) |
||
63 | |||
64 | /** |
||
65 | * Get the interest name for the notifiable. |
||
66 | * |
||
67 | * @param $notifiable |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 2 | public function interestName($notifiable) |
|
77 | } |
||
78 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.