| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 2 | public function __construct(private readonly ClientException $clientException) |
|
| 29 | { |
||
| 30 | 2 | $request = $clientException->getRequest(); |
|
| 31 | |||
| 32 | 2 | $message = vsprintf( |
|
| 33 | 2 | 'Libraries.io Rate Limit Exceeded. Limit: %s, Remaining: %s, Reset: %s', |
|
| 34 | 2 | [ |
|
| 35 | 2 | $request->getHeaderLine('x-ratelimit-limit'), |
|
| 36 | 2 | $request->getHeaderLine('x-ratelimit-remaining'), |
|
| 37 | 2 | $request->getHeaderLine('x-ratelimit-reset'), |
|
| 38 | 2 | ] |
|
| 39 | 2 | ); |
|
| 40 | |||
| 41 | 2 | parent::__construct($message, 0, $clientException); |
|
| 42 | } |
||
| 49 |