Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Modules\Integrations\Domain\Contract; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | /** |
| 12 | * Contract for external security integration providers (AbuseIPDB, VirusTotal, Google Safe Browsing, etc.). |
| 13 | */ |
| 14 | interface IntegrationProviderInterface |
| 15 | { |
| 16 | /** |
| 17 | * Unique driver machine name matching driver in a_mod_integrations_records. |
| 18 | * |
| 19 | * @return string |
| 20 | */ |
| 21 | public function getDriver(): string; |
| 22 | |
| 23 | /** |
| 24 | * Inspects IP address for abuse, malicious activity, or proxy/bot usage. |
| 25 | * |
| 26 | * @param string $ip IPv4 or IPv6 address. |
| 27 | * @param string|null $apiKey API authorization key. |
| 28 | * @param array<string, mixed> $config Custom parameters from config_parameters JSON. |
| 29 | * @return SecurityCheckResult |
| 30 | */ |
| 31 | public function checkIp(string $ip, ?string $apiKey, array $config = []): SecurityCheckResult; |
| 32 | |
| 33 | /** |
| 34 | * Inspects domain for reputation, blacklist status, or domain age. |
| 35 | * |
| 36 | * @param string $domain FQDN domain name. |
| 37 | * @param string|null $apiKey API authorization key. |
| 38 | * @param array<string, mixed> $config Custom parameters from config_parameters JSON. |
| 39 | * @return SecurityCheckResult |
| 40 | */ |
| 41 | public function checkDomain(string $domain, ?string $apiKey, array $config = []): SecurityCheckResult; |
| 42 | |
| 43 | /** |
| 44 | * Inspects link URL for malware, phishing, or social engineering threats. |
| 45 | * |
| 46 | * @param string $url Full HTTP/HTTPS URL. |
| 47 | * @param string|null $apiKey API authorization key. |
| 48 | * @param array<string, mixed> $config Custom parameters from config_parameters JSON. |
| 49 | * @return SecurityCheckResult |
| 50 | */ |
| 51 | public function checkUrl(string $url, ?string $apiKey, array $config = []): SecurityCheckResult; |
| 52 | } |