API.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\DonationSpam\Akismet; |
| 4 | |
| 5 | use Akismet; |
| 6 | use Give\DonationSpam\Akismet\DataTransferObjects\CommentCheckArgs; |
| 7 | |
| 8 | /** |
| 9 | * @since 3.15.0 |
| 10 | */ |
| 11 | class API |
| 12 | { |
| 13 | /** |
| 14 | * @since 3.15.0 |
| 15 | */ |
| 16 | public function commentCheck(CommentCheckArgs $args): array |
| 17 | { |
| 18 | // @phpstan-ignore class.notFound |
| 19 | return Akismet::http_post($args->toHttpQuery(), 'comment-check'); |
| 20 | } |
| 21 | } |
| 22 |