| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function send(SendData $data): bool |
||
| 26 | { |
||
| 27 | // @codeCoverageIgnoreStart |
||
| 28 | |||
| 29 | $ch = curl_init(); |
||
| 30 | |||
| 31 | curl_setopt($ch, CURLOPT_URL, "example.com"); |
||
| 32 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
||
| 33 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
||
| 34 | |||
| 35 | curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); |
||
| 36 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
||
| 37 | |||
| 38 | $output = curl_exec($ch); |
||
|
|
|||
| 39 | |||
| 40 | curl_close($ch); |
||
| 41 | |||
| 42 | // @codeCoverageIgnoreEnd |
||
| 43 | |||
| 44 | return true; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.