| Total Complexity | 2 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | trait AssertApiKeyTrait |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Minimum length of API key |
||
| 26 | * |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | private static $apiKeyMinLength = 20; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Maximum length of API key |
||
| 33 | * |
||
| 34 | * @var int |
||
| 35 | */ |
||
| 36 | private static $apiKeyMaxLength = 45; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Validate length of API key |
||
| 40 | * |
||
| 41 | * @param string $value |
||
| 42 | * @param string $message |
||
| 43 | * |
||
| 44 | * @return null |
||
| 45 | */ |
||
| 46 | 7 | public static function assertApiKey(string $value, string $message = '') |
|
| 59 |