| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 2 | public function get(string $domain, array $params = []) |
|
| 30 | { |
||
| 31 | 2 | Assert::stringNotEmpty($domain); |
|
| 32 | |||
| 33 | 1 | if (array_key_exists('limit', $params)) { |
|
| 34 | Assert::range($params['limit'], 1, 300); |
||
| 35 | } |
||
| 36 | |||
| 37 | 1 | $response = $this->httpGet(sprintf('/v3/%s/events', $domain), $params); |
|
| 38 | |||
| 39 | 1 | return $this->hydrateResponse($response, EventResponse::class); |
|
| 40 | } |
||
| 41 | } |
||
| 42 |