| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | trait AssertApiKeyTrait |
||
| 21 | { |
||
| 22 | use AssertRangeTrait; |
||
| 23 | use ValueToStringTrait; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Minimum length of API key |
||
| 27 | */ |
||
| 28 | private static int $apiKeyMinLength = 20; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Maximum length of API key |
||
| 32 | */ |
||
| 33 | private static int $apiKeyMaxLength = 45; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Check value is a syntactically valid API key |
||
| 37 | */ |
||
| 38 | 16 | public static function assertApiKey(string $value, string $message = ''): void |
|
| 53 |