| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 54 | public function lookup($domain = '') |
|
| 30 | { |
||
| 31 | 54 | if (empty($domain)) { |
|
| 32 | 3 | throw new MissingArgException("Must provide a domain name when using lookup method."); |
|
| 33 | } |
||
| 34 | 51 | $this->parseWhoisDomain($domain); |
|
| 35 | |||
| 36 | // Get the domains whois server. |
||
| 37 | 51 | $whoisServer = $this->tldLocator->getWhoisServer($this->parsedDomain); |
|
| 38 | |||
| 39 | // Get the full output of the whois lookup. |
||
| 40 | 33 | $response = $this->makeWhoisRequest($this->parsedDomain, $whoisServer); |
|
| 41 | |||
| 42 | 33 | return $response; |
|
| 43 | } |
||
| 45 |