Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 15 | public static function numerify($key) |
|
26 | 15 | { |
|
27 | 15 | static::initialize(); |
|
28 | 15 | if (is_string($key)) { |
|
29 | 2 | if (!isset(static::$strToInt[$key])) { |
|
30 | 2 | throw new \DomainException('Invalid cURL option name: ' . $key); |
|
31 | } |
||
32 | 2 | return static::$strToInt[$key]; |
|
33 | }; |
||
34 | 14 | if (!isset(static::$intToStr[$key])) { |
|
35 | 1 | throw new \DomainException('Invalid cURL option number: ' . $key); |
|
36 | } |
||
37 | 14 | return $key; |
|
38 | } |
||
66 |