| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 39 | 1 | public static function build($keyName) |
|
| 40 | { |
||
| 41 | 1 | if (empty($keyName) || !is_string($keyName)) { |
|
| 42 | throw new \InvalidArgumentException('keyName must be a non-empty string'); |
||
| 43 | } |
||
| 44 | 1 | $key = new Basic(new FileStorage(), $keyName); |
|
| 45 | 1 | $key->create(); // will automatically skip if key has already been generated |
|
| 46 | 1 | return $key; |
|
| 47 | } |
||
| 48 | } |
||
| 49 |