Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| StartCaptchaEndpoint | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| handle | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Olz\Captcha\Endpoints; |
| 4 | |
| 5 | use Olz\Api\OlzTypedEndpoint; |
| 6 | use Olz\Captcha\Utils\CaptchaUtils; |
| 7 | |
| 8 | /** |
| 9 | * @phpstan-import-type OlzCaptchaConfig from CaptchaUtils |
| 10 | * |
| 11 | * @extends OlzTypedEndpoint< |
| 12 | * array{}, |
| 13 | * array{ |
| 14 | * config: OlzCaptchaConfig, |
| 15 | * } |
| 16 | * > |
| 17 | */ |
| 18 | class StartCaptchaEndpoint extends OlzTypedEndpoint { |
| 19 | protected function handle(mixed $input): mixed { |
| 20 | $config = $this->captchaUtils()->generateOlzCaptchaConfig(3); |
| 21 | return [ |
| 22 | 'config' => $config, |
| 23 | ]; |
| 24 | } |
| 25 | } |