Conditions | 4 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 16 | public function resolve($domain = '', $type = DNS_ANY) |
|
22 | { |
||
23 | 16 | if (empty($domain)) |
|
24 | 16 | return false; |
|
25 | |||
26 | 12 | $this->clear(); |
|
27 | |||
28 | 12 | $result = dns_get_record($domain, $type, $authns, $addtl); |
|
29 | |||
30 | 12 | if (empty($result) || $result === false) { |
|
31 | 4 | return false; |
|
32 | } |
||
33 | |||
34 | list( |
||
35 | 8 | $this->DNS, |
|
36 | 8 | $this->NS, |
|
37 | 8 | $this->ADITIONAL |
|
38 | 8 | ) = [$result, $authns, $addtl]; |
|
39 | |||
40 | 8 | return true; |
|
41 | } |
||
42 | |||
43 | } |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.