| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 6 | public function __construct(Client $client, $key) |
|
| 15 | { |
||
| 16 | 6 | $this->client = $client; |
|
| 17 | 6 | $this->key = $key; |
|
| 18 | 6 | $baseUrl = $this->client->getConfig('base_uri'); |
|
| 19 | 6 | Validator::notEmpty() |
|
| 20 | 6 | ->url() |
|
| 21 | 6 | ->endsWith('/') |
|
| 22 | 6 | ->setName("URL for NewRelic's Insights API must be valid and have a trailing slash") |
|
| 23 | 6 | ->assert($baseUrl); |
|
| 24 | 6 | } |
|
| 25 | |||
| 39 |