| Conditions | 3 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 69 | 2 | public function get($path, array $options = []) |
|
| 70 | { |
||
| 71 | 2 | if ($this->app_client) { |
|
| 72 | 2 | $options['headers'] = array_merge( |
|
| 73 | 2 | ['User-Agent' => $this->app_client], |
|
| 74 | 2 | isset($options['headers']) ? $options['headers'] : [] |
|
| 75 | 2 | ); |
|
| 76 | 2 | } |
|
| 77 | |||
| 78 | 2 | $response = $this->client->request('GET', $this->host.$path, $options); |
|
| 79 | |||
| 80 | 2 | $content = $this->detector->detect($response, $path, $options); |
|
| 81 | 2 | $content = $this->repair->repair($content); |
|
| 82 | |||
| 83 | 2 | return $content; |
|
| 84 | } |
||
| 85 | } |
||
| 86 |