1 | <?php |
||
11 | class AzineMailgunMailerService |
||
12 | { |
||
13 | /** |
||
14 | * @var \Swift_Mailer |
||
15 | */ |
||
16 | private $mailer; |
||
17 | |||
18 | /** |
||
19 | * @var \Twig_Environment |
||
20 | */ |
||
21 | private $twig; |
||
22 | |||
23 | /** |
||
24 | * @var TranslatorInterface |
||
25 | */ |
||
26 | private $translator; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $fromEmail; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $ticketId; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $ticketSubject; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $ticketMessage; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | private $spamAlertsRecipientEmail; |
||
52 | |||
53 | /** |
||
54 | * @var ManagerRegistry |
||
55 | */ |
||
56 | private $managerRegistry; |
||
57 | |||
58 | /** |
||
59 | * @var int |
||
60 | */ |
||
61 | private $sendNotificationsInterval; |
||
62 | |||
63 | /** |
||
64 | * AzineMailgunMailerService constructor. |
||
65 | * |
||
66 | * @param \Swift_Mailer $mailer |
||
67 | * @param \Twig_Environment $twig |
||
68 | * @param TranslatorInterface $translator |
||
69 | * @param string $fromEmail |
||
70 | * @param string $ticketId |
||
71 | * @param string $ticketSubject |
||
72 | * @param string $ticketMessage |
||
73 | * @param string $spamAlertsRecipientEmail |
||
74 | * @param ManagerRegistry $managerRegistry |
||
75 | * @param int $sendNotificationsInterval |
||
76 | */ |
||
77 | public function __construct( |
||
100 | |||
101 | /** |
||
102 | * @param string $eventId |
||
103 | * @throws \Exception |
||
104 | * @return int $messagesSent |
||
105 | */ |
||
106 | public function sendSpamComplaintNotification($eventId) |
||
155 | |||
156 | /** |
||
157 | * @param HetrixtoolsServiceResponse $response |
||
158 | * @param string $ipAddress |
||
159 | * @return int |
||
160 | * @throws \Exception |
||
161 | */ |
||
162 | public function sendBlacklistNotification(HetrixtoolsServiceResponse $response, $ipAddress) |
||
187 | } |
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.