Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public static function send(array $options){ |
||
37 | $mail = static::instance(); |
||
38 | |||
39 | $options = array_merge([ |
||
|
|||
40 | 'to' => false, |
||
41 | 'from' => false, |
||
42 | 'replyTo' => false, |
||
43 | 'subject' => false, |
||
44 | 'message' => false, |
||
45 | 'attachments' => [], |
||
46 | ],$options); |
||
47 | |||
48 | return $mail->send(new Envelope($option)); |
||
49 | } |
||
50 | |||
54 |
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.