| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public static function stripHeaders(string $key, string $pattern = self::PUBLIC_KEY_PATTERN) |
||
| 52 | { |
||
| 53 | $matches = []; |
||
| 54 | $result = preg_match($pattern, $key, $matches); |
||
| 55 | if ($result === false) { |
||
| 56 | throw new Exception('Could not find content matching the provided pattern.'); |
||
| 57 | } |
||
| 58 | |||
| 59 | /** @psalm-suppress EmptyArrayAccess */ |
||
| 60 | return preg_replace('/\s+/', '', $matches[1]); |
||
| 61 | } |
||
| 63 |