| Conditions | 6 |
| Paths | 7 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | ]; |
||
| 18 | |||
| 19 | private static $adapter; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return CaptchaInterface |
||
| 23 | * @throws CaptchaException |
||
| 24 | * @throws ConfigException |
||
| 25 | * @throws DiException |
||
| 26 | * @throws ReflectionException |
||
| 27 | */ |
||
| 28 | public static function getHandler(): CaptchaInterface |
||
| 29 | { |
||
| 30 | if (self::$adapter !== null) { |
||
| 31 | return self::$adapter; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (!config()->has('captcha')) { |
||
| 35 | config()->import(new Setup('config', 'captcha')); |
||
| 36 | } |
||
| 37 | |||
| 38 | $captchaAdapter = config()->get('captcha.current'); |
||
| 39 | |||
| 48 | } |