| Conditions | 5 |
| Paths | 10 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 49 | 11 | protected function checkDNS($host) |
|
| 50 | { |
||
| 51 | 11 | $Aresult = true; |
|
| 52 | 11 | $MXresult = checkdnsrr($host, 'MX'); |
|
| 53 | |||
| 54 | 11 | if (!$MXresult) { |
|
| 55 | 11 | $this->warnings[NoDNSMXRecord::CODE] = new NoDNSMXRecord(); |
|
| 56 | 11 | $Aresult = checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'); |
|
| 57 | 11 | if (!$Aresult) { |
|
| 58 | 3 | $this->error = new NoDNSRecord(); |
|
|
|
|||
| 59 | 3 | } |
|
| 60 | 11 | } |
|
| 61 | 11 | return $MXresult || $Aresult; |
|
| 62 | } |
||
| 63 | } |
||
| 64 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..