| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 71 | public static function normalizeCredentialParamName($key) { |
|
| 20 | 71 | $snaked_key = static::snake($key); |
|
| 21 | 71 | foreach (self::$OAuthCredentialPatterns as $name => $pattern) { |
|
| 22 | 71 | if (preg_match($pattern, $snaked_key)) { |
|
| 23 | 71 | return $name; |
|
| 24 | } |
||
| 25 | } |
||
| 26 | 2 | throw new \DomainException('Unknown credential parameter: "' . $key . '"'); |
|
| 27 | } |
||
| 38 |